File: FindTPLTHREADS.cmake

package info (click to toggle)
kokkos 5.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 15,148 kB
  • sloc: cpp: 225,388; sh: 1,250; python: 78; makefile: 16; fortran: 4; ansic: 2
file content (14 lines) | stat: -rw-r--r-- 379 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
include(FindPackageHandleStandardArgs)
find_package(Threads)

if(TARGET Threads::Threads)
  set(FOUND_THREADS TRUE)
else()
  set(FOUND_THREADS FALSE)
endif()

find_package_handle_standard_args(TPLTHREADS DEFAULT_MSG FOUND_THREADS)
#Only create the TPL if we succeed
if(FOUND_THREADS)
  kokkos_create_imported_tpl(THREADS INTERFACE LINK_OPTIONS ${CMAKE_THREAD_LIBS_INIT})
endif()