Skip to content

Commit

Permalink
v2.0 Patch
Browse files Browse the repository at this point in the history
Signed-off-by: Rian Quinn <[email protected]>
  • Loading branch information
rianquinn committed Mar 20, 2018
1 parent c9e423d commit 55ecd6f
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.7)
cmake_minimum_required(VERSION 3.1.3)

project(GSL CXX)

Expand All @@ -25,7 +25,6 @@ if (CMAKE_VERSION VERSION_LESS 3.7.9)
else()
message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++14 support. Please use a different C++ compiler.")
endif()

endif()
else ()
# set the GSL library to be compiled only with c++14
Expand All @@ -49,17 +48,19 @@ target_include_directories(GSL INTERFACE
>
)

if (MSVC_IDE)
option(VS_ADD_NATIVE_VISUALIZERS "Configure project to use Visual Studio native visualizers" TRUE)
else()
set(VS_ADD_NATIVE_VISUALIZERS FALSE CACHE INTERNAL "Native visualizers are Visual Studio extension" FORCE)
endif()
if ((CMAKE_VERSION GREATER 3.7.9) OR (CMAKE_VERSION EQUAL 3.7.9))
if (MSVC_IDE)
option(VS_ADD_NATIVE_VISUALIZERS "Configure project to use Visual Studio native visualizers" TRUE)
else()
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
if(VS_ADD_NATIVE_VISUALIZERS)
target_sources(GSL INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}/GSL.natvis
)
# add natvis file to the library so it will automatically be loaded into Visual Studio
if(VS_ADD_NATIVE_VISUALIZERS)
target_sources(GSL INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}/GSL.natvis
)
endif()
endif()

install(
Expand Down

0 comments on commit 55ecd6f

Please sign in to comment.