File: CMakeLists.txt

package info (click to toggle)
ordered-map 1.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 424 kB
  • sloc: cpp: 3,123; makefile: 16
file content (24 lines) | stat: -rw-r--r-- 1,050 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
cmake_minimum_required(VERSION 3.8)

project(tsl_ordered_map_tests)

add_executable(tsl_ordered_map_tests "main.cpp" 
                                     "custom_allocator_tests.cpp" 
                                     "ordered_map_tests.cpp" 
                                     "ordered_set_tests.cpp")

target_compile_features(tsl_ordered_map_tests PRIVATE cxx_std_11)

if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
    target_compile_options(tsl_ordered_map_tests PRIVATE -Werror -Wall -Wextra -Wold-style-cast -DTSL_DEBUG -UNDEBUG)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
    target_compile_options(tsl_ordered_map_tests PRIVATE /bigobj /WX /W3 /DTSL_DEBUG /UNDEBUG)
endif()

# Boost::unit_test_framework
find_package(Boost 1.54.0 REQUIRED COMPONENTS unit_test_framework)
target_link_libraries(tsl_ordered_map_tests PRIVATE Boost::unit_test_framework)   

# tsl::ordered_map
add_subdirectory(../ ${CMAKE_CURRENT_BINARY_DIR}/tsl)
target_link_libraries(tsl_ordered_map_tests PRIVATE tsl::ordered_map)