View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0009963CMakeCMakepublic2009-11-24 15:302016-06-06 13:37
ReporterShane Dixon 
Assigned ToDavid Cole 
PriorityhighSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake-2-8 
Target VersionCMake 2.8.3Fixed in VersionCMake 2.8.3 
Summary0009963: Passing command-line arguments to ExternalProject truncates variables
DescriptionWhen passing CMAKE_INSTALL_PREFIX=${PROJECT_BINARY_DIR} to an external project, the path should be C:\temp\deploy2, but the path instead shows up as just "C:". I fix it by adding a bogus variable TEST=${PROJECT_BINARY_DIR} which fixes the CAMKE_INSTAALL_PREFIX definition, but then TEST shows up as the wrong thing. I have this in two separate external projects that I build.
Additional Information    ExternalProject_Add( ExtFMEmul
        URL "${CMAKE_CURRENT_SOURCE_DIR}/fm"
        CMAKE_GENERATOR "NMake Makefiles"
        CMAKE_ARGS cmake_install_prefix
            -DCMAKE_INSTALL_PREFIX=${PROJECT_BINARY_DIR}
            -DCMAKE_MODULE_PATH=${CMAKE_MODULE_PATH}
            -DMYPROJ_FM_H_PATH=${PROJECT_SOURCE_DIR}/include
            -DEXTRA_INCLUDES=${PROJECT_BINARY_DIR}/include
        BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/ExtFM_cl
        INSTALL_DIR ${PROJECT_BINARY_DIR} )

In the external project, the CMAKE_INSTALL_PREFIX yields this:
-- CMAKE_INSTALL_PREFIX...............C:

Now if I change the ExternalProject_Add to this:

    ExternalProject_Add( ExtFMEmul
        URL "${CMAKE_CURRENT_SOURCE_DIR}/fm"
        CMAKE_GENERATOR "NMake Makefiles"
        CMAKE_ARGS # Test is needed b/c of glitch in passing cmake_install_prefix
            -DTEST=${PROJECT_BINARY_DIR}
            -DCMAKE_INSTALL_PREFIX=${PROJECT_BINARY_DIR}
            -DCMAKE_MODULE_PATH=${CMAKE_MODULE_PATH}
            -DMYPROJ_FM_H_PATH=${PROJECT_SOURCE_DIR}/include
            -DEXTRA_INCLUDES=${PROJECT_BINARY_DIR}/include
        BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/ExtFM_cl
        INSTALL_DIR ${PROJECT_BINARY_DIR} )

The external project now yields the correct result for CMAKE_INSTALL_PREFIX, but the TEST variable is now wrong:

-- CMAKE_INSTALL_PREFIX...............C:/temp/deploy2
-- TEST...............................C:
TagsNo tags attached.
Attached Files

 Relationships
has duplicate 0010735closedDavid Cole Passing Paths containing colons through ExternalProject_Add's CMAKE_ARGS argument 
has duplicate 0009971closedDavid Cole Parameters pass to command-line entirely wrong 
related to 0011462closedDavid Cole "the input line is too long" error after upgrading from 2.8.2 to 2.8.3 

  Notes
(0018580)
Shane Dixon (reporter)
2009-11-24 15:32

I'm running cmake 2.8.0 on Windows XP:

C:\temp\deploy2>cmake --version
cmake version 2.8.0
(0018591)
Shane Dixon (reporter)
2009-11-25 14:09

Might be related to this other bug that I reported:
http://public.kitware.com/Bug/view.php?id=9971 [^]
(0022145)
David Cole (manager)
2010-09-08 18:43

fixed in CVS of KWSys:

$ cvs commit -m "CMake: quote ':' in Windows NMake Makefiles (0009963)"
/cvsroot/KWSys/KWSys/System.c,v <-- System.c
new revision: 1.18; previous revision: 1.17

should be in the CMake 'master' branch momentarily...
(0022147)
David Cole (manager)
2010-09-08 19:09

The fixing commit is now in CMake 'master' :
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fcbdd3129e7edec4b07f96662aa21371d671cb83 [^]
(0022162)
David Cole (manager)
2010-09-09 11:11

Reverting previous change, which was not the correct fix for this bug... Still pending.
(0022184)
David Cole (manager)
2010-09-10 18:59

The fix for this is now merged to the 'next' branch of CMake with this commit:
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=269a4b876a34483c5cb664499dc6b1634fa453ff [^]

It's a crazy, crazy hackish fix. Don't look. Not sure whether to feel embarrassed or proud. :-}

As long as all the dashboards agree with this fix, we'll merge this into master next week, and it will make it into the 2.8.3 release...
(0022187)
David Cole (manager)
2010-09-10 19:08

There is an issue with the test modifications on the Borland Continuous dashboard. Looks like Borland doesn't like the space in the "bin dir" directory name. I'll be looking at the nightly dashboard results in the morning and formulating a response to fix this and any other issues that crop up overnight...

Bleh.
(0024438)
David Cole (manager)
2011-01-05 15:52

In this commit's message:
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1c2a9b8140829ba886d67bca084ee40eb0a20b84 [^]

...I inadvertently made a typo that references this bug, 0009963. The commit actually fixes part of 0009663, and that's the one that I should have referenced in the commit message. Sorry for the noise.

 Issue History
Date Modified Username Field Change
2009-11-24 15:30 Shane Dixon New Issue
2009-11-24 15:32 Shane Dixon Note Added: 0018580
2009-11-25 14:09 Shane Dixon Note Added: 0018591
2010-07-13 09:31 Bill Hoffman Status new => assigned
2010-07-13 09:31 Bill Hoffman Assigned To => David Cole
2010-07-23 06:10 David Cole Relationship added has duplicate 0010735
2010-08-29 02:37 Kovarththanan Rajaratnam Category CMake => Modules
2010-08-29 02:40 Kovarththanan Rajaratnam Category Modules => CMake
2010-09-08 17:44 David Cole Relationship added has duplicate 0009971
2010-09-08 17:46 David Cole Target Version => CMake 2.8.3
2010-09-08 18:43 David Cole Note Added: 0022145
2010-09-08 18:43 David Cole Status assigned => resolved
2010-09-08 18:43 David Cole Resolution open => fixed
2010-09-08 19:09 David Cole Note Added: 0022147
2010-09-09 11:11 David Cole Note Added: 0022162
2010-09-09 11:11 David Cole Status resolved => feedback
2010-09-09 11:11 David Cole Resolution fixed => reopened
2010-09-09 17:59 David Cole Priority normal => high
2010-09-10 18:59 David Cole Note Added: 0022184
2010-09-10 18:59 David Cole Status feedback => resolved
2010-09-10 18:59 David Cole Resolution reopened => fixed
2010-09-10 19:08 David Cole Note Added: 0022187
2010-10-06 13:40 David Cole Fixed in Version => CMake 2.8.3
2010-11-09 22:57 Philip Lowman Status resolved => closed
2010-11-15 17:57 David Cole Relationship added related to 0011462
2011-01-05 15:52 David Cole Note Added: 0024438
2016-06-06 13:37 Brad King View Status private => public


Copyright © 2000 - 2018 MantisBT Team