|
@@ -38,7 +38,7 @@ if(WIN32 AND NOT CYGWIN)
|
|
|
endif()
|
|
endif()
|
|
|
|
|
|
|
|
if(CMAKE_Fortran_COMPILER_ID STREQUAL "LFortran")
|
|
if(CMAKE_Fortran_COMPILER_ID STREQUAL "LFortran")
|
|
|
- add_compile_options(--implicit-interface)
|
|
|
|
|
|
|
+ add_compile_options("$<$<COMPILE_LANGUAGE:Fortran>:--implicit-interface>")
|
|
|
endif()
|
|
endif()
|
|
|
|
|
|
|
|
add_library(hello STATIC hello.f)
|
|
add_library(hello STATIC hello.f)
|
|
@@ -53,7 +53,7 @@ function(test_fortran_c_interface_module)
|
|
|
FortranCInterface_VERIFY()
|
|
FortranCInterface_VERIFY()
|
|
|
FortranCInterface_VERIFY(CXX)
|
|
FortranCInterface_VERIFY(CXX)
|
|
|
if(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
|
|
if(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
|
|
|
- if(NOT CMAKE_Fortran_COMPILER_ID MATCHES "SunPro|PathScale|Absoft|Fujitsu|LCC")
|
|
|
|
|
|
|
+ if(NOT CMAKE_Fortran_COMPILER_ID MATCHES "SunPro|PathScale|Absoft|Fujitsu|LCC|LFortran")
|
|
|
set(module_expected 1)
|
|
set(module_expected 1)
|
|
|
endif()
|
|
endif()
|
|
|
if(FortranCInterface_MODULE_FOUND OR module_expected)
|
|
if(FortranCInterface_MODULE_FOUND OR module_expected)
|
|
@@ -127,7 +127,7 @@ endfunction()
|
|
|
# if the id's match or the compilers are compatible, then
|
|
# if the id's match or the compilers are compatible, then
|
|
|
# call the test_fortran_c_interface_module function
|
|
# call the test_fortran_c_interface_module function
|
|
|
if("${CMAKE_Fortran_COMPILER_ID}:${CMAKE_C_COMPILER_ID}" MATCHES
|
|
if("${CMAKE_Fortran_COMPILER_ID}:${CMAKE_C_COMPILER_ID}" MATCHES
|
|
|
- "(Intel(LLVM)?:MSVC|Absoft:GNU|LLVMFlang:(GNU|Clang))"
|
|
|
|
|
|
|
+ "(Intel(LLVM)?:MSVC|Absoft:GNU|(LLVMFlang|LFortran):(GNU|Clang))"
|
|
|
OR ("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "${CMAKE_C_COMPILER_ID}" ))
|
|
OR ("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "${CMAKE_C_COMPILER_ID}" ))
|
|
|
test_fortran_c_interface_module()
|
|
test_fortran_c_interface_module()
|
|
|
else()
|
|
else()
|