Skip to content

Commit 006bead

Browse files
authored
Merge pull request #840 from nredick/Update-minimum-cmake-version
Update minimum cmake version from 2.8.12 -> 3.5
2 parents 9141201 + 02014e7 commit 006bead

File tree

5 files changed

+56
-57
lines changed

5 files changed

+56
-57
lines changed

.github/workflows/test.yml

Lines changed: 40 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ jobs:
2323

2424
- name: Use cmake
2525
run: cmake --version
26-
26+
2727
- uses: actions/checkout@v4
2828

2929
- name: Install astyle
3030
shell: bash
3131
run: cd .. && mkdir astyle && cd astyle && wget 'https://sourceforge.net/projects/astyle/files/astyle/astyle 2.04/astyle_2.04_linux.tar.gz' && tar -zxvf astyle_2.04_linux.tar.gz && cd astyle/build/gcc && make && sudo make install && cd ../../../../
32-
32+
3333
- name: Create Build Environment
34-
run: |
34+
run: |
3535
mkdir build;
3636
cd build;
3737
@@ -53,21 +53,21 @@ jobs:
5353
- name: check indentation
5454
shell: bash
5555
working-directory: ${{github.workspace}}/build
56-
run: |
57-
if [[ "$(git status | grep 'modified' --count)" -gt "0" ]]; then
58-
git diff > diff.log;
59-
cat diff.log;
60-
exit 1;
56+
run: |
57+
if [[ "$(git status | grep 'modified' --count)" -gt "0" ]]; then
58+
git diff > diff.log;
59+
cat diff.log;
60+
exit 1;
6161
fi
6262
6363
test_linux_and_macos:
6464
needs: test_indentation
65-
strategy:
65+
strategy:
6666
fail-fast: false
67-
matrix:
67+
matrix:
6868
os: ['ubuntu-22.04', 'ubuntu-24.04','macos-13']
6969
build_type: ['Release', 'Debug']
70-
70+
7171
runs-on: ${{ matrix.os }}
7272

7373
steps:
@@ -99,7 +99,7 @@ jobs:
9999
fi
100100
fi
101101
shell: bash
102-
102+
103103
- name: Create Build Environment
104104
run: cmake -E make_directory ${{github.workspace}}/build
105105

@@ -131,17 +131,17 @@ jobs:
131131

132132
test_linux_non_unity_no_optional_dependencies:
133133
needs: test_indentation
134-
strategy:
134+
strategy:
135135
fail-fast: false
136-
matrix:
136+
matrix:
137137
os: ['ubuntu-24.04']
138138
build_type: ['Debug']
139-
139+
140140
runs-on: ${{ matrix.os }}
141141

142142
steps:
143143
- uses: actions/checkout@v4
144-
144+
145145
- name: Create Build Environment
146146
run: cmake -E make_directory ${{github.workspace}}/build
147147

@@ -164,17 +164,17 @@ jobs:
164164
working-directory: ${{github.workspace}}/build
165165
shell: bash
166166
run: ctest -VV -C ${{ matrix.build_type }}
167-
167+
168168

169169
test_windows:
170170
needs: test_indentation
171-
strategy:
171+
strategy:
172172
fail-fast: false
173-
matrix:
173+
matrix:
174174
os: ['windows-2022']
175175
build_type: ['Release', 'Debug']
176176
build_system: ['Visual Studio 17 2022']
177-
177+
178178
runs-on: ${{ matrix.os }}
179179

180180
steps:
@@ -187,7 +187,7 @@ jobs:
187187
# shell: bash
188188

189189
- uses: ilammy/msvc-dev-cmd@v1
190-
190+
191191
- name: Create Build Environment
192192
run: cmake -E make_directory ${{github.workspace}}/build
193193

@@ -211,16 +211,16 @@ jobs:
211211
working-directory: ${{github.workspace}}/build
212212
shell: bash
213213
run: ctest -VV -C ${{ matrix.build_type }} -E _no_coordinates
214-
214+
215215

216216
test_linux_and_macos_mpi:
217217
needs: test_indentation
218-
strategy:
218+
strategy:
219219
fail-fast: false
220-
matrix:
220+
matrix:
221221
os: ['ubuntu-24.04','macos-13']
222222
build_type: ['Release']
223-
223+
224224
runs-on: ${{ matrix.os }}
225225

