diff options
author | friendlyanon <friendlyanon_@hotmail.com> | 2021-03-24 19:59:14 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-03-26 13:35:34 (GMT) |
commit | 96a704010713833e9ec17fa78495df3e0852bbf5 (patch) | |
tree | 81dcf4a132a5461584c773a2ad34532f5977a3b0 /Tests/RunCMake/project/RunCMakeTest.cmake | |
parent | 3706e9c97cef2ad8097adfd4ed2f04ff08398787 (diff) | |
download | CMake-96a704010713833e9ec17fa78495df3e0852bbf5.zip CMake-96a704010713833e9ec17fa78495df3e0852bbf5.tar.gz CMake-96a704010713833e9ec17fa78495df3e0852bbf5.tar.bz2 |
project: Define variables indicating whether project is top level
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
Diffstat (limited to 'Tests/RunCMake/project/RunCMakeTest.cmake')
-rw-r--r-- | Tests/RunCMake/project/RunCMakeTest.cmake | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Tests/RunCMake/project/RunCMakeTest.cmake b/Tests/RunCMake/project/RunCMakeTest.cmake index 6914699..349e8ac 100644 --- a/Tests/RunCMake/project/RunCMakeTest.cmake +++ b/Tests/RunCMake/project/RunCMakeTest.cmake @@ -15,6 +15,9 @@ run_cmake(ProjectDescriptionNoArg2) run_cmake(ProjectHomepage) run_cmake(ProjectHomepage2) run_cmake(ProjectHomepageNoArg) +run_cmake(ProjectIsTopLevel) +run_cmake(ProjectIsTopLevelMultiple) +run_cmake(ProjectIsTopLevelSubdirectory) run_cmake(ProjectTwice) run_cmake(VersionAndLanguagesEmpty) run_cmake(VersionEmpty) |