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
This commit is contained in:
parent
e74ebd4e87
commit
3ed2e6d02b
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue