Skip to content

Commit

Permalink
do some workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
eparshut committed May 29, 2024
1 parent 43a526a commit ab258bf
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,15 @@ else()
endif()

if(ITT_API_FORTRAN_SUPPORT)
enable_language(Fortran)
# Workaround to find compiler
find_program(IFORT_FOUND ifort)
if(IFORT_FOUND)
set(CMAKE_Fortran_COMPILER ${IFORT_FOUND})
else()
message(FATAL_ERROR "Intel Fortran compiler was found in the PATH")
endif()
#enable_language(Fortran)

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/${PLATFORM_PATH}/${ARCH_PATH})
Expand All @@ -109,7 +117,7 @@ if(ITT_API_FORTRAN_SUPPORT)
if(FORCE_32)
set(FORTRAN_BUILD_CMD ${FORTRAN_BUILD_CMD} -m32)
endif()
set(ITT_FORTRAN_BUILD_CMD ${FORTRAN_BUILD_CMD} -o ${ITT_FORTRAN ${ITT_FORTRAN_SRC})
set(ITT_FORTRAN_BUILD_CMD ${FORTRAN_BUILD_CMD} -o ${ITT_FORTRAN} ${ITT_FORTRAN_SRC})
set(ADVISOR_ANNOTATION_BUILD_CMD ${FORTRAN_BUILD_CMD} -o ${ADVISOR_ANNOTATION} ${ADVISOR_ANNOTATION_SRC})
else()
set(FORTRAN_BUILD_CMD ${CMAKE_Fortran_COMPILER} /Z7 /nologo /libdir:noauto /O2 /c /module:${FORTRAN_BINARY_DIR})
Expand Down

0 comments on commit ab258bf

Please sign in to comment.