summaryrefslogtreecommitdiffstats
path: root/Source/cmGetSourceFilePropertyCommand.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2002-08-26 19:22:31 (GMT)
committerKen Martin <ken.martin@kitware.com>2002-08-26 19:22:31 (GMT)
commitb8be208408323fad5179754a66cd40d76e9654e8 (patch)
treee181d43a4e5b081ecbb1228fd6cd59d7eb161e73 /Source/cmGetSourceFilePropertyCommand.cxx
parentae6e90e872fc6ed97cc221713e833e21f5552e0b (diff)
downloadCMake-b8be208408323fad5179754a66cd40d76e9654e8.zip
CMake-b8be208408323fad5179754a66cd40d76e9654e8.tar.gz
CMake-b8be208408323fad5179754a66cd40d76e9654e8.tar.bz2
updated to match the SET
Diffstat (limited to 'Source/cmGetSourceFilePropertyCommand.cxx')
-rw-r--r--Source/cmGetSourceFilePropertyCommand.cxx28
1 files changed, 9 insertions, 19 deletions
diff --git a/Source/cmGetSourceFilePropertyCommand.cxx b/Source/cmGetSourceFilePropertyCommand.cxx
index bfd7743..435d937 100644
--- a/Source/cmGetSourceFilePropertyCommand.cxx
+++ b/Source/cmGetSourceFilePropertyCommand.cxx
@@ -17,8 +17,8 @@
#include "cmGetSourceFilePropertyCommand.h"
// cmSetSourceFilePropertyCommand
-bool cmGetSourceFilePropertyCommand::InitialPass(std::vector<std::string> const&
- args)
+bool cmGetSourceFilePropertyCommand::InitialPass(
+ std::vector<std::string> const& args)
{
if(args.size() != 3 )
{
@@ -28,28 +28,18 @@ bool cmGetSourceFilePropertyCommand::InitialPass(std::vector<std::string> const&
const char* var = args[0].c_str();
const char* file = args[1].c_str();
cmSourceFile* sf = m_Makefile->GetSource(file);
+
if(sf)
{
- if(args[2] == "ABSTRACT")
- {
- m_Makefile->AddDefinition(var, sf->GetPropertyAsBool("ABSTRACT"));
- }
- if(args[2] == "WRAP_EXCLUDE")
- {
- m_Makefile->AddDefinition(var, sf->GetPropertyAsBool("WRAP_EXCLUDE"));
- }
- if(args[2] == "COMPILE_FLAGS")
+ const char *prop = sf->GetProperty(args[2].c_str());
+ if (prop)
{
- m_Makefile->AddDefinition(var, sf->GetProperty("COMPILE_FLAGS"));
+ m_Makefile->AddDefinition(var, prop);
+ return true;
}
}
- else
- {
- std::string m = "Could not find source file: ";
- m += file;
- this->SetError(m.c_str());
- return false;
- }
+
+ m_Makefile->AddDefinition(var, "NOT_FOUND");
return true;
}