-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
31 lines (23 loc) · 1 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
cmake_minimum_required(VERSION 3.20)
project(PowerManagementUnit)
set(CMAKE_C_STANDARD 99)
# Check for CppUTest and bail out if they don't have it
if(DEFINED ENV{CPPUTEST_HOME} AND DEFINED ENV{CPPUTESTEXT_HOME} AND DEFINED ENV{CPPUTEST_PARENT_DIR})
message("Using CppUTest found in $ENV{CPPUTEST_HOME}")
message("Using CppUTest Extensions found in $ENV{CPPUTESTEXT_HOME}")
message("Using CppUTest library basedir found in $ENV{CPPUTEST_PARENT_DIR}")
else()
message("CPPUTEST_HOME or CPPUTESTEXT_HOME or CPPUTEST_PARENT_DIR is not set; You must tell CMake where to find CppUTest")
return()
endif()
enable_language(C)
enable_language(CXX)
# The version number
set (PowerManagementUnit_VERSION_MAJOR 1)
set (PowerManagementUnit_VERSION_MINOR 0)
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
add_subdirectory(src)
add_subdirectory(mocks)
add_subdirectory(test)