cmake: CMAKE_BUILD_TYPE MATCHES -> STREQUAL
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
c9398a0bf4
commit
1517b150ed
|
@ -63,7 +63,7 @@ if(NOT CMAKE_CXX_FLAGS MATCHES "-Wall")
|
|||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
|
||||
endif(NOT CMAKE_CXX_FLAGS MATCHES "-Wall")
|
||||
|
||||
if(CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
|
||||
if(TIDY)
|
||||
message(STATUS "TIDY=ON, running clang-tidy")
|
||||
|
@ -157,9 +157,9 @@ if(CMAKE_BUILD_TYPE MATCHES "Debug")
|
|||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wpedantic")
|
||||
endif(NOT CMAKE_CXX_FLAGS MATCHES "-Wpedantic")
|
||||
|
||||
endif(CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||
endif()
|
||||
|
||||
if(CMAKE_BUILD_TYPE MATCHES "Release")
|
||||
if(CMAKE_BUILD_TYPE STREQUAL Release)
|
||||
|
||||
# Optimize yet more.
|
||||
if(NOT CMAKE_CXX_FLAGS MATCHES "-O3")
|
||||
|
@ -197,7 +197,7 @@ if(CMAKE_BUILD_TYPE MATCHES "Release")
|
|||
if(NOT CMAKE_CXX_FLAGS MATCHES "-Wp,-D_FORTIFY_SOURCE=2")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wp,-D_FORTIFY_SOURCE=2")
|
||||
endif(NOT CMAKE_CXX_FLAGS MATCHES "-Wp,-D_FORTIFY_SOURCE=2")
|
||||
endif(CMAKE_BUILD_TYPE MATCHES "Release")
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsplit-stack")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat=2 -Wformat-security")
|
||||
|
@ -210,9 +210,9 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIE")
|
|||
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcf-protection")
|
||||
add_compile_options (-fdiagnostics-show-location=once)
|
||||
|
||||
if(CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
set(LDFLAGS "${LDFLAGS} -Wl,-Og,โsort-common,โas-needed,-z,now,-pic,-pie")
|
||||
elseif(CMAKE_BUILD_TYPE MATCHES "Release")
|
||||
elseif(CMAKE_BUILD_TYPE STREQUAL Release)
|
||||
set(LDFLAGS "${LDFLAGS} -Wl,-O1,โsort-common,โas-needed,-z,relro,-z,now,-pic,-pie,-flto")
|
||||
endif()
|
||||
|
||||
|
@ -268,7 +268,7 @@ add_executable(fortuna ${FORTUNA_SOURCES} ${FORTUNA_HEADERS})
|
|||
target_include_directories(fortuna PRIVATE . PUBLIC SYSTEM lib/fmt/include lib/fmtlog)
|
||||
target_compile_features(fortuna PUBLIC cxx_std_20)
|
||||
|
||||
if(CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
message(STATUS "Looking for iwyu...")
|
||||
find_program(iwyu NAMES include-what-you-use iwyu)
|
||||
if(iwyu)
|
||||
|
|
Reference in New Issue