aboutsummaryrefslogtreecommitdiff
path: root/support/misc
diff options
context:
space:
mode:
authorGravatar Samuel Martin <s.martin49@gmail.com>2016-07-03 15:47:43 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-07-03 16:58:11 +0200
commit019ba1dc5283864405f966fbbf9ce799a06f7c27 (patch)
tree112e21989c8310e67cd60f8d9b58b911f6652d83 /support/misc
parentb0bff16b2ff4a77388d69a714311fbbec7ffaa79 (diff)
downloadbuildroot-019ba1dc5283864405f966fbbf9ce799a06f7c27.tar.gz
buildroot-019ba1dc5283864405f966fbbf9ce799a06f7c27.tar.bz2
pkg-cmake.mk: export the fortran compiler path in the CMake toolchain file
Since the fortran support is conditional, only enable it when needed. Signed-off-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com> Cc: Benjamin Kamath <bkamath@spaceflight.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'support/misc')
-rw-r--r--support/misc/toolchainfile.cmake.in4
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()