View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0015953 | CMake | CMake | public | 2016-02-04 03:14 | 2016-06-10 14:21 | ||||
Reporter | jbauer | ||||||||
Assigned To | Gregor Jasny | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | Apple | OS | OS X | OS Version | 10.11.3 | ||||
Product Version | CMake 3.4.3 | ||||||||
Target Version | CMake 3.6 | Fixed in Version | CMake 3.6 | ||||||
Summary | 0015953: CMake Does Not Use -isystem with GCC on OS X | ||||||||
Description | On OS X with the GCC compiler, CMake does not pass the -isystem flag to build commands for libraries configured with SYSTEM. For example, if target 'cmake_test' has an include added as 'target_include_directories( cmake_test SYSTEM PRIVATE ${PNG_INCLUDE_DIRS} )', -isystem will not be added on OS X with GCC. | ||||||||
Steps To Reproduce | Use the 'target_include_directories' command with the SYSTEM option on OS X with GCC. A minimal project that reproduces this issue has been provided via: https://github.com/digitalriptide/cmake_test [^] | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |||||||||||
|
Relationships |
Notes | |
(0040438) Brad King (manager) 2016-02-04 08:24 |
This is due to a condition here: https://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/Compiler/GNU.cmake;hb=v3.4.3#l55 [^] if(NOT APPLE) set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-isystem ") endif() which is present because at one time gcc on Apple did not support the flag. The condition may need to be updated to check the version/vendor of gcc. |
(0040442) Gregor Jasny (developer) 2016-02-07 14:45 |
I pushed apple-isystem-gcc topic containing https://cmake.org/gitweb?p=stage/cmake.git;a=commit;h=2cae5128fdc6316a7f0913cb89ec467b33b9715b [^] This will be available with CMake 3.6. In the meatime you could work around by adding something like this to your root CMakeLists.txt: if(APPLE) set(CMAKE_INCLUDE_SYSTEM_FLAG_C "-isystem ") set(CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-isystem ") endif() |
(0040448) Brad King (manager) 2016-02-09 10:11 |
Re 0015953:0040442: Thanks. The commit is now in 'master': Apple: Enable -isystem for GNU Compiler >= 4 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2cae5128 [^] |
(0041264) 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. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2016-02-04 03:14 | jbauer | New Issue | |
2016-02-04 08:24 | Brad King | Note Added: 0040438 | |
2016-02-04 08:41 | Gregor Jasny | Assigned To | => Gregor Jasny |
2016-02-04 08:41 | Gregor Jasny | Status | new => assigned |
2016-02-07 07:18 | Gregor Jasny | Relationship added | related to 0004462 |
2016-02-07 07:47 | Gregor Jasny | Relationship added | related to 0010837 |
2016-02-07 14:45 | Gregor Jasny | Note Added: 0040442 | |
2016-02-09 10:11 | Brad King | Note Added: 0040448 | |
2016-02-09 10:11 | Brad King | Status | assigned => resolved |
2016-02-09 10:11 | Brad King | Resolution | open => fixed |
2016-02-09 10:11 | Brad King | Fixed in Version | => CMake 3.6 |
2016-02-09 10:11 | Brad King | Target Version | => CMake 3.6 |
2016-06-10 14:21 | Kitware Robot | Note Added: 0041264 | |
2016-06-10 14:21 | Kitware Robot | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |