diff options
author | Sebastien Barre <sebastien.barre@kitware.com> | 2002-01-17 21:35:26 (GMT) |
---|---|---|
committer | Sebastien Barre <sebastien.barre@kitware.com> | 2002-01-17 21:35:26 (GMT) |
commit | a2fe7601f03555bb4adb13522f0a8470bfb78811 (patch) | |
tree | 2506c36292009deade388dce6bdc803dd0ff3c35 /Source/cmaketest.cxx | |
parent | e8c4fbef82bac94ee18cd99518357de1b1f237e8 (diff) | |
download | CMake-a2fe7601f03555bb4adb13522f0a8470bfb78811.zip CMake-a2fe7601f03555bb4adb13522f0a8470bfb78811.tar.gz CMake-a2fe7601f03555bb4adb13522f0a8470bfb78811.tar.bz2 |
FIX: need a 'make clean' before 'make all' otherwise the post-build custom-command are not run (since a lib might be up to date already for ex.).
Diffstat (limited to 'Source/cmaketest.cxx')
-rw-r--r-- | Source/cmaketest.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/cmaketest.cxx b/Source/cmaketest.cxx index 4e54b11..ced4912 100644 --- a/Source/cmaketest.cxx +++ b/Source/cmaketest.cxx @@ -110,8 +110,23 @@ int main (int argc, char *argv[]) else { // assume a make sytle program + // clean first + std::string cleanCommand = makeCommand; + cleanCommand += " clean"; + std::cout << "Running make command: " << cleanCommand.c_str() << " ...\n"; + if (!cmSystemTools::RunCommand(cleanCommand.c_str(), output)) + { + std::cerr << "Error: " << cleanCommand.c_str() << " execution failed\n"; + std::cerr << output.c_str() << "\n"; + // return to the original directory + cmSystemTools::ChangeDirectory(cwd.c_str()); + return 1; + } + + // now build makeCommand += " all"; } + std::cout << "Running make command: " << makeCommand.c_str() << " ...\n"; if (!cmSystemTools::RunCommand(makeCommand.c_str(), output)) { |