diff options
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/project/ProjectTwice.cmake | 26 | ||||
-rw-r--r-- | Tests/RunCMake/project/RunCMakeTest.cmake | 1 |
2 files changed, 27 insertions, 0 deletions
diff --git a/Tests/RunCMake/project/ProjectTwice.cmake b/Tests/RunCMake/project/ProjectTwice.cmake new file mode 100644 index 0000000..d053834 --- /dev/null +++ b/Tests/RunCMake/project/ProjectTwice.cmake @@ -0,0 +1,26 @@ +cmake_policy(SET CMP0048 NEW) +project(ProjectTwiceTestFirst + VERSION 1.2.3.4 + DESCRIPTION "Test Project" + HOMEPAGE_URL "http://example.com" + LANGUAGES NONE +) + +project(ProjectTwiceTestSecond LANGUAGES NONE) + +foreach(var + PROJECT_VERSION + PROJECT_VERSION_MAJOR + PROJECT_VERSION_MINOR + PROJECT_VERSION_PATCH + PROJECT_VERSION_TWEAK + PROJECT_DESCRIPTION + PROJECT_HOMEPAGE_URL +) + if(${var}) + message(SEND_ERROR "${var} set but should be empty") + endif() + if(CMAKE_${var}) + message(SEND_ERROR "CMAKE_${var} set but should be empty") + endif() +endforeach() diff --git a/Tests/RunCMake/project/RunCMakeTest.cmake b/Tests/RunCMake/project/RunCMakeTest.cmake index e9fb929..3a8ad4b 100644 --- a/Tests/RunCMake/project/RunCMakeTest.cmake +++ b/Tests/RunCMake/project/RunCMakeTest.cmake @@ -15,6 +15,7 @@ run_cmake(ProjectDescriptionNoArg2) run_cmake(ProjectHomepage) run_cmake(ProjectHomepage2) run_cmake(ProjectHomepageNoArg) +run_cmake(ProjectTwice) run_cmake(VersionAndLanguagesEmpty) run_cmake(VersionEmpty) run_cmake(VersionInvalid) |