[cmake-developers] [CMake 0014298]: add_test and test with space

Mantis Bug Tracker mantis at public.kitware.com
Wed Jul 17 05:14:53 EDT 2013


The following issue has been SUBMITTED. 
====================================================================== 
http://cmake.org/Bug/view.php?id=14298 
====================================================================== 
Reported By:                Mathieu Malaterre
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   14298
Category:                   CMake
Reproducibility:            have not tried
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2013-07-17 05:14 EDT
Last Modified:              2013-07-17 05:14 EDT
====================================================================== 
Summary:                    add_test and test with space
Description: 
Please document that add_test does not deal with test name with spaces.

Eg:

 get_filename_component(filename "${dcmfile}" NAME)
 add_test(NAME "my_app_${filename}"
   COMMAND ${EXECUTABLE_OUTPUT_PATH}/my_app "${dcmfile}"
 )

should really be:

 get_filename_component(filename "${dcmfile}" NAME)
 string(REPLACE " " "_" filename_nospace "${filename}")
 add_test(NAME "my_app_${filename_nospace}"
   COMMAND ${EXECUTABLE_OUTPUT_PATH}/my_app "${dcmfile}"
 )

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2013-07-17 05:14 Mathieu MalaterreNew Issue                                    
======================================================================




More information about the cmake-developers mailing list