View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015977CMakeCMakepublic2016-02-16 20:282016-06-10 14:21
ReporterRichard Lang 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformWindows 7 64 bitOSOS Version
Product VersionCMake 3.3.1 
Target VersionFixed in VersionCMake 3.4.3 
Summary0015977: include_directories() gags on ".." embedded in directory path
DescriptionWorking on port of collection of existing projects from proprietary toolchain to cmake, where some source and include files reside in sibling/common ancestor folders of of the project folders


   |-- SharedSource
   | |--SharedSource1.c
   | |--SharedSource2.c
   | +--SharedSource1.h
   +-- Project1
   | |--Project1.c
   | +--MakeLists.txt
   +-- Project2
        |--Project2.c
        +--MakeLists.txt

Using Windows native cmake v3.4.1 I can quite happily specify "SharedSource" as an include directory in my project cmake scripts using a "../' parent directory relative reference as follows:


  ...
  include_directories(../SharedSource)
  ...

however when I try and run the same script using cmake within the cygwin & MSYS2 UNIX emulation environments it fails with a "Found relative path while evaluating include directories" message.

The problem still occurs when I explicitly prepend CMAKE_CURRENT_SOURCE_DIR on the path, as follows

  include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../SharedSource)

The cygwin cmake version is 3.3.1, while the MSYS2 one is 3.2.3, and probably reflects the current version in these environments, as I've installed them pretty recently.

 
Additional InformationDon't currently have a native UNIX/linux environment to try this on. I'm a UNIX novice, but AFAIK "../SharedSource" should be a valid relative path on UNIX platforms.

Can't see anything obvious in the bug tracker that would suggest that this has been fixed between 3.3.1 and 3.4.1, suggesting it's maybe a platform idiosyncrasy.
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0040497)
Brad King (manager)
2016-02-17 09:38

Please try 3.4 or later in the environment where you see the warning with 3.3 or 3.2. Binaries for 3.4 on cygwin are available here:

 https://cmake.org/files/v3.4/cygwin/ [^]

Or you can build from source.
(0040502)
Richard Lang (reporter)
2016-02-17 15:33

The 3.4.3 cygwin build appears to work correctly thanks Brad.

Unfortunately some other issues prevent me from using the cygwin version of cmake (a native Windows compiler toolchain that can't handle cygwin paths) so I've been playing with MSYS2 as an alternative. Will give them a nudge regarding ensuring the latest cmake version is included in the next build.
(0041247)
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.

 Issue History
Date Modified Username Field Change
2016-02-16 20:28 Richard Lang New Issue
2016-02-17 09:38 Brad King Note Added: 0040497
2016-02-17 15:33 Richard Lang Note Added: 0040502
2016-02-17 15:35 Brad King Status new => resolved
2016-02-17 15:35 Brad King Resolution open => fixed
2016-02-17 15:35 Brad King Fixed in Version => CMake 3.4.3
2016-06-10 14:21 Kitware Robot Note Added: 0041247
2016-06-10 14:21 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team