Skip to content

Commit 0839bfe

Browse files
committed
More build system tweaks, doc improvements.
1 parent e08172e commit 0839bfe

File tree

6 files changed

+28
-8
lines changed

6 files changed

+28
-8
lines changed

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff 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.
318319
target_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

benchmarks/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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)
1213
endfunction()
1314

1415
ADD_PAGMO_BENCHMARK(thread_island_pool)

doc/sphinx/changelog.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,23 @@
33
Changelog
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+
623
2.16.0 (2020-09-25)
724
-------------------
825

doc/sphinx/quickstart.rst

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Using pagmo with CMake
3838
As a part of the pagmo installation, a group of CMake files is installed into
3939
``CMAKE_INSTALL_PREFIX/lib/cmake/pagmo``.
4040
This 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>`__,
4242
facilitates the detection and use of pagmo from other CMake-based projects.
4343
pagmo's config-file package, once loaded, provides
4444
an 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

tests/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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})
2324
endfunction()
2425

tutorials/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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})
1314
endfunction()
1415

0 commit comments

Comments
 (0)