#
# Wolfgang Bangerth, Matthias Maier, Daniel Arndt, 2015, 2018
#
-IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
- ADD_FLAGS(CMAKE_REQUIRED_FLAGS "-Wno-unused-command-line-argument")
-ELSEIF(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
- ADD_FLAGS(CMAKE_REQUIRED_FLAGS "-diag-error warn")
-ENDIF()
-IF(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
- ADD_FLAGS(CMAKE_REQUIRED_FLAGS "/WX")
-ELSE()
+IF(NOT CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
+ IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ ADD_FLAGS(CMAKE_REQUIRED_FLAGS "-Wno-unused-command-line-argument")
+ ELSEIF(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
+ ADD_FLAGS(CMAKE_REQUIRED_FLAGS "-diag-error warn")
+ ENDIF()
ADD_FLAGS(CMAKE_REQUIRED_FLAGS "-Werror")
-ENDIF()
-ADD_FLAGS(CMAKE_REQUIRED_FLAGS "-fuse-ld=lld")
-CHECK_CXX_SOURCE_COMPILES(
- "
- int main() { return 0; }
- "
- DEAL_II_COMPILER_HAS_FUSE_LD_LLD)
-RESET_CMAKE_REQUIRED()
+ ADD_FLAGS(CMAKE_REQUIRED_FLAGS "-fuse-ld=lld")
+ CHECK_CXX_SOURCE_COMPILES(
+ "
+ int main() { return 0; }
+ "
+ DEAL_II_COMPILER_HAS_FUSE_LD_LLD)
+ RESET_CMAKE_REQUIRED()
-IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
- ADD_FLAGS(CMAKE_REQUIRED_FLAGS "-Wno-unused-command-line-argument")
-ELSEIF(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
- ADD_FLAGS(CMAKE_REQUIRED_FLAGS "-diag-error warn")
-ENDIF()
-IF(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
- ADD_FLAGS(CMAKE_REQUIRED_FLAGS "/WX")
-ELSE()
+ IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ ADD_FLAGS(CMAKE_REQUIRED_FLAGS "-Wno-unused-command-line-argument")
+ ELSEIF(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
+ ADD_FLAGS(CMAKE_REQUIRED_FLAGS "-diag-error warn")
+ ENDIF()
ADD_FLAGS(CMAKE_REQUIRED_FLAGS "-Werror")
-ENDIF()
-ADD_FLAGS(CMAKE_REQUIRED_FLAGS "-fuse-ld=gold")
-CHECK_CXX_SOURCE_COMPILES(
- "
- int main() { return 0; }
- "
- DEAL_II_COMPILER_HAS_FUSE_LD_GOLD)
-RESET_CMAKE_REQUIRED()
+ ADD_FLAGS(CMAKE_REQUIRED_FLAGS "-fuse-ld=gold")
+ CHECK_CXX_SOURCE_COMPILES(
+ "
+ int main() { return 0; }
+ "
+ DEAL_II_COMPILER_HAS_FUSE_LD_GOLD)
+ RESET_CMAKE_REQUIRED()
-IF(DEAL_II_COMPILER_HAS_FUSE_LD_LLD)
- ADD_FLAGS(DEAL_II_LINKER_FLAGS "-fuse-ld=lld")
-ELSEIF(DEAL_II_COMPILER_HAS_FUSE_LD_GOLD)
- ADD_FLAGS(DEAL_II_LINKER_FLAGS "-fuse-ld=gold")
+ IF(DEAL_II_COMPILER_HAS_FUSE_LD_LLD)
+ ADD_FLAGS(DEAL_II_LINKER_FLAGS "-fuse-ld=lld")
+ ELSEIF(DEAL_II_COMPILER_HAS_FUSE_LD_GOLD)
+ ADD_FLAGS(DEAL_II_LINKER_FLAGS "-fuse-ld=gold")
+ ENDIF()
ENDIF()
-