summaryrefslogtreecommitdiffstats
path: root/Source/cmFLTKWrapUICommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2005-02-22 15:32:44 (GMT)
committerBrad King <brad.king@kitware.com>2005-02-22 15:32:44 (GMT)
commit39af9ee1e496db77849015541f687897ed819a56 (patch)
tree79bd7c1765408c80822dc9b87853bdac24704332 /Source/cmFLTKWrapUICommand.cxx
parent4d30cb309cc0cd191e89a7969599b79dea111a08 (diff)
downloadCMake-39af9ee1e496db77849015541f687897ed819a56.zip
CMake-39af9ee1e496db77849015541f687897ed819a56.tar.gz
CMake-39af9ee1e496db77849015541f687897ed819a56.tar.bz2
ENH: Updated implementation of custom commands. Multiple command lines are now supported effectively allowing entire scripts to be written. Also removed extra variable expansions and cleaned up passing of commands through to the generators. The command and individual arguments are now kept separate all the way until the generator writes them out. This cleans up alot of escaping issues.
Diffstat (limited to 'Source/cmFLTKWrapUICommand.cxx')
-rw-r--r--Source/cmFLTKWrapUICommand.cxx41
1 files changed, 21 insertions, 20 deletions
diff --git a/Source/cmFLTKWrapUICommand.cxx b/Source/cmFLTKWrapUICommand.cxx
index bdae514..6fda96e 100644
--- a/Source/cmFLTKWrapUICommand.cxx
+++ b/Source/cmFLTKWrapUICommand.cxx
@@ -29,7 +29,8 @@ bool cmFLTKWrapUICommand::InitialPass(std::vector<std::string> const& args)
// what is the current source dir
std::string cdir = m_Makefile->GetCurrentDirectory();
- std::string fluid_exe = "${FLTK_FLUID_EXECUTABLE}";
+ const char* fluid_exe =
+ m_Makefile->GetRequiredDefinition("FLTK_FLUID_EXECUTABLE");
// get parameter for the command
m_Target = args[0]; // Target that will use the generated files
@@ -66,28 +67,28 @@ bool cmFLTKWrapUICommand::InitialPass(std::vector<std::string> const& args)
std::string cxxres = outputDirectory.c_str();
cxxres += "/" + srcName;
cxxres += ".cxx";
-
- std::vector<std::string> cxxargs;
- cxxargs.push_back("-c"); // instructs Fluid to run in command line
- cxxargs.push_back("-h"); // optionally rename .h files
- cxxargs.push_back(hname);
- cxxargs.push_back("-o"); // optionally rename .cxx files
- cxxargs.push_back(cxxres);
- cxxargs.push_back(origname);// name of the GUI fluid file
-
+
+ cmCustomCommandLine commandLine;
+ commandLine.push_back(fluid_exe);
+ commandLine.push_back("-c"); // instructs Fluid to run in command line
+ commandLine.push_back("-h"); // optionally rename .h files
+ commandLine.push_back(hname);
+ commandLine.push_back("-o"); // optionally rename .cxx files
+ commandLine.push_back(cxxres);
+ commandLine.push_back(origname);// name of the GUI fluid file
+ cmCustomCommandLines commandLines;
+ commandLines.push_back(commandLine);
+
// Add command for generating the .h and .cxx files
+ const char* no_main_dependency = 0;
+ const char* no_comment = 0;
m_Makefile->AddCustomCommandToOutput(cxxres.c_str(),
- fluid_exe.c_str(),
- cxxargs,
- 0,
- depends);
-
+ depends, no_main_dependency,
+ commandLines, no_comment);
m_Makefile->AddCustomCommandToOutput(hname.c_str(),
- fluid_exe.c_str(),
- cxxargs,
- 0,
- depends);
-
+ depends, no_main_dependency,
+ commandLines, no_comment);
+
cmSourceFile *sf = m_Makefile->GetSource(cxxres.c_str());
sf->GetDepends().push_back(hname);
sf->GetDepends().push_back(origname);