Skip to content

Commit a43f134

Browse files
build: If IPO is set to "auto" turn it off when building in debug mode
Turning IPO on when debugging avoids the debugger from identifying some of the source code.
1 parent fb0b2c8 commit a43f134

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ if (VTR_IPO_BUILD STREQUAL "on")
8787
message(ERROR "Building with IPO unsupported with this compiler!")
8888
endif()
8989
elseif(VTR_IPO_BUILD STREQUAL "auto")
90-
if (IPO_SUPPORTED)
90+
if (IPO_SUPPORTED AND NOT CMAKE_BUILD_TYPE STREQUAL "debug")
9191
message(STATUS "Building with IPO: on (auto)")
9292
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
9393
else()

0 commit comments

Comments
 (0)