mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-06 22:30:07 -05:00
ENH: Added CMAKE_PROJECT_NAME variable to play the role of CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR for the top-level project name.
This commit is contained in:
@@ -48,6 +48,14 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args)
|
||||
|
||||
m_Makefile->AddDefinition("PROJECT_NAME", args[0].c_str());
|
||||
|
||||
// Set the CMAKE_PROJECT_NAME variable to be the highest-level
|
||||
// project name in the tree. This is always the first PROJECT
|
||||
// command encountered.
|
||||
if(!m_Makefile->GetDefinition("CMAKE_PROJECT_NAME"))
|
||||
{
|
||||
m_Makefile->AddDefinition("CMAKE_PROJECT_NAME", args[0].c_str());
|
||||
}
|
||||
|
||||
std::vector<std::string> languages;
|
||||
if(args.size() > 1)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user