We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d97381 commit cf965b7Copy full SHA for cf965b7
CMakeLists.txt
@@ -51,11 +51,14 @@ project(OpenROAD VERSION 1
51
52
# LTO setting must come after project() for proper compiler detection
53
option(LINK_TIME_OPTIMIZATION "Flag to control link time optimization: on by default" ON)
54
-if (LINK_TIME_OPTIMIZATION)
+
55
+string(TOUPPER "${CMAKE_BUILD_TYPE}" UPPER_BUILD_TYPE)
56
57
+if (LINK_TIME_OPTIMIZATION AND NOT UPPER_BUILD_TYPE STREQUAL "DEBUG")
58
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
59
message(STATUS "LTO is enabled")
60
else()
- message(STATUS "LTO is disabled: ${LTO_ERROR}")
61
+ message(STATUS "LTO is disabled")
62
endif()
63
64
set(OPENROAD_HOME ${PROJECT_SOURCE_DIR})
0 commit comments