View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014184CMakeCMakepublic2013-06-01 03:432014-10-06 10:33
Reportersteve.k.chiu 
Assigned ToPeter Kuemmel 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformWindows + Ninja + Mingw64-32OSWindowsOS Version8
Product VersionCMake 2.8.11 
Target VersionFixed in VersionCMake 3.0 
Summary0014184: link_directories produce backslash path for mingw
DescriptionThe link_directories command produce backslash path which does not work in the mingw+ninja environment. All the others path (e.g. include path) are forward-slash, it seems the link_directories path has been forgotten.
Steps To Reproduce1. add the link_directories command to the CMakeLists.txt
2. use Ninja generator and MinGW compiler (from mingw64 project)
3. the gcc compiler complain can not find the specified library (for ex. c:/qt/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lraw_r)
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0033163)
Rolf Eike Beer (developer)
2013-06-01 04:42

Could you plase add a minimal CMakeLists.txt to reproduce this and a build log showing the error?

Beside that you shouldn't be using link_directories anyway. use target_link_libraries with an absolute path to the lib.
(0033166)
steve.k.chiu (reporter)
2013-06-02 03:43

Note this problem happens only when the command line is too long, and ninja add the link directories to the .rsp file. Apparently .rsp file treat backslash char as escape sequence, so it has problem finding the correctly directory.
(0033175)
Brad King (manager)
2013-06-03 08:49

I think Ninja started putting link libraries in .rsp files here:

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

but only when the length is beyond the command line limit.
(0035682)
Peter Kuemmel (developer)
2014-04-13 05:26

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aa21ae696d55c46231cf0a429afe900ad6e3cc9f [^]
(0036968)
Robert Maynard (manager)
2014-10-06 10:33

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2013-06-01 03:43 steve.k.chiu New Issue
2013-06-01 04:42 Rolf Eike Beer Note Added: 0033163
2013-06-02 03:43 steve.k.chiu Note Added: 0033166
2013-06-03 08:49 Brad King Note Added: 0033175
2013-06-03 08:50 Brad King Assigned To => Peter Kuemmel
2013-06-03 08:50 Brad King Status new => assigned
2014-04-13 05:26 Peter Kuemmel Note Added: 0035682
2014-04-13 05:26 Peter Kuemmel Status assigned => resolved
2014-04-13 05:26 Peter Kuemmel Fixed in Version => CMake 3.0
2014-04-13 05:26 Peter Kuemmel Resolution open => fixed
2014-10-06 10:33 Robert Maynard Note Added: 0036968
2014-10-06 10:33 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team