File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -2,13 +2,15 @@ include(CheckIncludeFile)
22include (CheckSymbolExists)
33include (CheckIncludeFileCXX)
44
5- if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.24 AND CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" AND CMAKE_GENERATOR STREQUAL "Unix Makefiles" )
5+ if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" AND CMAKE_GENERATOR STREQUAL "Unix Makefiles" )
66 # otherwise failed to link since -lc++ is missing
77 set (linker_lang CXX)
8+ message (VERBOSE "Setting linker language to CXX for certain targets" )
89elseif (NOT CMAKE_GENERATOR MATCHES "Visual Studio" )
910 # IntelLLVM|NVHPC need Fortran.
1011 # For other compilers (except as above) don't need it set, but Fortran doesn't hurt.
1112 set (linker_lang Fortran)
13+ message (VERBOSE "Setting linker language to Fortran for certain targets" )
1214endif ()
1315
1416# --- abi check: C++ and Fortran compiler ABI compatibility
Original file line number Diff line number Diff line change @@ -26,6 +26,5 @@ add_test(NAME Fortran_C++_null COMMAND fortran_cxx_null)
2626# for Visual Studio generator object library
2727add_library (c_null OBJECT ${PROJECT_SOURCE_DIR} /src/pointer/null.c)
2828add_executable (fortran_c_null null_c.f90 $<TARGET_OBJECTS:c_null>)
29+ set_property (TARGET fortran_c_null PROPERTY LINKER_LANGUAGE Fortran)
2930add_test (NAME Fortran_C_null COMMAND fortran_c_null)
30-
31- set_property (TARGET fortran_c_null fortran_cxx_null PROPERTY LINKER_LANGUAGE Fortran)
You can’t perform that action at this time.
0 commit comments