93ac2a78d5
CMake used to put all header search paths into HEADER_SEARCH_PATHS attribute. Unfortunately this attribute does not support to declare a search path as a system include. As a hack one could add a -isystem /path to the cflags but then include ordering is not deterministic. A better approach was chosen with this patch by not filling HEADER_SEARCH_PATHS at all and to populate the C, C++, and Fortran flags directly. The include paths used by Xcode should be now identical to the ones used by Unix Makefiles and Ninja generator.
43 lines
1.6 KiB
CMake
43 lines
1.6 KiB
CMake
|
|
#=============================================================================
|
|
# Copyright 2004-2015 Kitware, Inc.
|
|
#
|
|
# Distributed under the OSI-approved BSD License (the "License");
|
|
# see accompanying file Copyright.txt for details.
|
|
#
|
|
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
# See the License for more information.
|
|
#=============================================================================
|
|
# (To distribute this file outside of CMake, substitute the full
|
|
# License text for the above reference.)
|
|
|
|
set(CMAKE_Swift_OUTPUT_EXTENSION .o)
|
|
set(CMAKE_INCLUDE_FLAG_Swift "-I")
|
|
|
|
# Load compiler-specific information.
|
|
if(CMAKE_Swift_COMPILER_ID)
|
|
include(Compiler/${CMAKE_Swift_COMPILER_ID}-Swift OPTIONAL)
|
|
endif()
|
|
|
|
# load the system- and compiler specific files
|
|
if(CMAKE_Swift_COMPILER_ID)
|
|
# load a hardware specific file, mostly useful for embedded compilers
|
|
if(CMAKE_SYSTEM_PROCESSOR)
|
|
include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Swift_COMPILER_ID}-Swift-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL)
|
|
endif()
|
|
include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Swift_COMPILER_ID}-Swift OPTIONAL)
|
|
endif()
|
|
|
|
# for most systems a module is the same as a shared library
|
|
# so unless the variable CMAKE_MODULE_EXISTS is set just
|
|
# copy the values from the LIBRARY variables
|
|
if(NOT CMAKE_MODULE_EXISTS)
|
|
set(CMAKE_SHARED_MODULE_Swift_FLAGS ${CMAKE_SHARED_LIBRARY_Swift_FLAGS})
|
|
set(CMAKE_SHARED_MODULE_CREATE_Swift_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_Swift_FLAGS})
|
|
endif()
|
|
|
|
include(CMakeCommonLanguageInclude)
|
|
|
|
set(CMAKE_Swift_INFORMATION_LOADED 1)
|