summaryrefslogtreecommitdiff
path: root/Modules/Internal/CheckSourceCompiles.cmake
Commit message (Collapse)AuthorAgeFilesLines
* Modules:Check*: refactor: use block(SCOPE_FOR POLICIES)scivision2023-03-081-2/+2
|
* Modules: Drop redundant check logging to CMakeOutput.log and CMakeError.logBrad King2023-01-181-8/+0
| | | | | | | | | | `try_compile` and `try_run` now automatically log checks using them to `CMakeConfigureLog.yaml`. Add `LOG_DESCRIPTION` arguments to some `try_compile` calls to replace the description previously written to the old logs. Issue: #23200
* CheckSourceCompiles: For Swift executable, name source 'main.swift'Evan Wilde2022-10-241-2/+6
| | | | | | | | | | | | | | | | Xcode uses its own heuristics to determine whether or not to accept top-level code in a source file while Ninja uses the swift driver heuristics. With the Swift driver, if the module contains a single file, that file will be parsed as a top-level code context. With Xcode, the single file will only be parsed as top-level code if the name of that file is 'main.swift'. To ensure more consistent behavior between the two generators, if we're building Swift and the try-compile target type is executable or undefined, we name the file `main.swift` to ensure that both will handle the single file as top-level code.
* CheckSourceCompiles: Add support for SwiftEvan Wilde2022-10-241-0/+3
| | | | | Plumb through swift `check_source_compiles` support. Add tests to check that valid swift sources compile and invalid sources don't.
* Modules: Use new SOURCES_FROM_* try_compile (1/2)Matthew Woehlke2022-09-271-3/+2
| | | | | | | | | | | Modify some modules that ship with CMake to use the new SOURCES_FROM_* arguments to try_compile / try_run as added by commits cb14ae2b87 (try_compile: Add SOURCE_FROM_{ARG,VAR}, 2022-09-21) and 611d801790 (try_compile: Add SOURCE_FROM_FILE, 2022-09-22). This covers users which previously either used an existing file (but sometimes needed to rename it), or which wrote out their source in entirety. It does NOT cover users that actually need configure_file functionality, as those will be more involved to update and will thus be tackled in part 2.
* Modules: Use new keyword-dispatched try_compile signatureMatthew Woehlke2022-09-141-2/+1
| | | | | | | | | | | Modify most of the modules that ship with CMake to use the new try_compile / try_run signatures added by commit aa9220d3a0 (try_compile: Add keyword-dispatched signature, 2022-09-02). This improves debugging by each invocation using its own directory so that the results of multiple invocations can be retained. This does not cover any invocations which provide an entire project, as that flavor of try_compile has not yet been updated.
* Check{Compiler,Linker}Flag: Add possibility to retrieve check outputsMarc Chevrier2022-01-191-1/+8
|
* HIP: Add HIP to all the Check* modulesRobert Maynard2021-06-071-0/+3
|
* Check*: Tolerate variables set with names of languagesBrad King2020-11-251-7/+7
| | | | | | | | | | | | Fix the language checks added by commit 90dead024c (CheckCompilerFlag: unified way to check compiler flags per language, 2020-09-25, v3.19.0-rc1~88^2), commit 10ae907de0 (CheckSoureCompiles: Add a unified way to check if a source compiles, 2020-09-14, v3.19.0-rc1~118^2~1), and commit 357e2ef429 (CheckSoureRuns: Add a unified way to check if a source runs, 2020-09-14, v3.19.0-rc1~118^2) to work when variables of the language names are set. Fixes: #21500
* Modules: Do not implicitly add new functions via old Check ModulesRobert Maynard2020-10-261-0/+127
The conversion of Check<Lang>CompilerFlag, SourceCompiles, and SourceRuns over to the new functions has the possibility of breaking projects that had functions with those existing names. To reduce the possibility of collisions we now have all the legacy code call functions that start with `cmake_`, and users will need to explicitly include the new modules to get the non-prefixed versions Fixes: #21359