Specify C++17 support in cmake a different way

This commit is contained in:
Essem 2021-12-31 20:55:53 -06:00
parent 1e1a24b003
commit c6249d96af
No known key found for this signature in database
GPG key ID: 7D497397CC3A2A8C

View file

@ -6,7 +6,7 @@ file(GLOB SOURCE_FILES "natives/*.cc" "natives/*.h")
add_library(${PROJECT_NAME} SHARED ${SOURCE_FILES} ${CMAKE_JS_SRC})
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "" SUFFIX ".node")
target_link_libraries(${PROJECT_NAME} ${CMAKE_JS_LIB})
set(CMAKE_CXX_STANDARD 17)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)
add_definitions(-DNAPI_CPP_EXCEPTIONS)
add_definitions(-DNAPI_VERSION=3)