CrayClang : Linker language issue when mixing Fortran and C++
Hi,
I installed CMake 3.28 rc5 on a HPE Cray HPC environment to test the newly recognized CrayClang compiler.
The compiler identification works, but I have the following specificity:
add_executable(test_symba7 test_symba7.f90)
target_link_libraries(test_symba7 symba7seq fargoseqrt)
set_target_properties(test_symba7
PROPERTIES
INCLUDE_DIRECTORIES ${CMAKE_BINARY_DIR}/include/swift
)
if (CMAKE_CXX_COMPILER_ID STREQUAL "CrayClang")
message(INFO " Cray compiler needs to link some mix of Fortran and C++ with C++ linker.")
set_target_properties(test_symba7
PROPERTIES
LINKER_LANGUAGE CXX)
endif()
Where fargoseqrt
is a full C++ library and symba7seq
a mix of C++ and Fortran.
I don't know if this is expected or if the "correct" linker language should be automatically detected but I though I'd tried to let you know before the release.