File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,15 +2,16 @@ include(CheckIncludeFile)
22include (CheckSymbolExists )
33include (CheckIncludeFileCXX )
44
5+ set (linker_lang)
56if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" AND CMAKE_GENERATOR STREQUAL "Unix Makefiles" )
67 # otherwise failed to link since -lc++ is missing
78 set (linker_lang CXX)
8- message (VERBOSE "Setting linker language to CXX for certain targets" )
9- elseif (NOT CMAKE_GENERATOR MATCHES "Visual Studio" )
10- # IntelLLVM|NVHPC need Fortran.
11- # For other compilers (except as above) don't need it set, but Fortran doesn't hurt.
9+ elseif (CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM|NVHPC" AND NOT CMAKE_GENERATOR MATCHES "Visual Studio" )
10+ # IntelLLVM|NVHPC need Fortran
1211 set (linker_lang Fortran)
13- message (VERBOSE "Setting linker language to Fortran for certain targets" )
12+ endif ()
13+ if (linker_lang)
14+ message (STATUS "Setting linker language to ${linker_lang} for certain targets" )
1415endif ()
1516
1617# --- abi check: C++ and Fortran compiler ABI compatibility
You can’t perform that action at this time.
0 commit comments