From 0d70d7dd0b5ec47112ed531ebffd236c8d983c8d Mon Sep 17 00:00:00 2001 From: Graham Jones Date: Wed, 10 Jan 2024 22:53:51 +0000 Subject: [PATCH] Added dependency on Version.h of SystemInfo.cpp so it is re-compiled if the version number is changed in CMakelists.txt --- src/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8b27c19d..906dd627 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 3.10) project(pinetime-app C CXX ASM) - # define some variables just for this example to determine file locations set(NRF_PROJECT_NAME pinetime-app) set(NRF_BOARD pca10040) @@ -769,6 +768,10 @@ link_directories( ) +set_source_files_properties(displayapp/screens/SystemInfo.cpp PROPERTIES + OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Version.h +) + set(COMMON_FLAGS -MP -MD -mthumb -mabi=aapcs -ftree-vrp -ffunction-sections -fdata-sections -fno-strict-aliasing -fno-builtin -fshort-enums -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fstack-usage -fno-exceptions -fno-non-call-exceptions) set(WARNING_FLAGS -Wall -Wextra -Warray-bounds=2 -Wformat=2 -Wformat-overflow=2 -Wformat-truncation=2 -Wformat-nonliteral -Wno-missing-field-initializers -Wno-unknown-pragmas -Wno-expansion-to-defined -Wreturn-type -Werror=return-type -Werror) set(DEBUG_FLAGS -Og -g3)