diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2003-01-15 22:31:22 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2003-01-15 22:31:22 (GMT) |
commit | c6d2312619f008a691d9a313988b15c02e4f94cd (patch) | |
tree | 3dfde773b647d2739f97f0217dd1a40225f1c0ff /Source/cmaketest.cxx | |
parent | 17d8775e82aafe373f25b6d6ce9a568ab78816f2 (diff) | |
download | CMake-c6d2312619f008a691d9a313988b15c02e4f94cd.zip CMake-c6d2312619f008a691d9a313988b15c02e4f94cd.tar.gz CMake-c6d2312619f008a691d9a313988b15c02e4f94cd.tar.bz2 |
ENH: add testing for modules and one two config modes for cmaketest
Diffstat (limited to 'Source/cmaketest.cxx')
-rw-r--r-- | Source/cmaketest.cxx | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/Source/cmaketest.cxx b/Source/cmaketest.cxx index efb312e..515e978 100644 --- a/Source/cmaketest.cxx +++ b/Source/cmaketest.cxx @@ -49,7 +49,16 @@ int do_cmaketest (int argc, char **argv) << "\t CMAKE_ARGS argument ...\n"; return 1; } - + bool onlyOneConfig = false; + if(argc > 3) + { + if(strcmp(argv[argc-1], "ONLY_ONE_CONFIG") == 0) + { + onlyOneConfig = true; + argc--; + } + } + // does the directory exist ? if (!cmSystemTools::FileIsDirectory(argv[2])) { @@ -138,16 +147,21 @@ int do_cmaketest (int argc, char **argv) return 1; } std::cout << "Done Generating build files.\n"; - - std::cout << "Generating build files (again)...\n"; - if (cm.Run(args) != 0) + // if the option ONLY_ONE_CONFIG is passed to the program + // only run the config step once + if(!onlyOneConfig) { - std::cerr << "Error: cmake execution failed\n"; - // return to the original directory - cmSystemTools::ChangeDirectory(cwd.c_str()); - return 1; + std::cout << "Generating build files (again)...\n"; + if (cm.Run(args) != 0) + { + std::cerr << "Error: cmake execution failed\n"; + // return to the original directory + cmSystemTools::ChangeDirectory(cwd.c_str()); + return 1; + } + std::cout << "Done Generating build files (again).\n"; } - std::cout << "Done Generating build files (again).\n"; + cmListFileCache::GetInstance()->ClearCache(); |