Skip to content
Snippets Groups Projects
Commit 417e6cdb authored by Pradipta Samanta's avatar Pradipta Samanta
Browse files

added openacc_fortran_options only for the compilation of Fortran codes

fixed a cmake style

added to two other components
parent 270cb827
No related branches found
No related tags found
1 merge request!37Draft: C++ port of horizontal/mo_lib_gradients.F90
...@@ -39,7 +39,9 @@ if(IM_ENABLE_OPENACC) ...@@ -39,7 +39,9 @@ if(IM_ENABLE_OPENACC)
# If _OPENACC is defined, assume that the required compiler flags are already # If _OPENACC is defined, assume that the required compiler flags are already
# provided, e.g. in CMAKE_Fortran_FLAGS: # provided, e.g. in CMAKE_Fortran_FLAGS:
if(NOT HAS_OPENACC_MACRO) if(NOT HAS_OPENACC_MACRO)
target_compile_options(iconmath-horizontal PRIVATE ${OpenACC_Fortran_OPTIONS}) target_compile_options(iconmath-horizontal
PRIVATE
$<$<COMPILE_LANGUAGE:Fortran>:${OpenACC_Fortran_OPTIONS}>)
# This make sures that unit tests (FortUTF) compiles without the need of # This make sures that unit tests (FortUTF) compiles without the need of
# passing OpenACC compile option. # passing OpenACC compile option.
target_link_libraries(iconmath-horizontal PRIVATE OpenACC::OpenACC_Fortran) target_link_libraries(iconmath-horizontal PRIVATE OpenACC::OpenACC_Fortran)
......
...@@ -41,7 +41,8 @@ if(IM_ENABLE_OPENACC) ...@@ -41,7 +41,8 @@ if(IM_ENABLE_OPENACC)
# provided, e.g. in CMAKE_Fortran_FLAGS: # provided, e.g. in CMAKE_Fortran_FLAGS:
if(NOT HAS_OPENACC_MACRO) if(NOT HAS_OPENACC_MACRO)
target_compile_options(iconmath-interpolation target_compile_options(iconmath-interpolation
PRIVATE ${OpenACC_Fortran_OPTIONS}) PRIVATE
$<$<COMPILE_LANGUAGE:Fortran>:${OpenACC_Fortran_OPTIONS}>)
# This make sures that unit tests (FortUTF) compiles without the need of # This make sures that unit tests (FortUTF) compiles without the need of
# passing OpenACC compile option. # passing OpenACC compile option.
target_link_libraries(iconmath-interpolation PRIVATE OpenACC::OpenACC_Fortran) target_link_libraries(iconmath-interpolation PRIVATE OpenACC::OpenACC_Fortran)
......
...@@ -50,7 +50,9 @@ if(IM_ENABLE_OPENACC) ...@@ -50,7 +50,9 @@ if(IM_ENABLE_OPENACC)
# If _OPENACC is defined, assume that the required compiler flags are already # If _OPENACC is defined, assume that the required compiler flags are already
# provided, e.g. in CMAKE_Fortran_FLAGS: # provided, e.g. in CMAKE_Fortran_FLAGS:
if(NOT HAS_OPENACC_MACRO) if(NOT HAS_OPENACC_MACRO)
target_compile_options(iconmath-support PRIVATE ${OpenACC_Fortran_OPTIONS}) target_compile_options(iconmath-support
PRIVATE
$<$<COMPILE_LANGUAGE:Fortran>:${OpenACC_Fortran_OPTIONS}>)
# This make sures that unit tests (FortUTF) compiles without the need of # This make sures that unit tests (FortUTF) compiles without the need of
# passing OpenACC compile option. # passing OpenACC compile option.
target_link_libraries(iconmath-support PRIVATE OpenACC::OpenACC_Fortran) target_link_libraries(iconmath-support PRIVATE OpenACC::OpenACC_Fortran)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment