summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh
diff options
context:
space:
mode:
authorCody P Schafer <dev@codyps.com>2017-05-01 15:29:39 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-26 13:16:40 +0100
commit034ee07ed9b2e88272a010dbbdb685c293c09375 (patch)
treeb59b23d069d83431d101c70fe3180ae644c46fdb /meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh
parent24bb79155b69c01d892ccf691fc130b1be8ff7a3 (diff)
downloadpoky-034ee07ed9b2e88272a010dbbdb685c293c09375.tar.gz
cmake: in SDK use OE env var to set default toolchain
Patch the location in cmake where the toolchain file is loaded to use the (new) OE_CMAKE_TOOLCHAIN_FILE variable to select a default toolchain if no toolchain has been specified. The cmake alias is removed. The alternatives: - shell alias fails when cmake is called indirectly (ex: a makefile managing several projects which calls cmake for some of them) because aliases are not inherited - wrapper script that unconditionally adds "-D..." breaks cmake's build tests and many other things as it causes cmake to believe it should be configuring things when it should not be. For example, `cmake -DCMAKE_TOOLCHAIN_FILE=... --build .` does not work (note that this also breaks people directly using `cmake --build .` with the current alias). (From OE-Core rev: da60be3768e7183794d63548166d107dbd0a4973) Signed-off-by: Cody P Schafer <dev@codyps.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh')
-rw-r--r--meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh b/meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh
index 0eb56b66fa..64b6cf3c6a 100644
--- a/meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh
+++ b/meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh
@@ -1 +1 @@
alias cmake="cmake -DCMAKE_TOOLCHAIN_FILE=$OECORE_NATIVE_SYSROOT/usr/share/cmake/OEToolchainConfig.cmake" export OE_CMAKE_TOOLCHAIN_FILE="$OECORE_NATIVE_SYSROOT/usr/share/cmake/OEToolchainConfig.cmake"