Cannot build an OpenMP program with Fujitsu compiler
With the current support of the Fujitsu compiler in the master branch, it seems that at least for the Fortran compiler, the OpenMP flag is not passed at linking time, leading to this error message:
frtpx: fatal: -Kopenmp option is not specified at linking of object files to which -Kopenmp applied at compiling. The linking process is suspended.
Minimum working example:
! test.f90
program test
implicit none
integer :: a(20)
integer :: i
!$omp parallel do private(i) shared(a)
do i = 1, 20
a(i) = i
end do
!$omp end parallel do
end program
# CMakeLists.txt
cmake_minimum_required(VERSION 3.20)
project(TestOpenMP VERSION 0.0.0 LANGUAGES Fortran)
find_package(OpenMP REQUIRED)
add_executable(test test.f90)
target_link_libraries(test PRIVATE OpenMP::OpenMP_Fortran)