MantisBT - CMake
View Issue Details
0007407CMakeCMakepublic2008-07-27 07:112009-02-26 09:14
Hartmut Seichter 
Brad King 
normalminoralways
closedfixed 
CMake-2-6 
 
0007407: Xcode 3.1 and include_directories
If include_directories point to a path like "/usr/local/include" it will not show up in the "Header Search Path" in Xcode 3.1

My current workaround is to use an extra dash (here OSG_INCLUDE_DIR is "/usr/local/include":

if(APPLE)
    include_directories("/${OSG_INCLUDE_DIR}")
else(APPLE)
    include_directories(${OSG_INCLUDE_DIR})
endif(APPLE)

It will show up correctly no in the Xcode project.

No tags attached.
child of 0008598closed Brad King implicit include directory suppression may be outdated 
Issue History
2008-07-27 07:11Hartmut SeichterNew Issue
2008-08-19 16:45Bill HoffmanStatusnew => assigned
2008-08-19 16:45Bill HoffmanAssigned To => Bill Hoffman
2008-12-09 17:37Hartmut SeichterNote Added: 0014315
2009-02-24 15:24Brad KingRelationship addedchild of 0008598
2009-02-24 15:25Brad KingAssigned ToBill Hoffman => Brad King
2009-02-24 15:40Brad KingNote Added: 0015341
2009-02-24 15:40Brad KingStatusassigned => closed
2009-02-24 15:40Brad KingResolutionopen => fixed
2009-02-25 23:05Eric WingNote Added: 0015412
2009-02-25 23:05Eric WingStatusclosed => feedback
2009-02-25 23:05Eric WingResolutionfixed => reopened
2009-02-25 23:19Eric WingNote Added: 0015413
2009-02-26 09:14Brad KingNote Added: 0015421
2009-02-26 09:14Brad KingStatusfeedback => closed
2009-02-26 09:14Brad KingResolutionreopened => fixed

Notes
(0014315)
Hartmut Seichter   
2008-12-09 17:37   
This issue persits in 2.6.3 RC 5
(0015341)
Brad King   
2009-02-24 15:40   
I've removed include dir suppression outright. See issue 0008598.
(0015412)
Eric Wing   
2009-02-25 23:05   
I just tried the final release of 2.6.3. In Xcode 3.1.2 (Xcode generator), CMake still seems to be suppressing /usr/local/include even though suppression claims to have been removed. This is causing very bad headaches when used with SDK's as header files won't be found.

Example CMake project that reproduces the problem. For a single file project with a file called main.c (and it includes a fake header file you put in /usr/local/include) try:

cmake_minimum_required(VERSION 2.6)
SET(CMAKE_OSX_ARCHITECTURES "ppc;i386" CACHE STRING "Build architectures for OSX" FORCE)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=10.5" CACHE STRING "Flags used by the compiler during all build types." FORCE)

INCLUDE_DIRECTORIES(/usr/local/include /opt/local/include)
ADD_EXECUTABLE(foo main.c)

Generate an Xcode project. You can see in Xcode that the Header paths gets the /opt/local/include, but not /usr/local/include. Compiling should fail because the header you put in /usr/local/include can't be found (assuming it wasn't accidentally found elsewhere).
(0015413)
Eric Wing   
2009-02-25 23:19   
Just to be clear, this is a problem with both the Makefile and Xcode generator.
(0015421)
Brad King   
2009-02-26 09:14   
The new implementation does not suppress /usr/local/include at all. The code was completely removed.