diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-04-13 12:46:57 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-06-07 11:32:52 (GMT) |
commit | de4da665d3205afa239749c41513a315c3831f51 (patch) | |
tree | 02ab204c77efc1a89b620b38c118913c06c125f8 /Modules/Compiler | |
parent | bb879bcf2dd8a65eeb285ef67aa72c16aab01938 (diff) | |
download | CMake-de4da665d3205afa239749c41513a315c3831f51.zip CMake-de4da665d3205afa239749c41513a315c3831f51.tar.gz CMake-de4da665d3205afa239749c41513a315c3831f51.tar.bz2 |
Use --sysroot when cross compiling.
As CMAKE_ROOT_FIND_PATH can be a list, a new CMAKE_SYSROOT is
introduced, which is never a list.
The contents of this variable is passed to supporting compilers
as --sysroot. It is also accounted for when processing implicit
link directories reported by the compiler, and when generating
RPATH information.
Diffstat (limited to 'Modules/Compiler')
-rw-r--r-- | Modules/Compiler/GNU.cmake | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/Compiler/GNU.cmake b/Modules/Compiler/GNU.cmake index 504704d..e5e10c3 100644 --- a/Modules/Compiler/GNU.cmake +++ b/Modules/Compiler/GNU.cmake @@ -30,6 +30,7 @@ macro(__compiler_gnu lang) endif() set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-fPIC") set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-shared") + set(CMAKE_SYSROOT_FLAG "--sysroot=") # Older versions of gcc (< 4.5) contain a bug causing them to report a missing # header file as a warning if depfiles are enabled, causing check_header_file |