File: CMakeLists.txt

package info (click to toggle)
libconvert-binary-c-perl 0.86-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,264 kB
  • sloc: ansic: 47,836; perl: 4,980; yacc: 2,143; makefile: 61
file content (25 lines) | stat: -rw-r--r-- 828 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
cmake_minimum_required( VERSION 2.9 FATAL_ERROR )

project( pthread_readout LANGUAGES C )

set( CMAKE_C_STANDARD 11 )
set( CMAKE_C_STANDARD_REQUIRED ON )
set( CMAKE_C_EXTENSIONS OFF )

add_executable( pthread_readout pthread_readout.c )

# For this executable specifically, make the _PDCLIB_* headers available
# but *not* PDCLib's standard headers -- so we can check PDCLib config
# against the host system.
target_include_directories( pthread_readout BEFORE PRIVATE ${CMAKE_SOURCE_DIR}/include/pdclib ${CMAKE_SOURCE_DIR}/platform/example/include/pdclib )

# PThread linkage.
set( CMAKE_THREAD_PREFER_PTHREAD 1 )
set( THREADS_PREFER_PTHREAD_FLAG 1 )
find_package( Threads )

if ( NOT CMAKE_USE_PTHREADS_INIT )
    message( FATAL_ERROR "Cannot find pthread." )
endif()

target_link_libraries( pthread_readout Threads::Threads )