Skip to content

Commit 5f6bb17

Browse files
committed
change comp func
1 parent 9fda812 commit 5f6bb17

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cmake/CompilerWarnings.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
function(set_compiler_warnings target)
22
if (MSVC)
3-
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
3+
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
44
set(PROJECT_WARNINGS
55
-Wall
66
-Wextra
@@ -57,7 +57,7 @@ function(set_compiler_warnings target)
5757
/Zc:throwingNew
5858
/EHsc)
5959
endif()
60-
elseif (CMAKE_CXX_COMPILER_ID MATCHES "AppleClang")
60+
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
6161
set(PROJECT_WARNINGS
6262
-fstack-protector-strong
6363
-Wall
@@ -80,7 +80,7 @@ function(set_compiler_warnings target)
8080
-Wnon-virtual-dtor
8181
-Wold-style-cast
8282
)
83-
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
83+
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
8484
set(PROJECT_WARNINGS
8585
-U_FORTIFY_SOURCE
8686
-D_FORTIFY_SOURCE=3

cmake/LinkerFlags.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
function(set_linker_flags target)
22
if (MSVC)
33
set(PROJECT_LINK_OPTIONS /machine:x64 /guard:cf)
4-
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
4+
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
55
set(PROJECT_LINK_OPTIONS -Wl,--allow-shlib-undefined,--as-needed,-z,noexecstack,-z,relro,-z,now,-z,nodlopen)
66
endif()
77

0 commit comments

Comments
 (0)