diff options
author | Brad King <brad.king@kitware.com> | 2023-06-14 13:18:41 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-06-14 13:18:45 (GMT) |
commit | ed37038a1cd4e37516b91ad4babae68e6d57e7ab (patch) | |
tree | e434eea503f58c7847e966a71dc6bf5cae60fa01 /Source/cmake.cxx | |
parent | e06b2a526c0d0e8f671b32e28da02176df345ad3 (diff) | |
parent | 7005dea00589143e2d91d863a7d419385a0babf4 (diff) | |
download | CMake-ed37038a1cd4e37516b91ad4babae68e6d57e7ab.zip CMake-ed37038a1cd4e37516b91ad4babae68e6d57e7ab.tar.gz CMake-ed37038a1cd4e37516b91ad4babae68e6d57e7ab.tar.bz2 |
Merge topic 'cross-compiling-emulator-env-var'
7005dea005 CrossCompiling: Load CMAKE_CROSSCOMPILING_EMULATOR from environment
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8543
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 1fa6ba1..b8ebca5 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -2506,6 +2506,18 @@ int cmake::ActualConfigure() "Name of generator toolset.", cmStateEnums::INTERNAL); } + if (!this->State->GetInitializedCacheValue( + "CMAKE_CROSSCOMPILING_EMULATOR")) { + cm::optional<std::string> emulator = + cmSystemTools::GetEnvVar("CMAKE_CROSSCOMPILING_EMULATOR"); + if (emulator && !emulator->empty()) { + std::string message = + "Emulator to run executables and tests when cross compiling."; + this->AddCacheEntry("CMAKE_CROSSCOMPILING_EMULATOR", *emulator, message, + cmStateEnums::STRING); + } + } + // reset any system configuration information, except for when we are // InTryCompile. With TryCompile the system info is taken from the parent's // info to save time |