summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorMichael Hanselmann <public@hansmi.ch>2014-09-17 04:11:10 (GMT)
committerBrad King <brad.king@kitware.com>2014-09-18 13:16:27 (GMT)
commite380d7c5baca9de5fcb5826e2d9386a6dd57e48c (patch)
tree06ee89a3eae882ecaec8b8802597dd45d1c4f222 /Modules
parent201cc6fe095f1a0abfc34bb6482d933cc12ff055 (diff)
downloadCMake-e380d7c5baca9de5fcb5826e2d9386a6dd57e48c.zip
CMake-e380d7c5baca9de5fcb5826e2d9386a6dd57e48c.tar.gz
CMake-e380d7c5baca9de5fcb5826e2d9386a6dd57e48c.tar.bz2
FindProtobuf: Make outputs depend on protoc executable
After updating from Protocol Buffers 2.5.0 to 2.6.0 compilation of the generated source failed: "This file was generated by an older version of protoc which is incompatible with your Protocol Buffer headers. Please regenerate this file with a newer version of protoc.". Turns out the source and headers generated by way of FindProtobuf.cmake:PROTOBUF_GENERATE_CPP aren't updated. Adding a dependency on the compiler executable fixes this issue.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindProtobuf.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/FindProtobuf.cmake b/Modules/FindProtobuf.cmake
index 9b120a6..72ca6ed 100644
--- a/Modules/FindProtobuf.cmake
+++ b/Modules/FindProtobuf.cmake
@@ -183,7 +183,7 @@ function(PROTOBUF_GENERATE_CPP SRCS HDRS)
"${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.h"
COMMAND ${PROTOBUF_PROTOC_EXECUTABLE}
ARGS --cpp_out ${CMAKE_CURRENT_BINARY_DIR} ${_protobuf_include_path} ${ABS_FIL}
- DEPENDS ${ABS_FIL}
+ DEPENDS ${ABS_FIL} ${PROTOBUF_PROTOC_EXECUTABLE}
COMMENT "Running C++ protocol buffer compiler on ${FIL}"
VERBATIM )
endforeach()