MantisBT - CMake | |||||
| View Issue Details | |||||
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0013302 | CMake | CTest | public | 2012-06-13 21:05 | 2013-03-04 08:38 |
| Reporter | Jean-Christophe Fillion-Robin | ||||
| Assigned To | David Cole | ||||
| Priority | normal | Severity | feature | Reproducibility | N/A |
| Status | closed | Resolution | fixed | ||
| Platform | OS | OS Version | |||
| Product Version | |||||
| Target Version | CMake 2.8.9 | Fixed in Version | CMake 2.8.9 | ||
| Summary | 0013302: Improve mechanism allowing to pass command line parameter to ctest script | ||||
| Description | When setting up dashboard it is sometimes useful to pass parameter to ctest script. A possible approach is to pass parameters doing the following: ctest -S /path/to/script.cmake,OPTNAME1##OPTVALUE1^^OPTNAME2##OPTVALUE2 Then, the following code can be used in the called CTest script to "extract" the associated value: if(NOT CTEST_SCRIPT_ARG STREQUAL "") string(REPLACE "^^" "\\;" CTEST_SCRIPT_ARG_AS_LIST "${CTEST_SCRIPT_ARG}") set(CTEST_SCRIPT_ARG_AS_LIST ${CTEST_SCRIPT_ARG_AS_LIST}) foreach(argn_argv ${CTEST_SCRIPT_ARG_AS_LIST}) string(REPLACE "##" "\\;" argn_argv_list ${argn_argv}) set(argn_argv_list ${argn_argv_list}) list(GET argn_argv_list 0 argn) list(GET argn_argv_list 1 argv) set(${argn} ${argv}) endforeach() endif() When more complex value, like URL are passed as parameter, special characters like ":" need also to be "encoded". See issue 0012953 A mechanism similar to what's done with "cmake" executable could probably be implemented. It means parameter could be passed using: -DOPTNAME1:STRING=OPTVALUE1 | ||||
| Steps To Reproduce | |||||
| Additional Information | |||||
| Tags | No tags attached. | ||||
| Relationships | |||||
| Attached Files | |||||
| Issue History | |||||
| Date Modified | Username | Field | Change | ||
| 2012-06-13 21:05 | Jean-Christophe Fillion-Robin | New Issue | |||
| 2012-08-11 21:42 | David Cole | Status | new => backlog | ||
| 2012-08-11 21:42 | David Cole | Note Added: 0030438 | |||
| 2012-09-03 16:55 | Rolf Eike Beer | Note Added: 0030901 | |||
| 2012-09-03 17:17 | David Cole | Assigned To | => David Cole | ||
| 2012-09-03 17:17 | David Cole | Status | backlog => assigned | ||
| 2012-09-03 17:17 | David Cole | Note Added: 0030903 | |||
| 2012-09-03 17:17 | David Cole | Status | assigned => resolved | ||
| 2012-09-03 17:17 | David Cole | Fixed in Version | => CMake 2.8.9 | ||
| 2012-09-03 17:17 | David Cole | Resolution | open => fixed | ||
| 2012-09-03 17:18 | David Cole | Target Version | => CMake 2.8.9 | ||
| 2013-03-04 08:38 | Robert Maynard | Note Added: 0032449 | |||
| 2013-03-04 08:38 | Robert Maynard | Status | resolved => closed | ||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||