CMakeLists.txt: Use strings when doing STREQUAL comparisons, and compare variables instead of their content for IS_GNU and IS_CLANG
This commit is contained in:
parent
2104f6e804
commit
7b28ff50b8
|
@ -34,8 +34,8 @@ set(MINIMAL_GNU "11.0")
|
|||
set(MINIMAL_CLANG "14.0.1")
|
||||
set(MINIMAL_MSVC "19.30")
|
||||
option(IGNORE_MINIMAL_COMPILER_VERSION "Whether or not to ignore the minimal compiler versions")
|
||||
set(IS_GNU (${CMAKE_CXX_COMPILER_ID} STREQUAL GNU))
|
||||
set(IS_CLANG (${CMAKE_CXX_COMPILER_ID} STREQUAL Clang))
|
||||
set(IS_GNU (CMAKE_CXX_COMPILER_ID STREQUAL "GNU"))
|
||||
set(IS_CLANG (CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))
|
||||
|
||||
option(NO_CCACHE "Disables CCache")
|
||||
if (NOT NO_CCACHE)
|
||||
|
@ -111,7 +111,7 @@ elseif(MSVC)
|
|||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO")
|
||||
endif()
|
||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" UPPERCASE_BUILD_TYPE)
|
||||
if (UPPERCASE_BUILD_TYPE STREQUAL RELEASE)
|
||||
if (UPPERCASE_BUILD_TYPE STREQUAL "RELEASE")
|
||||
add_definitions(-DYBCON_FLAGS="${CMAKE_CXX_FLAGS_RELEASE}")
|
||||
endif()
|
||||
add_definitions(-DYBCON_COMPILER="${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
|
||||
|
@ -153,7 +153,7 @@ if (Threads_FOUND)
|
|||
endif()
|
||||
|
||||
option(NO_SELF_PACKER "Disables usage of a self-packer")
|
||||
if (NOT (CMAKE_BUILD_TYPE STREQUAL Debug OR CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo OR NO_SELF_PACKER OR DEFINED EMSCRIPTEN OR MINGW))
|
||||
if (NOT (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo" OR NO_SELF_PACKER OR DEFINED EMSCRIPTEN OR MINGW))
|
||||
include(FindSelfPackers)
|
||||
if (SELF_PACKER_FOR_EXECUTABLE MATCHES upx)
|
||||
set(SELF_PACKER_FOR_EXECUTABLE_FLAGS ${SELF_PACKER_FOR_EXECUTABLE_FLAGS} --ultra-brute --best)
|
||||
|
|
Loading…
Reference in New Issue