diff options
author | Brad King <brad.king@kitware.com> | 2017-04-13 12:14:17 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-04-13 12:14:23 (GMT) |
commit | 2cb98329f1e1175fb24d7ea3daf969f1de8a2a21 (patch) | |
tree | 51fb2d104c764ef4a3b871188151c4833ea105ec /Tests | |
parent | 26b5f7defe10edeaac763487a26ab9a101f2ed8f (diff) | |
parent | 3b4848717aa23d0238e97fb7d381829e6e47f722 (diff) | |
download | CMake-2cb98329f1e1175fb24d7ea3daf969f1de8a2a21.zip CMake-2cb98329f1e1175fb24d7ea3daf969f1de8a2a21.tar.gz CMake-2cb98329f1e1175fb24d7ea3daf969f1de8a2a21.tar.bz2 |
Merge topic 'project-description'
3b484871 project: Add `DESCRIPTION` parameter
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !679
Diffstat (limited to 'Tests')
6 files changed, 13 insertions, 0 deletions
diff --git a/Tests/RunCMake/project/ProjectDescription-stdout.txt b/Tests/RunCMake/project/ProjectDescription-stdout.txt new file mode 100644 index 0000000..ffa9092 --- /dev/null +++ b/Tests/RunCMake/project/ProjectDescription-stdout.txt @@ -0,0 +1 @@ +PROJECT_DESCRIPTION=Test Project diff --git a/Tests/RunCMake/project/ProjectDescription.cmake b/Tests/RunCMake/project/ProjectDescription.cmake new file mode 100644 index 0000000..3a47362 --- /dev/null +++ b/Tests/RunCMake/project/ProjectDescription.cmake @@ -0,0 +1,6 @@ +cmake_policy(SET CMP0048 NEW) +project(ProjectDescriptionTest VERSION 1.0.0 DESCRIPTION "Test Project" LANGUAGES) +if(NOT PROJECT_DESCRIPTION) + message(FATAL_ERROR "PROJECT_DESCRIPTION expected to be set") +endif() +message(STATUS "PROJECT_DESCRIPTION=${PROJECT_DESCRIPTION}") diff --git a/Tests/RunCMake/project/ProjectDescription2-result.txt b/Tests/RunCMake/project/ProjectDescription2-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/project/ProjectDescription2-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/project/ProjectDescription2-stderr.txt b/Tests/RunCMake/project/ProjectDescription2-stderr.txt new file mode 100644 index 0000000..558e2df --- /dev/null +++ b/Tests/RunCMake/project/ProjectDescription2-stderr.txt @@ -0,0 +1 @@ + DESCRITPION may be specified at most once. diff --git a/Tests/RunCMake/project/ProjectDescription2.cmake b/Tests/RunCMake/project/ProjectDescription2.cmake new file mode 100644 index 0000000..3f186ba --- /dev/null +++ b/Tests/RunCMake/project/ProjectDescription2.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0048 NEW) +project(ProjectDescriptionTest VERSION 1.0.0 DESCRIPTION "Test Project" DESCRIPTION "Only once allowed" LANGUAGES) diff --git a/Tests/RunCMake/project/RunCMakeTest.cmake b/Tests/RunCMake/project/RunCMakeTest.cmake index dba97d2..3d13e2e 100644 --- a/Tests/RunCMake/project/RunCMakeTest.cmake +++ b/Tests/RunCMake/project/RunCMakeTest.cmake @@ -7,6 +7,8 @@ run_cmake(LanguagesImplicit) run_cmake(LanguagesEmpty) run_cmake(LanguagesNONE) run_cmake(LanguagesTwice) +run_cmake(ProjectDescription) +run_cmake(ProjectDescription2) run_cmake(VersionAndLanguagesEmpty) run_cmake(VersionEmpty) run_cmake(VersionInvalid) |