forked from espressif/esp-idf
Merge branch 'bugfix/more_cmake_fixes' into 'master'
More CMake fixes See merge request idf/esp-idf!5060
This commit is contained in:
@@ -9,15 +9,6 @@ unset(compile_definitions)
|
|||||||
# Add the following build specifications here, since these seem to be dependent
|
# Add the following build specifications here, since these seem to be dependent
|
||||||
# on config values on the root Kconfig.
|
# on config values on the root Kconfig.
|
||||||
|
|
||||||
# Temporary trick to support both gcc5 and gcc8 builds
|
|
||||||
if(CMAKE_C_COMPILER_VERSION VERSION_EQUAL 5.2.0)
|
|
||||||
set(GCC_NOT_5_2_0 0 CACHE STRING "GCC is 5.2.0 version")
|
|
||||||
else()
|
|
||||||
set(GCC_NOT_5_2_0 1 CACHE STRING "GCC is not 5.2.0 version")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
list(APPEND compile_definitions "-DGCC_NOT_5_2_0=${GCC_NOT_5_2_0}")
|
|
||||||
|
|
||||||
if(CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE)
|
if(CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE)
|
||||||
list(APPEND compile_options "-Os")
|
list(APPEND compile_options "-Os")
|
||||||
else()
|
else()
|
||||||
|
@@ -24,3 +24,5 @@ set(COMPONENT_SRCS "nghttp2/lib/nghttp2_buf.c"
|
|||||||
"port/http_parser.c")
|
"port/http_parser.c")
|
||||||
|
|
||||||
register_component()
|
register_component()
|
||||||
|
|
||||||
|
target_compile_definitions(${COMPONENT_LIB} PUBLIC "-DHAVE_CONFIG_H")
|
||||||
|
@@ -58,6 +58,7 @@ function run_tests()
|
|||||||
BOOTLOADER_BINS="bootloader/bootloader.elf bootloader/bootloader.bin"
|
BOOTLOADER_BINS="bootloader/bootloader.elf bootloader/bootloader.bin"
|
||||||
APP_BINS="app-template.elf app-template.bin"
|
APP_BINS="app-template.elf app-template.bin"
|
||||||
PARTITION_BIN="partition_table/partition-table.bin"
|
PARTITION_BIN="partition_table/partition-table.bin"
|
||||||
|
BUILD_ARTIFACTS="project_description.json flasher_args.json config/kconfig_menus.json config/sdkconfig.json"
|
||||||
IDF_COMPONENT_PREFIX="__idf"
|
IDF_COMPONENT_PREFIX="__idf"
|
||||||
|
|
||||||
print_status "Initial clean build"
|
print_status "Initial clean build"
|
||||||
@@ -65,7 +66,7 @@ function run_tests()
|
|||||||
idf.py build || exit $?
|
idf.py build || exit $?
|
||||||
|
|
||||||
# check all the expected build artifacts from the clean build
|
# check all the expected build artifacts from the clean build
|
||||||
assert_built ${APP_BINS} ${BOOTLOADER_BINS} ${PARTITION_BIN}
|
assert_built ${APP_BINS} ${BOOTLOADER_BINS} ${PARTITION_BIN} ${BUILD_ARTIFACTS}
|
||||||
|
|
||||||
print_status "Updating component source file rebuilds component"
|
print_status "Updating component source file rebuilds component"
|
||||||
# touch a file & do a build
|
# touch a file & do a build
|
||||||
|
@@ -91,7 +91,7 @@ function(__build_set_default_build_specifications)
|
|||||||
unset(c_compile_options)
|
unset(c_compile_options)
|
||||||
unset(cxx_compile_options)
|
unset(cxx_compile_options)
|
||||||
|
|
||||||
list(APPEND compile_definitions "-DHAVE_CONFIG_H" "-D_GNU_SOURCE")
|
list(APPEND compile_definitions "-D_GNU_SOURCE")
|
||||||
|
|
||||||
list(APPEND compile_options "-ffunction-sections"
|
list(APPEND compile_options "-ffunction-sections"
|
||||||
"-fdata-sections"
|
"-fdata-sections"
|
||||||
@@ -442,6 +442,14 @@ macro(idf_build_process target)
|
|||||||
idf_build_set_property(___COMPONENT_REQUIRES_COMMON ${lib} APPEND)
|
idf_build_set_property(___COMPONENT_REQUIRES_COMMON ${lib} APPEND)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
# Temporary trick to support both gcc5 and gcc8 builds
|
||||||
|
if(CMAKE_C_COMPILER_VERSION VERSION_EQUAL 5.2.0)
|
||||||
|
set(GCC_NOT_5_2_0 0 CACHE STRING "GCC is 5.2.0 version")
|
||||||
|
else()
|
||||||
|
set(GCC_NOT_5_2_0 1 CACHE STRING "GCC is not 5.2.0 version")
|
||||||
|
endif()
|
||||||
|
idf_build_set_property(COMPILE_DEFINITIONS "-DGCC_NOT_5_2_0" APPEND)
|
||||||
|
|
||||||
# All targets built under this scope is with the ESP-IDF build system
|
# All targets built under this scope is with the ESP-IDF build system
|
||||||
set(ESP_PLATFORM 1)
|
set(ESP_PLATFORM 1)
|
||||||
idf_build_set_property(COMPILE_DEFINITIONS "-DESP_PLATFORM" APPEND)
|
idf_build_set_property(COMPILE_DEFINITIONS "-DESP_PLATFORM" APPEND)
|
||||||
|
@@ -137,7 +137,7 @@ function(__kconfig_generate_config sdkconfig sdkconfig_defaults)
|
|||||||
set(sdkconfig_cmake ${config_dir}/sdkconfig.cmake)
|
set(sdkconfig_cmake ${config_dir}/sdkconfig.cmake)
|
||||||
set(sdkconfig_header ${config_dir}/sdkconfig.h)
|
set(sdkconfig_header ${config_dir}/sdkconfig.h)
|
||||||
set(sdkconfig_json ${config_dir}/sdkconfig.json)
|
set(sdkconfig_json ${config_dir}/sdkconfig.json)
|
||||||
set(sdkconfig_json_menus ${config_dir}/${kconfig_menus}.json)
|
set(sdkconfig_json_menus ${config_dir}/kconfig_menus.json)
|
||||||
|
|
||||||
idf_build_get_property(output_sdkconfig __OUTPUT_SDKCONFIG)
|
idf_build_get_property(output_sdkconfig __OUTPUT_SDKCONFIG)
|
||||||
if(output_sdkconfig)
|
if(output_sdkconfig)
|
||||||
|
Reference in New Issue
Block a user