The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=15464 
====================================================================== 
Reported By:                socantre
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15464
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2015-03-21 04:46 EDT
Last Modified:              2015-03-21 04:46 EDT
====================================================================== 
Summary:                    target_include_directories(tgt SYSTEM PUBLIC foo)
adds include path with -I instead of -isystem
Description: 
With the ninja generator and AppleClang on OS X the include flag -I is used
instead of -isystem when include directories are added to specific targets

A global include_directories(SYSTEM headers) uses the correct -isystem flag

Steps to Reproduce: 
mkdir tmp && cd tmp
touch main.cpp
cat << EOF > CMakeLists.txt
cmake_minimum_required(VERSION 3.2)
project(test)
add_executable(main main.cpp)
target_include_directories(main SYSTEM PUBLIC include)
EOF
mkdir build && cd build
cmake -G Ninja ..
grep build.ninja -e "-I../include"

Additional Information: 
-- The C compiler identification is AppleClang 6.0.0.6000057
-- The CXX compiler identification is AppleClang 6.0.0.6000057

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2015-03-21 04:46 socantre       New Issue                                    
======================================================================

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to