[CMake] target_include_directories(): SYSTEM option does not seem to work on recent versions of CMake, when targeting Xcode.
Nils Gladitz
nilsgladitz at gmail.com
Thu Aug 6 04:57:27 EDT 2015
On 08/06/2015 10:41 AM, A D wrote:
> It is not using "-isystem" flag, whereas it is available.
>
> Did we misuse the command ? Or should we report this as a bug ?
>
> Thank you for reading,
I am not too familiar with XCode myself but
Modules/Platform/Darwin.cmake
contains
# Xcode does not support -isystem yet.
if(XCODE)
set(CMAKE_INCLUDE_SYSTEM_FLAG_C)
set(CMAKE_INCLUDE_SYSTEM_FLAG_CXX)
endif()
suggesting that even though the compiler might support -isystem, Xcode
itself does (or did) not. I can't tell if that is something that may or
may not have changed with current Xcode releases.
If you have reason to believe it is supported now (e.g. because you are
able to create and Xcode project without cmake that has explicit system
includes) you may want to open an issue.
Nils
More information about the CMake
mailing list