Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require C++11 or later #77

Merged
merged 1 commit into from Apr 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean to remove this instruction ? Seems unrelated...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, not at all.

I shuffled the lines moving <toolset>msvc: to the top, so the # MSVC comments is in the beginning

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see. I had missed that before. Thanks.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem. Thx for extra pair of eyes

# 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