Skip to content

Commit d2c55d0

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 <[email protected]> Signed-off-by: ahspw <[email protected]>
1 parent e7bc87a commit d2c55d0

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)