diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2020-03-25 15:06:54 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-04-14 17:48:28 (GMT) |
commit | 8cc384f6299d60d705330f712031c2851498aa62 (patch) | |
tree | fe27164dc9a9fcac22c9ffd67a8e8396ddfa491a /Modules/Platform | |
parent | 37fa5122c2c1e2138b9e01191dc3cc1800f6ba40 (diff) | |
download | CMake-8cc384f6299d60d705330f712031c2851498aa62.zip CMake-8cc384f6299d60d705330f712031c2851498aa62.tar.gz CMake-8cc384f6299d60d705330f712031c2851498aa62.tar.bz2 |
Compilers: Add paths from -print-sysroot to system prefix path
Diffstat (limited to 'Modules/Platform')
-rw-r--r-- | Modules/Platform/UnixPaths.cmake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/Platform/UnixPaths.cmake b/Modules/Platform/UnixPaths.cmake index 97f744d..98c83aa 100644 --- a/Modules/Platform/UnixPaths.cmake +++ b/Modules/Platform/UnixPaths.cmake @@ -86,6 +86,10 @@ set(_CMAKE_CUDA_IMPLICIT_INCLUDE_DIRECTORIES_INIT unset(_cmake_sysroot_compile) +if(CMAKE_COMPILER_SYSROOT) + list(PREPEND CMAKE_SYSTEM_PREFIX_PATH "${CMAKE_COMPILER_SYSROOT}") +endif() + # Enable use of lib32 and lib64 search path variants by default. set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB32_PATHS TRUE) set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE) |