-
Notifications
You must be signed in to change notification settings - Fork 6
/
CMakeLists.txt
26 lines (21 loc) · 1.15 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
cmake_minimum_required(VERSION 3.10)
project(FlatHeadBro)
# set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
# set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
# set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
# NOTE: do not use include, otherwise the linker scripts will be messed up!
add_subdirectory(boot0-spl)
add_subdirectory(boot0)
add_subdirectory(secondary/bootloadertest)
add_subdirectory(secondary/interrupttest)
add_subdirectory(secondary/supervisorinterrupttest)
add_subdirectory(secondary/mmutest)
add_subdirectory(secondary/steppermotor)
if (CMAKE_C_COMPILER_ID STREQUAL "Clang" AND CMAKE_C_COMPILER_VERSION VERSION_LESS "15")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mno-relax ")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -mno-relax ")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mno-relax")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -mno-relax")
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -mno-relax")
endif()
# message(STATUS "${CMAKE_C_COMPILER_ID}-${CMAKE_C_COMPILER_VERSION}, ${CMAKE_C_FLAGS} ${CMAKE_ASM_FLAGS}")