summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-01-19 14:06:46 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-01-19 14:06:53 (GMT)
commit180666f586769aa0942f4c65ac87835f5a6b26fd (patch)
tree73dde4ce4fc0f90f623605fde4543fa55afbf9cc /Source
parent2740cc458b858bf0dedec718b0f089694f87cbd4 (diff)
parent6cee4c6a8b83487af3144446ca156476a941c155 (diff)
downloadCMake-180666f586769aa0942f4c65ac87835f5a6b26fd.zip
CMake-180666f586769aa0942f4c65ac87835f5a6b26fd.tar.gz
CMake-180666f586769aa0942f4c65ac87835f5a6b26fd.tar.bz2
Merge topic 'CMake-cross-compiling'
6cee4c6a8b Restore support for cross-compiling CMake itself Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5713
Diffstat (limited to 'Source')
-rw-r--r--Source/Checks/cm_cxx_features.cmake8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/Checks/cm_cxx_features.cmake b/Source/Checks/cm_cxx_features.cmake
index 663d89a..7917d41 100644
--- a/Source/Checks/cm_cxx_features.cmake
+++ b/Source/Checks/cm_cxx_features.cmake
@@ -81,7 +81,13 @@ if(CMake_HAVE_CXX_MAKE_UNIQUE)
endif()
cm_check_cxx_feature(unique_ptr)
if (NOT CMAKE_CXX_STANDARD LESS "17")
- cm_check_cxx_feature(filesystem TRY_RUN)
+ if (NOT CMAKE_CROSSCOMPILING OR CMAKE_CROSSCOMPILING_EMULATOR)
+ cm_check_cxx_feature(filesystem TRY_RUN)
+ else()
+ # In cross-compiling mode, it is not possible to check implementation bugs
+ # so rely only on conformance done by compilation
+ cm_check_cxx_feature(filesystem)
+ endif()
else()
set(CMake_HAVE_CXX_FILESYSTEM FALSE)
endif()