Skip to content

Commit

Permalink
Make cmake build usable with Visual Studio
Browse files Browse the repository at this point in the history
  • Loading branch information
slipher committed Jun 20, 2024
1 parent 889b0c3 commit 923dcb1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,15 @@ option(BUILD_SHARED_LIBCRN "Build shared libcrn" OFF)
option(BUILD_STATIC_LIBCRN "Build static libcrn" OFF)
option(BUILD_CRUNCH "Build crunch" ON)
option(BUILD_EXAMPLES "Build examples" OFF)
option(OPTIMIZE_RELEASE "Optimize release build" ON)
if (NOT MSVC)
option(OPTIMIZE_RELEASE "Optimize release build" ON)
endif()

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-unused-value -Wno-unused")
if (NOT MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-unused-value -Wno-unused")
endif()

if(OPTIMIZE_RELEASE)
# CMake already sets -O3 flag on release build
Expand Down

0 comments on commit 923dcb1

Please sign in to comment.