File: CMakeLists.txt

package info (click to toggle)
criterion 2.4.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 3,864 kB
  • sloc: ansic: 17,945; cpp: 774; python: 74; makefile: 25; sh: 19
file content (23 lines) | stat: -rw-r--r-- 504 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
cmake_minimum_required (VERSION 3.1.0)

project (Sample C)

# Add ./cmake to the module path
list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

option (ENABLE_TESTS "Build tests along with the library" ON)

# Add interface to include dirs
include_directories ("${CMAKE_CURRENT_SOURCE_DIR}/include")

# Add sources
add_subdirectory (src)

if (ENABLE_TESTS)
  # Check for criterion
  find_package (Criterion REQUIRED)

  # Add tests
  enable_testing ()
  add_subdirectory (test)
endif ()