v2.0 Patch (#641)

Signed-off-by: Rian Quinn <rianquinn@gmail.com>
This commit is contained in:
Rian Quinn 2018-04-27 13:56:25 -06:00 committed by Anna Gringauze
parent 2fc94db3eb
commit d933e51b8b

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.7) cmake_minimum_required(VERSION 3.1.3)
project(GSL CXX) project(GSL CXX)
@ -25,7 +25,6 @@ if (CMAKE_VERSION VERSION_LESS 3.7.9)
else() else()
message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++14 support. Please use a different C++ compiler.") message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++14 support. Please use a different C++ compiler.")
endif() endif()
endif() endif()
else () else ()
# set the GSL library to be compiled only with c++14 # set the GSL library to be compiled only with c++14
@ -49,17 +48,19 @@ target_include_directories(GSL INTERFACE
> >
) )
if (MSVC_IDE) if ((CMAKE_VERSION GREATER 3.7.9) OR (CMAKE_VERSION EQUAL 3.7.9))
option(VS_ADD_NATIVE_VISUALIZERS "Configure project to use Visual Studio native visualizers" TRUE) if (MSVC_IDE)
else() option(VS_ADD_NATIVE_VISUALIZERS "Configure project to use Visual Studio native visualizers" TRUE)
set(VS_ADD_NATIVE_VISUALIZERS FALSE CACHE INTERNAL "Native visualizers are Visual Studio extension" FORCE) else()
endif() set(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 # add natvis file to the library so it will automatically be loaded into Visual Studio
if(VS_ADD_NATIVE_VISUALIZERS) if(VS_ADD_NATIVE_VISUALIZERS)
target_sources(GSL INTERFACE target_sources(GSL INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}/GSL.natvis ${CMAKE_CURRENT_SOURCE_DIR}/GSL.natvis
) )
endif()
endif() endif()
install( install(