Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Macos fortran build fix #1802

Merged
merged 8 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/test-fortran-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: test-fortran-macos

on: [push, pull_request]

jobs:
fast_build_release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest]

steps:
- uses: actions/checkout@v4

- name: Install GFortran
run: brew install gfortran

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build

- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DFORTRAN=ON

- name: Build
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake --build . --parallel

- name: Test
shell: bash
working-directory: ${{runner.workspace}}/build
run: |
ls
./bin/fortrantest
2 changes: 1 addition & 1 deletion .github/workflows/test-fortran-ubuntu.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test-fortran
name: test-fortran-ubuntu

on: [push, pull_request]

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ if (BUILD_CXX)
"but it is not supported by the compiler. The check failed with this output:\n"
"${check_ipo_support_output}")
endif()
elseif(NOT ipo_supported)
elseif(NOT ipo_supported OR (APPLE AND FORTRAN))
message(STATUS "IPO / LTO: disabled because it is not supported")
elseif(NOT BUILD_SHARED_LIBS)
# For a static library, we can't be sure whether the final linking will
Expand Down
2 changes: 1 addition & 1 deletion cmake/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
| OS | C++ | Fortran | Python | CSharp Example | .NET |
|:-------- | :---: | :------: | :----: | :----: | :----: |
| 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] |
| MacOS | [![Status][macos_cpp_svg]][macos_cpp_link] | *(2)* | [![Status][macos_python_svg]][macos_python_link] | *(1)* |[![Status][macos_dotnet_svg]][macos_dotnet_link] |
| 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] |
| 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] |

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