226226
steps:
@@ -232,19 +232,19 @@ jobs:
232232
sudo apt update;
233233
sudo apt install gfortran swig python3-setuptools openmpi-bin libopenmpi-dev
234234
elif [ "$RUNNER_OS" == "macOS" ]; then
235-
sudo brew install open-mpi || true
235+
sudo brew install open-mpi || true
236236
echo "4"
237237
if [ "${{ matrix.os }}" == "macos-13" ]; then
238238
sudo xcode-select --switch /Applications/Xcode_15.0.1.app
239239
else
240240
sudo xcode-select --switch /Applications/Xcode_13.2.1.app
241241
fi
242-
else
242+
else
243243
echo "$RUNNER_OS not supported"
244244
exit 1
245245
fi
246246
shell: bash
247-
247+
248248
- name: Create Build Environment
249249
run: cmake -E make_directory ${{github.workspace}}/build
250250

@@ -284,11 +284,11 @@ jobs:
284284

285285
- name: extend path
286286
run: echo $PATH && export PATH=$PATH:/home/runner/.local/bin && echo $PATH && export PYTHONPATH=$PYTHONPATH:/home/runner/.local/bin
287-
287+
288288
- name: Install coveralls
289-
run: pipx install cpp-coveralls
289+
run: pipx install cpp-coveralls
290290
shell: bash
291-
291+
292292
- name: Create Build Environment
293293
run: cmake -E make_directory ${{github.workspace}}/build
294294

@@ -350,14 +350,14 @@ jobs:
350350

351351
linux-cmake_mpi:
352352
needs: [test_indentation,coverage]
353-
strategy:
353+
strategy:
354354
fail-fast: false
355-
matrix:
355+
matrix:
356356
os: ['ubuntu-24.04']
357-
cmake_version: ['2.8.12','3.16.x', '3.20.x']
357+
cmake_version: ['3.16.x', '3.20.x']
358358
use_mpi: ['TRUE','FALSE']
359359
build_type: ['Release']
360-
360+
361361
runs-on: ${{ matrix.os }}
362362

363363
steps:
@@ -369,8 +369,8 @@ jobs:
369369
sudo apt update;
370370
sudo apt install gfortran swig python3-setuptools openmpi-bin libopenmpi-dev
371371
elif [ "$RUNNER_OS" == "macOS" ]; then
372-
sudo brew install open-mpi || true
373-
else
372+
sudo brew install open-mpi || true
373+
else
374374
echo "$RUNNER_OS not supported"
375375
exit 1
376376
fi
@@ -379,8 +379,8 @@ jobs:
379379
- name: Setup cmake
380380
uses: jwlawson/[email protected]
381381
with:
382-
cmake-version: ${{ matrix.cmake_version }}
383-
382+
cmake-version: ${{ matrix.cmake_version }}
383+
384384
- name: Use cmake
385385
run: cmake --version
386386

@@ -590,7 +590,7 @@ jobs:
590590
shell: bash
591591
run: ctest -VV -C ${{ matrix.build_type }}
592592

593-
593+
594594
linux-gcc_no_apps:
595595
needs: [test_indentation,coverage]
596596
strategy:
@@ -718,4 +718,3 @@ jobs:
718718
working-directory: ${{github.workspace}}/build
719719
shell: bash
720720
run: ctest -VV -C ${{ matrix.build_type }} -R _valgrind -E _no_coordinates_valgrind
721-

CMakeLists.txt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 2.8.12)
1+
cmake_minimum_required(VERSION 3.5)
22

33
project(WorldBuilder C CXX)
44

@@ -118,9 +118,9 @@ endif()
118118

119119

120120
#find python libs
121-
SET(WB_ENABLE_PYTHON ON CACHE BOOL "Whether or not to enable Python when compiling the world builder.")
121+
SET(WB_ENABLE_PYTHON ON CACHE BOOL "Whether or not to enable Python when compiling the world builder.")
122122
if(${WB_ENABLE_PYTHON})
123-
if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
123+
if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
124124
FIND_PACKAGE(PythonLibs 3.0)
125125
FIND_PACKAGE(PythonInterp 3.0)
126126

@@ -299,15 +299,15 @@ if(MAKE_PYTHON_WRAPPER)
299299

300300
# Add swig module
301301
SET_SOURCE_FILES_PROPERTIES(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/source/world_builder/wrapper_cpp.i PROPERTIES CPLUSPLUS ON)
302-
if(${CMAKE_VERSION} VERSION_LESS "3.8.0")
302+
if(${CMAKE_VERSION} VERSION_LESS "3.8.0")
303303
swig_add_module(gwb python ${CMAKE_CURRENT_SOURCE_DIR}/source/world_builder/wrapper_cpp.i)
304304
else()
305305
swig_add_library(gwb LANGUAGE python SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/source/world_builder/wrapper_cpp.i)
306306
endif()
307307

308308
endif()
309309

