Skip to content

Commit e50b691

Browse files
committed
improve CMakeLists.txt
1 parent 6cc30b5 commit e50b691

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ endif()
4141

4242
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
4343
# using Clang
44-
if (CMAKE_BUILD_TYPE MATCHES "^Release$")
44+
if (CMAKE_BUILD_TYPE STREQUAL "Release")
4545
set(CMAKE_C_FLAGS "-static -O3 -Wall -pedantic")
4646
set(CMAKE_CXX_FLAGS "-static -O3 -Wall -pedantic")
4747
else()
@@ -50,14 +50,14 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
5050
endif()
5151
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
5252
# using GCC
53-
if (CMAKE_BUILD_TYPE MATCHES "^Release$")
53+
if (CMAKE_BUILD_TYPE STREQUAL "Release")
5454
set(CMAKE_C_FLAGS "-s -static -O3 -Wall -pedantic")
5555
set(CMAKE_CXX_FLAGS "-s -static -O3 -Wall -pedantic")
5656
else()
5757
set(CMAKE_C_FLAGS "-static -g -Wall -pedantic")
5858
set(CMAKE_CXX_FLAGS "-static -g -Wall -pedantic")
5959
endif()
60-
elseif (MSVC AND (CMAKE_BUILD_TYPE MATCHES "^Release$"))
60+
elseif (MSVC AND (CMAKE_BUILD_TYPE STREQUAL "Release"))
6161
# replace "/MD" with "/MT" (building without runtime DLLs)
6262
set(CompilerFlags
6363
CMAKE_C_FLAGS

0 commit comments

Comments
 (0)