Merge branch 'development' of https://github.com/ETLCPP/etl into development

This commit is contained in:
John Wellbelove 2022-07-27 10:42:56 +01:00
commit 592711c72a

View File

@ -15,13 +15,22 @@ project(etl VERSION ${ETL_VERSION})
option(BUILD_TESTS "Build unit tests" OFF)
option(NO_STL "No STL" OFF)
# There is a bug on old gcc versions for some targets that causes all system headers
# to be implicitly wrapped with 'extern "C"'
# Users can add set(NO_SYSTEM_INCLUDE ON) to their top level CMakeLists.txt to work around this.
option(NO_SYSTEM_INCLUDE "Do not include with -isystem" OFF)
if (NO_SYSTEM_INCLUDE)
set(INCLUDE_SPECIFIER "")
else()
set(INCLUDE_SPECIFIER "SYSTEM")
endif()
add_library(${PROJECT_NAME} INTERFACE)
# This allows users which use the add_subdirectory or FetchContent
# to use the same target as users which use find_package
add_library(etl::etl ALIAS ${PROJECT_NAME})
target_include_directories(${PROJECT_NAME} SYSTEM INTERFACE
target_include_directories(${PROJECT_NAME} ${INCLUDE_SPECIFIER} INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)