Skip to content

Commit

Permalink
Merge pull request #77 from mloskot/ml/require-cpp11
Browse files Browse the repository at this point in the history
Require C++11 or later
  • Loading branch information
mloskot committed Apr 9, 2018
2 parents d9e9f24 + b79dc29 commit 4bc495e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .appveyor.yml
Expand Up @@ -7,6 +7,8 @@
#
version: 1.0.{build}-{branch}

# Current Boost.GIL develop branch (future Boost 1.68) requires C++11
# Since VS2017, MSVC default is /std:c++14, so no explicit switch is required.
image: Visual Studio 2017

platform: x64
Expand Down
4 changes: 4 additions & 0 deletions CMakeLists.txt
Expand Up @@ -9,6 +9,10 @@
cmake_minimum_required(VERSION 3.10)
project(Boost.GIL CXX)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

include(CMakeDependentOption)
option(GIL_BUILD_TESTS "Build GIL tests" ON)
option(GIL_BUILD_EXAMPLES "Build GIL examples" OFF) # FIXME: Switch to ON after https://github.com/boostorg/gil/issues/40
Expand Down
9 changes: 5 additions & 4 deletions Jamfile
Expand Up @@ -9,13 +9,14 @@
project boost-gil
:
requirements
<toolset>intel:<debug-symbols>off
# MSVC: Since VS2017, default is -std:c++14, so no explicit switch is required.
<toolset>msvc:<asynch-exceptions>on
<toolset>msvc:<cxxflags>"/W4"
<toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE <define>_CRT_SECURE_NO_WARNINGS <define>_CRT_NONSTDC_NO_DEPRECATE
<toolset>gcc:<cxxflags>"-pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter -Wconversion -Wfloat-equal -Wshadow"
<toolset>darwin:<cxxflags>"-pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter -Wconversion -Wfloat-equal -Wshadow"
<toolset>clang:<cxxflags>"-pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter -Wsign-conversion -Wconversion -Wfloat-equal -Wshadow"
<toolset>intel:<debug-symbols>off
<toolset>gcc:<cxxflags>"-std=c++11 -pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter -Wconversion -Wfloat-equal -Wshadow"
<toolset>darwin:<cxxflags>"-std=c++11 -pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter -Wconversion -Wfloat-equal -Wshadow"
<toolset>clang:<cxxflags>"-std=c++11 -pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter -Wsign-conversion -Wconversion -Wfloat-equal -Wshadow"
;

build-project example ;
Expand Down

0 comments on commit 4bc495e

Please sign in to comment.