mirror of
https://github.com/espressif/openthread.git
synced 2026-08-19 08:59:52 +00:00
[cmake] avoid unnecessary rebuild when git commit id changes (#6881)
This commit removes the PACKAGE_VERSION definition from the global config target so that when the git commit id is changed, only a few sources will be re-compiled.
This commit is contained in:
@@ -101,7 +101,6 @@ if(OT_PACKAGE_VERSION STREQUAL "")
|
||||
ot_git_version(OT_PACKAGE_VERSION)
|
||||
message(STATUS "Setting default package version: ${OT_PACKAGE_VERSION}")
|
||||
endif()
|
||||
target_compile_definitions(ot-config INTERFACE "PACKAGE_VERSION=\"${OT_PACKAGE_VERSION}\"")
|
||||
message(STATUS "Package Version: ${OT_PACKAGE_VERSION}")
|
||||
|
||||
set(OT_THREAD_VERSION "1.2" CACHE STRING "Thread version chosen by the user at configure time")
|
||||
|
||||
@@ -53,3 +53,7 @@ endif()
|
||||
if(OT_MTD)
|
||||
include(mtd.cmake)
|
||||
endif()
|
||||
|
||||
set_property(SOURCE cli_joiner.cpp
|
||||
APPEND PROPERTY COMPILE_DEFINITIONS "PACKAGE_VERSION=\"${OT_PACKAGE_VERSION}\""
|
||||
)
|
||||
|
||||
@@ -243,3 +243,7 @@ endif()
|
||||
if(OT_RCP)
|
||||
include(radio.cmake)
|
||||
endif()
|
||||
|
||||
set_property(SOURCE api/instance_api.cpp
|
||||
APPEND PROPERTY COMPILE_DEFINITIONS "PACKAGE_VERSION=\"${OT_PACKAGE_VERSION}\""
|
||||
)
|
||||
|
||||
@@ -69,3 +69,7 @@ endif()
|
||||
if(OT_RCP)
|
||||
include(radio.cmake)
|
||||
endif()
|
||||
|
||||
set_property(SOURCE ncp_base_mtd.cpp
|
||||
APPEND PROPERTY COMPILE_DEFINITIONS "PACKAGE_VERSION=\"${OT_PACKAGE_VERSION}\""
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user