diff --git a/components/bootloader/subproject/CMakeLists.txt b/components/bootloader/subproject/CMakeLists.txt index 5428ec2463..2daf4d90eb 100644 --- a/components/bootloader/subproject/CMakeLists.txt +++ b/components/bootloader/subproject/CMakeLists.txt @@ -57,7 +57,7 @@ idf_build_set_property(__COMPONENT_REQUIRES_COMMON "${common_req}") idf_build_set_property(__OUTPUT_SDKCONFIG 0) project(bootloader) -idf_build_set_property(COMPILE_DEFINITIONS "-DBOOTLOADER_BUILD=1" APPEND) +idf_build_set_property(COMPILE_DEFINITIONS "BOOTLOADER_BUILD=1" APPEND) idf_build_set_property(COMPILE_OPTIONS "-fno-stack-protector" APPEND) idf_component_get_property(main_args esptool_py FLASH_ARGS) diff --git a/components/nvs_flash/host_test/nvs_page_test/CMakeLists.txt b/components/nvs_flash/host_test/nvs_page_test/CMakeLists.txt index 7cbfe573bb..6d51e4612e 100644 --- a/components/nvs_flash/host_test/nvs_page_test/CMakeLists.txt +++ b/components/nvs_flash/host_test/nvs_page_test/CMakeLists.txt @@ -7,7 +7,7 @@ list(APPEND EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/mocks/driver/") list(APPEND EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/mocks/freertos/") list(APPEND EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/mocks/spi_flash/") -idf_build_set_property(COMPILE_DEFINITIONS "-DNO_DEBUG_STORAGE" APPEND) +idf_build_set_property(COMPILE_DEFINITIONS "NO_DEBUG_STORAGE" APPEND) project(test_nvs_page_host) diff --git a/components/pthread/CMakeLists.txt b/components/pthread/CMakeLists.txt index 1db395070e..e7336108c0 100644 --- a/components/pthread/CMakeLists.txt +++ b/components/pthread/CMakeLists.txt @@ -6,7 +6,7 @@ set(sources "pthread.c" idf_component_register(SRCS ${sources} INCLUDE_DIRS include) -idf_build_set_property(COMPILE_DEFINITIONS "-D_POSIX_READER_WRITER_LOCKS" APPEND) +idf_build_set_property(COMPILE_DEFINITIONS "_POSIX_READER_WRITER_LOCKS" APPEND) set(extra_link_flags "-u pthread_include_pthread_impl") list(APPEND extra_link_flags "-u pthread_include_pthread_cond_impl") diff --git a/tools/cmake/build.cmake b/tools/cmake/build.cmake index e467a06700..ac76846edd 100644 --- a/tools/cmake/build.cmake +++ b/tools/cmake/build.cmake @@ -73,7 +73,7 @@ function(__build_get_idf_git_revision) endif() # cut IDF_VER to required 32 characters. string(SUBSTRING "${idf_ver_t}" 0 31 idf_ver) - idf_build_set_property(COMPILE_DEFINITIONS "-DIDF_VER=\"${idf_ver}\"" APPEND) + idf_build_set_property(COMPILE_DEFINITIONS "IDF_VER=\"${idf_ver}\"" APPEND) git_submodule_check("${idf_path}") idf_build_set_property(IDF_VER ${idf_ver}) endfunction() @@ -90,7 +90,7 @@ function(__build_set_default_build_specifications) unset(c_compile_options) unset(cxx_compile_options) - list(APPEND compile_definitions "-D_GNU_SOURCE") + list(APPEND compile_definitions "_GNU_SOURCE") list(APPEND compile_options "-ffunction-sections" "-fdata-sections" @@ -592,7 +592,7 @@ macro(idf_build_process target) # All targets built under this scope is with the ESP-IDF build system set(ESP_PLATFORM 1) - idf_build_set_property(COMPILE_DEFINITIONS "-DESP_PLATFORM" APPEND) + idf_build_set_property(COMPILE_DEFINITIONS "ESP_PLATFORM" APPEND) # Perform component processing (inclusion of project_include.cmake, adding component # subdirectories, creating library targets, linking libraries, etc.) diff --git a/tools/mocks/driver/CMakeLists.txt b/tools/mocks/driver/CMakeLists.txt index cb68badac0..58d2c0bddb 100644 --- a/tools/mocks/driver/CMakeLists.txt +++ b/tools/mocks/driver/CMakeLists.txt @@ -21,4 +21,4 @@ idf_component_mock(INCLUDE_DIRS ${include_dirs} ${original_driver_dir}/include/driver/i2c.h ${original_driver_dir}/include/driver/gpio.h) -idf_build_set_property(COMPILE_DEFINITIONS "-DSPI_MOCK" APPEND) +idf_build_set_property(COMPILE_DEFINITIONS "SPI_MOCK" APPEND)