[PATCH] D98374: [test-suite] SPEC2017 CPU CAM4 portability updates.

Nichols A. Romero via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 12 20:43:40 PST 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rT01f5ea4052f0: [test-suite] SPEC2017 CPU CAM4 portability updates. (authored by naromero77).

Repository:
  rT test-suite

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98374/new/

https://reviews.llvm.org/D98374

Files:
  External/SPEC/CFP2017rate/527.cam4_r/CMakeLists.txt
  cmake/modules/Fortran.cmake


Index: cmake/modules/Fortran.cmake
===================================================================
--- cmake/modules/Fortran.cmake
+++ cmake/modules/Fortran.cmake
@@ -27,3 +27,7 @@
       "Please use use Ninja 1.10 or later by adding -G \"Ninja\" to cmake invocation.\n")
   endif()
 endfunction()
+
+# standard CMake Utility Modules specific to Fortran
+# https://cmake.org/cmake/help/latest/manual/cmake-modules.7.html
+include(CheckFortranCompilerFlag)
Index: External/SPEC/CFP2017rate/527.cam4_r/CMakeLists.txt
===================================================================
--- External/SPEC/CFP2017rate/527.cam4_r/CMakeLists.txt
+++ External/SPEC/CFP2017rate/527.cam4_r/CMakeLists.txt
@@ -91,8 +91,6 @@
   -DSPEC_CASE_FLAG
 )
 
-add_compile_options(-fallow-argument-mismatch)
-
 ## test ########################################################################
 
 speccpu2017_run_test(RUN_TYPE test)
@@ -572,6 +570,12 @@
   zeff.f90
   zenith.F90
 )
+
+check_fortran_compiler_flag("-fallow-argument-mismatch" SUPPORTS_FALLOW_ARGUMENT_MISMATCH)
+if (SUPPORTS_FALLOW_ARGUMENT_MISMATCH)
+  target_compile_options(${PROG} PRIVATE $<$<COMPILE_LANGUAGE:Fortran>:-fallow-argument-mismatch>)
+endif ()
+
 target_link_libraries(${PROG} PRIVATE netcdf)
 
 speccpu2017_prepare_rundir()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98374.330419.patch
Type: text/x-patch
Size: 1288 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210313/a07f7d49/attachment.bin>


More information about the llvm-commits mailing list