summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Compiler/IntelLLVM.cmake7
-rw-r--r--Modules/FindPkgConfig.cmake14
2 files changed, 20 insertions, 1 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")
diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake
index 02f7fb4..4d29f45 100644
--- a/Modules/FindPkgConfig.cmake
+++ b/Modules/FindPkgConfig.cmake
@@ -425,13 +425,19 @@ macro(_pkg_set_path_internal)
unset(_pkgconfig_path)
endif()
- # Tell pkg-config not to strip any -L paths so we can search them all.
+ # Tell pkg-config not to strip any -I or -L paths so we can search them all.
if(DEFINED ENV{PKG_CONFIG_ALLOW_SYSTEM_LIBS})
set(_pkgconfig_allow_system_libs_old "$ENV{PKG_CONFIG_ALLOW_SYSTEM_LIBS}")
else()
unset(_pkgconfig_allow_system_libs_old)
endif()
set(ENV{PKG_CONFIG_ALLOW_SYSTEM_LIBS} 1)
+ if(DEFINED ENV{PKG_CONFIG_ALLOW_SYSTEM_CFLAGS})
+ set(_pkgconfig_allow_system_cflags_old "$ENV{PKG_CONFIG_ALLOW_SYSTEM_CFLAGS}")
+ else()
+ unset(_pkgconfig_allow_system_cflags_old)
+ endif()
+ set(ENV{PKG_CONFIG_ALLOW_SYSTEM_CFLAGS} 1)
endmacro()
macro(_pkg_restore_path_internal)
@@ -445,6 +451,12 @@ macro(_pkg_restore_path_internal)
else()
unset(ENV{PKG_CONFIG_ALLOW_SYSTEM_LIBS})
endif()
+ if(DEFINED _pkgconfig_allow_system_cflags_old)
+ set(ENV{PKG_CONFIG_ALLOW_SYSTEM_CFLAGS} "${_pkgconfig_allow_system_cflags_old}")
+ unset(_pkgconfig_allow_system_cflags_old)
+ else()
+ unset(ENV{PKG_CONFIG_ALLOW_SYSTEM_CFLAGS})
+ endif()
unset(_extra_paths)
unset(_pkgconfig_path_old)