-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
39 lines (32 loc) · 981 Bytes
/
CMakeLists.txt
File metadata and controls
39 lines (32 loc) · 981 Bytes
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
32
33
34
35
36
37
38
39
cmake_minimum_required(VERSION 3.14)
project(LaserTrackerHSM
VERSION 1.0.0
DESCRIPTION "HSM State Pattern Demo using std::variant for Laser Tracker"
LANGUAGES CXX
)
# Require C++17
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# Enable warnings
if(MSVC)
add_compile_options(/W4 /WX-)
else()
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
# Find threading library
find_package(Threads REQUIRED)
# Main executable
add_executable(laser_tracker_hsm
main.cpp
)
# Link threading library
target_link_libraries(laser_tracker_hsm PRIVATE Threads::Threads)
# Set output directory
set_target_properties(laser_tracker_hsm PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
)
# Print configuration info
message(STATUS "C++ Compiler: ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
message(STATUS "C++ Standard: ${CMAKE_CXX_STANDARD}")
message(STATUS "Build Type: ${CMAKE_BUILD_TYPE}")