mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-26 00:00:39 -05:00
cmSourceFile::GetProperty: return cmProp
This commit is contained in:
committed by
Brad King
parent
fc223f9860
commit
e64fa5f1b6
@@ -1445,14 +1445,15 @@ cmLocalVisualStudio7GeneratorFCInfo::cmLocalVisualStudio7GeneratorFCInfo(
|
||||
needfc = true;
|
||||
}
|
||||
const std::string COMPILE_FLAGS("COMPILE_FLAGS");
|
||||
if (const char* cflags = sf.GetProperty(COMPILE_FLAGS)) {
|
||||
fc.CompileFlags = genexInterpreter.Evaluate(cflags, COMPILE_FLAGS);
|
||||
if (cmProp cflags = sf.GetProperty(COMPILE_FLAGS)) {
|
||||
fc.CompileFlags = genexInterpreter.Evaluate(*cflags, COMPILE_FLAGS);
|
||||
needfc = true;
|
||||
}
|
||||
const std::string COMPILE_OPTIONS("COMPILE_OPTIONS");
|
||||
if (const char* coptions = sf.GetProperty(COMPILE_OPTIONS)) {
|
||||
if (cmProp coptions = sf.GetProperty(COMPILE_OPTIONS)) {
|
||||
lg->AppendCompileOptions(
|
||||
fc.CompileFlags, genexInterpreter.Evaluate(coptions, COMPILE_OPTIONS));
|
||||
fc.CompileFlags,
|
||||
genexInterpreter.Evaluate(*coptions, COMPILE_OPTIONS));
|
||||
needfc = true;
|
||||
}
|
||||
// Add precompile headers compile options.
|
||||
@@ -1473,7 +1474,7 @@ cmLocalVisualStudio7GeneratorFCInfo::cmLocalVisualStudio7GeneratorFCInfo(
|
||||
|
||||
if (lg->FortranProject) {
|
||||
switch (cmOutputConverter::GetFortranFormat(
|
||||
sf.GetProperty("Fortran_FORMAT"))) {
|
||||
sf.GetSafeProperty("Fortran_FORMAT"))) {
|
||||
case cmOutputConverter::FortranFormatFixed:
|
||||
fc.CompileFlags = "-fixed " + fc.CompileFlags;
|
||||
needfc = true;
|
||||
@@ -1487,26 +1488,26 @@ cmLocalVisualStudio7GeneratorFCInfo::cmLocalVisualStudio7GeneratorFCInfo(
|
||||
}
|
||||
}
|
||||
const std::string COMPILE_DEFINITIONS("COMPILE_DEFINITIONS");
|
||||
if (const char* cdefs = sf.GetProperty(COMPILE_DEFINITIONS)) {
|
||||
fc.CompileDefs = genexInterpreter.Evaluate(cdefs, COMPILE_DEFINITIONS);
|
||||
if (cmProp cdefs = sf.GetProperty(COMPILE_DEFINITIONS)) {
|
||||
fc.CompileDefs = genexInterpreter.Evaluate(*cdefs, COMPILE_DEFINITIONS);
|
||||
needfc = true;
|
||||
}
|
||||
std::string defPropName = cmStrCat("COMPILE_DEFINITIONS_", configUpper);
|
||||
if (const char* ccdefs = sf.GetProperty(defPropName)) {
|
||||
if (cmProp ccdefs = sf.GetProperty(defPropName)) {
|
||||
fc.CompileDefsConfig =
|
||||
genexInterpreter.Evaluate(ccdefs, COMPILE_DEFINITIONS);
|
||||
genexInterpreter.Evaluate(*ccdefs, COMPILE_DEFINITIONS);
|
||||
needfc = true;
|
||||
}
|
||||
|
||||
const std::string INCLUDE_DIRECTORIES("INCLUDE_DIRECTORIES");
|
||||
if (const char* cincs = sf.GetProperty(INCLUDE_DIRECTORIES)) {
|
||||
fc.IncludeDirs = genexInterpreter.Evaluate(cincs, INCLUDE_DIRECTORIES);
|
||||
if (cmProp cincs = sf.GetProperty(INCLUDE_DIRECTORIES)) {
|
||||
fc.IncludeDirs = genexInterpreter.Evaluate(*cincs, INCLUDE_DIRECTORIES);
|
||||
needfc = true;
|
||||
}
|
||||
|
||||
// Check for extra object-file dependencies.
|
||||
if (const char* deps = sf.GetProperty("OBJECT_DEPENDS")) {
|
||||
std::vector<std::string> depends = cmExpandedList(deps);
|
||||
if (cmProp deps = sf.GetProperty("OBJECT_DEPENDS")) {
|
||||
std::vector<std::string> depends = cmExpandedList(*deps);
|
||||
const char* sep = "";
|
||||
for (const std::string& d : depends) {
|
||||
fc.AdditionalDeps += sep;
|
||||
|
||||
Reference in New Issue
Block a user