[CMake] Issue parsing command lines with '=' in value of defined variables

Lowekamp, Bradley (NIH/NLM/LHC) [C] blowekamp at mail.nih.gov
Tue Jan 13 10:29:35 EST 2015


Hello,

I encountered this issue only on windows why trying to use the ExternalData module with a file called: "slice_01524_z-5.0034um.tif"

I am tested with CMake 3.0.2 and 2.8.12.2 on widows for this test. Here is the test script:

foreach(i RANGE ${CMAKE_ARGC})
message(STATUS "ARGV${i}: ${CMAKE_ARGV${i}}")
endforeach()
message(STATUS "ExternalData file: ${file}")


Some runs:


$ cmake -Dfile=good.tif -P EqualTest.cmake
-- ARGV0: c:\Program Files (x86)\CMake 2.8\bin\cmake.exe
-- ARGV1: -Dfile=good.tif
-- ARGV2: -P
-- ARGV3: EqualTest.cmake
-- ARGV4:
-- ExternalData file: good.tif

[OK]


$ cmake -Dfile=slice_01524_z=5.0034um.tif -P EqualTest.cmake
-- ARGV0: c:\Program Files (x86)\CMake 2.8\bin\cmake.exe
-- ARGV1: -Dfile=slice_01524_z=5.0034um.tif
-- ARGV2: -P
-- ARGV3: EqualTest.cmake
-- ARGV4:
-- ExternalData file: slice_01524_z=5.0034um.tif

[OK]


$ cmake -Dfile=InLens/slice_01524_z=5.0034um.tif -P EqualTest.cmake
-- ARGV0: c:\Program Files (x86)\CMake 2.8\bin\cmake.exe
-- ARGV1: -Dfile=InLens/slice_01524_z=5.0034um.tif
-- ARGV2: -P
-- ARGV3: EqualTest.cmake
-- ARGV4:
-- ExternalData file: InLens/slice_01524_z=5.0034um.tif

[OK]


$ cmake -Dfile=C:/slice_01524_z=5.0034um.tif -P EqualTest.cmake
-- ARGV0: c:\Program Files (x86)\CMake 2.8\bin\cmake.exe
-- ARGV1: -Dfile=C:/slice_01524_z=5.0034um.tif
-- ARGV2: -P
-- ARGV3: EqualTest.cmake
-- ARGV4:
-- ExternalData file:

[FAIL]


So it looks like when the value has the dive and an equal sign no value is assigned.

Bug?

Thanks,
Brad


More information about the CMake mailing list