summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CheckCompilerFlag
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'backport-3.28-ci-xcode-15.3'Brad King2024-03-121-2/+2
|\
| * Tests: Update RunCMake.CheckCompilerFlag for Xcode 15.3Brad King2024-03-121-2/+2
| | | | | | | | | | | | Xcode passes a new `-use-frontend-parseable-output` flag to Swift that conflicts with our `-parseable-output` flag. Use a different flag for the test case.
* | Tests: Update Swift tests to use CMP0157 NEW behaviorEvan Wilde2023-11-171-0/+1
|/ | | | | Fixing failing tests caused by introduction of new policy + warning when the policy is not set.
* Tests: Fix RunCMake infrastructure for LCC and CMP0129Brad King2023-04-031-6/+0
| | | | | | | | | | Since commit 3958ed878f (LCC: Add policy CMP0129 regarding interpreting LCC as GNU, 2021-10-19, v3.23.0-rc1~508^2) we intended to enable policy `CMP0129` in RunCMake tests via `-DCMAKE_POLICY_DEFAULT_CMP0129=NEW`. Fix the condition activating that to check `CMAKE_C_COMPILER_ID` where it is always available. Remove now-unnecessary CMP0129 settings in RunCMake cases.
* CheckCompilerFlag: Revert 'Match the Clang "argument unused" output ...'Brad King2023-03-132-0/+18
| | | | | | | | | | | | | | Revert commit 5b45a3d0ce (CheckCompilerFlag: Match the Clang "argument unused" output for all languages, 2023-01-23, v3.26.0-rc1~38^2). It broke existing projects that were silently tolerating unrelated unused arguments in their checks for C and CXX. For example, using `CFLAGS=-nostdinc` or `CXXFLAGS=-nostdinc++` causes those flags to be used when driving the linker as well, and Clang warns they are unused in that case. Add a test case covering the now-restored behavior. Fixes: #24591
* CheckCompilerFlag: Add Swift SupportEvan Wilde2022-11-042-0/+25
| | | | | Plumb through Swift `check_compiler_flag` support. Add tests to check that valid flags work and invalid flags don't.
* Tests: Move TryCompile check module cases to RunCMake.Check*Brad King2022-10-063-0/+48
| | | | The latter already have similar checks for similar modules.
* Tests: Clarify RunCMake.Check* case namesBrad King2022-10-069-8/+8
| | | | | | Cases for `CheckSource{Compiles,Runs}` and `Check{Compiler,Linker}Flag` cover the modules with the language as a parameter, not the language-specific modules.
* Tests: Remove stray debugging flag from RunCMake.CheckCompilerFlag caseBrad King2022-10-051-1/+1
|
* CheckSourceCompiles: Avoid linker warning with -fembed-bitcodeCraig Scott2022-04-092-0/+22
| | | | | | | | | | | | | | | When the Apple linker sees -headerpad_max_install_names and bitcode is enabled with a flag like -fembed-bitcode, it issues a warning and ignores the -headerpad_max_install_names flag. This causes unrelated compiler and linker flag checks to fail for valid flags. In f745e0497e (CheckCompilerFlags: Catch linker warning about ignored flags, 2022-01-03), we started detecting linker warnings, which caused a regression for projects that were setting -fembed-bitcode in their CMAKE_CXX_FLAGS or similar. Prevent that regression by removing the -headerpad_max_install_names linker flag when we know it will warn and be ignored anyway. Fixes: #23390 Issue: #23408
* CheckCompilerFlag: Fix regression in locale environment preservationBrad King2022-04-072-0/+18
| | | | | | | Fix a typo from commit 660e0d80ae (internal/CheckCompilerFlag: rely on common configuration, 2022-01-12, v3.23.0-rc1~124^2~1) that caused locale environment variables to not be restored after they are set during the check.
* internal/CheckCompilerFlag: rely on common configurationMarc Chevrier2022-01-142-2/+2
| | | | | Extract configuration step from the CheckCompilerFlag command to enable to share it with future CheckLinkerFlag implementation
* LCC: Add policy CMP0129 regarding interpreting LCC as GNUmakise-homura2021-10-211-0/+4
| | | | | | | | | | Due to MCST LCC compiler identification is now changed to LCC, there should be a way for old projects to still identify it as GNU, as it was before. This commits adds the policy: CMP0129: Compiler id for MCST LCC compilers is now LCC, not GNU. This policy controls such a behavior. OLD behaivior is to treat LCC as GNU, NEW is to treat is as LCC.
* LCC: Add dedicated support for MCST LCC compilermakise-homura2021-10-153-4/+4
| | | | | | | | | | | | | | | | | | | | | 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.
* HIP: Add HIP to all the Check* modulesRobert Maynard2021-06-072-0/+17
|
* Check*: Tolerate variables set with names of languagesBrad King2020-11-256-0/+12
| | | | | | | | | | | | 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
* CUDA: Add Support to SourceCompiles|Runs and CheckCompilerFlagsRobert Maynard2020-10-082-0/+17
|
* Merge topic 'add_ispc_to_check_helpers'Brad King2020-10-072-0/+17
|\ | | | | | | | | | | | | e17e2c6a51 ISPC: CheckCompilerFlags and CheckSourceCompiles support ISPC Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5337
| * ISPC: CheckCompilerFlags and CheckSourceCompiles support ISPCRobert Maynard2020-10-062-0/+17
| |
* | CheckCompilerFlag: Update the regex used to detect invalid options for GCC 10Luthaf2020-10-061-0/+7
|/ | | | | | | | | The warning emmitted by GCC for invalid options have been updated to read "command-line option XXX is valid ..." instead of "command line option XXX is valid ...". Update the regex to make it valid with both the old and new warning message. Fixes: #21275
* CheckCompilerFlag: Add tests to verify module correctnessRobert Maynard2020-10-0613-0/+101