UNPKG

581 BPlain TextView Raw
1set(CMAKE_CXX_STANDARD 14)
2set(CMAKE_CXX_STANDARD_REQUIRED ON)
3
4add_library(jsi
5 jsi.cpp)
6
7include_directories(..)
8
9
10set(jsi_compile_flags "")
11if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" OR
12 "${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
13 list(APPEND jsi_compile_flags "-Wno-non-virtual-dtor")
14elseif ("${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")
18endif()
19target_compile_options(jsi PUBLIC ${jsi_compile_flags})