MantisBT - CMake
View Issue Details
0006108CMakeCMakepublic2007-12-03 09:252015-07-08 08:57
Steven Van Ingelgem 
Bill Hoffman 
highmajoralways
closedunable to reproduce 
 
 
0006108: -isystem get's set on "APPLE"
In Platform/Darwin.cmake @ lines 101-104 the "-isystem" gets unset for XCode only, but XCode uses GCC in the background. So if you use GNU makefiles under Mac, you will find yourself with uncompilable files as well.

My guess is that the IF(XCODE) check should be removed (or extended with a check for GCC).
No tags attached.
bz2 test.tar.bz2 (954) 2007-12-15 03:35
https://public.kitware.com/Bug/file/1256/test.tar.bz2
Issue History
2007-12-03 09:25Steven Van IngelgemNew Issue
2007-12-04 20:02Miguel FigueroaNote Added: 0009831
2007-12-04 20:03Miguel FigueroaPrioritynormal => high
2007-12-04 20:03Miguel FigueroaSeverityblock => major
2007-12-05 02:18Steven Van IngelgemNote Added: 0009832
2007-12-14 14:44Bill HoffmanNote Added: 0009903
2007-12-14 20:34Bill HoffmanStatusnew => assigned
2007-12-14 20:34Bill HoffmanAssigned To => Bill Hoffman
2007-12-15 03:35Steven Van IngelgemFile Added: test.tar.bz2
2007-12-15 03:36Steven Van IngelgemNote Added: 0009921
2008-01-10 15:41Bill HoffmanNote Added: 0010108
2008-01-10 15:44Steven Van IngelgemNote Added: 0010110
2008-01-10 15:55Bill HoffmanNote Added: 0010111
2008-01-10 16:32Alex NeundorfCategoryCCMake => CMake
2008-10-01 17:03Bill HoffmanNote Added: 0013691
2015-02-26 15:59Stephen KellyStatusassigned => resolved
2015-02-26 15:59Stephen KellyResolutionopen => unable to reproduce
2015-07-08 08:57Robert MaynardNote Added: 0039077
2015-07-08 08:57Robert MaynardStatusresolved => closed

Notes
(0009831)
Miguel Figueroa   
2007-12-04 20:02   
I helped diagnose this problem. My understanding is that the following code in Platform/Darwin.cmake @ lines 101-104 should reset the use of -isystem:

# Xcode does not support -isystem yet.
IF(XCODE)
  SET(CMAKE_INCLUDE_SYSTEM_FLAG_C)
  SET(CMAKE_INCLUDE_SYSTEM_FLAG_CXX)
ENDIF(XCODE)

So that, when INCLUDE_DIRECTORIES(SYSTEM ${wxWidgets_INCLUDE_DIRS}) is called from the UsewxWidgets.cmake file the system knows to use the -isystem flag only in systems which support this and XCODE is not one of them apparently.

I don't have a system to debug where is it that -isystem gets set, but according to the snippet of code above I would think that the SYSTEM option in the INCLUDE_DIRECTORIES command should be ignored for XCode...

--Miguel
(0009832)
Steven Van Ingelgem   
2007-12-05 02:18   
Miguel, not only for XCode ah? Just for GCC on a Mac (XCode is just the IDE, but it still uses GCC on a Mac - and GCC for Mac seems to freak out with the -isystem parameter).
(0009903)
Bill Hoffman   
2007-12-14 14:44   
Can you give an example where this fails? We do lots of mac dashboards with lots of tests, and this code works just fine.
(0009921)
Steven Van Ingelgem   
2007-12-15 03:36   
Hi, I just attached a test-case which I also sent Miguel which shows this behaviour.
(0010108)
Bill Hoffman   
2008-01-10 15:41   
So, what version of gcc on the mac has trouble with this? I just tried and -isystem seems to work and gives no warnings on two different OSX machines.
(0010110)
Steven Van Ingelgem   
2008-01-10 15:44   
I'm using 4.0.1 (the one from XCode 2.5) on a 10.4.11 G3 Mac. The test case failed for me at the time of writing.
(0010111)
Bill Hoffman   
2008-01-10 15:55   
What is the error you get, when it tries to use -isystem
(0013691)
Bill Hoffman   
2008-10-01 17:03   
I still can not reproduce this?
(0039077)
Robert Maynard   
2015-07-08 08:57   
Closing resolved issues that have not been updated in more than 4 months.