Skip to content

Commit f989f18

Browse files
committed
Set CPM_USE_LOCAL_PACKAGES
1 parent 87e81ab commit f989f18

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

CMakeLists.txt

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
#######################################################
22
### Matplot++ ###
33
#######################################################
4+
# Project information
45
cmake_minimum_required(VERSION 3.14)
5-
project(matplotplusplus VERSION 1.0.0)
6-
6+
project(matplotplusplus VERSION 1.0.1)
77
set(CMAKE_CXX_STANDARD 17)
8+
9+
# CMake dependencies for installer
810
include(CMakePackageConfigHelpers)
911
include(GNUInstallDirs)
12+
13+
# To find or download packages
1014
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
11-
include(cmake/CPM.cmake)
1215
message("CMAKE_MODULE_PATH=${CMAKE_MODULE_PATH}")
16+
option(CPM_USE_LOCAL_PACKAGES "Try `find_package` before downloading dependencies" ON)
17+
include(cmake/CPM.cmake)
1318

14-
# Is this a master project or a subdirectory of another project
19+
# Check if this is a master project or a subdirectory of another project
1520
if (${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_SOURCE_DIR})
1621
set(MASTER_PROJECT ON)
1722
else ()
@@ -34,15 +39,16 @@ option(BUILD_HIGH_RESOLUTION_WORLD_MAP "Compile the high resolution maps for geo
3439
option(BUILD_FOR_DOCUMENTATION_IMAGES "Bypass wait() commands and save figures as .svg at destruction" OFF)
3540
option(BUILD_EXPERIMENTAL_OPENGL_BACKEND "Compile target with the experimental OpenGL backend" OFF)
3641
option(OPTIMIZE_RELEASE_CODE_BY_DEFAULT "Turn on optimization flags by default in Release" OFF)
42+
option(BUILD_WITH_PEDANTIC_WARNINGS "Use pedantic warnings. This is useful for developers because many of these warnings will be in continuous integration anyway." OFF)
43+
option(BUILD_WITH_UTF8 "Accept utf-8 in MSVC by default." ON)
44+
3745
if (OPTIMIZE_RELEASE_CODE_BY_DEFAULT)
3846
if (MSVC)
3947
set(CMAKE_CXX_FLAGS_RELEASE "/O2")
4048
else ()
4149
set(CMAKE_CXX_FLAGS_RELEASE "-O2")
4250
endif ()
4351
endif ()
44-
option(BUILD_WITH_PEDANTIC_WARNINGS "Use pedantic warnings. This is useful for developers because many of these warnings will be in continuous integration anyway." OFF)
45-
option(BUILD_WITH_UTF8 "Accept utf-8 in MSVC by default." ON)
4652

4753
# Where to find dependencies
4854
option(WITH_SYSTEM_CIMG "Use system-provided CImg.h instead of bundled" OFF)

0 commit comments

Comments
 (0)