-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
45 lines (36 loc) · 1.28 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
41
42
43
44
45
cmake_minimum_required(VERSION 3.17)
project(NRF52840_CMAKE_BLINKY
VERSION 0.1
DESCRIPTION "Basic blinky project using CMake and the nrfx module from Nordic."
LANGUAGES C CXX ASM)
set_property(GLOBAL PROPERTY C_STANDARD 11)
set_property(GLOBAL PROPERTY CXX_STANDARD 17)
#################
# Build Modules #
#################
# Define and Process Project Options
include(BuildOptions.cmake)
# Improved functions for checking compiler/linker flag support
include(cmake/compiler/CheckAndApplyFlags.cmake)
# Adds a function for generating a linker map
include(cmake/linker/map.cmake)
# Overrides add_executable so that linker script dependencies are registered automatically
include(cmake/linker/AddExecutableWithLinkerScriptDep.cmake)
# Provides functions to convert ELF files into .bin and .hex
include(cmake/Conversions.cmake)
##################
# Compiler Flags #
##################
# If we're not a subproject, globally apply our warning flags
# if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
# add_compile_options(-Wall -Wextra)
# endif()
# Set default flags
check_c_compiler_flag("-Wno-unknown-pragmas" _Wno_unknown_pragmas)
if(_Wno_unknown_pragmas)
add_compile_options("-Wno-unknown-pragmas")
endif()
#######################
# Process Source Tree #
#######################
add_subdirectory(src)