-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
39 lines (33 loc) · 980 Bytes
/
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
# CMake Version Required
cmake_minimum_required (VERSION 3.1...3.14)
if (${CMAKE_VERSION} VERSION_LESS 3.14)
cmake_policy(
VERSION
${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}
)
endif ()
# Project Information
project (
"CS 101"
VERSION 0.1
DESCRIPTION "A collection of computer science fundamentals including algorithms and data structures"
LANGUAGES C CXX
)
# If this is the main project and not included as a subdirectory ...
if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
# Target folder support for IDEs
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
# Testing
include(CTest)
# Testing only available if this is the main app
# Emergency override: CS101_BUILD_TESTING
if((CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME OR CS101_BUILD_TESTING))
enable_testing()
include(GoogleTest)
add_subdirectory(test)
endif ()
endif ()
# Path to include folder
set(CS101_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include")
# Library Source Code
add_subdirectory(src)