Skip to content

Commit 52e4f1a

Browse files
Garfield96ahspw
authored andcommitted
build: Fix release builds with enabled FLB_DEBUG
Enabling FLB_RELEASE should enable compiler optimizations. However, if FLB_DEBUG was enabled at the same time, no optimization settings were applied. Now, FLB_RELEASE will always enable optimizations and includes debug information (CMAKE_BUILD_TYPE is RelWithDebInfo). Signed-off-by: Christian Norbert Menges <christian.norbert.menges@sap.com> Signed-off-by: ahspw <ahspvirtuallife@gmail.com>
1 parent 021614b commit 52e4f1a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,10 +438,10 @@ endif()
438438
# Enable Debug symbols if specified
439439
if(MSVC)
440440
set(CMAKE_BUILD_TYPE None) # Avoid flag conflicts (See CMakeList.txt:L18)
441-
elseif(FLB_DEBUG)
442-
set(CMAKE_BUILD_TYPE "Debug")
443441
elseif(FLB_RELEASE)
444442
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
443+
elseif(FLB_DEBUG)
444+
set(CMAKE_BUILD_TYPE "Debug")
445445
endif()
446446

447447
if(FLB_IPO STREQUAL "On" OR (FLB_IPO STREQUAL "ReleaseOnly" AND FLB_RELEASE))

0 commit comments

Comments
 (0)