diff --git a/cmake/workaround_thread.cmake b/cmake/workaround_thread.cmake deleted file mode 100644 index 1837068..0000000 --- a/cmake/workaround_thread.cmake +++ /dev/null @@ -1,26 +0,0 @@ -# FindThreads improperly passes -pthread to nvcc instead of e.g. -Xcompiler=-pthread. -# (see: https://gitlab.kitware.com/cmake/cmake/issues/18008) -# Fixed in CMake 3.13.0. - -function(_fix_threads_flags) - if(${CMAKE_VERSION} VERSION_LESS "3.13.0") - if(TARGET Threads::Threads) - get_property(_languages GLOBAL PROPERTY ENABLED_LANGUAGES) - if("CUDA" IN_LIST _languages) - get_property(_threads_options TARGET Threads::Threads PROPERTY INTERFACE_COMPILE_OPTIONS) - if(_threads_options STREQUAL "-pthread") - set_property(TARGET Threads::Threads - PROPERTY INTERFACE_COMPILE_OPTIONS - $<$:-Xcompiler=-pthread> - $<$>:-pthread>) - endif() - get_property(_threads_options_linker TARGET Threads::Threads PROPERTY INTERFACE_LINK_LIBRARIES) - if(_threads_options_linker STREQUAL "-pthread") - set_property(TARGET Threads::Threads - PROPERTY INTERFACE_LINK_LIBRARIES -lpthread) - endif() - endif() - endif() - endif() -endfunction() - diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 3327abb..c22a244 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -18,9 +18,6 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL Clang AND DEFINED CMAKE_CUDA_COMPILER AND set(CUDA_AVAILABLE OFF) endif() -include(${PROJECT_SOURCE_DIR}/cmake/workaround_thread.cmake) -_fix_threads_flags() - function(compile_test name) add_executable(${name} ${name}.cpp) target_link_libraries(${name} PRIVATE gtest_main) diff --git a/tests/regression/array/bindgen_regression_array_cu.f90 b/tests/regression/array/bindgen_regression_array_cu.f90 index bf7c222..9de241d 100644 --- a/tests/regression/array/bindgen_regression_array_cu.f90 +++ b/tests/regression/array/bindgen_regression_array_cu.f90 @@ -1,5 +1,6 @@ ! This file is generated! module bindgen_regression_array_cu +use iso_c_binding implicit none interface