From 89dc093e84897bd50174114adbd4e6f0e9a93984 Mon Sep 17 00:00:00 2001 From: baldurk Date: Wed, 28 Sep 2016 13:54:55 +0200 Subject: [PATCH] Define _RELEASE macro on Release CMake targets --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index d4a44e3a1..7dc119e2d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -92,6 +92,10 @@ if(ENABLE_VULKAN) add_definitions(-DRENDERDOC_SUPPORT_VULKAN) endif() +if(CMAKE_BUILD_TYPE STREQUAL "Release") + add_definitions(-D_RELEASE) +endif() + if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fstrict-aliasing") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")