diff options
Diffstat (limited to 'support/misc/toolchainfile.cmake.in')
-rw-r--r-- | support/misc/toolchainfile.cmake.in | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/support/misc/toolchainfile.cmake.in b/support/misc/toolchainfile.cmake.in index 5cf381e96c..e550b8f5ed 100644 --- a/support/misc/toolchainfile.cmake.in +++ b/support/misc/toolchainfile.cmake.in @@ -29,3 +29,7 @@ set(ENV{PKG_CONFIG_SYSROOT_DIR} "${RELOCATED_HOST_DIR}/@@STAGING_SUBDIR@@") # This toolchain file can be used both inside and outside Buildroot. set(CMAKE_C_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_CC@@") set(CMAKE_CXX_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_CXX@@") +if(@@TOOLCHAIN_HAS_FORTRAN@@) + set(CMAKE_Fortran_FLAGS "@@TARGET_FCFLAGS@@ ${CMAKE_Fortran_FLAGS}" CACHE STRING "Buildroot FCFLAGS") + set(CMAKE_Fortran_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_FC@@") +endif() |