-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeListsPrivate1.txt
54 lines (42 loc) · 2.65 KB
/
CMakeListsPrivate1.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
50
51
52
53
54
# !!! WARNING !!! AUTO-GENERATED FILE, PLEASE DO NOT MODIFY IT AND USE
# https://docs.platformio.org/page/projectconf/section_env_build.html#build-flags
#
# If you need to override existing CMake configuration or add extra,
# please create `CMakeListsUser.txt` in the root of project.
# The `CMakeListsUser.txt` will not be overwritten by PlatformIO.
set(CMAKE_CONFIGURATION_TYPES "uno" CACHE STRING "Build Types reflect PlatformIO Environments" FORCE)
SET(CMAKE_C_COMPILER "$ENV{HOME}/.platformio/packages/toolchain-atmelavr/bin/avr-gcc")
SET(CMAKE_CXX_COMPILER "$ENV{HOME}/.platformio/packages/toolchain-atmelavr/bin/avr-g++")
SET(CMAKE_CXX_FLAGS "-fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -Os -Wall -ffunction-sections -fdata-sections -flto -mmcu=atmega328p")
SET(CMAKE_C_FLAGS "-std=gnu11 -fno-fat-lto-objects -Os -Wall -ffunction-sections -fdata-sections -flto -mmcu=atmega328p")
SET(CMAKE_C_STANDARD 17)
set(CMAKE_CXX_STANDARD 20)
if (CMAKE_BUILD_TYPE MATCHES "uno")
add_definitions(-D'PLATFORMIO=50003')
add_definitions(-D'ARDUINO_AVR_UNO')
add_definitions(-D'F_CPU=16000000L')
add_definitions(-D'ARDUINO_ARCH_AVR')
add_definitions(-D'ARDUINO=10808')
add_definitions(-D'__AVR_ATmega328P__')
include_directories("${CMAKE_CURRENT_LIST_DIR}/include")
include_directories("${CMAKE_CURRENT_LIST_DIR}/src")
include_directories("$ENV{HOME}/.platformio/packages/framework-arduino-avr/cores/arduino")
include_directories("$ENV{HOME}/.platformio/packages/framework-arduino-avr/variants/standard")
include_directories("$ENV{HOME}/.platformio/packages/framework-arduino-avr/libraries/EEPROM/src")
include_directories("$ENV{HOME}/.platformio/packages/framework-arduino-avr/libraries/HID/src")
include_directories("$ENV{HOME}/.platformio/packages/framework-arduino-avr/libraries/SPI/src")
include_directories("$ENV{HOME}/.platformio/packages/framework-arduino-avr/libraries/SoftwareSerial/src")
include_directories("$ENV{HOME}/.platformio/packages/framework-arduino-avr/libraries/Wire/src")
include_directories("$ENV{HOME}/.platformio/packages/toolchain-atmelavr/lib/gcc/avr/5.4.0/include")
include_directories("$ENV{HOME}/.platformio/packages/toolchain-atmelavr/lib/gcc/avr/5.4.0/include-fixed")
include_directories("$ENV{HOME}/.platformio/packages/toolchain-atmelavr/avr/include")
include_directories("$ENV{HOME}/.platformio/packages/tool-unity")
FILE(GLOB_RECURSE EXTRA_LIB_SOURCES
${CMAKE_CURRENT_LIST_DIR}/.pio/libdeps/uno/*.*
)
endif()
FILE(GLOB_RECURSE SRC_LIST
${CMAKE_CURRENT_LIST_DIR}/src/*.*
${CMAKE_CURRENT_LIST_DIR}/lib/*.*
)
list(APPEND SRC_LIST ${EXTRA_LIB_SOURCES})