generated from NikolasK-source/CMAKE_Template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
40 lines (32 loc) · 2.13 KB
/
CMakeLists.txt
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
40
#
# Copyright (C) 2020-2024 Nikolas Koesling <nikolas@koesling.info>.
# This template is free software. You can redistribute it and/or modify it under the terms of the MIT License.
#
cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR)
# ----------------------------------------------- User settings --------------------------------------------------------
# ======================================================================================================================
# project
project(Modbus_TCP_client_shm LANGUAGES CXX VERSION 1.6.3)
# settings
set(Target "modbus-tcp-client-shm") # Executable name (without file extension!)
set(STANDARD 20) # C++ Standard
set(ARCHITECTURE "native") # CPU architecture to optimize for (only relevant if OPTIMIZE_FOR_ARCHITECTURE is ON)
# options
option(BUILD_DOC "Build documentation" OFF)
option(COMPILER_WARNINGS "Enable compiler warnings" ON)
option(ENABLE_MULTITHREADING "Link the default multithreading library for the current target system" OFF)
option(MAKE_32_BIT_BINARY "Compile as 32 bit application. No effect on 32 bit Systems" OFF)
option(OPENMP "enable openmp" OFF)
option(OPTIMIZE_DEBUG "apply optimizations also in debug mode" ON)
option(CLANG_FORMAT "use clang-format" ON)
option(CLANG_TIDY "use clang-tidy" ON)
option(CLANG_TIDY_NO_ERRORS "do not treat clang-tidy warnings as errors" ON)
option(OPTIMIZE_FOR_ARCHITECTURE "enable optimizations for specified architecture" OFF)
option(LTO_ENABLED "enable interprocedural and link time optimizations" ON)
option(COMPILER_EXTENSIONS "enable compiler specific C++ extensions" OFF)
option(ENABLE_TEST "enable test builds" OFF)
# ======================================================================================================================
# ======================================================================================================================
# ----------------------------------------------- Do not change --------------------------------------------------------
# ======================================================================================================================
include(cmake_files/setup.cmake)