summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-09-08 12:56:25 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-09-08 12:56:28 (GMT)
commitad484e24bffa24306c16079aebe0b7ffa9e2fdcd (patch)
treeae01bed48c95ffe4339a03c56920a36a92b952bf
parentf09e524a87acd99d8ae5f8d054fdf6b0728e2c94 (diff)
parente30f0f89afcfb748d464fbe84e0566a36f2bee87 (diff)
downloadCMake-ad484e24bffa24306c16079aebe0b7ffa9e2fdcd.zip
CMake-ad484e24bffa24306c16079aebe0b7ffa9e2fdcd.tar.gz
CMake-ad484e24bffa24306c16079aebe0b7ffa9e2fdcd.tar.bz2
Merge topic 'IntelLLVM-debug-flags'
e30f0f89af IntelLLVM: Suppress -Rdebug-disables-optimization on debug builds Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: LecrisUT <github@lecris.me> Merge-request: !8764
-rw-r--r--Modules/Compiler/IntelLLVM.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/Modules/Compiler/IntelLLVM.cmake b/Modules/Compiler/IntelLLVM.cmake
index e256c8f..f3c0bf4 100644
--- a/Modules/Compiler/IntelLLVM.cmake
+++ b/Modules/Compiler/IntelLLVM.cmake
@@ -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")