Skip to content

Commit 6b6d741

Browse files
authored
Merge pull request ERGO-Code#1802 from ERGO-Code/macos-fortran
Macos fortran build fix
2 parents b1b3306 + 0a0692c commit 6b6d741

File tree

4 files changed

+39
-3
lines changed

4 files changed

+39
-3
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: test-fortran-macos
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
fast_build_release:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
matrix:
10+
os: [macos-latest]
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Install GFortran
16+
run: brew install gfortran
17+
18+
- name: Create Build Environment
19+
run: cmake -E make_directory ${{runner.workspace}}/build
20+
21+
- name: Configure CMake
22+
shell: bash
23+
working-directory: ${{runner.workspace}}/build
24+
run: cmake $GITHUB_WORKSPACE -DFORTRAN=ON
25+
26+
- name: Build
27+
shell: bash
28+
working-directory: ${{runner.workspace}}/build
29+
run: cmake --build . --parallel
30+
31+
- name: Test
32+
shell: bash
33+
working-directory: ${{runner.workspace}}/build
34+
run: |
35+
ls
36+
./bin/fortrantest

.github/workflows/test-fortran-ubuntu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: test-fortran
1+
name: test-fortran-ubuntu
22

33
on: [push, pull_request]
44

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ if (BUILD_CXX)
209209
"but it is not supported by the compiler. The check failed with this output:\n"
210210
"${check_ipo_support_output}")
211211
endif()
212-
elseif(NOT ipo_supported)
212+
elseif(NOT ipo_supported OR (APPLE AND FORTRAN))
213213
message(STATUS "IPO / LTO: disabled because it is not supported")
214214
elseif(NOT BUILD_SHARED_LIBS)
215215
# For a static library, we can't be sure whether the final linking will

cmake/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
| OS | C++ | Fortran | Python | CSharp Example | .NET |
44
|:-------- | :---: | :------: | :----: | :----: | :----: |
55
| Linux | [![Status][linux_cpp_svg]][linux_cpp_link] | [![Status][linux_fortran_svg]][linux_fortran_link] | [![Status][linux_python_svg]][linux_python_link] | *(1)* | [![Status][linux_dotnet_svg]][linux_dotnet_link] |
6-
| MacOS | [![Status][macos_cpp_svg]][macos_cpp_link] | *(2)* | [![Status][macos_python_svg]][macos_python_link] | *(1)* |[![Status][macos_dotnet_svg]][macos_dotnet_link] |
6+
| MacOS | [![Status][macos_cpp_svg]][macos_cpp_link] | [![Status][macos_fortran_svg]][macos_fortran_link] | [![Status][macos_python_svg]][macos_python_link] | *(1)* |[![Status][macos_dotnet_svg]][macos_dotnet_link] |
77
| Windows | [![Status][windows_cpp_svg]][windows_cpp_link] | *(2)* | [![Status][windows_python_svg]][windows_python_link] | [![Status][windows_csharp_svg]][windows_csharp_link] | [![Status][windows_dotnet_svg]][windows_dotnet_link] |
88

99
[linux_cpp_svg]: https://github.com/ERGO-Code/HiGHS/actions/workflows/cmake-linux-cpp.yml/badge.svg

0 commit comments

Comments
 (0)