Commit Graph

11 Commits

Author SHA1 Message Date
Kitware Robot
0b96ae1f6a Revise C++ coding style using clang-format with "east const"
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`, now with "east const" enforcement.
Use `clang-format` version 18.

* If you reached this commit for a line in `git blame`, re-run the blame
  operation starting at the parent of this commit to see older history
  for the content.

* See the parent commit for instructions to rebase a change across this
  style transition commit.

Issue: #26123
2025-01-23 13:09:50 -05:00
Jonathan Ringer
53717488ea FindProtobuf: Add PROTOC_EXE option to protobuf_generate
This option was added to protobuf's upstream cmake package.
2024-10-10 11:39:19 -04:00
Brad King
9e3b559b6a Tests: Update cmake_minimum_required versions to 3.10 2024-10-03 14:18:16 -04:00
Xiong Nandi
1dc1d000a0 FindProtobuf: Fix IMPORT_DIRS handling and relative directory generation
Append ${CMAKE_CURRENT_SOURCE_DIR} to `_protobuf_include_path` last, since
protoc will search the path in order.

Besides, we have to figure out the output directory by iterating through the
include paths and checking for valid relative paths.
2024-09-11 12:56:28 -04:00
Frank Lange
f2a4b879b1 FindProtobuf: Add PLUGIN parameter to protobuf_generate
This allows for example reusing the function for generating gRPC code by
specifying which grpc plugin to use.
2021-05-06 13:42:21 -04:00
Kitware Robot
ed98209ddc Revise include order using clang-format-6.0
Run the `clang-format.bash` script to update our C and C++ code to a new
include order `.clang-format`.  Use `clang-format` version 6.0.
2019-10-01 12:26:36 -04:00
Rolf Eike Beer
194adaf985 Tests: require C++11 for some protobuf tests
Newer versions of Protobuf require C++11, which is reflected in the imported
target created by FindProtobuf. Manually set this for all tests that only use
the variables.
2019-07-03 18:49:49 +02:00
Peter Mitrano
1299f4cc5e FindProtobuf: add flag to allow descriptor files to be generated
- The .desc files will be in the same folder as the generated .cc and .h files.
- Paths to generate .desc files are stored in a variable passed in
- This is only implemented for C++
- Remove legacy ARGS
- Add test that generates and uses C++ protobuf message
- Add test that checks that the generated .desc file can be instantiated
  with DynamicMessageFactory
- Add Help rst for new feature
2017-10-02 08:08:24 -04:00
André Apitzsch
c281acf807 FindProtobuf: add target for protoc 2017-07-12 13:48:22 -04:00
Brad King
a5ccddf057 FindProtobuf: Rename imported targets to match upstream names
Rename our recently added imported targets to match those provided by
the upstream's CMake-based build.  That way a project using
`find_package(Protobuf)` can get the same target names no matter how
protobuf is found.

Suggested-by: Konstantin Podsvirov <konstantin@podsvirov.pro>
2017-05-22 10:51:55 -04:00
André Apitzsch
e4e1d194bd
FindProtobuf: add tests 2017-05-18 13:57:01 +02:00