summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorscivision <scivision@users.noreply.github.com>2023-10-12 17:49:15 (GMT)
committerBrad King <brad.king@kitware.com>2023-10-16 15:30:17 (GMT)
commit0f37000304fc2cbf3945a2a2be9f969be3eef62d (patch)
tree2e7f5b54ef0bbf1037f071b471cab7064c0d1615 /Help
parentdc0dbffb0ffbfa7713b2b96994c453a90a99e209 (diff)
downloadCMake-0f37000304fc2cbf3945a2a2be9f969be3eef62d.zip
CMake-0f37000304fc2cbf3945a2a2be9f969be3eef62d.tar.gz
CMake-0f37000304fc2cbf3945a2a2be9f969be3eef62d.tar.bz2
try_{compile,run}: add LINKER_LANGUAGE option
Fixes: #25326
Diffstat (limited to 'Help')
-rw-r--r--Help/command/try_compile.rst9
-rw-r--r--Help/command/try_run.rst1
-rw-r--r--Help/dev/try_compile-linker-language.rst6
3 files changed, 16 insertions, 0 deletions
diff --git a/Help/command/try_compile.rst b/Help/command/try_compile.rst
index 0255b4d..24d481b 100644
--- a/Help/command/try_compile.rst
+++ b/Help/command/try_compile.rst
@@ -77,6 +77,7 @@ Try Compiling Source Files
[COMPILE_DEFINITIONS <defs>...]
[LINK_OPTIONS <options>...]
[LINK_LIBRARIES <libs>...]
+ [LINKER_LANGUAGE <lang>]
[OUTPUT_VARIABLE <var>]
[COPY_FILE <fileName> [COPY_FILE_ERROR <var>]]
[<LANG>_STANDARD <std>]
@@ -184,6 +185,14 @@ The options for the above signatures are:
set the :prop_tgt:`STATIC_LIBRARY_OPTIONS` target property in the generated
project, depending on the :variable:`CMAKE_TRY_COMPILE_TARGET_TYPE` variable.
+``LINKER_LANGUAGE <lang>```
+ .. versionadded:: 3.29
+
+ Specify the :prop_tgt:`LINKER_LANGUAGE` target property of the generated
+ project. When using multiple source files with different languages, set
+ this to the language of the source file containing the program entry point,
+ e.g., ``main``.
+
``LOG_DESCRIPTION <text>``
.. versionadded:: 3.26
diff --git a/Help/command/try_run.rst b/Help/command/try_run.rst
index 1b5087d..c466a81 100644
--- a/Help/command/try_run.rst
+++ b/Help/command/try_run.rst
@@ -67,6 +67,7 @@ The signature above is recommended for clarity.
[COMPILE_DEFINITIONS <defs>...]
[LINK_OPTIONS <options>...]
[LINK_LIBRARIES <libs>...]
+ [LINKER_LANGUAGE <lang>]
[COMPILE_OUTPUT_VARIABLE <var>]
[COPY_FILE <fileName> [COPY_FILE_ERROR <var>]]
[<LANG>_STANDARD <std>]
diff --git a/Help/dev/try_compile-linker-language.rst b/Help/dev/try_compile-linker-language.rst
new file mode 100644
index 0000000..8482dee
--- /dev/null
+++ b/Help/dev/try_compile-linker-language.rst
@@ -0,0 +1,6 @@
+try_compile-linker-language
+---------------------------
+
+* The :command:`try_compile` and :command:`try_run` commands gained a
+ ``LINKER_LANGUAGE`` option to specify the :prop_tgt:`LINKER_LANGUAGE`
+ target property in the generated test project.