-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
49 lines (44 loc) · 1.6 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
46
47
48
49
cmake_minimum_required(VERSION 3.22)
project(cmake_master)
include(cmake/build_flags.cmake)
include(ExternalProject)
if (BUILD_CPU MATCHES yes)
ExternalProject_Add(linux
SOURCE_DIR ${CMAKE_SOURCE_DIR}/linux_build
BINARY_DIR ${CMAKE_SOURCE_DIR}/linux_build/build
CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=${CMAKE_SOURCE_DIR}/cmake/linux.cmake
-DCMAKE_BUILD_TYPE=Release
BUILD_ALWAYS 1
INSTALL_COMMAND ""
)
endif()
if(BUILD_MCU MATCHES yes)
ExternalProject_Add(mcu
SOURCE_DIR ${CMAKE_SOURCE_DIR}/mcu_build
BINARY_DIR ${CMAKE_SOURCE_DIR}/mcu_build/build
CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=${CMAKE_SOURCE_DIR}/cmake/r5f.cmake
-DCMAKE_BUILD_TYPE=Release
BUILD_ALWAYS 1
INSTALL_COMMAND ""
)
endif()
if(BUILD_C7X MATCHES yes)
ExternalProject_Add(c7x
SOURCE_DIR ${CMAKE_SOURCE_DIR}/c7x_build
BINARY_DIR ${CMAKE_SOURCE_DIR}/c7x_build/build
CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=${CMAKE_SOURCE_DIR}/cmake/c7x.cmake
-DCMAKE_BUILD_TYPE=Release
BUILD_ALWAYS 1
INSTALL_COMMAND ""
)
endif()
if(BUILD_C6X MATCHES yes)
ExternalProject_Add(c6x
SOURCE_DIR ${CMAKE_SOURCE_DIR}/c6x_build
BINARY_DIR ${CMAKE_SOURCE_DIR}/c6x_build/build
CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=${CMAKE_SOURCE_DIR}/cmake/c6x.cmake
-DCMAKE_BUILD_TYPE=Release
BUILD_ALWAYS 1
INSTALL_COMMAND ""
)
endif()