Add a UPPERCASE_BUILD_TYPE variable to make a condition case-insensitive

This commit is contained in:
Username404 2021-10-20 21:17:40 +02:00
parent 24dca593c5
commit 30ef4500f2
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 2 additions and 1 deletions

View File

@ -79,7 +79,8 @@ elseif(${IS_CLANG})
endif()
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -flto=full -fwhole-program-vtables -fstrict-vtable-pointers")
endif()
if (CMAKE_BUILD_TYPE STREQUAL "Release")
string(TOUPPER ${CMAKE_BUILD_TYPE} UPPERCASE_BUILD_TYPE)
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}")