summaryrefslogtreecommitdiffstats
path: root/Help/variable
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-04-13 12:46:57 (GMT)
committerBrad King <brad.king@kitware.com>2013-11-19 17:39:39 (GMT)
commit7cd65c97fabd9f3249739a81dd1260a1e0b59ee1 (patch)
tree27ba5ee0d30c9a59ed288806ca1ce40060dd4f0f /Help/variable
parent5096967ecd443f3d7477d823e7ffdffcc15a8ed1 (diff)
downloadCMake-7cd65c97fabd9f3249739a81dd1260a1e0b59ee1.zip
CMake-7cd65c97fabd9f3249739a81dd1260a1e0b59ee1.tar.gz
CMake-7cd65c97fabd9f3249739a81dd1260a1e0b59ee1.tar.bz2
Add CMAKE_SYSROOT variable to set --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 'Help/variable')
-rw-r--r--Help/variable/CMAKE_SYSROOT.rst12
1 files changed, 12 insertions, 0 deletions
diff --git a/Help/variable/CMAKE_SYSROOT.rst b/Help/variable/CMAKE_SYSROOT.rst
new file mode 100644
index 0000000..e42e63a
--- /dev/null
+++ b/Help/variable/CMAKE_SYSROOT.rst
@@ -0,0 +1,12 @@
+CMAKE_SYSROOT
+-------------
+
+Path to pass to the compiler in the ``--sysroot`` flag.
+
+The ``CMAKE_SYSROOT`` content is passed to the compiler in the ``--sysroot``
+flag, if supported. The path is also stripped from the RPATH/RUNPATH if
+necessary on installation. The ``CMAKE_SYSROOT`` is also used to prefix
+paths searched by the ``find_*`` commands.
+
+This variable may only be set in a toolchain file specified by
+the ``CMAKE_TOOLCHAIN_FILE`` variable.