File tree Expand file tree Collapse file tree 1 file changed +13
-12
lines changed
Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change 1- cmake_minimum_required (VERSION 3.7 )
1+ cmake_minimum_required (VERSION 3.1.3 )
22
33project (GSL CXX )
44
@@ -25,7 +25,6 @@ if (CMAKE_VERSION VERSION_LESS 3.7.9)
2525 else ()
2626 message (FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++14 support. Please use a different C++ compiler." )
2727 endif ()
28-
2928 endif ()
3029else ()
3130 # set the GSL library to be compiled only with c++14
@@ -49,17 +48,19 @@ target_include_directories(GSL INTERFACE
4948 >
5049)
5150
52- if (MSVC_IDE )
53- option (VS_ADD_NATIVE_VISUALIZERS "Configure project to use Visual Studio native visualizers" TRUE )
54- else ()
55- set (VS_ADD_NATIVE_VISUALIZERS FALSE CACHE INTERNAL "Native visualizers are Visual Studio extension" FORCE )
56- endif ()
51+ if ((CMAKE_VERSION GREATER 3.7.9) OR (CMAKE_VERSION EQUAL 3.7.9))
52+ if (MSVC_IDE )
53+ option (VS_ADD_NATIVE_VISUALIZERS "Configure project to use Visual Studio native visualizers" TRUE )
54+ else ()
55+ set (VS_ADD_NATIVE_VISUALIZERS FALSE CACHE INTERNAL "Native visualizers are Visual Studio extension" FORCE )
56+ endif ()
5757
58- # add natvis file to the library so it will automatically be loaded into Visual Studio
59- if (VS_ADD_NATIVE_VISUALIZERS)
60- target_sources (GSL INTERFACE
61- ${CMAKE_CURRENT_SOURCE_DIR} /GSL.natvis
62- )
58+ # add natvis file to the library so it will automatically be loaded into Visual Studio
59+ if (VS_ADD_NATIVE_VISUALIZERS)
60+ target_sources (GSL INTERFACE
61+ ${CMAKE_CURRENT_SOURCE_DIR} /GSL.natvis
62+ )
63+ endif ()
6364endif ()
6465
6566install (
You can’t perform that action at this time.
0 commit comments