310-
# Find if we are using make or ninja.
310+
# Find if we are using make or ninja.
311311
IF(CMAKE_GENERATOR MATCHES "Ninja")
312312
SET(_make_command "ninja")
313313
ELSE()
@@ -371,11 +371,11 @@ if (NOT MSVC AND NOT APPLE)
371371
#TODO: if other compiles need to be threaded, see https://computing.llnl.gov/tutorials/pthreads/#Compiling to add the correct cases.
372372
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER MATCHES "AppleClang")
373373
# Preventing issues with older cmake compilers (<3.7) which do not support VERSION_GREATER_EQUAL
374-
# cmake vesrion 3.12.0 introduces COMPILE_LANGUAGE:FORTRAN, otherwise this would be >=2.8.12
374+
# cmake version 3.12.0 introduces COMPILE_LANGUAGE:FORTRAN, otherwise this would be >=2.8.12
375375
if(NOT ${CMAKE_VERSION} VERSION_LESS "3.9.0")
376-
SET(WB_COMPILER_OPTIONS_PRIVATE -pedantic -Wall -Wextra
376+
SET(WB_COMPILER_OPTIONS_PRIVATE -pedantic -Wall -Wextra
377377
$<$<COMPILE_LANGUAGE:CXX>:-Wmost -Wunreachable-code -Wuninitialized -Wmissing-braces -Wunused-parameter -Wold-style-cast -Wshadow -Wfloat-equal -Wpointer-arith -Wwrite-strings
378-
-Wsynth -Wsign-compare -Woverloaded-virtual -Wliteral-range -Wparentheses -Wunused-local-typedefs -Wcast-qual -fstrict-aliasing -Werror=uninitialized -Wundef
378+
-Wsynth -Wsign-compare -Woverloaded-virtual -Wliteral-range -Wparentheses -Wunused-local-typedefs -Wcast-qual -fstrict-aliasing -Werror=uninitialized -Wundef
379379
-Wcast-align -Wmissing-declarations -Wredundant-decls -Wdiv-by-zero -Wdisabled-optimization -Wswitch-default -Wunused>)
380380

381381
if (${FORCE_COLORED_OUTPUT})
@@ -392,7 +392,7 @@ if (NOT MSVC AND NOT APPLE)
392392
endif()
393393

394394
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
395-
SET(WB_COMPILER_OPTIONS_PRIVATE $<$<COMPILE_LANGUAGE:CXX>:-pthread -pedantic -Wall -Wextra -Wpointer-arith -Wwrite-strings -Wsign-compare
395+
SET(WB_COMPILER_OPTIONS_PRIVATE $<$<COMPILE_LANGUAGE:CXX>:-pthread -pedantic -Wall -Wextra -Wpointer-arith -Wwrite-strings -Wsign-compare
396396
-Woverloaded-virtual -Wno-parentheses -Wcast-qual -fstrict-aliasing -Wmaybe-uninitialized -Werror=maybe-uninitialized>)
397397
else()
398398
# gcc linux
@@ -466,7 +466,7 @@ else()
466466
endif()
467467
endif()
468468

469-
if(${CMAKE_VERSION} VERSION_LESS "3.13.0")
469+
if(${CMAKE_VERSION} VERSION_LESS "3.13.0")
470470
SET(CMAKE_EXE_LINKER_FLAGS "${WB_LINKER_OPTIONS} ${WB_VISU_LINKER_OPTIONS} ${WB_COMPILER_OPTIONS_PRIVATE_COVERAGE_OLD}")
471471
else()
472472
target_link_options(${WB_TARGET} INTERFACE ${WB_LINKER_OPTIONS})
@@ -549,7 +549,7 @@ if(MAKE_PYTHON_WRAPPER)
549549
swig_link_libraries(gwb ${GWB_LIBRARY_WHOLE} ${Python_LIBRARIES})
550550
endif()
551551
endif()
552-
552+
553553
set_target_properties(${TARGET} PROPERTIES PREFIX "_" OUTPUT_NAME "gwb")
554554

555555

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ For more information see the [GWB site](https://geodynamicworldbuilder.github.io
1818

1919
## Frequently Asked Questions (FAQ)
2020
### What are the minimum requirements to compile the library and tools?
21-
Currently, GWB requires only a C++14 compiler and CMake version higher than 2.8.12 to compile the library tools. Note that for some optional features (such as certain wrappers and unity build) a higher version of CMake and other dependencies may be needed (e.g., a Fortran compiler to compile the Fortran wrapper).
21+
Currently, GWB requires only a C++14 compiler and CMake version higher than 3.5 to compile the library tools. Note that for some optional features (such as certain wrappers and unity build) a higher version of CMake and other dependencies may be needed (e.g., a Fortran compiler to compile the Fortran wrapper).
2222
### What do I do when I have a question or want to request a feature?
2323
If you have a question about the code and you can not find the answer easily in the documentation or the question is not already raised as an [issue](https://github.com/GeodynamicWorldBuilder/WorldBuilder/issues), please let us know by opening an [issue on github](https://github.com/GeodynamicWorldBuilder/WorldBuilder/issues/new). This is also the preferred method for asking for new features for GWB.
2424

2525
### I found a mistake in the documentation or code, what should I do?
2626
Please do not keep it to yourself and let us know. Others will also profit from mistakes being found and fixed. Even if it is just a typo in the documentation feel free to raise an issue or, even better, make a pull request to fix the issue.
2727

2828
### Is there a way to ask a quick question or chat with the developers or other users?
29-
We are now also experimenting with matrix chat ([#gwb:matrix.org](https://app.element.io/#/room/#gwb:matrix.org)). [Matrix](https://matrix.org) is an open source distributed chat protocol (a description of how to communicate). The matrix is not limited to one client, but using the [Element](https://element.io) client is generally recommended. Element can be used as a desktop, mobile or web application. Since the main developer is already present on matrix, a special space has been created for the World Builder allowing the option for multiple rooms. You can join the main room [here](https://app.element.io/#/room/#gwb:matrix.org). This is the easiest way since you can just open it in your browser. If you want to join the whole space in any client, use this link: [https://matrix.to/#/!vhukRUGUINnZOIutoQ:matrix.org](https://matrix.to/#/!vhukRUGUINnZOIutoQ:matrix.org).
29+
We are now also experimenting with matrix chat ([#gwb:matrix.org](https://app.element.io/#/room/#gwb:matrix.org)). [Matrix](https://matrix.org) is an open source distributed chat protocol (a description of how to communicate). The matrix is not limited to one client, but using the [Element](https://element.io) client is generally recommended. Element can be used as a desktop, mobile or web application. Since the main developer is already present on matrix, a special space has been created for the World Builder allowing the option for multiple rooms. You can join the main room [here](https://app.element.io/#/room/#gwb:matrix.org). This is the easiest way since you can just open it in your browser. If you want to join the whole space in any client, use this link: [https://matrix.to/#/!vhukRUGUINnZOIutoQ:matrix.org](https://matrix.to/#/!vhukRUGUINnZOIutoQ:matrix.org).
3030

3131
Feel free to join!
3232

@@ -43,7 +43,7 @@ Menno Fraters and others. August 2024. The Geodynamic World Builder v1.0.0. Zeno
4343

4444
### How can I follow the progress of this project?
4545
There are multiple ways in which you can follow this project:
46-
1. Watch the repository on github. This will give you an update of what is happening in the repository. This happens automatically and you can set it up to notify you for different kinds of events.
46+
1. Watch the repository on github. This will give you an update of what is happening in the repository. This happens automatically and you can set it up to notify you for different kinds of events.
4747
2. Follow the [World Builder Mastodon account](https://social.mfraters.net/@world_builder). This is a manually updated feed which updates when there are new releases or major new features merged into the main branch. More general news related to the project may also be posted.
4848
3. Subscribe to the Mastodon RSS feed: https://social.mfraters.net/@world_builder.rss. This will show exactly the same information as the Mastodon account, but you can use any RSS reader.
4949
4. Visit the [World Builder website](https://geodynamicworldbuilder.github.io/). Besides all kinds of useful information and links, it also contains a RSS feed viewer for the World Builder Mastodon account.

include/world_builder/utilities.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ namespace WorldBuilder
386386
* when determining the location with respect to the curved plane.
387387
* \param spline_x the spline representing the x coordinate.
388388
* \param spline_y the spline representing the y coordinate.
389-
* \param global_x_list This is a list of one dimensional coorindates, with zero or the
389+
* \param global_x_list This is a list of one dimensional coordinates, with zero or the
390390
* amount of coordinates entries, used for interpolation. An empty list is interpreted
391391
* as a list filled with {0,1,2,...,number of coordinates}. Filling this list with other
392392
* values changes the returned section fraction. It allows for, for example, adding

source/world_builder/features/plume.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ namespace WorldBuilder
318318
rotation_angle,
319319
surface_point);
320320

321-
// If we are in the tip, we have to compute the difference diffently:
321+
// If we are in the tip, we have to compute the difference differently:
322322
if (depth >= min_depth && depth < depths.front())
323323
{
324324
const double a = semi_major_axis_lengths.front();

0 commit comments

Comments
 (0)