summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/project
Commit message (Collapse)AuthorAgeFilesLines
* CMAKE_PROJECT_INCLUDE: Allow to run module filesCristian Le2023-10-184-0/+49
| | | | Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
* CMAKE_PROJECT_INCLUDE: Add support for including multiple filesCristian Le2023-10-1820-22/+72
| | | | | Fixes: #25341 Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
* Deprecate compatibility with CMake versions older than 3.5Brad King2023-02-112-2/+15
| | | | | | | | Issue a deprecation warning on calls to `cmake_minimum_required` or `cmake_policy` that set policies based on versions older than 3.5. Note that the effective policy version includes `...<max>` treatment. Update the check from commit 5845c218d7 (Deprecate compatibility with CMake versions older than 2.8.12, 2020-06-12, v3.19.0-rc1~629^2).
* Tests/RunCMake: Update cmake_minimum_required versionsBrad King2023-02-111-1/+5
| | | | | | | | 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`.
* project: Warn at top-level if `cmake_minimum_required` wasn't calledfriendlyanon2022-11-114-1/+10
| | | | | | | The top-level project() call will now issue an AUTHOR_WARNING if it wasn't called after cmake_minimum_required(). Fixes: #24071
* RunCMake/project: Ignore exact line number in stderr checksfriendlyanon2022-11-117-7/+7
|
* cmMakefile: Dedupe languages when enabling themfriendlyanon2022-06-303-0/+26
| | | | | | | | cmMakefile::EnableLanguage() now deduplicates the languages argument and emits an author warning listing the languages that were defined multiple times in a single call. Fixes: #23596
* project(): Add new CMAKE_PROJECT_TOP_LEVEL_INCLUDES file injection pointCraig Scott2022-05-1312-0/+39
| | | Fixes: #22685
* Provide guidance when trying to use non-enabled languageRobert Maynard2022-05-044-0/+11
| | | | Fixes #23463
* Add deprecation warnings for policies CMP0097 and belowBrad King2022-02-032-0/+20
| | | | | | | The OLD behaviors of all policies are deprecated, but only by documentation. Add an explicit deprecation diagnostic for policies introduced in CMake 3.16 and below to encourage projects to port away from setting policies to OLD.
* project: Define variables indicating whether project is top levelfriendlyanon2021-03-268-0/+50
| | | | | | | | | Define `PROJECT_IS_TOP_LEVEL` and `<PROJECT-NAME>_IS_TOP_LEVEL`. The latter is a STATIC cache entry just like other `<PROJECT-NAME>_*` variables so that it is globally scoped. Issue: #20310 Fixes: #21961
* Tests/RunCMake: Update cmake_minimum_required versionsBrad King2020-06-181-1/+1
| | | | Use 3.3 or 2.8.12 where possible.
* project: Fix potential buffer write-past-end for version componentsCraig Scott2019-10-262-0/+33
| | | | This fixes two errors: not accounting for the trailing null and a misunderstanding of what std::numeric_limits::digits10 means.
* project: Keep leading `0` in PROJECT_VERSION componentsAlex Turbov2019-07-168-0/+95
| | | | | | | | | Introduce CMake policy `CMP0096` to make `project()` keep leading zeros in version components. As a side effect, it now allows really long version numbers. Fixes: #19421 Co-Author: Brad King <brad.king@kitware.com>
* Tests: Factor out RunCMake.project helper macro into moduleBrad King2019-07-152-6/+7
|
* project(): Add tests verifying variables set by second project() callCraig Scott2018-10-072-0/+27
|
* project: Add HOMEPAGE_URL named parameterAlex Turbov2018-03-169-2/+36
| | | | | | | | | This sets variables like PROJECT_HOMEPAGE_URL, which can be used as default values for various things (packaging modules, doxygen defaults, etc.). Some packaging modules have been updated to do this as part of this commit. Co-Author: Craig Scott <craig.scott@crascit.com>
* Tests: Avoid enabling languages unnecessarily in RunCMake.projectBrad King2018-03-151-1/+1
|
* project: warn on metadata arguments missing valuesAlex Turbov2018-03-079-1/+17
| | | | Warn if `DESCRIPTION` or `VERSION` is given without a following value.
* Various typo fixesLuz Paz2018-01-031-1/+1
| | | | Some are user-facing. Others are source comments.
* Add deprecation warnings for policies CMP0054 and belowBrad King2017-11-011-0/+10
| | | | | | The OLD behaviors of all policies are deprecated, but only by documentation. Add an explicit deprecation diagnostic for some policies to encourage projects to port away from setting policies to OLD.
* project: Add `DESCRIPTION` parameterAlex Turbov2017-04-116-0/+13
| | | | | | | | | | | | | | | | | It is quite often the project description has used in a real world software. Examples include: * part of a help screen of the application * builtin resources (`*.rc` files, data for "About" dialog of a GUI app, & etc) * most generators for CPack can use it * it could be used by documentary software (Doxygen, Sphinx) which is usually integrated to CMake based projects via `add_custom_target()` Now `project()` call learned an optional `DESCRIPTION` parameter with a short string describing a project. Being specified, it would set the `PROJECT_DESCRIPTION` variable which could be used in `configure_file()` or whatever user wants. Also `PROJECT_DESCRIPTION` is a default value for `CPACK_PACKAGE_DESCRIPTION_SUMMARY`.
* project: Fix support for explicit RC languageBrad King2016-09-282-0/+4
| | | | | | | | | | | | | | | The check added in commit v3.6.0-rc1~293^2 (Diagnose recursive project/enable_language without crashing, 2016-03-07) broke support for enabling `RC` explicitly along with other languages like `C`. The reason is that we enable all listed languages at once so the internal `enable_language(RC)` that we do while enabling `C` or `CXX` on some platforms triggers the recursion check if `RC` is explicitly listed. Ideally we should refactor things to only enable one language at a time, but for now it is simplest to just exclude `RC` from the explicit list until other languages are enabled, and then enable it. Closes: #16330
* RunCMake: Remove unneeded files.Stephen Kelly2015-02-091-1/+0
| | | | | The default expectation of RunCMake tests is empty content, so there is no need to specify it.
* project: Manage VERSION variablesBrad King2014-01-2926-0/+138
| | | | | | | | | | | | | | | | Teach the project() command to set variables {PROJECT,<PROJECT-NAME>}_VERSION{,_MAJOR,_MINOR,_PATCH,_TWEAK} holding the project version number and its components. Add project() command option "VERSION" to specify the version explicitly, and default to the empty string when it is not given. Since this clears variables when no VERSION is given, this may change behavior for existing projects that set the version variables themselves prior to calling project(). Add policy CMP0048 for compatibility. Suggested-by: Alex Neundorf <neundorf@kde.org>
* project: Add optional LANGUAGES keywordBrad King2014-01-2911-0/+28
Teach the project() command to recognize an optional "LANGUAGES" keyword after the project name and prior to the list of languages. Do not allow multiple copies of the keyword. If the keyword is specified and no languages are listed, imply NONE.