Skip to content

build: Update CMAKE_CXX_STANDARD from 11 to 14 #699

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

Merged
merged 3 commits into from
Jun 27, 2022
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ target_link_libraries(boost_gil
Boost::variant2
)

target_compile_features(boost_gil INTERFACE cxx_std_11)
target_compile_features(boost_gil INTERFACE cxx_std_14)

else()

Expand All @@ -60,14 +60,14 @@ option(BOOST_GIL_ENABLE_EXT_RASTERIZATION "Enable Rasterization extension and te
option(BOOST_GIL_ENABLE_EXT_IMAGE_PROCESSING "Enable Image Processing extension (!) and tests" ON)
option(BOOST_GIL_USE_CONAN "Use Conan to install dependencies" OFF)
option(BOOST_GIL_USE_CLANG_TIDY "Set CMAKE_CXX_CLANG_TIDY property on targets to enable clang-tidy linting" OFF)
set(CMAKE_CXX_STANDARD 11 CACHE STRING "C++ standard version to use (default is 11)")
set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard version to use (default is 14)")

#-----------------------------------------------------------------------------
# Project
#-----------------------------------------------------------------------------
project(Boost.GIL
LANGUAGES CXX
DESCRIPTION "Boost.GIL - Generic Image Library | Requires C++11 since Boost 1.68")
DESCRIPTION "Boost.GIL - Generic Image Library | Requires C++14 since Boost 1.80")

list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_BINARY_DIR}/cmake)

Expand Down Expand Up @@ -140,7 +140,7 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
set(Boost_USE_STATIC_RUNTIME OFF)
endif()

find_package(Boost 1.72.0 REQUIRED COMPONENTS filesystem)
find_package(Boost 1.80.0 REQUIRED COMPONENTS filesystem)
message(STATUS "Boost.GIL: Using Boost_INCLUDE_DIRS=${Boost_INCLUDE_DIRS}")
message(STATUS "Boost.GIL: Using Boost_LIBRARY_DIRS=${Boost_LIBRARY_DIRS}")

Expand Down
4 changes: 2 additions & 2 deletions test/extension/toolbox/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ foreach(_name
set(_target test_ext_toolbox_${_name})

add_executable(${_target} "")
target_sources(${_target} PRIVATE ${_name})
target_sources(${_target} PRIVATE "${_name}.cpp")
target_link_libraries(${_target}
PRIVATE
gil_compile_options
Expand All @@ -50,7 +50,7 @@ foreach(_name
set(_target test_ext_toolbox_${_name})

add_executable(${_target} "")
target_sources(${_target} PRIVATE ${_name})
target_sources(${_target} PRIVATE "${_name}.cpp")
target_link_libraries(${_target}
PRIVATE
gil_compile_options
Expand Down