summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-07-25 17:55:44 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-07-25 17:55:56 (GMT)
commitc96cb57e8e660f24e4c677bf764aaebfcedd9ead (patch)
tree14ae437258c1faac476cfc5a188118a2a7abef7e
parent742c44f4c501d7908e16c1c8e183550c383582f3 (diff)
parentc172eecea64154bdc3de4aa64a31771268e8d1da (diff)
downloadCMake-c96cb57e8e660f24e4c677bf764aaebfcedd9ead.zip
CMake-c96cb57e8e660f24e4c677bf764aaebfcedd9ead.tar.gz
CMake-c96cb57e8e660f24e4c677bf764aaebfcedd9ead.tar.bz2
Merge topic 'property-typo-fix'
c172eecea6 cmTarget: Restore Fortran_PREPROCESS property initialization Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8654
-rw-r--r--Source/cmTarget.cxx2
-rw-r--r--Tests/FortranOnly/CMakeLists.txt4
2 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index b81eec5..1281bc6 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -420,7 +420,7 @@ TargetProperty const StaticTargetProperties[] = {
{ "Fortran_FORMAT"_s, IC::CanCompileSources },
{ "Fortran_MODULE_DIRECTORY"_s, IC::CanCompileSources },
{ "Fortran_COMPILER_LAUNCHER"_s, IC::CanCompileSources },
- { "Fortran_PREPRPOCESS"_s, IC::CanCompileSources },
+ { "Fortran_PREPROCESS"_s, IC::CanCompileSources },
{ "Fortran_VISIBILITY_PRESET"_s, IC::CanCompileSources },
// ---- HIP
COMMON_LANGUAGE_PROPERTIES(HIP),
diff --git a/Tests/FortranOnly/CMakeLists.txt b/Tests/FortranOnly/CMakeLists.txt
index b092c42..dfc28dd 100644
--- a/Tests/FortranOnly/CMakeLists.txt
+++ b/Tests/FortranOnly/CMakeLists.txt
@@ -169,8 +169,11 @@ endif()
# extensions like '.F' and '.fpp'.
if(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_OFF AND
NOT CMAKE_Fortran_COMPILER_ID MATCHES "(Flang|NAG|PGI|NVHPC|SunPro|XL)")
+
+ set(CMAKE_Fortran_PREPROCESS OFF)
add_library(no_preprocess_target STATIC no_preprocess_target_upper.F)
target_compile_options(no_preprocess_target PRIVATE -DINTEGER=nonsense)
+ unset(CMAKE_Fortran_PREPROCESS)
add_library(no_preprocess_source STATIC no_preprocess_source_upper.F)
target_compile_options(no_preprocess_source PRIVATE -DINTEGER=nonsense)
@@ -181,7 +184,6 @@ if(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_OFF AND
target_sources(no_preprocess_source PRIVATE no_preprocess_source_fpp.fpp)
endif()
- set_property(TARGET no_preprocess_target PROPERTY Fortran_PREPROCESS OFF)
set_property(SOURCE no_preprocess_source_upper.F no_preprocess_source_fpp.fpp PROPERTY Fortran_PREPROCESS OFF)
endif()