Просмотр исходного кода

XL: Set C++ and Fortran flags consistently with C

Since commit e1729238 (Add initial XL C compiler flags for safer builds,
2009-09-30) CMake sets the initial XL C flags to include "-qthreaded"
and "-qhalt=e".  Do the same for C++ and Fortran with this toolchain.
Brad King 15 лет назад
Родитель
Сommit
3a40c7faa4
2 измененных файлов с 8 добавлено и 0 удалено
  1. 4 0
      Modules/Compiler/XL-CXX.cmake
  2. 4 0
      Modules/Compiler/XL-Fortran.cmake

+ 4 - 0
Modules/Compiler/XL-CXX.cmake

@@ -1,5 +1,9 @@
 SET(CMAKE_CXX_VERBOSE_FLAG "-V")
 
+# -qthreaded     = Ensures that all optimizations will be thread-safe
+# -qhalt=e       = Halt on error messages (rather than just severe errors)
+SET(CMAKE_CXX_FLAGS_INIT "-qthreaded -qhalt=e")
+
 SET(CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
 SET(CMAKE_CXX_FLAGS_RELEASE_INIT "-O -DNDEBUG")
 SET(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-O -DNDEBUG")

+ 4 - 0
Modules/Compiler/XL-Fortran.cmake

@@ -2,6 +2,10 @@ SET(CMAKE_Fortran_VERBOSE_FLAG "-V")
 
 SET(CMAKE_Fortran_DEFINE_FLAG "-WF,-D")
 
+# -qthreaded     = Ensures that all optimizations will be thread-safe
+# -qhalt=e       = Halt on error messages (rather than just severe errors)
+SET(CMAKE_Fortran_FLAGS_INIT "-qthreaded -qhalt=e")
+
 SET(CMAKE_Fortran_FLAGS_DEBUG_INIT "-g")
 SET(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O")
 SET(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-O")