[cmake-developers] [CMake 0015464]: target_include_directories(tgt SYSTEM PUBLIC foo) adds include path with -I instead of -isystem
Mantis Bug Tracker
mantis at public.kitware.com
Sat Mar 21 04:46:28 EDT 2015
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
======================================================================
More information about the cmake-developers
mailing list