Skip to content

Commit

Permalink
Atlas should search for OpenACC itself (by Willem)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrdar committed Apr 25, 2024
1 parent e45c633 commit d136165
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/atlas_acc_support/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@

if( atlas_HAVE_ACC )

if( NOT (CMAKE_C_COMPILER_ID MATCHES ${CMAKE_Fortran_COMPILER_ID}) )
if (FALSE)
#if( NOT (CMAKE_C_COMPILER_ID MATCHES ${CMAKE_Fortran_COMPILER_ID}) )

add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/lib/libatlas_acc_support.so ${CMAKE_CURRENT_BINARY_DIR}/atlas_acc_map_data.c.o
COMMAND ${ACC_C_COMPILER} ${ACC_C_FLAGS} ${ACC_C_INCLUDE} -fPIC -o ${CMAKE_CURRENT_BINARY_DIR}/atlas_acc_map_data.c.o
Expand All @@ -29,9 +31,9 @@ if( atlas_HAVE_ACC )

else()

ecbuild_add_library( TARGET atlas_acc_support SOURCES atlas_acc_map_data.c )
target_compile_options( atlas_acc_support PRIVATE ${ACC_C_FLAGS} )
target_link_libraries( atlas_acc_support PRIVATE ${ACC_C_FLAGS} )
find_package( OpenACC REQUIRED )
ecbuild_add_library( TARGET atlas_acc_support TYPE STATIC SOURCES atlas_acc_map_data.c
PRIVATE_LIBS OpenACC::OpenACC_C)

endif()

Expand Down

0 comments on commit d136165

Please sign in to comment.