# HG changeset patch
# User Juuso Lapinlampi <wubthecaptain@gmail.com>
# Date 1544450815 0
#      Mon Dec 10 14:06:55 2018 +0000
# Node ID ef4bcd98e60a0957bafa520048912cb74668dfa8
# Parent  37a862bf69001cc311979720ba74dcaa792473b0
CMake: Enforce C++98 standard (without extensions)

We could perhaps get more precise warnings from the C++ compiler, if it
knew the standards version to use. This adds definitions for
CMAKE_CXX_STANDARD, CMAKE_CXX_STANDARD_REQUIRED and CXX_EXTENSIONS.

Technically Doomseeker conforms to the C++03 standard, but CMake has no
option for that; nonetheless they're very similar.

Fixes: #3542

diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -21,6 +21,10 @@
 cmake_minimum_required(VERSION 2.8.12)
 project(Doomseeker)
 
+set(CMAKE_CXX_STANDARD 98)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(CMAKE_CXX_EXTENSIONS OFF)
+
 # Multiarch support
 if(UNIX AND NOT APPLE)
 	include(GNUInstallDirs)
