Only define YBCON_FLAGS in optimized builds

This commit is contained in:
Username404 2021-10-20 19:16:45 +02:00
parent 62204d480e
commit 36b0e39a92
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 4 additions and 1 deletions

View File

@ -79,7 +79,10 @@ elseif(${IS_CLANG})
endif()
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -flto=full -fwhole-program-vtables -fstrict-vtable-pointers")
endif()
add_definitions(-DYBCON_FLAGS="${CMAKE_CXX_FLAGS_RELEASE}" -DYBCON_COMPILER="${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
if (CMAKE_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}")
if (MINGW OR MSVC)
if (UNIX)