mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
9c4212aca4
This avoids propagating -std=c++14 as a compile option Currently if you use less than CMake 3.8 and you install the project `-std=c++14` gets added to the INTERFACE_COMPILE_OPTIONS. This forces users to use C++ 14 or remove the property from the imported target. The solution is to raise the minimum and use `cxx_std_14`
21 lines
939 B
CMake
21 lines
939 B
CMake
# This cmake module is meant to hold helper functions/macros
|
|
# that make maintaining the cmake build system much easier.
|
|
# This is especially helpful since gsl needs to provide coverage
|
|
# for multiple versions of cmake.
|
|
#
|
|
# Any functions/macros should have a gsl_* prefix to avoid problems
|
|
|
|
# Adding the GSL.natvis files improves the debugging experience for users of this library.
|
|
function(gsl_add_native_visualizer_support)
|
|
if (MSVC_IDE)
|
|
option(GSL_VS_ADD_NATIVE_VISUALIZERS "Configure project to use Visual Studio native visualizers" TRUE)
|
|
else()
|
|
set(GSL_VS_ADD_NATIVE_VISUALIZERS FALSE CACHE INTERNAL "Native visualizers are Visual Studio extension" FORCE)
|
|
endif()
|
|
|
|
# add natvis file to the library so it will automatically be loaded into Visual Studio
|
|
if(GSL_VS_ADD_NATIVE_VISUALIZERS)
|
|
target_sources(GSL INTERFACE $<BUILD_INTERFACE:${GSL_SOURCE_DIR}/GSL.natvis>)
|
|
endif()
|
|
endfunction()
|