Skip to content

Commit

Permalink
CMake/Meson: Use C++14
Browse files Browse the repository at this point in the history
Since dxguids.h uses constexpr, we should make sure the GUIDs lib
is built using an appropriate C++ version. CMake requires 14,
Meson defaults to 14.
  • Loading branch information
jenatali committed Dec 28, 2020
1 parent 1dc7f15 commit d64caa7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ cmake_minimum_required(VERSION 3.10.2)
project(DirectX-Headers
LANGUAGES CXX
VERSION 1.0)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

option(BUILD_TEST "Build the test" ON)

Expand Down
5 changes: 3 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

project('DirectX-Headers', 'cpp', version : '1.0')
project('DirectX-Headers', 'cpp', version : '1.0',
default_options : ['cpp_std=c++14'])

inc_dirs = [include_directories('include', is_system : true)]
install_inc_subdirs = ['']
Expand All @@ -27,4 +28,4 @@ pkg.generate(name : 'DirectX-Headers',
libraries : [guids_lib],
version : meson.project_version(),
subdirs : install_inc_subdirs)
install_subdir('include', install_dir : '')
install_subdir('include', install_dir : '')

0 comments on commit d64caa7

Please sign in to comment.