1 | set(CMAKE_CXX_STANDARD 14)
|
2 | set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
3 |
|
4 | add_library(jsi
|
5 | jsi.cpp)
|
6 |
|
7 | include_directories(..)
|
8 |
|
9 |
|
10 | set(jsi_compile_flags "")
|
11 | if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" OR
|
12 | "${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
|
13 | list(APPEND jsi_compile_flags "-Wno-non-virtual-dtor")
|
14 | elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC")
|
15 | # Turn on Error Handling in MSVC, otherwise objects are not destructed
|
16 | # when they go out of scope due to exceptions.
|
17 | list(APPEND jsi_compile_flags "/EHsc")
|
18 | endif()
|
19 | target_compile_options(jsi PUBLIC ${jsi_compile_flags})
|