summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/try_run
Commit message (Collapse)AuthorAgeFilesLines
* Tests: Fix RunCMake.try_run case on gfortran < 4.3Brad King2023-12-071-1/+1
| | | | | | Since commit 0f37000304 (try_{compile,run}: add LINKER_LANGUAGE option, 2023-10-12) the test has failed with gfortran < 4.3 because it does not support the Fortran syntax used by the test. Add a version check.
* Tests: Add inspection step to RunCMake.try_runBrad King2023-12-072-0/+33
|
* Tests: Remove unused code from RunCMake.try_runBrad King2023-12-071-4/+0
|
* Tests: Fix clang -Wstrict-prototypes warningsBrad King2023-10-263-3/+3
|
* try_{compile,run}: add LINKER_LANGUAGE optionscivision2023-10-164-0/+55
| | | | Fixes: #25326
* Tests: Remove redundant policy setting from RunCMake.try_{compile,run} casesBrad King2023-10-161-3/+0
| | | | | | Since commit 1edf138506 (Tests/RunCMake: Update cmake_minimum_required versions, 2023-02-06, v3.27.0-rc1~508^2~1) policy CMP0054 is automatically set to NEW in these tests.
* Tests/RunCMake: Update cmake_minimum_required versionsBrad King2023-02-111-1/+1
| | | | | | | | For policy-specific tests, use the version before the policy was introduced. Otherwise, use 3.5 where possible. Also, remove `cmake_minimum_required()` and `project()` calls from individual cases where they are handled by `CMakeLists.txt`.
* try_compile: Record propagated CMake variables in configure logBrad King2023-02-011-0/+15
| | | | | | | These provide more detailed information about how the test project was configured. Issue: #23200
* Tests: Match configure log try_compile directories more preciselyBrad King2023-01-241-10/+10
| | | | | Do not accept a double-quote in the `try_compile` work directory to ensure we do not match more than the field value.
* Modules: Record system inspection steps in the configure logBrad King2023-01-181-2/+16
| | | | | | | | Replace old-style `file(APPEND .../CMake{Output,Error}.log)` logging with calls to `message(CONFIGURE_LOG)` to record the steps in the `CMakeConfigureLog.yaml` configure log instead. Issue: #23200
* try_compile: Record stack of in-progess checks in configure logBrad King2023-01-163-0/+20
| | | | | | | | Many `try_compile` and `try_run` calls occur inside check modules between `message(CHECK_START)` and `message(CHECK_{PASS,FAIL})` pairs. Add a field to configure log entries to report this context. Issue: #23200
* try_compile: Add a NO_LOG option to skip recording in the configure logBrad King2023-01-161-0/+5
|
* try_compile: Add optional LOG_DESCRIPTION to record in configure logBrad King2023-01-162-0/+4
| | | | Issue: #23200
* Merge branch 'backport-try_run-cross-compile' into try_run-cross-compileBrad King2023-01-122-0/+10
|\
| * try_run: Avoid crash in keyword-dispatched signature when cross-compilingBrad King2023-01-122-0/+10
| | | | | | | | | | | | | | | | Since commit aa9220d3a0 (try_compile: Add keyword-dispatched signature, 2022-09-02, v3.25.0-rc1~178^2) the `DoNotRunExecutable` code path may be reached with no single source-file argument. Do not assume it exists. Fixes: #24295
* | ConfigureLog: Version individual events instead of the whole logBrad King2022-12-161-8/+5
| | | | | | | | | | | | | | | | In order to support multiple log versions without buffering the entire log, move versioning to the level of individual events. Multiple versions of an event may then be logged consecutively. Issue: #23200
* | ConfigureLog: Log try_compile and try_run checksMatthew Woehlke2022-12-165-0/+128
|/ | | | | | Add configure log events for `try_compile` and `try_run` results. Issue: #23200
* Tests: document try_{compile,run} old/new signature testingMatthew Woehlke2022-09-151-0/+9
| | | | | Add a brief documentation blurb to the try_compile and try_run test sets on writing tests for both "old" and "new" signatures.
* try_compile: Add keyword-dispatched signatureMatthew Woehlke2022-09-0514-27/+56
| | | | | | | | | | | | | | | | Introduce a new signature for try_compile (and try_run) which removes the `bindir` argument and requires the SOURCES tag. This will eventually allow us to add other ways of providing sources, but also allows us to change the behavior without breaking compatibility. The old signature uses a special, but non-unique temporary location inside the specified `bindir`, which conventionally is just the project's build directory. The new signature unconditionally uses the a unique temporary directory which is unconditionally within the project's build directory (which is no longer separately specified). This ensures that successive runs do not overwrite previous runs, will simplify debugging, and should also, eventually, allow us to execute multiple trials in parallel.
* cmCoreTryCompile: Port to cmArgumentParserBrad King2022-08-026-18/+30
|
* Tests: Add RunCMake.try_run cases for missing keyword argumentsBrad King2022-08-0123-13/+58
|
* try_compile: Fail earlier when bindir is not an absolute pathBrad King2022-07-267-0/+16
| | | | | If the bindir is not an absolute path, other errors occur later. Fail early with a clear error in this case.
* try_run: Add RUN_OUTPUT_STDOUT_VARIABLE and RUN_OUTPUT_STDERR_VARIABLE.Patrick Northon2022-07-087-0/+25
|
* LCC: Add dedicated support for MCST LCC compilermakise-homura2021-10-151-1/+1
| | | | | | | | | | | | | | | | | | | | | Divert LCC compiler as a new one, instead of treating it as GNU. Since old times, Elbrus C/C++/Fortran Compiler (LCC) by MCST has been passing checks for GNU compilers, so it has been identified as GNU. Now, with intent of seriously upstreaming its support, it has been added as a separate LCC compiler, and its version displays not a supported GCC version, but LCC version itself (e.g. LCC 1.25.19 instead of GNU 7.3.0). This commit adds its support for detection, and also converts basically every check like 'is this compiler GNU?' to 'is this compiler GNU or LCC?'. The only places where this check is untouched, is where it regards other platforms where LCC is unavailable (primarily non-Linux), and where it REALLY differs from GNU compiler. Note: this transition may break software that are already ported to Elbrus, but hardly relies that LCC will be detected as GNU; still such software is not known.
* try_run: Allow to set working directoryAsit Dhal2021-02-032-0/+11
| | | | Fixes: #17634
* Tests/RunCMake: Update cmake_minimum_required versionsBrad King2020-06-181-1/+1
| | | | Use 3.3 or 2.8.12 where possible.
* Tests: fix failures with gnu mode clang on windowsZsolt Parragi2019-05-241-1/+3
| | | | | | | | | Root causes were: * Using incorrect conditions (assuming MSVC-like command line mode) * Trying to compile the MSVC STL in C++11 mode, when parts of it require C++14 or enabling MS extensions in clang. * Missing flush in a testcase using stdout in a dll and a main part with static crt
* Tests: Teach tests when to treat clang-cl as MSVCZsolt Parragi2019-02-111-1/+1
| | | | | | | | | | | | | | | | | | | * Disable the system include unused variable test in ExportImport when clang is in MSVC compatible mode. * Disable CxxDialect testcase when clang is in MSVC compatible mode, as it doesn't support `typeof`. * Teach Module.WriteCompilerDetectionHeader to treat clang-cl as MSVC. * Disable the SystemIncludeDirectories testcase within IncludeDirectories when clang is in MSVC compatible mode. * Disable the CMakeOnly.CheckCXXCompilerFlag testcase when clang is in MSVC compatible mode. * Treat clang-cl as MSVC in LinkOptions.cmake in the try_run and try_compile testcases.
* try_compile/try_run: Add support for LINK_OPTIONS option.Marc Chevrier2018-12-014-0/+61
|
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-1/+4
| | | | | | | | | | | | | Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
* try_run: Add test for bad link libraries.Matt McCormick2015-01-266-0/+17
Based off the corresponding try_compile test.