Skip to content

Commit 7bc2964

Browse files
committed
ci/presets template
1 parent 6cca110 commit 7bc2964

File tree

5 files changed

+12
-44
lines changed

5 files changed

+12
-44
lines changed

.github/workflows/ci_cmake.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,19 @@ jobs:
1919
with:
2020
python-version: '3.x'
2121

22-
- run: cmake --preset make
22+
- run: cmake --preset default -G "Unix Makefiles"
2323
- run: cmake --build build --parallel
2424
- run: ctest --preset default
2525

2626

2727
macos:
2828
env:
29-
CC: gcc-11
3029
FC: gfortran-11
3130
runs-on: macos-latest
3231
steps:
3332
- uses: actions/checkout@v2
3433

35-
- run: cmake --preset make
34+
- run: cmake --preset default -G "Unix Makefiles"
3635
- run: cmake --build build --parallel
3736
- run: ctest --preset default
3837

@@ -42,6 +41,6 @@ jobs:
4241
steps:
4342
- uses: actions/checkout@v2
4443

45-
- run: cmake --preset makewin
44+
- run: cmake --preset default -G "MinGW Makefiles"
4645
- run: cmake --build build --parallel
4746
- run: ctest --preset default

.github/workflows/ci_meson.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ jobs:
2525
macos:
2626
runs-on: macos-latest
2727
env:
28-
CC: gcc-10
29-
CXX: g++-10
30-
FC: gfortran-10
28+
# meson needs to specify all GCC on Mac
29+
CC: gcc-11
30+
CXX: g++-11
31+
FC: gfortran-11
3132

3233
steps:
3334
- uses: actions/checkout@v2

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# export CFLAGS=$CXXFLAGS
2020
#
2121
# in general, CMake >= 3.14 have better link resolution than CMake 3.13.
22-
cmake_minimum_required(VERSION 3.14...3.20)
22+
cmake_minimum_required(VERSION 3.14...3.21)
2323

2424
project(Fortran_C_CXX_interface
2525
LANGUAGES C Fortran CXX

CMakePresets.json

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,17 @@
11
{
22
"version": 2,
3-
"cmakeMinimumRequired": {
4-
"major": 3,
5-
"minor": 20,
6-
"patch": 0
7-
},
83

94
"configurePresets": [
105
{
116
"name": "default",
127
"binaryDir": "${sourceDir}/build",
138
"generator": "Ninja",
14-
"cacheVariables": {"CMAKE_BUILD_TYPE": "Release"}
15-
},
16-
{
17-
"name": "make", "inherits": "default",
18-
"displayName": "build with GNU Make",
19-
"generator": "Unix Makefiles"
20-
},
21-
{
22-
"name": "makewin", "inherits": "default",
23-
"displayName": "build with GNU Make: Windows",
24-
"generator": "MinGW Makefiles"
25-
},
26-
{
27-
"name": "intel", "inherits": "default",
28-
"displayName": "Intel Classic compiler: Linux/MacOS",
29-
"environment": {
30-
"CC": "icc",
31-
"CXX": "icpc",
32-
"FC": "ifort",
33-
"LAPACK_ROOT": "$env{MKLROOT}",
34-
"MPI_ROOT": "$env{I_MPI_ROOT}"
9+
"cacheVariables": {
10+
"CMAKE_BUILD_TYPE": "Release"
3511
}
3612
},
3713
{
38-
"name": "intelwin", "inherits": "intel",
39-
"displayName": "Intel Classic compiler: Windows",
40-
"environment": {
41-
"CC": "icl",
42-
"CXX": "icl"
43-
}
44-
},
45-
{
46-
"name": "intelnext", "inherits": "intel",
14+
"name": "intel", "inherits": "default",
4715
"displayName": "Intel oneAPI LLVM",
4816
"environment": {
4917
"CC": "icx",

cmake/compilers.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ endif()
1515
if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
1616
# this helps show the options are/aren't conflicting between C and Fortran
1717
# at build time
18-
string(APPEND CMAKE_Fortran_FLAGS -fimplicit-none)
18+
string(APPEND CMAKE_Fortran_FLAGS " -fimplicit-none")
1919
add_compile_options(-Wextra -Wall)
2020
endif()

0 commit comments

Comments
 (0)