summaryrefslogtreecommitdiffstats
path: root/Source/cmProjectCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-10-08 15:26:16 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-10-08 15:26:21 (GMT)
commitc3e27c25625142aa1f1de36c454f00ee44df8dbd (patch)
tree324589a94e981dd7a0dd0ff0c49466375e695f9d /Source/cmProjectCommand.cxx
parentc76e024a3dee8933ff5b213149c295e2925b4860 (diff)
parentf8a086a86bd3f9301f04e5ad64b75fe960eee99a (diff)
downloadCMake-c3e27c25625142aa1f1de36c454f00ee44df8dbd.zip
CMake-c3e27c25625142aa1f1de36c454f00ee44df8dbd.tar.gz
CMake-c3e27c25625142aa1f1de36c454f00ee44df8dbd.tar.bz2
Merge topic 'project-always-set-desc-url'
f8a086a86b project(): Ensure DESCRIPTION and HOMEPAGE_URL variables are set b27247c8df project(): Add tests verifying variables set by second project() call Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2457
Diffstat (limited to 'Source/cmProjectCommand.cxx')
-rw-r--r--Source/cmProjectCommand.cxx20
1 files changed, 8 insertions, 12 deletions
diff --git a/Source/cmProjectCommand.cxx b/Source/cmProjectCommand.cxx
index 305c7a6..8f565c8 100644
--- a/Source/cmProjectCommand.cxx
+++ b/Source/cmProjectCommand.cxx
@@ -300,19 +300,15 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args,
}
}
- if (haveDescription) {
- this->Makefile->AddDefinition("PROJECT_DESCRIPTION", description.c_str());
- this->Makefile->AddDefinition(projectName + "_DESCRIPTION",
- description.c_str());
- TopLevelCMakeVarCondSet("CMAKE_PROJECT_DESCRIPTION", description.c_str());
- }
+ this->Makefile->AddDefinition("PROJECT_DESCRIPTION", description.c_str());
+ this->Makefile->AddDefinition(projectName + "_DESCRIPTION",
+ description.c_str());
+ TopLevelCMakeVarCondSet("CMAKE_PROJECT_DESCRIPTION", description.c_str());
- if (haveHomepage) {
- this->Makefile->AddDefinition("PROJECT_HOMEPAGE_URL", homepage.c_str());
- this->Makefile->AddDefinition(projectName + "_HOMEPAGE_URL",
- homepage.c_str());
- TopLevelCMakeVarCondSet("CMAKE_PROJECT_HOMEPAGE_URL", homepage.c_str());
- }
+ this->Makefile->AddDefinition("PROJECT_HOMEPAGE_URL", homepage.c_str());
+ this->Makefile->AddDefinition(projectName + "_HOMEPAGE_URL",
+ homepage.c_str());
+ TopLevelCMakeVarCondSet("CMAKE_PROJECT_HOMEPAGE_URL", homepage.c_str());
if (languages.empty()) {
// if no language is specified do c and c++