Commit 6cee4c6a authored by Marc Chevrier's avatar Marc Chevrier Committed by Brad King
Browse files

Restore support for cross-compiling CMake itself

In commit eb583b0a (cmake_path command: path management, 2020-07-23,
v3.19.0-rc1~216^2~1) we added a `try_run`.  In cross-compilation mode,
C++ features tests must avoid running tests if there is no emulator
defined.
parent 19ff734e
Pipeline #209641 passed with stage
in 0 seconds
......@@ -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()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment