Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nanopb/nanopb.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorKevin Fitch <kfitch42@gmail.com>2017-06-29 02:08:28 +0300
committerKevin Fitch <kfitch42@gmail.com>2017-06-29 02:08:28 +0300
commitf19b22c04e6626f50f013fe0dc788ac5903f1fd4 (patch)
tree9fe4584d44e254ac0460c28175cff04322251964 /extra
parente2a1bdb086038f17aaeb36e7f8e4afa682f49c8e (diff)
In extra/FindNanopb.cmake, make the generated .pb.c and. pb.h files depend on
the .options file (if it exists), so that editing the .options file will trigger a rebuild.
Diffstat (limited to 'extra')
-rw-r--r--extra/FindNanopb.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/extra/FindNanopb.cmake b/extra/FindNanopb.cmake
index 9afb21d..749999d 100644
--- a/extra/FindNanopb.cmake
+++ b/extra/FindNanopb.cmake
@@ -170,6 +170,8 @@ function(NANOPB_GENERATE_CPP SRCS HDRS)
set(NANOPB_OPTIONS)
if(EXISTS ${NANOPB_OPTIONS_FILE})
set(NANOPB_OPTIONS -f ${NANOPB_OPTIONS_FILE})
+ else()
+ set(NANOPB_OPTIONS_FILE)
endif()
list(APPEND ${SRCS} "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.c")
@@ -190,7 +192,7 @@ function(NANOPB_GENERATE_CPP SRCS HDRS)
"${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.h"
COMMAND ${PYTHON_EXECUTABLE}
ARGS ${NANOPB_GENERATOR_EXECUTABLE} ${FIL_WE}.pb ${NANOPB_OPTIONS}
- DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb"
+ DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb" ${NANOPB_OPTIONS_FILE}
COMMENT "Running nanopb generator on ${FIL_WE}.pb"
VERBATIM )
endforeach()