| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
| |
Rewrite the documentation using better reStructuredText markup
constructs. Clarify interaction of options like LINK_LIBRARIES and
CMAKE_FLAGS.
|
|
|
|
|
|
| |
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.
|
|
Run the convert-help.bash script to convert documentation:
./convert-help.bash "/path/to/CMake-build/bin"
Then remove it.
|