Merge pull request #941 from JordanMaples/cmake_update

added GSL_ prefix to VS_ADD_NATIVE_VISUALIZERS
This commit is contained in:
Jordan Maples [MSFT] 2020-10-26 10:12:40 -07:00 committed by GitHub
commit 6f4529395c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -70,13 +70,13 @@ endif()
if (CMAKE_VERSION VERSION_GREATER 3.7.8) if (CMAKE_VERSION VERSION_GREATER 3.7.8)
if (MSVC_IDE) if (MSVC_IDE)
option(VS_ADD_NATIVE_VISUALIZERS "Configure project to use Visual Studio native visualizers" TRUE) option(GSL_VS_ADD_NATIVE_VISUALIZERS "Configure project to use Visual Studio native visualizers" TRUE)
else() else()
set(VS_ADD_NATIVE_VISUALIZERS FALSE CACHE INTERNAL "Native visualizers are Visual Studio extension" FORCE) set(GSL_VS_ADD_NATIVE_VISUALIZERS FALSE CACHE INTERNAL "Native visualizers are Visual Studio extension" FORCE)
endif() endif()
# add natvis file to the library so it will automatically be loaded into Visual Studio # add natvis file to the library so it will automatically be loaded into Visual Studio
if(VS_ADD_NATIVE_VISUALIZERS) if(GSL_VS_ADD_NATIVE_VISUALIZERS)
target_sources(GSL INTERFACE target_sources(GSL INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/GSL.natvis> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/GSL.natvis>
) )