heavy doubts that this will work
This commit is contained in:
parent
110d95a970
commit
de9b984973
1 changed files with 6 additions and 1 deletions
|
@ -7,8 +7,13 @@ add_library(${PROJECT_NAME} SHARED ${SOURCE_FILES} ${CMAKE_JS_SRC})
|
||||||
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "" SUFFIX ".node")
|
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "" SUFFIX ".node")
|
||||||
target_link_libraries(${PROJECT_NAME} ${CMAKE_JS_LIB})
|
target_link_libraries(${PROJECT_NAME} ${CMAKE_JS_LIB})
|
||||||
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)
|
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)
|
||||||
set(CMAKE_CXX_FLAGS "-Wall -Werror=format-security -Wno-cast-function-type -fexceptions -D_GLIBCXX_ASSERTIONS -fstack-clash-protection -pedantic -D_GLIBCXX_USE_CXX11_ABI=1")
|
if(MSVC)
|
||||||
|
set(CMAKE_CXX_FLAGS "/Wall /Wno-cast-function-type /fexceptions /fstack-clash-protection /pedantic")
|
||||||
|
set(CMAKE_CXX_FLAGS_DEBUG "/Zi")
|
||||||
|
else()
|
||||||
|
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Werror=format-security -Wno-cast-function-type -fexceptions -D_GLIBCXX_ASSERTIONS -fstack-clash-protection -pedantic -D_GLIBCXX_USE_CXX11_ABI=1")
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "-g")
|
set(CMAKE_CXX_FLAGS_DEBUG "-g")
|
||||||
|
endif()
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
|
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
|
||||||
add_definitions(-DNAPI_VERSION=5)
|
add_definitions(-DNAPI_VERSION=5)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue