diff options
author | Brad King <brad.king@kitware.com> | 2016-02-26 15:31:28 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-02-26 15:31:28 (GMT) |
commit | 79d4b5bec911f057c87dd6c558cbe112afbc3a7e (patch) | |
tree | 57bc2105737882a65b89009eea8bc89fb81f9e15 /Help | |
parent | cc7a1b194152a171725ae9cb66c6de1e710b4ecb (diff) | |
parent | 7f1bd9fe6910f7633d98dec018cc01331a46b87e (diff) | |
download | CMake-79d4b5bec911f057c87dd6c558cbe112afbc3a7e.zip CMake-79d4b5bec911f057c87dd6c558cbe112afbc3a7e.tar.gz CMake-79d4b5bec911f057c87dd6c558cbe112afbc3a7e.tar.bz2 |
Merge topic 'try_compile-target-type'
7f1bd9fe try_compile: Add option to control type of target
Diffstat (limited to 'Help')
-rw-r--r-- | Help/command/try_compile.rst | 3 | ||||
-rw-r--r-- | Help/manual/cmake-variables.7.rst | 1 | ||||
-rw-r--r-- | Help/release/dev/try_compile-target-type.rst | 8 | ||||
-rw-r--r-- | Help/variable/CMAKE_TRY_COMPILE_TARGET_TYPE.rst | 15 |
4 files changed, 27 insertions, 0 deletions
diff --git a/Help/command/try_compile.rst b/Help/command/try_compile.rst index 28dae80..78b1bc7 100644 --- a/Help/command/try_compile.rst +++ b/Help/command/try_compile.rst @@ -112,3 +112,6 @@ The current setting of :policy:`CMP0065` is set in the generated project. Set the :variable:`CMAKE_TRY_COMPILE_CONFIGURATION` variable to choose a build configuration. + +Set the :variable:`CMAKE_TRY_COMPILE_TARGET_TYPE` variable to specify +the type of target used for the source file signature. diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index 15eaece..444a706 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -292,6 +292,7 @@ Variables that Control the Build /variable/CMAKE_STATIC_LINKER_FLAGS_CONFIG /variable/CMAKE_STATIC_LINKER_FLAGS /variable/CMAKE_TRY_COMPILE_CONFIGURATION + /variable/CMAKE_TRY_COMPILE_TARGET_TYPE /variable/CMAKE_USE_RELATIVE_PATHS /variable/CMAKE_VISIBILITY_INLINES_HIDDEN /variable/CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD diff --git a/Help/release/dev/try_compile-target-type.rst b/Help/release/dev/try_compile-target-type.rst new file mode 100644 index 0000000..cc41bf3 --- /dev/null +++ b/Help/release/dev/try_compile-target-type.rst @@ -0,0 +1,8 @@ +try_compile-target-type +----------------------- + +* The :command:`try_compile` command learned to check a new + :variable:`CMAKE_TRY_COMPILE_TARGET_TYPE` variable to optionally + build a static library instead of an executable. This is useful + for cross-compiling toolchains that cannot link binaries without + custom flags or scripts. diff --git a/Help/variable/CMAKE_TRY_COMPILE_TARGET_TYPE.rst b/Help/variable/CMAKE_TRY_COMPILE_TARGET_TYPE.rst new file mode 100644 index 0000000..5fa8dfc --- /dev/null +++ b/Help/variable/CMAKE_TRY_COMPILE_TARGET_TYPE.rst @@ -0,0 +1,15 @@ +CMAKE_TRY_COMPILE_TARGET_TYPE +----------------------------- + +Type of target generated for :command:`try_compile` calls using the +source file signature. Valid values are: + +``EXECUTABLE`` + Use :command:`add_executable` to name the source file in the + generated project. This is the default if no value is given. + +``STATIC_LIBRARY`` + Use :command:`add_library` with the ``STATIC`` option to name the + source file in the generated project. This avoids running the + linker and is intended for use with cross-compiling toolchains + that cannot link without custom flags or linker scripts. |