-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
56 lines (45 loc) · 1.58 KB
/
CMakeLists.txt
File metadata and controls
56 lines (45 loc) · 1.58 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#====================================================
#
# Cross Platform C++/CMake Project Template
# (Root CMakeLists.txt Script)
#
#====================================================
# Confirm this is top-level project
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
# Setup CMake project
cmake_minimum_required(VERSION 3.12 FATAL_ERROR)
project(
Project_Name_Here
VERSION 0.0.0.0
LANGUAGES
C CXX ASM
)
# TODO: Find all references to the below `${PRJ_PREFIX}`
# variable and replace it with the expanded literal,
# especially if you intend to use this project as a
# dependency for other projects. Then delete it, you
# should not keep the `PRJ_PREFIX` variable around.
set(PRJ_PREFIX "XPTEMP")
# Export compilation commands to build dir
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Include root CML helper module
include(cmake/utility/root_setup.cmake)
setup_testing_dependencies()
setup_clang_format_target()
setup_clang_tidy_target()
# Include compiler configuration script
include(cmake/compiler/config_dispatch.cmake)
endif()
set(${PRJ_PREFIX}_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
set(${PRJ_PREFIX}_CMAKE_MODULES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
# Include native install directory variables
include(GNUInstallDirs)
# Source Subdirs
add_subdirectory(lib)
add_subdirectory(src)
# TODO: Add other project source directories...
# Confirm this is top-level project
if (${CMAKE_PROJECT_NAME}_IS_TOP_LEVEL)
# Testing sources
add_subdirectory(tests)
endif()