diff --git a/CMakeLists.txt b/CMakeLists.txt index 53058e3..f4ab478 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1.3) +cmake_minimum_required(VERSION 3.7) project(GSL CXX) @@ -49,10 +49,18 @@ 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() + # add natvis file to the library so it will automatically be loaded into Visual Studio -target_sources(GSL INTERFACE - ${CMAKE_CURRENT_SOURCE_DIR}/GSL.natvis -) +if(VS_ADD_NATIVE_VISUALIZERS) + target_sources(GSL INTERFACE + ${CMAKE_CURRENT_SOURCE_DIR}/GSL.natvis + ) +endif() install( DIRECTORY include/gsl diff --git a/README.md b/README.md index 1c84490..f5abe22 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ contributing any changes that were necessary back to this project to benefit the ## Building the tests To build the tests, you will require the following: -* [CMake](http://cmake.org), version 3.1.3 or later to be installed and in your PATH. +* [CMake](http://cmake.org), version 3.7 or later to be installed and in your PATH. These steps assume the source code of this repository has been cloned into a directory named `c:\GSL`.