From 3ed2e6d02b53c80062b464b48e0dd51370f2e1c0 Mon Sep 17 00:00:00 2001 From: Sebastien Barre Date: Wed, 6 Mar 2002 16:30:55 -0500 Subject: 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 --- Source/CMakeLists.txt | 1 + Source/cmaketest.cxx | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) 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; -- cgit v0.12