Skip to content

Commit

Permalink
CMake: Set minimum C++ standard to 14
Browse files Browse the repository at this point in the history
  • Loading branch information
ZedThree committed Oct 20, 2023
1 parent 1b1e0e6 commit 4a2c6ce
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@
#Minimum required CMake Version
cmake_minimum_required(VERSION 2.8.12)

# Only set the cxx_standard if it is not set by someone else
if (NOT DEFINED CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()

# strongly encouraged to enable this globally to avoid conflicts between
# -Wpedantic being enabled and -std=c++20 and -std=gnu++20 for example
# when compiling with PCH enabled
set(CMAKE_CXX_EXTENSIONS OFF)


#Project Name
PROJECT(NCXX C CXX)
set(PACKAGE "netcdf-cxx4" CACHE STRING "")
Expand Down

0 comments on commit 4a2c6ce

Please sign in to comment.