mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 13:20:47 -06:00
IntelLLVM: Suppress -Rdebug-disables-optimization on debug builds
IntelLLVM 2023.0.0 and above emit this remark if `-g` is used without any `-O<level>` flag, which is our default behavior. Add another flag to suppress the remark.
This commit is contained in:
@@ -44,6 +44,13 @@ else()
|
||||
|
||||
string(APPEND CMAKE_${lang}_FLAGS_INIT " ")
|
||||
string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g")
|
||||
if(CMAKE_${lang}_COMPILER_VERSION VERSION_GREATER_EQUAL 2023.0.0)
|
||||
if("x${lang}" STREQUAL "xFortran")
|
||||
string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -diag-disable:10440")
|
||||
else()
|
||||
string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -Rno-debug-disables-optimization")
|
||||
endif()
|
||||
endif()
|
||||
string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -Os")
|
||||
string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O3")
|
||||
string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -g")
|
||||
|
||||
Reference in New Issue
Block a user