View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0016137 | CMake | CMake | public | 2016-06-07 09:56 | 2016-06-10 14:21 | ||||
Reporter | Andry81 | ||||||||
Assigned To | |||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | no change required | ||||||
Platform | Intel x86 | OS | Windows | OS Version | 7 x64 | ||||
Product Version | CMake 3.5.2 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0016137: ExternalProject_Add: Can't escape ; character in CMAKE_ARGS | ||||||||
Description | Seems ExternalProject_Add became broken from some time ago. I could not figure out when, but from version 3.5.2 (including 3.5.2-rc1) it does not work anymore. All ";" characters does replace now by space whenever and not matter how you use the expression. | ||||||||
Steps To Reproduce | ExternalProject_Add(MySubProject SOURCE_DIR ${SUBPROJECT_ROOT} CMAKE_ARGS -DMYPATH=c:/blabla1;c:/blabla1/blabla2;c:/blabla1/blabla3 INSTALL_COMMAND "" ) | ||||||||
Additional Information | I Tried these to workaround it: 1. Quotes around the expression ("-DMYPATH=...") 2. Backlash escaping ("-DMYPATH=...\;...") 3. LIST APPEND instead SET 4. LIST_SEPARATOR in ExternalProject_Add 5. STRING REPLACE ^^ to ; Nothing works. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0041140) Brad King (manager) 2016-06-07 10:10 |
Use this: CMAKE_ARGS -DMYPATH=c:/blabla1|c:/blabla1/blabla2|c:/blabla1/blabla3 LIST_SEPARATOR | The purpose of LIST_SEPARATOR is to work around this limitation of the CMake language. |
(0041143) Andry81 (reporter) 2016-06-07 10:30 |
Seems our build system uses some wrapper over ExternalProject_Add macro and not all arguments passes from wrapper to the cmake command. I'll try to look into this to fix that case. Thx! |
(0041144) Brad King (manager) 2016-06-07 10:37 |
$ cmake --version cmake version 3.6.0-rc1 $ cat ../CMakeLists.txt cmake_minimum_required(VERSION 3.5) project(Issue16137 NONE) include(ExternalProject) ExternalProject_Add(MySubProject SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/SubProject CMAKE_ARGS -DMYPATH=c:/blabla1|c:/blabla1/blabla2|c:/blabla1/blabla3 LIST_SEPARATOR | INSTALL_COMMAND "" ) $ cat ../SubProject/CMakeLists.txt cmake_minimum_required(VERSION 3.5) project(IssueSubProject NONE) message(STATUS "MYPATH='${MYPATH}'") $ cmake .. -- Building for: Visual Studio 14 2015 ... $ grep MYPATH MySubProject.vcxproj "C:\Program Files\CMake\bin\cmake.exe" -DMYPATH=c:/blabla1";"c:/blabla1/blabla2";"c:/blabla1/blabla3 "-GVisual Studio 14 2015" C:/.../SubProject $ cmake --build . --config Debug ... Performing configure step for 'MySubProject' -- MYPATH='c:/blabla1;c:/blabla1/blabla2;c:/blabla1/blabla3' ... |
(0041145) Andry81 (reporter) 2016-06-07 10:42 |
Strange output. How can i get this one? "C:\Program Files\CMake\bin\cmake.exe" "-DMYPATH=c:/blabla1;c:/blabla1/blabla2;c:/blabla1/blabla3" "-GVisual Studio 14 2015" C:/.../SubProject |
(0041146) Brad King (manager) 2016-06-07 11:00 |
The commands "C:\Program Files\CMake\bin\cmake.exe" "-DMYPATH=c:/blabla1;c:/blabla1/blabla2;c:/blabla1/blabla3" "-GVisual Studio 14 2015" C:/.../SubProject and "C:\Program Files\CMake\bin\cmake.exe" -DMYPATH=c:/blabla1";"c:/blabla1/blabla2";"c:/blabla1/blabla3 "-GVisual Studio 14 2015" C:/.../SubProject are identical after command line parsing. The details of how the arguments are quoted are not important. |
(0041147) Andry81 (reporter) 2016-06-07 11:17 |
Not in this case: "C:\Program Files\CMake\bin\cmake.exe" "-DMYPATH=c:/bla bla1;c:/bla bla1/blabla2;c:/bla bla1/blabla3" "-GVisual Studio 14 2015" C:/.../SubProject |
(0041148) Brad King (manager) 2016-06-07 11:25 |
$ cat ../CMakeLists.txt cmake_minimum_required(VERSION 3.5) project(Issue16137 NONE) include(ExternalProject) ExternalProject_Add(MySubProject SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/SubProject CMAKE_ARGS "-DMYPATH=c:/bla bla1|c:/bla bla1/blabla2|c:/blabla1/bla bla3" LIST_SEPARATOR | INSTALL_COMMAND "" ) $ cmake .. $ grep MYPATH MySubProject.vcxproj "C:\Program Files\CMake\bin\cmake.exe" "-DMYPATH=c:/bla bla1";"c:/bla bla1/blabla2";"c:/blabla1/bla bla3" "-GVisual Studio 14 2015" C:/.../SubProject $ cmake --build . --config Debug ... Performing configure step for 'MySubProject' -- MYPATH='c:/bla bla1;c:/bla bla1/blabla2;c:/blabla1/bla bla3' ... |
(0041149) Brad King (manager) 2016-06-07 11:28 |
For reference, the strange-looking ";" quoting behavior is specific to the VS IDE generators and is explained here: https://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmOutputConverter.cxx;hb=v3.6.0-rc1#l814 [^] |
(0041155) Kitware Robot (administrator) 2016-06-10 14:21 |
This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2016-06-07 09:56 | Andry81 | New Issue | |
2016-06-07 10:10 | Brad King | Note Added: 0041140 | |
2016-06-07 10:10 | Brad King | Status | new => resolved |
2016-06-07 10:10 | Brad King | Resolution | open => no change required |
2016-06-07 10:16 | Andry81 | Note Added: 0041141 | |
2016-06-07 10:17 | Andry81 | Note Added: 0041142 | |
2016-06-07 10:17 | Andry81 | Status | resolved => feedback |
2016-06-07 10:17 | Andry81 | Resolution | no change required => reopened |
2016-06-07 10:28 | Andry81 | Note Deleted: 0041142 | |
2016-06-07 10:28 | Andry81 | Note Deleted: 0041141 | |
2016-06-07 10:30 | Andry81 | Note Added: 0041143 | |
2016-06-07 10:30 | Andry81 | Status | feedback => new |
2016-06-07 10:37 | Brad King | Note Added: 0041144 | |
2016-06-07 10:37 | Brad King | Status | new => resolved |
2016-06-07 10:37 | Brad King | Resolution | reopened => no change required |
2016-06-07 10:42 | Andry81 | Note Added: 0041145 | |
2016-06-07 11:00 | Brad King | Note Added: 0041146 | |
2016-06-07 11:17 | Andry81 | Note Added: 0041147 | |
2016-06-07 11:25 | Brad King | Note Added: 0041148 | |
2016-06-07 11:28 | Brad King | Note Added: 0041149 | |
2016-06-10 14:21 | Kitware Robot | Note Added: 0041155 | |
2016-06-10 14:21 | Kitware Robot | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |