File tree Expand file tree Collapse file tree 6 files changed +28
-8
lines changed
Expand file tree Collapse file tree 6 files changed +28
-8
lines changed Original file line number Diff line number Diff line change @@ -314,8 +314,11 @@ target_compile_options(pagmo PRIVATE
314314 "$<$<CONFIG:MinSizeRel>:${PAGMO_CXX_FLAGS_RELEASE} >"
315315)
316316
317- # Set the minimum C++ standard to C++17
317+ # Set the minimum C++ standard to C++17, both when building
318+ # and consuming pagmo.
318319target_compile_features (pagmo PUBLIC cxx_std_17)
320+ # Enforce vanilla C++17 when compiling pagmo.
321+ set_property (TARGET pagmo PROPERTY CXX_EXTENSIONS NO )
319322# NOTE: make sure the include directories from the current build
320323# are included first, so that if there is already a pagmo installation
321324# in the prefix path we don't risk including the headers from that
Original file line number Diff line number Diff line change @@ -8,7 +8,8 @@ function(ADD_PAGMO_BENCHMARK arg1)
88 "$<$<CONFIG:MinSizeRel>:${PAGMO_CXX_FLAGS_RELEASE} >"
99 )
1010 # Set the minimum C++ standard to C++17
11- target_compile_features (${arg1} PUBLIC cxx_std_17)
11+ target_compile_features (${arg1} PRIVATE cxx_std_17)
12+ set_property (TARGET ${arg1} PROPERTY CXX_EXTENSIONS NO )
1213endfunction ()
1314
1415ADD_PAGMO_BENCHMARK(thread_island_pool)
Original file line number Diff line number Diff line change 33Changelog
44=========
55
6+ 2.16.1 (unreleased)
7+ -------------------
8+
9+ Changes
10+ ~~~~~~~
11+
12+ - pagmo now requires CMake >= 3.8
13+ (`#458 <https://github.com/esa/pagmo2/pull/458 >`__).
14+
15+ Fix
16+ ~~~
17+
18+ - Various build system fixes/improvements
19+ (`#459 <https://github.com/esa/pagmo2/pull/459 >`__,
20+ `#458 <https://github.com/esa/pagmo2/pull/458 >`__,
21+ `#457 <https://github.com/esa/pagmo2/pull/457 >`__).
22+
6232.16.0 (2020-09-25)
724-------------------
825
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ Using pagmo with CMake
3838As a part of the pagmo installation, a group of CMake files is installed into
3939``CMAKE_INSTALL_PREFIX/lib/cmake/pagmo ``.
4040This bundle, which is known in the CMake lingo as a
41- `config-file package <https://cmake.org/cmake/help/v3.3 /manual/cmake-packages.7.html >`__,
41+ `config-file package <https://cmake.org/cmake/help/latest /manual/cmake-packages.7.html >`__,
4242facilitates the detection and use of pagmo from other CMake-based projects.
4343pagmo's config-file package, once loaded, provides
4444an imported target called ``Pagmo::pagmo `` which encapsulates all the information
@@ -53,9 +53,6 @@ program presented earlier may look like this:
5353
5454.. code-block :: cmake
5555
56- # pagmo needs at least CMake 3.3.
57- cmake_minimum_required(VERSION 3.3)
58-
5956 # The name of our project.
6057 project(sample_project)
6158
Original file line number Diff line number Diff line change @@ -18,7 +18,8 @@ function(ADD_PAGMO_TESTCASE arg1)
1818 "$<$<CONFIG:MinSizeRel>:${PAGMO_CXX_FLAGS_RELEASE} >"
1919 )
2020 # Set the minimum C++ standard to C++17
21- target_compile_features (${arg1} PUBLIC cxx_std_17)
21+ target_compile_features (${arg1} PRIVATE cxx_std_17)
22+ set_property (TARGET ${arg1} PROPERTY CXX_EXTENSIONS NO )
2223 add_test (${arg1} ${arg1} )
2324endfunction ()
2425
Original file line number Diff line number Diff line change @@ -8,7 +8,8 @@ function(ADD_PAGMO_TUTORIAL arg1)
88 "$<$<CONFIG:MinSizeRel>:${PAGMO_CXX_FLAGS_RELEASE} >"
99 )
1010 # Set the minimum C++ standard to C++17
11- target_compile_features (${arg1} PUBLIC cxx_std_17)
11+ target_compile_features (${arg1} PRIVATE cxx_std_17)
12+ set_property (TARGET ${arg1} PROPERTY CXX_EXTENSIONS NO )
1213 add_test (${arg1} ${arg1} )
1314endfunction ()
1415
You can’t perform that action at this time.
0 commit comments