diff options
author | Samuel Martin <s.martin49@gmail.com> | 2014-06-01 11:24:23 +0200 |
---|---|---|
committer | Peter Korsgaard <peter@korsgaard.com> | 2014-06-01 22:11:38 +0200 |
commit | 85fea5d9538e8ea1d1f83c7aa517ffebff7a4f1f (patch) | |
tree | 40320b97fbda68ea4b4a598648ce6d600cc91931 /support/misc | |
parent | 3d997bf7bc5acc89b2de60efe69fbcb7c66a2a11 (diff) | |
download | buildroot-85fea5d9538e8ea1d1f83c7aa517ffebff7a4f1f.tar.gz buildroot-85fea5d9538e8ea1d1f83c7aa517ffebff7a4f1f.zip |
pkg-cmake.mk: refactor the toolchainfile.cmake generation
This patch introduces a toolchainfile.cmake.in template which is filled
by Buildroot.
Using a toolchainfile.cmake.in template file allows to avoid overloading
quoting and/or escaping and it becomes much more similar to the
resulting file.
This patch also cleans up the quoting style.
[Peter: drop stdin redirect as suggested by Thomas]
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Cc: Baruch Siach <baruch@tkos.co.il>
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'support/misc')
-rw-r--r-- | support/misc/toolchainfile.cmake.in | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/support/misc/toolchainfile.cmake.in b/support/misc/toolchainfile.cmake.in new file mode 100644 index 0000000000..e8cc378be8 --- /dev/null +++ b/support/misc/toolchainfile.cmake.in @@ -0,0 +1,20 @@ +# +# Automatically generated file; DO NOT EDIT. +# CMake toolchain file for Buildroot +# + +set(CMAKE_SYSTEM_NAME Linux) + +set(CMAKE_C_FLAGS "@@TARGET_CFLAGS@@ ${CMAKE_C_FLAGS}" CACHE STRING "Buildroot CFLAGS" FORCE) +set(CMAKE_CXX_FLAGS "@@TARGET_CXXFLAGS@@ ${CMAKE_CXX_FLAGS}" CACHE STRING "Buildroot CXXFLAGS" FORCE) +set(CMAKE_INSTALL_SO_NO_EXE 0) + +set(CMAKE_PROGRAM_PATH "@@HOST_DIR@@/usr/bin") +set(CMAKE_FIND_ROOT_PATH "@@STAGING_DIR@@") +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +set(ENV{PKG_CONFIG_SYSROOT_DIR} "@@STAGING_DIR@@") + +set(CMAKE_C_COMPILER "@@TARGET_CC_NOCCACHE@@") +set(CMAKE_CXX_COMPILER "@@TARGET_CXX_NOCCACHE@@") |