summaryrefslogtreecommitdiff
path: root/Help/variable/CMAKE_TRY_COMPILE_TARGET_TYPE.rst
blob: b60539fb37582c233b45fbce75d0893f6a4477d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
CMAKE_TRY_COMPILE_TARGET_TYPE
-----------------------------

.. versionadded:: 3.6

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.