Made service compiler build sensitive to template changes.

This commit is contained in:
Pedro Pinto committed 2017-08-16 16:56:21 +00:00
1 parent 6dca1b15d1
commit ead4b1cd5b
1 file changed
+8 -2
+8 -2
View File
@@ -69,6 +69,12 @@ function(Service_Compiler_Generate_Cpp SRCS HDRS)
list(APPEND ${SRCS} "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.server.pb.cc")
list(APPEND ${HDRS} "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.server.pb.h")
set (TEMPLATES
${CMAKE_CURRENT_SOURCE_DIR}/api/service_compiler/templates/cpp/client.pb.cc
${CMAKE_CURRENT_SOURCE_DIR}/api/service_compiler/templates/cpp/client.pb.h
${CMAKE_CURRENT_SOURCE_DIR}/api/service_compiler/templates/cpp/server.pb.cc
${CMAKE_CURRENT_SOURCE_DIR}/api/service_compiler/templates/cpp/server.pb.h)
if (WIN32)
add_custom_command(
@@ -90,7 +96,7 @@ function(Service_Compiler_Generate_Cpp SRCS HDRS)
-I ${CMAKE_SOURCE_DIR}/src
${ABS_FIL}
DEPENDS ${ABS_FIL}
DEPENDS ${ABS_FIL} ${TEMPLATES}
COMMENT "Running C++ service compiler on ${FIL}"
VERBATIM )
@@ -114,7 +120,7 @@ function(Service_Compiler_Generate_Cpp SRCS HDRS)
-I ${CMAKE_SOURCE_DIR}/src
${ABS_FIL}
DEPENDS ${ABS_FIL}
DEPENDS ${ABS_FIL} ${TEMPLATES}
COMMENT "Running C++ service compiler on ${FIL}"
VERBATIM )