File tree Expand file tree Collapse file tree 4 files changed +30
-7
lines changed
Expand file tree Collapse file tree 4 files changed +30
-7
lines changed Original file line number Diff line number Diff line change 5959 brew link gcc@${GCC_V}
6060
6161 - 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
6368
6469 - name : Build and compile
6570 run : cmake --build build
7277 run : ctest --parallel --output-on-failure
7378 working-directory : build
7479
80+ - name : Install project
81+ run : cmake --install build
82+
7583 - name : Test in-tree builds
7684 if : contains( matrix.gcc_v, '10') # Only test one compiler on each platform
7785 run : |
@@ -129,7 +137,12 @@ jobs:
129137 run : pip install --upgrade fypp
130138
131139 - 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
133146
134147 - name : Build and compile
135148 run : cmake --build build
@@ -141,3 +154,6 @@ jobs:
141154 - name : test
142155 run : ctest --parallel --output-on-failure
143156 working-directory : build
157+
158+ - name : Install project
159+ run : cmake --install build
Original file line number Diff line number Diff line change 9999 -DCMAKE_BUILD_TYPE=Debug
100100 -DCMAKE_Fortran_FLAGS_DEBUG="-Wall -Wextra -Wimplicit-interface -fPIC -g -fcheck=all -fbacktrace"
101101 -DCMAKE_MAXIMUM_RANK=4
102+ -DCMAKE_INSTALL_PREFIX=$PWD/_dist
102103 env:
103104 FC: gfortran
104105 CC: gcc
@@ -120,3 +121,6 @@ jobs:
120121 with :
121122 name : WindowsCMakeTestlog
122123 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)
22project (stdlib Fortran)
33enable_testing ()
44
5+ # Follow GNU conventions for installation directories
6+ include (GNUInstallDirs)
7+
58include (${PROJECT_SOURCE_DIR} /cmake/stdlib.cmake)
69
710# --- compiler options
@@ -55,5 +58,5 @@ add_subdirectory(src)
5558
5659install (EXPORT fortran_stdlib-targets
5760 NAMESPACE fortran_stdlib::
58- DESTINATION "lib /cmake/fortran_stdlib"
61+ DESTINATION "${CMAKE_INSTALL_LIBDIR} /cmake/fortran_stdlib"
5962)
Original file line number Diff line number Diff line change @@ -64,8 +64,8 @@ add_subdirectory(tests)
6464
6565install (TARGETS fortran_stdlib
6666 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} "
7070)
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