Skip to content

Commit b9b7995

Browse files
authoredSep 22, 2018
Added support to choose build mode in command line (#20)
It somehow didn't work with the command `cmake -DCMAKE_BUILD_TYPE=Release`.
1 parent 23d44a3 commit b9b7995

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎CMakeLists.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ set(CMAKE_CXX_STANDARD 14)
1717
set(CMAKE_EXE_LINKER_FLAGS "-static-libstdc++")
1818

1919
# Possible values are Debug, Release, RelWithDebInfo, MinSizeRel
20-
set(CMAKE_BUILD_TYPE "Debug")
20+
if(NOT CMAKE_BUILD_TYPE)
21+
set(CMAKE_BUILD_TYPE "Debug" FORCE)
22+
endif(NOT CMAKE_BUILD_TYPE)
2123

2224
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "_build")
2325
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "_build")

0 commit comments

Comments
 (0)