summaryrefslogtreecommitdiffstats
path: root/Help/command/try_compile.rst
Commit message (Collapse)AuthorAgeFilesLines
* CUDA: Propagate CMAKE_CUDA_RUNTIME_LIBRARY state to try_compileRobert Maynard2020-05-201-0/+1
|
* ObjC: Document ObjC/ObjCXX standard properties / variablesCristian Adam2019-11-111-1/+10
| | | | Fixes: #19919
* MSVC: Add abstraction for runtime library selectionBrad King2019-04-171-0/+1
| | | | | | | | | | | | | | | | Replace our hard-coded defaults for `/MD` and `/MDd` with a first-class abstraction to select the runtime library from an enumeration of logical names. We've long hesitated to do this because the idea of "runtime library selection" touches on related concepts on several platforms. Avoid that scope creep by simply defining an abstraction that applies only when targeting the MSVC ABI on Windows. Removing the old default flags requires a policy because existing projects may rely on string processing to edit them and choose a runtime library under the old behavior. Add policy CMP0091 to provide compatibility. Fixes: #19108
* Help: Caveat for try_compile() and CMAKE_TRY_COMPILE_PLATFORM_VARIABLESCraig Scott2019-02-241-1/+3
|
* Help: Consistency in try_compile() docs for target typeCraig Scott2019-02-241-8/+14
|
* Help: try_compile() readability and grammar improvementsCraig Scott2019-02-241-6/+6
|
* Help: User-provided variable names for try_* commandsCraig Scott2019-02-241-5/+5
| | | | | All uppercase is typically used for command keywords. Non-keyword arguments should generally be shown as `<something>` according to the CMake documentation guide.
* GHS: try_compile() now uses GHS platform variablesFred Baksik2019-01-161-0/+3
| | | | | | | -- Forward GHS platform variables to try_compile() CMAKE_TRY_COMPILE_PLATFORM_VARIABLES only worked for source signature try_compile() -- Update tests to no longer add GHS platform variables to try_compile() -- Avoid linker error in GhsMulti/GhsMultiCompilerOptions/CMakeLists.txt by building library
* PIE link options: Update strategy to fix performance regressionMarc Chevrier2018-12-191-0/+5
| | | | Fixes: #18700
* try_compile/try_run: Add support for LINK_OPTIONS option.Marc Chevrier2018-12-011-1/+8
|
* CMP0083: fix warning message on try_compileMarc Chevrier2018-11-191-1/+2
| | | | Fixes: #18593
* Help: Apply syntax highlighting to project commandsJoachim Wuttke (o)2018-10-251-3/+5
| | | | | | * Replace most "::" by ".. code-block:: cmake" * Header sentence in imperative voice, detailed command description in present tense.
* try_compile: extend CMP0067 to honor language standards for CUDA.Robert Maynard2016-12-121-6/+10
|
* try_compile: Add policy CMP0067 to honor language standardsBrad King2016-12-061-0/+14
| | | | | | | | | | | | | | Projects use `try_compile` to check if they will be able to compile some particular source code. When a language standard variable like `CMAKE_CXX_STANDARD` is set, then the project intends to compile source code using a compiler mode for that standard. Therefore it makes sense for `try_compile` to use that standard in the test project too. Unfortunately this was not done when support for the `CMAKE_CXX_STANDARD` variable was first implemented. Add a policy to introduce the improved behavior in a compatible way. Closes: #16456
* try_compile: Add options to specify language standardsBrad King2016-12-061-1/+17
| | | | | | | | | Give `try_compile` callers a way to control the `CXX_STANDARD`, `CXX_STANDARD_REQUIRED`, and `CXX_EXTENSIONS` properties of the generated test target (or the `C` equivalents) in order to compile a test source for a particular language standard. Issue: #16456
* try_compile: Optionally forward custom platform variables to test projectBrad King2016-05-251-0/+4
| | | | | | | | | Add a `CMAKE_TRY_COMPILE_PLATFORM_VARIABLES` variable to specify a list of custom variables to be forwarded to a `try_compile` test project. This will be useful for platform information modules or toolchain files to forward some platform-specific set of variables from the host project (perhaps set in its cache) to the test project so that it can build the same way.
* try_compile: Add option to control type of targetBrad King2016-02-191-0/+3
| | | | | | | Create a `CMAKE_TRY_COMPILE_TARGET_TYPE` option to specify use of `add_library(... STATIC ...)` for the generated test project. This will be useful for cross-compiling toolchains that cannot link a binary without custom flags or scripts.
* try_compile: Propogate CMP0065 to the generated project.Chuck Atkins2015-09-211-0/+3
| | | | | | | Set policy CMP0065 to the value used in the calling project. Set the the value of CMAKE_ENABLE_EXPORTS if set in the calling project to initialize the target property appropriately.
* try_compile: Update documentation for other propagated variablesChuck Atkins2015-08-141-0/+4
|
* try_compile: Propogate the CMAKE_LINK_SEARCH_ variablesChuck Atkins2015-08-141-0/+7
|
* Help: Revise try_compile and try_run documentation (#15358)Brad King2015-02-041-49/+77
| | | | | | Rewrite the documentation using better reStructuredText markup constructs. Clarify interaction of options like LINK_LIBRARIES and CMAKE_FLAGS.
* Help: Clarify --debug-trycompile usage with try_compileAlan W. Irwin2014-09-031-3/+4
| | | | | | Explain that try_compile calls need to be protected with conditions to avoid running more than once so that it is easy to isolate a single try_compile to perform with --debug-trycompile.
* Convert builtin help to reStructuredText source filesKitware Robot2013-10-151-0/+71
Run the convert-help.bash script to convert documentation: ./convert-help.bash "/path/to/CMake-build/bin" Then remove it.