Skip to content

Commit

Permalink
Updated CMakeLists
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Hofmann committed Sep 24, 2019
1 parent aca4bf1 commit 7f3955a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ if (UNIX AND APPLE)
set(LIBS "${LIBS}" "-framework OpenGL")
elseif (WIN32)
message(STATUS "Windows build")
set(CMAKE_CXX_FLAGS "/W2")
elseif (UNIX AND NOT APPLE)
message(STATUS "Linux build")
set(LIBS "${LIBS}" "-lpng")
Expand All @@ -33,14 +34,14 @@ elseif (UNIX AND NOT APPLE)
set(LIBS "${LIBS}" "-lXtst")
endif()

set(CMAKE_C_FLAGS "-Wall -Wparentheses -Winline -Wbad-function-cast -Wdisabled-optimization")
set(CMAKE_C_FLAGS_RELEASE "-O3")
set(CMAKE_CXX_FLAGS "-Wall -Wparentheses -Winline -Wbad-function-cast -Wdisabled-optimization")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
if (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
message(STATUS "No MSVC compiler in use, adding compile flags -Wextra")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra")
endif()

# add_compile_definitions(NAPI_CPP_EXCEPTIONS)
add_compile_definitions(NAPI_CPP_EXCEPTIONS)

# cmake-js
set(INCLUDES ${INCLUDES} ${CMAKE_JS_INC})
Expand Down

0 comments on commit 7f3955a

Please sign in to comment.