|
|
@ -59,7 +59,7 @@ bool cmProjectCommand(std::vector<std::string> const& args,
|
|
|
|
mf.SetProjectName(projectName);
|
|
|
|
mf.SetProjectName(projectName);
|
|
|
|
|
|
|
|
|
|
|
|
std::string varName = cmStrCat(projectName, "_BINARY_DIR"_s);
|
|
|
|
std::string varName = cmStrCat(projectName, "_BINARY_DIR"_s);
|
|
|
|
bool nonCacheVarAlreadySet = mf.IsDefinitionSet(varName);
|
|
|
|
bool nonCacheVarAlreadySet = mf.IsNormalDefinitionSet(varName);
|
|
|
|
mf.AddCacheDefinition(varName, mf.GetCurrentBinaryDirectory(),
|
|
|
|
mf.AddCacheDefinition(varName, mf.GetCurrentBinaryDirectory(),
|
|
|
|
"Value Computed by CMake", cmStateEnums::STATIC);
|
|
|
|
"Value Computed by CMake", cmStateEnums::STATIC);
|
|
|
|
if (nonCacheVarAlreadySet) {
|
|
|
|
if (nonCacheVarAlreadySet) {
|
|
|
@ -67,7 +67,7 @@ bool cmProjectCommand(std::vector<std::string> const& args,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
varName = cmStrCat(projectName, "_SOURCE_DIR"_s);
|
|
|
|
varName = cmStrCat(projectName, "_SOURCE_DIR"_s);
|
|
|
|
nonCacheVarAlreadySet = mf.IsDefinitionSet(varName);
|
|
|
|
nonCacheVarAlreadySet = mf.IsNormalDefinitionSet(varName);
|
|
|
|
mf.AddCacheDefinition(varName, mf.GetCurrentSourceDirectory(),
|
|
|
|
mf.AddCacheDefinition(varName, mf.GetCurrentSourceDirectory(),
|
|
|
|
"Value Computed by CMake", cmStateEnums::STATIC);
|
|
|
|
"Value Computed by CMake", cmStateEnums::STATIC);
|
|
|
|
if (nonCacheVarAlreadySet) {
|
|
|
|
if (nonCacheVarAlreadySet) {
|
|
|
@ -82,7 +82,7 @@ bool cmProjectCommand(std::vector<std::string> const& args,
|
|
|
|
mf.AddDefinitionBool("PROJECT_IS_TOP_LEVEL", mf.IsRootMakefile());
|
|
|
|
mf.AddDefinitionBool("PROJECT_IS_TOP_LEVEL", mf.IsRootMakefile());
|
|
|
|
|
|
|
|
|
|
|
|
varName = cmStrCat(projectName, "_IS_TOP_LEVEL"_s);
|
|
|
|
varName = cmStrCat(projectName, "_IS_TOP_LEVEL"_s);
|
|
|
|
nonCacheVarAlreadySet = mf.IsDefinitionSet(varName);
|
|
|
|
nonCacheVarAlreadySet = mf.IsNormalDefinitionSet(varName);
|
|
|
|
mf.AddCacheDefinition(varName, mf.IsRootMakefile() ? "ON" : "OFF",
|
|
|
|
mf.AddCacheDefinition(varName, mf.IsRootMakefile() ? "ON" : "OFF",
|
|
|
|
"Value Computed by CMake", cmStateEnums::STATIC);
|
|
|
|
"Value Computed by CMake", cmStateEnums::STATIC);
|
|
|
|
if (nonCacheVarAlreadySet) {
|
|
|
|
if (nonCacheVarAlreadySet) {
|
|
|
|