diff options
author | Sebastien Barre <sebastien.barre@kitware.com> | 2002-03-06 21:30:55 (GMT) |
---|---|---|
committer | Sebastien Barre <sebastien.barre@kitware.com> | 2002-03-06 21:30:55 (GMT) |
commit | 3ed2e6d02b53c80062b464b48e0dd51370f2e1c0 (patch) | |
tree | ea993f71d1bf4c9c7ede5a75e449a97e7229563a /Source | |
parent | e74ebd4e879f5fccf5fc5cb52fcdce24cb5fd629 (diff) | |
download | CMake-3ed2e6d02b53c80062b464b48e0dd51370f2e1c0.zip CMake-3ed2e6d02b53c80062b464b48e0dd51370f2e1c0.tar.gz CMake-3ed2e6d02b53c80062b464b48e0dd51370f2e1c0.tar.bz2 |
ENH: add cmaketest to install targets (so that it can be used in other projects) and pass the rest of its command-line args to cmake
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Source/cmaketest.cxx | 12 |
2 files changed, 12 insertions, 1 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 439f6a5..0b6bba3 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -75,6 +75,7 @@ ADD_EXECUTABLE(ctest ctest.cxx cmSystemTools.cxx cmRegularExpression.cxx) IF(BUILD_TESTING) IF (DART_ROOT) ADD_EXECUTABLE(cmaketest cmaketest.cxx cmSystemTools.cxx) + INSTALL_TARGETS(/bin cmaketest) CONFIGURE_FILE( ${CMake_SOURCE_DIR}/Source/cmaketest.h.in diff --git a/Source/cmaketest.cxx b/Source/cmaketest.cxx index 28f9b94..0a6a8bf 100644 --- a/Source/cmaketest.cxx +++ b/Source/cmaketest.cxx @@ -52,7 +52,8 @@ int main (int argc, char *argv[]) { projectName = argv[5]; } - + + // WARNING: the rest of the args is passed to cmake /** * Run an executable command and put the stdout in output. @@ -85,6 +86,15 @@ int main (int argc, char *argv[]) std::string generator = "-G"; generator += CMAKE_GENERATOR; args.push_back(generator); + + if(argc > 6) + { + for (int j = 6; j < argc ; j++) + { + args.push_back(argv[j]); + } + } + std::cout << "Generating build files...\n"; cmake cm; |