-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
40 lines (31 loc) · 1.45 KB
/
CMakeLists.txt
File metadata and controls
40 lines (31 loc) · 1.45 KB
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
# The following lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
set(CMAKE_CXX_STANDARD 14)
set(EXTRA_COMPONENT_DIRS ./components)
set(SDKCONFIG "${CMAKE_BINARY_DIR}/sdkconfig")
set(SDKCONFIG_DEFAULTS "sdkconfig.defaults")
# if($ENV{PROFILING})
# set(SDKCONFIG_DEFAULTS "sdkconfig.defaults;sdkconfig.profiling")
# add_compile_definitions(PROFILING=1)
# endif()
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
# if($ENV{PRODUCTION})
# message(STATUS "Building Production")
# add_compile_definitions(PRODUCTION=1)
# endif()
project(c_versus_cpp)
idf_build_set_property(COMPILE_OPTIONS "-Wall" APPEND)
idf_build_set_property(COMPILE_OPTIONS "-Wextra" APPEND)
idf_build_set_property(COMPILE_OPTIONS "-Werror" APPEND)
idf_build_set_property(COMPILE_OPTIONS "-Wno-unused" APPEND)
idf_build_set_property(COMPILE_OPTIONS "-Wdisabled-optimization" APPEND)
idf_build_set_property(COMPILE_OPTIONS "-Winit-self" APPEND)
idf_build_set_property(COMPILE_OPTIONS "-Wmissing-include-dirs" APPEND)
idf_build_set_property(CXX_COMPILE_OPTIONS "-Wnoexcept" APPEND)
idf_build_set_property(CXX_COMPILE_OPTIONS "-Woverloaded-virtual" APPEND)
idf_build_set_property(CXX_COMPILE_OPTIONS "-Wstrict-null-sentinel" APPEND)
# if($ENV{PRODUCTION})
# # Override menuconfig setting to ensure proper production optimization
# idf_build_set_property(COMPILE_OPTIONS "-O2" APPEND)
# endif()