summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-09-19 14:25:16 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-09-19 14:25:26 (GMT)
commit620cf9efa78c8862558ac321c043194d1cb6eb19 (patch)
tree6888ffe4d16fc96bc882d1196f1b1ee0101396f3
parent71cfcbe816d419e8a240d30a64a57a372072b6a6 (diff)
parentd00d8537f6c52997f41535634c110116900e95c9 (diff)
downloadCMake-620cf9efa78c8862558ac321c043194d1cb6eb19.zip
CMake-620cf9efa78c8862558ac321c043194d1cb6eb19.tar.gz
CMake-620cf9efa78c8862558ac321c043194d1cb6eb19.tar.bz2
Merge topic 'use-new-project-try_compile'
d00d8537f6 Modules: Use new keyword-dispatched try_compile signature Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7690
-rw-r--r--Modules/CMakeDetermineCompilerABI.cmake5
-rw-r--r--Modules/CheckIPOSupported.cmake6
-rw-r--r--Modules/FindSDL_sound.cmake6
-rw-r--r--Modules/FortranCInterface.cmake8
-rw-r--r--Modules/FortranCInterface/Detect.cmake8
5 files changed, 17 insertions, 16 deletions
diff --git a/Modules/CMakeDetermineCompilerABI.cmake b/Modules/CMakeDetermineCompilerABI.cmake
index c148f8a..053effa 100644
--- a/Modules/CMakeDetermineCompilerABI.cmake
+++ b/Modules/CMakeDetermineCompilerABI.cmake
@@ -162,8 +162,9 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src)
message(CHECK_START "Determine Intel Fortran Compiler Implicit Link Path")
# Build a sample project which reports symbols.
try_compile(IFORT_LIB_PATH_COMPILED
- ${CMAKE_BINARY_DIR}/CMakeFiles/IntelVSImplicitPath
- ${CMAKE_ROOT}/Modules/IntelVSImplicitPath
+ PROJECT IntelFortranImplicit
+ SOURCE_DIR ${CMAKE_ROOT}/Modules/IntelVSImplicitPath
+ BINARY_DIR ${CMAKE_BINARY_DIR}/CMakeFiles/IntelVSImplicitPath
IntelFortranImplicit
CMAKE_FLAGS
"-DCMAKE_Fortran_FLAGS:STRING=${CMAKE_Fortran_FLAGS}"
diff --git a/Modules/CheckIPOSupported.cmake b/Modules/CheckIPOSupported.cmake
index 14262a1..9108e34 100644
--- a/Modules/CheckIPOSupported.cmake
+++ b/Modules/CheckIPOSupported.cmake
@@ -137,9 +137,9 @@ macro(_ipo_run_language_check language)
try_compile(
_IPO_LANGUAGE_CHECK_RESULT
- "${bindir}"
- "${srcdir}"
- "${TRY_COMPILE_PROJECT_NAME}"
+ PROJECT "${TRY_COMPILE_PROJECT_NAME}"
+ SOURCE_DIR "${srcdir}"
+ BINARY_DIR "${bindir}"
CMAKE_FLAGS
"-DCMAKE_VERBOSE_MAKEFILE=ON"
"-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON"
diff --git a/Modules/FindSDL_sound.cmake b/Modules/FindSDL_sound.cmake
index 6807522..d863e3c 100644
--- a/Modules/FindSDL_sound.cmake
+++ b/Modules/FindSDL_sound.cmake
@@ -185,9 +185,9 @@ if(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
try_compile(
MY_RESULT
- ${PROJECT_BINARY_DIR}/CMakeTmp
- ${PROJECT_BINARY_DIR}/CMakeTmp
- DetermineSoundLibs
+ PROJECT DetermineSoundLibs
+ SOURCE_DIR ${PROJECT_BINARY_DIR}/CMakeTmp
+ BINARY_DIR ${PROJECT_BINARY_DIR}/CMakeTmp
OUTPUT_VARIABLE MY_OUTPUT
)
diff --git a/Modules/FortranCInterface.cmake b/Modules/FortranCInterface.cmake
index 53df01a..af025af 100644
--- a/Modules/FortranCInterface.cmake
+++ b/Modules/FortranCInterface.cmake
@@ -361,10 +361,10 @@ function(FortranCInterface_VERIFY)
# Build a sample project which reports symbols.
set(CMAKE_TRY_COMPILE_CONFIGURATION Release)
try_compile(FortranCInterface_VERIFY_${lang}_COMPILED
- ${FortranCInterface_BINARY_DIR}/Verify${lang}
- ${FortranCInterface_SOURCE_DIR}/Verify
- VerifyFortranC # project name
- VerifyFortranC # target name
+ PROJECT VerifyFortranC
+ TARGET VerifyFortranC
+ SOURCE_DIR ${FortranCInterface_SOURCE_DIR}/Verify
+ BINARY_DIR ${FortranCInterface_BINARY_DIR}/Verify${lang}
CMAKE_FLAGS -DVERIFY_CXX=${verify_cxx}
-DCMAKE_VERBOSE_MAKEFILE=ON
"-DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}"
diff --git a/Modules/FortranCInterface/Detect.cmake b/Modules/FortranCInterface/Detect.cmake
index 567fc37..6401aed 100644
--- a/Modules/FortranCInterface/Detect.cmake
+++ b/Modules/FortranCInterface/Detect.cmake
@@ -47,10 +47,10 @@ unset(_FortranCInterface_CMP0056)
# Build a sample project which reports symbols.
set(CMAKE_TRY_COMPILE_CONFIGURATION Release)
try_compile(FortranCInterface_COMPILED
- ${FortranCInterface_BINARY_DIR}
- ${FortranCInterface_SOURCE_DIR}
- FortranCInterface # project name
- FortranCInterface # target name
+ PROJECT FortranCInterface
+ TARGET FortranCInterface
+ SOURCE_DIR ${FortranCInterface_SOURCE_DIR}
+ BINARY_DIR ${FortranCInterface_BINARY_DIR}
CMAKE_FLAGS
"-DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}"
"-DCMAKE_Fortran_FLAGS:STRING=${CMAKE_Fortran_FLAGS}"