Skip to content

Commit

Permalink
Remove support for unified BuildConfig.h (#3355)
Browse files Browse the repository at this point in the history
This mode was only used by autoconf. Rename CHIP_SEPARATE_CONFIG_H to
CHIP_HAVE_CONFIG_H since that's the only mode now.
  • Loading branch information
mspang authored Oct 22, 2020
1 parent 4fc19f1 commit f6a6c1b
Show file tree
Hide file tree
Showing 19 changed files with 21 additions and 23 deletions.
2 changes: 1 addition & 1 deletion config/nrfconnect/nrfconnect-app.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,4 @@ chip_build(ChipLib ChipConfig
# ==================================================

target_link_libraries(app PUBLIC ChipLib)
target_compile_definitions(app PRIVATE CHIP_SEPARATE_CONFIG_H)
target_compile_definitions(app PRIVATE CHIP_HAVE_CONFIG_H)
2 changes: 1 addition & 1 deletion examples/wifi-echo/server/esp32/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ EXTRA_COMPONENT_DIRS += $(PROJECT_PATH)/third_party/connectedhomeip/config/esp32
$(PROJECT_PATH)/../../../common/screen-framework \

CXXFLAGS += -std=c++11 -Os -DLWIP_IPV6_SCOPES=0
CPPFLAGS += -Os -DLWIP_IPV6_SCOPES=0 -DCHIP_SEPARATE_CONFIG_H
CPPFLAGS += -Os -DLWIP_IPV6_SCOPES=0 -DCHIP_HAVE_CONFIG_H
CFLAGS += -Os -DLWIP_IPV6_SCOPES=0

top: all flashing_script
Expand Down
2 changes: 1 addition & 1 deletion src/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ config("includes") {
"${root_gen_dir}/include",
]

defines = [ "CHIP_SEPARATE_CONFIG_H=1" ]
defines = [ "CHIP_HAVE_CONFIG_H=1" ]

if (chip_device_platform == "linux" || chip_device_platform == "darwin") {
defines += [ "CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE=${chip_enable_ble}" ]
Expand Down
2 changes: 1 addition & 1 deletion src/ble/BleConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

#pragma once

#if CHIP_SEPARATE_CONFIG_H
#if CHIP_HAVE_CONFIG_H
#include <ble/BleBuildConfig.h>
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/crypto/CHIPCryptoPAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#ifndef _CHIP_CRYPTO_PAL_H_
#define _CHIP_CRYPTO_PAL_H_

#if CHIP_SEPARATE_CONFIG_H
#if CHIP_HAVE_CONFIG_H
#include <crypto/CryptoBuildConfig.h>
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/include/platform/CHIPDeviceConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#pragma once

#if CHIP_SEPARATE_CONFIG_H
#if CHIP_HAVE_CONFIG_H
#include <platform/CHIPDeviceBuildConfig.h>
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/inet/InetConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

#pragma once

#if CHIP_SEPARATE_CONFIG_H
#if CHIP_HAVE_CONFIG_H
#include <inet/InetBuildConfig.h>
#endif

Expand Down
4 changes: 2 additions & 2 deletions src/inet/RawEndPoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
#include <lwip/ip.h>
#include <lwip/raw.h>
#include <lwip/tcpip.h>
#if CHIP_SEPARATE_CONFIG_H
#if CHIP_HAVE_CONFIG_H
#include <lwip/lwip_buildconfig.h>
#endif // CHIP_SEPARATE_CONFIG_H
#endif // CHIP_HAVE_CONFIG_H
#endif // CHIP_SYSTEM_CONFIG_USE_LWIP

#if CHIP_SYSTEM_CONFIG_USE_SOCKETS
Expand Down
4 changes: 2 additions & 2 deletions src/inet/UDPEndPoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
#include <lwip/ip.h>
#include <lwip/tcpip.h>
#include <lwip/udp.h>
#if CHIP_SEPARATE_CONFIG_H
#if CHIP_HAVE_CONFIG_H
#include <lwip/lwip_buildconfig.h>
#endif // CHIP_SEPARATE_CONFIG_H
#endif // CHIP_HAVE_CONFIG_H
#endif // CHIP_SYSTEM_CONFIG_USE_LWIP

#if CHIP_SYSTEM_CONFIG_USE_SOCKETS
Expand Down
2 changes: 1 addition & 1 deletion src/lib/core/CHIPConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

#pragma once

#if CHIP_SEPARATE_CONFIG_H
#if CHIP_HAVE_CONFIG_H
#include <core/CHIPBuildConfig.h>
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/lib/message/support/crypto/CHIPCrypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#ifndef CHIPCRYPTO_H_
#define CHIPCRYPTO_H_

#if CHIP_SEPARATE_CONFIG_H
#if CHIP_HAVE_CONFIG_H
#include <crypto/CryptoBuildConfig.h>
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/lwip/efr32/lwipopts.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#ifndef __LWIPOPTS_H__
#define __LWIPOPTS_H__

#if CHIP_SEPARATE_CONFIG_H
#if CHIP_HAVE_CONFIG_H
#include <lwip/lwip_buildconfig.h>
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/lwip/k32w/lwipopts.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#ifndef __LWIPOPTS_H__
#define __LWIPOPTS_H__

#if CHIP_SEPARATE_CONFIG_H
#if CHIP_HAVE_CONFIG_H
#include <lwip/lwip_buildconfig.h>
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/lwip/nrf5/lwipopts.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#ifndef __LWIPOPTS_H__
#define __LWIPOPTS_H__

#if CHIP_SEPARATE_CONFIG_H
#if CHIP_HAVE_CONFIG_H
#include <lwip/lwip_buildconfig.h>
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/lwip/standalone/lwipopts.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#ifndef __LWIPOPTS_H__
#define __LWIPOPTS_H__

#if CHIP_SEPARATE_CONFIG_H
#if CHIP_HAVE_CONFIG_H
#include <lwip/lwip_buildconfig.h>
#endif

Expand Down
4 changes: 1 addition & 3 deletions src/system/SystemConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,8 @@
#pragma once

/* Platform include headers */
#if CHIP_SEPARATE_CONFIG_H
#if CHIP_HAVE_CONFIG_H
#include <system/SystemBuildConfig.h>
#elif defined(HAVE_CONFIG_H)
#include <BuildConfig.h>
#endif

/* Include a CHIP project-specific configuration file, if defined.
Expand Down
2 changes: 1 addition & 1 deletion src/test_driver/esp32/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ PROJECT_NAME := chip-tests
CXXFLAGS += -DCHIP_SUPPORT_FOREIGN_TEST_DRIVERS -DCHIP_TARGET_STYLE_EMBEDDED -Wno-deprecated-declarations

CXXFLAGS += -DLWIP_IPV6_SCOPES=0
CPPFLAGS += -DLWIP_IPV6_SCOPES=0 -DCHIP_SEPARATE_CONFIG_H
CPPFLAGS += -DLWIP_IPV6_SCOPES=0 -DCHIP_HAVE_CONFIG_H
CFLAGS += -DLWIP_IPV6_SCOPES=0

EXTRA_COMPONENT_DIRS += $(PROJECT_PATH)/third_party/connectedhomeip/config/esp32/components
Expand Down
2 changes: 1 addition & 1 deletion src/test_driver/nrfconnect/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,6 @@ chip_build(ChipLib ChipConfig
target_sources(app PRIVATE main/runner.cpp)
target_link_options(app PUBLIC -Wl,--whole-archive ${CHIP_TESTS} -Wl,--no-whole-archive)
target_link_libraries(app PUBLIC ChipLib $<TARGET_FILE:kernel>)
target_compile_definitions(app PUBLIC CHIP_SEPARATE_CONFIG_H)
target_compile_definitions(app PUBLIC CHIP_HAVE_CONFIG_H)

add_test(AllChipTests zephyr/zephyr.exe)
2 changes: 1 addition & 1 deletion third_party/lwip/repo/lwip/src/include/lwip/arch.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#ifndef LWIP_HDR_ARCH_H
#define LWIP_HDR_ARCH_H

#if CHIP_SEPARATE_CONFIG_H
#if CHIP_HAVE_CONFIG_H
#include <lwip/lwip_buildconfig.h>
#endif

Expand Down

0 comments on commit f6a6c1b

Please sign in to comment.