File tree 4 files changed +30
-7
lines changed
4 files changed +30
-7
lines changed Original file line number Diff line number Diff line change 59
59
brew link gcc@${GCC_V}
60
60
61
61
- name : Configure with CMake
62
- run : cmake -Wdev -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAXIMUM_RANK=4 -S . -B build
62
+ run : >-
63
+ cmake -Wdev
64
+ -DCMAKE_BUILD_TYPE=Release
65
+ -DCMAKE_MAXIMUM_RANK=4
66
+ -DCMAKE_INSTALL_PREFIX=$PWD/_dist
67
+ -S . -B build
63
68
64
69
- name : Build and compile
65
70
run : cmake --build build
72
77
run : ctest --parallel --output-on-failure
73
78
working-directory : build
74
79
80
+ - name : Install project
81
+ run : cmake --install build
82
+
75
83
- name : Test in-tree builds
76
84
if : contains( matrix.gcc_v, '10') # Only test one compiler on each platform
77
85
run : |
@@ -129,7 +137,12 @@ jobs:
129
137
run : pip install --upgrade fypp
130
138
131
139
- name : Configure with CMake
132
- run : cmake -Wdev -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAXIMUM_RANK=4 -S . -B build
140
+ run : >-
141
+ cmake -Wdev
142
+ -DCMAKE_BUILD_TYPE=Release
143
+ -DCMAKE_MAXIMUM_RANK=4
144
+ -DCMAKE_INSTALL_PREFIX=$PWD/_dist
145
+ -S . -B build
133
146
134
147
- name : Build and compile
135
148
run : cmake --build build
@@ -141,3 +154,6 @@ jobs:
141
154
- name : test
142
155
run : ctest --parallel --output-on-failure
143
156
working-directory : build
157
+
158
+ - name : Install project
159
+ run : cmake --install build
Original file line number Diff line number Diff line change 99
99
-DCMAKE_BUILD_TYPE=Debug
100
100
-DCMAKE_Fortran_FLAGS_DEBUG="-Wall -Wextra -Wimplicit-interface -fPIC -g -fcheck=all -fbacktrace"
101
101
-DCMAKE_MAXIMUM_RANK=4
102
+ -DCMAKE_INSTALL_PREFIX=$PWD/_dist
102
103
env:
103
104
FC: gfortran
104
105
CC: gcc
@@ -120,3 +121,6 @@ jobs:
120
121
with :
121
122
name : WindowsCMakeTestlog
122
123
path : build/Testing/Temporary/LastTest.log
124
+
125
+ - name : Install project
126
+ run : cmake --install build
Original file line number Diff line number Diff line change @@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 3.14.0)
2
2
project (stdlib Fortran)
3
3
enable_testing ()
4
4
5
+ # Follow GNU conventions for installation directories
6
+ include (GNUInstallDirs)
7
+
5
8
include (${PROJECT_SOURCE_DIR} /cmake/stdlib.cmake)
6
9
7
10
# --- compiler options
@@ -55,5 +58,5 @@ add_subdirectory(src)
55
58
56
59
install (EXPORT fortran_stdlib-targets
57
60
NAMESPACE fortran_stdlib::
58
- DESTINATION "lib /cmake/fortran_stdlib"
61
+ DESTINATION "${CMAKE_INSTALL_LIBDIR} /cmake/fortran_stdlib"
59
62
)
Original file line number Diff line number Diff line change @@ -64,8 +64,8 @@ add_subdirectory(tests)
64
64
65
65
install (TARGETS fortran_stdlib
66
66
EXPORT fortran_stdlib-targets
67
- RUNTIME DESTINATION bin
68
- ARCHIVE DESTINATION lib
69
- LIBRARY DESTINATION lib
67
+ RUNTIME DESTINATION " ${CMAKE_INSTALL_BINDIR} "
68
+ ARCHIVE DESTINATION " ${CMAKE_INSTALL_LIBDIR} "
69
+ LIBRARY DESTINATION " ${CMAKE_INSTALL_LIBDIR} "
70
70
)
71
- install (DIRECTORY ${LIB_MOD_DIR} DESTINATION include )
71
+ install (DIRECTORY ${LIB_MOD_DIR} DESTINATION " ${CMAKE_INSTALL_INCLUDEDIR} " )
You can’t perform that action at this time.
0 commit comments