Skip to content

Commit

Permalink
search fortran compiler via envvar and do apt-get update on linux bui…
Browse files Browse the repository at this point in the history
…ldbox
  • Loading branch information
eparshut committed May 31, 2024
1 parent 127d31c commit 8d2be4d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Chechout sources
- name: Checkout sources
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Config environment
if: runner.os == 'Linux'
run: sudo apt-get install gcc-multilib
run: sudo apt-get update && sudo apt-get install gcc-multilib
- name: Setup Fortran Compiler
uses: fortran-lang/setup-fortran@v1
with:
Expand All @@ -43,7 +43,7 @@ jobs:
runs-on: ubuntu-latest
needs: build
steps:
- name: Chechout sources
- name: Checkout sources
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Create Release
id: create_release
Expand Down
13 changes: 11 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,17 @@ else()
endif()

if(ITT_API_FORTRAN_SUPPORT)
# TODO: current build command is ok for ifort and not ok for ifx. Need to check with other compilers
enable_language(Fortran)
# TODO: current build command works fine with ifort and fails with ifx
# since ifx doesn't support 32-bit compilation. Need to check with other compilers.

# Workaround to find the installed Fortran compiler via FC environment variable
# since enable_language(Fortran) does not work with setup-fortran github action
if(DEFINED ENV{FC})
find_program(CMAKE_Fortran_COMPILER $ENV{FC})
else()
message(FATAL_ERROR "The Fortran compiler was found on the system")
endif()

set(ITT_FORTRAN_SRC ${CMAKE_CURRENT_SOURCE_DIR}/include/fortran/${PLATFORM_PATH}/ittnotify.f90)
set(ADVISOR_ANNOTATION_SRC ${CMAKE_CURRENT_SOURCE_DIR}/include/fortran/advisor_annotate.f90)
set(FORTRAN_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/fortran)
Expand Down

0 comments on commit 8d2be4d

Please sign in to comment.