Merge topic 'lfortran-generate-object-code' into release-3.31
daf6cc89ee
LFortran: Remove hard-coded --generate-object-code flag
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10159
This commit is contained in:
commit
3df8890638
@ -9,6 +9,6 @@ set(CMAKE_Fortran_LINKER_WRAPPER_FLAG "-Wl,")
|
||||
set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_ON "--cpp")
|
||||
set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_OFF "--no-cpp")
|
||||
set(CMAKE_Fortran_PREPROCESS_SOURCE "<CMAKE_Fortran_COMPILER> --cpp <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
|
||||
set(CMAKE_Fortran_COMPILE_OBJECT "<CMAKE_Fortran_COMPILER> --cpp-infer <DEFINES> <INCLUDES> <FLAGS> --generate-object-code -c <SOURCE> -o <OBJECT>")
|
||||
set(CMAKE_Fortran_COMPILE_OBJECT "<CMAKE_Fortran_COMPILER> --cpp-infer <DEFINES> <INCLUDES> <FLAGS> -c <SOURCE> -o <OBJECT>")
|
||||
set(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "--shared")
|
||||
set(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "-Wl,-export-dynamic")
|
||||
|
@ -101,7 +101,7 @@ target_link_libraries(symbols PUBLIC myfort)
|
||||
set_property(TARGET symbols PROPERTY POSITION_INDEPENDENT_CODE 1)
|
||||
|
||||
if(CMAKE_Fortran_COMPILER_ID STREQUAL "LFortran")
|
||||
add_compile_options(--implicit-interface)
|
||||
add_compile_options(--implicit-interface --generate-object-code)
|
||||
endif()
|
||||
|
||||
# Require symbols through Fortran.
|
||||
|
@ -4,6 +4,10 @@
|
||||
cmake_minimum_required(VERSION ${CMAKE_VERSION})
|
||||
project(VerifyFortranC C Fortran)
|
||||
|
||||
if(CMAKE_Fortran_COMPILER_ID STREQUAL "LFortran")
|
||||
add_compile_options("$<$<COMPILE_LANGUAGE:Fortran>:--generate-object-code>")
|
||||
endif()
|
||||
|
||||
option(VERIFY_CXX "Whether to verify C++ and Fortran" OFF)
|
||||
if(VERIFY_CXX)
|
||||
enable_language(CXX)
|
||||
|
@ -38,7 +38,7 @@ if(WIN32 AND NOT CYGWIN)
|
||||
endif()
|
||||
|
||||
if(CMAKE_Fortran_COMPILER_ID STREQUAL "LFortran")
|
||||
add_compile_options("$<$<COMPILE_LANGUAGE:Fortran>:--implicit-interface>")
|
||||
add_compile_options("$<$<COMPILE_LANGUAGE:Fortran>:--implicit-interface;--generate-object-code>")
|
||||
endif()
|
||||
|
||||
add_library(hello STATIC hello.f)
|
||||
|
@ -8,7 +8,7 @@ if("${CMAKE_Fortran_COMPILER_ID};${CMAKE_Fortran_SIMULATE_ID}" MATCHES "^Intel(L
|
||||
endif()
|
||||
|
||||
if(CMAKE_Fortran_COMPILER_ID STREQUAL "LFortran")
|
||||
add_compile_options(--implicit-interface)
|
||||
add_compile_options(--implicit-interface --generate-object-code)
|
||||
endif()
|
||||
|
||||
# create a library with hello and world functions
|
||||
|
@ -4,7 +4,7 @@ project(CheckIPOSupported-Fortran LANGUAGES Fortran)
|
||||
cmake_policy(SET CMP0069 NEW)
|
||||
|
||||
if(CMAKE_Fortran_COMPILER_ID STREQUAL "LFortran")
|
||||
add_compile_options(--implicit-interface)
|
||||
add_compile_options(--implicit-interface --generate-object-code)
|
||||
endif()
|
||||
|
||||
include(CheckIPOSupported)
|
||||
|
@ -26,7 +26,7 @@ target_link_libraries(sunq sunquad)
|
||||
endfunction()
|
||||
|
||||
if(CMAKE_Fortran_COMPILER_ID STREQUAL "LFortran")
|
||||
add_compile_options(--implicit-interface)
|
||||
add_compile_options(--implicit-interface --generate-object-code)
|
||||
endif()
|
||||
|
||||
# check for the fortran c interface mangling
|
||||
|
Loading…
Reference in New Issue
Block a user