Skip to content

Commit

Permalink
Addition of compile features
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianWolters committed Oct 21, 2018
1 parent 328aa2d commit e1c1077
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,18 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
source_group("Header Files" FILES ${header_source_files})

add_library(${PROJECT_NAME} INTERFACE)
target_compile_features(${PROJECT_NAME} INTERFACE cxx_constexpr)
target_compile_features(${PROJECT_NAME}
INTERFACE
cxx_auto_type
cxx_constexpr
cxx_decltype_auto
)
target_include_directories(${PROJECT_NAME} INTERFACE ${PROJECT_SOURCE_DIR})
target_sources(${PROJECT_NAME}
INTERFACE
$<BUILD_INTERFACE:${header_source_files}>
)


# HACK: There is currently no other possibility to support IntelliSense in
# some IDEs (e.g. Visual Studio Code) for INTERFACE (header-only) libraries.
add_custom_target(${PROJECT_NAME}_ide SOURCES ${header_source_files})
Expand Down

0 comments on commit e1c1077

Please sign in to comment.