mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-25 09:11:58 -05:00
c52bad36aa
- Move all install logic inside gsl_install.cmake - This makes reading the logic easier, and avoids the enable language issue with `GNUInstallDirs` by having it included after the project call - Have all functions inside gsl_functions.cmake - Use CMake idiom PROJECT_IS_TOP_LEVEL - Update README.md
14 lines
484 B
CMake
14 lines
484 B
CMake
# Add include folders to the library and targets that consume it
|
|
# the SYSTEM keyword suppresses warnings for users of the library
|
|
#
|
|
# By adding this directory as an include directory the user gets a
|
|
# namespace effect.
|
|
#
|
|
# IE:
|
|
# #include <gsl/gsl>
|
|
if(PROJECT_IS_TOP_LEVEL)
|
|
target_include_directories(GSL INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
|
|
else()
|
|
target_include_directories(GSL SYSTEM INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
|
|
endif()
|