MantisBT - CMake
View Issue Details
0014179CMakeModulespublic2013-05-30 10:522013-11-04 09:33
azdagron 
 
normalmajoralways
closedfixed 
WindowsWindows 76.1.7601
CMake 2.8.11 
CMake 2.8.11.1CMake 2.8.11.1 
0014179: FindBoost does not treat paths properly
I set my CMAKE_PREFIX_PATH, to a folder on my C: drive (c:\work) as well as setting CMAKE_LIBRARY_PATH, BOOST_INCLUDEDIR and BOOST_LIBRARYDIR to folders within that path (i.e. c:\work\include and c:\work\lib).

I then do a find_package(Boost 1.53.0 ...) and it tries to escape the \w from c:\work and fails.

This works fine with CMake 2.8.10.2.
No tags attached.
txt CMakeLists.txt (244) 2013-05-30 12:41
https://public.kitware.com/Bug/file/4773/CMakeLists.txt
Issue History
2013-05-30 10:52azdagronNew Issue
2013-05-30 11:52Brad KingNote Added: 0033153
2013-05-30 12:41azdagronFile Added: CMakeLists.txt
2013-05-30 12:45azdagronNote Added: 0033154
2013-05-30 16:30Brad KingNote Added: 0033157
2013-05-30 16:30Brad KingStatusnew => resolved
2013-05-30 16:30Brad KingResolutionopen => fixed
2013-05-30 16:30Brad KingFixed in Version => CMake 2.8.12
2013-05-30 16:30Brad KingTarget Version => CMake 2.8.12
2013-06-07 15:16Robert MaynardFixed in VersionCMake 2.8.12 => CMake 2.8.11.1
2013-06-07 15:16Robert MaynardTarget VersionCMake 2.8.12 => CMake 2.8.11.1
2013-11-04 09:33Robert MaynardNote Added: 0034367
2013-11-04 09:33Robert MaynardStatusresolved => closed

Notes
(0033153)
Brad King   
2013-05-30 11:52   
I cannot reproduce this. Please provide a full CMakeLists.txt that reproduces the problem (and cmake command line if necessary). Also provide the error message you see.
(0033154)
azdagron   
2013-05-30 12:45   
Sorry for the lack of detail. I have attached CMakeLists.txt.

Here is the command line:
set VENDOR=c:\work\vendor
cmake -G "NMake Makefiles JOM" ..

And the output is:
>>>>>>>>>>>>>> BEGIN OUTPUT <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:280 (find_li
brary):
  Syntax error in cmake code at

    C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:280

  when parsing string

    NAMES;boost_chrono-vc110-mt-1_53;boost_chrono-vc110-mt;boost_chrono-mt-1_53;boost_chrono-mt;boos
t_chrono;HINTS;c:\work\vendor/lib;c:/work/vendor/include/lib;c:/work/vendor/include/../lib;c:/work/v
endor/include/stage/lib;PATHS;C:/boost/lib;C:/boost;/sw/local/lib;NAMES_PER_DIR;DOC;Boost chrono lib
rary (release)

  Invalid escape sequence \w
Call Stack (most recent call first):
  C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:931 (_Boost_FIND_LIBRARY)

  CMakeLists.txt:8 (find_package)


-- Configuring incomplete, errors occurred!
>>>>>>>>>>>>>> END OUTPUT <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

This doesn't happen if i leave the COMPONENTS off of find_package (i.e. find_package(Boost 1.53)

This works fine with cmake 2.8.10.2.
(0033157)
Brad King   
2013-05-30 16:30   
Fixed:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=363825cd [^]

Use this patch to your CMake code to workaround the bug for now:

-set(VENDOR $ENV{VENDOR})
+file(TO_CMAKE_PATH "${VENDOR}" VENDOR)
(0034367)
Robert Maynard   
2013-11-04 09:33   
Closing resolved issues that have not been updated in more than 4 months.