Skip to content

Commit

Permalink
fortran fix macos
Browse files Browse the repository at this point in the history
  • Loading branch information
galabovaa committed Jun 12, 2024
1 parent 718dd79 commit b8db77f
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 2 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/test-fortran-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: test-fortran-macos

on: [push, pull_request]

jobs:
fast_build_release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest]
# toolchain:
# - {compiler: gcc, version: 13}
# # - {compiler: intel, version: '2023.2'}
# # - {compiler: nvidia-hpc, version: '23.11'}
# include:
# - os: ubuntu-latest
# toolchain: {compiler: gcc, version: 12}

steps:
- uses: actions/checkout@v4

- uses: fortran-lang/setup-fortran@v1
id: setup-fortran
# with:
# compiler: ${{ matrix.toolchain.compiler }}
# version: ${{ matrix.toolchain.version }}

- 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)
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

0 comments on commit b8db77f

Please sign in to comment.