File: CMakeLists.txt

package info (click to toggle)
eztrace 2.0%2Brepack-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,132 kB
  • sloc: ansic: 23,501; perl: 910; sh: 857; cpp: 771; makefile: 696; fortran: 327; f90: 320; python: 57
file content (31 lines) | stat: -rw-r--r-- 671 bytes parent folder | download
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
26
27
28
29
30
31
cmake_minimum_required(VERSION 3.1)

enable_testing()

add_executable(htable
  htable.c)

# depending on the framework, you need to link to it
target_link_libraries(htable
  eztrace-core)

target_compile_options(htable
  PRIVATE
    -Wall -Wextra -Wpedantic
)

target_include_directories(htable
  PRIVATE
    ${CMAKE_CURRENT_SOURCE_DIR}
    ${CMAKE_SOURCE_DIR}/src/core/include/eztrace-core/
)

add_test(NAME htable COMMAND htable)

# Get the list of tests, and set environment variables
get_property(test_list DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY TESTS)
set_property(TEST ${test_list}
  PROPERTY ENVIRONMENT
  "EZTRACE_LIBRARY_PATH=${EZTRACE_LIBRARY_PATH}"
)