-
Notifications
You must be signed in to change notification settings - Fork 15.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmake: Replace protobuf_source_dir variable with protobuf_SOURCE_DIR …
…variable (#9596) protobuf_source_dir variable is no longer needed and has the same value as protobuf_SOURCE_DIR variable, which is instance of CMake-standard <PROJECT-NAME>_SOURCE_DIR variable: https://cmake.org/cmake/help/latest/variable/PROJECT-NAME_SOURCE_DIR.html
- Loading branch information
Showing
9 changed files
with
442 additions
and
445 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,49 @@ | ||
|
||
add_custom_command( | ||
OUTPUT ${protobuf_source_dir}/conformance/conformance.pb.cc | ||
DEPENDS ${protobuf_PROTOC_EXE} ${protobuf_source_dir}/conformance/conformance.proto | ||
COMMAND ${protobuf_PROTOC_EXE} ${protobuf_source_dir}/conformance/conformance.proto | ||
--proto_path=${protobuf_source_dir}/conformance | ||
--cpp_out=${protobuf_source_dir}/conformance | ||
OUTPUT ${protobuf_SOURCE_DIR}/conformance/conformance.pb.cc | ||
DEPENDS ${protobuf_PROTOC_EXE} ${protobuf_SOURCE_DIR}/conformance/conformance.proto | ||
COMMAND ${protobuf_PROTOC_EXE} ${protobuf_SOURCE_DIR}/conformance/conformance.proto | ||
--proto_path=${protobuf_SOURCE_DIR}/conformance | ||
--cpp_out=${protobuf_SOURCE_DIR}/conformance | ||
) | ||
|
||
add_custom_command( | ||
OUTPUT ${protobuf_source_dir}/src/google/protobuf/test_messages_proto3.pb.cc | ||
${protobuf_source_dir}/src/google/protobuf/test_messages_proto2.pb.cc | ||
DEPENDS ${protobuf_PROTOC_EXE} ${protobuf_source_dir}/src/google/protobuf/test_messages_proto3.proto | ||
${protobuf_PROTOC_EXE} ${protobuf_source_dir}/src/google/protobuf/test_messages_proto2.proto | ||
COMMAND ${protobuf_PROTOC_EXE} ${protobuf_source_dir}/src/google/protobuf/test_messages_proto3.proto | ||
${protobuf_source_dir}/src/google/protobuf/test_messages_proto2.proto | ||
--proto_path=${protobuf_source_dir}/src | ||
--cpp_out=${protobuf_source_dir}/src | ||
OUTPUT ${protobuf_SOURCE_DIR}/src/google/protobuf/test_messages_proto3.pb.cc | ||
${protobuf_SOURCE_DIR}/src/google/protobuf/test_messages_proto2.pb.cc | ||
DEPENDS ${protobuf_PROTOC_EXE} ${protobuf_SOURCE_DIR}/src/google/protobuf/test_messages_proto3.proto | ||
${protobuf_PROTOC_EXE} ${protobuf_SOURCE_DIR}/src/google/protobuf/test_messages_proto2.proto | ||
COMMAND ${protobuf_PROTOC_EXE} ${protobuf_SOURCE_DIR}/src/google/protobuf/test_messages_proto3.proto | ||
${protobuf_SOURCE_DIR}/src/google/protobuf/test_messages_proto2.proto | ||
--proto_path=${protobuf_SOURCE_DIR}/src | ||
--cpp_out=${protobuf_SOURCE_DIR}/src | ||
) | ||
|
||
add_executable(conformance_test_runner | ||
${protobuf_source_dir}/conformance/binary_json_conformance_suite.cc | ||
${protobuf_source_dir}/conformance/binary_json_conformance_suite.h | ||
${protobuf_source_dir}/conformance/conformance.pb.cc | ||
${protobuf_source_dir}/conformance/conformance_test.cc | ||
${protobuf_source_dir}/conformance/conformance_test_runner.cc | ||
${protobuf_source_dir}/conformance/third_party/jsoncpp/json.h | ||
${protobuf_source_dir}/conformance/third_party/jsoncpp/jsoncpp.cpp | ||
${protobuf_source_dir}/src/google/protobuf/test_messages_proto2.pb.cc | ||
${protobuf_source_dir}/src/google/protobuf/test_messages_proto3.pb.cc | ||
${protobuf_SOURCE_DIR}/conformance/binary_json_conformance_suite.cc | ||
${protobuf_SOURCE_DIR}/conformance/binary_json_conformance_suite.h | ||
${protobuf_SOURCE_DIR}/conformance/conformance.pb.cc | ||
${protobuf_SOURCE_DIR}/conformance/conformance_test.cc | ||
${protobuf_SOURCE_DIR}/conformance/conformance_test_runner.cc | ||
${protobuf_SOURCE_DIR}/conformance/third_party/jsoncpp/json.h | ||
${protobuf_SOURCE_DIR}/conformance/third_party/jsoncpp/jsoncpp.cpp | ||
${protobuf_SOURCE_DIR}/src/google/protobuf/test_messages_proto2.pb.cc | ||
${protobuf_SOURCE_DIR}/src/google/protobuf/test_messages_proto3.pb.cc | ||
) | ||
|
||
add_executable(conformance_cpp | ||
${protobuf_source_dir}/conformance/conformance.pb.cc | ||
${protobuf_source_dir}/conformance/conformance_cpp.cc | ||
${protobuf_source_dir}/src/google/protobuf/test_messages_proto2.pb.cc | ||
${protobuf_source_dir}/src/google/protobuf/test_messages_proto3.pb.cc | ||
${protobuf_SOURCE_DIR}/conformance/conformance.pb.cc | ||
${protobuf_SOURCE_DIR}/conformance/conformance_cpp.cc | ||
${protobuf_SOURCE_DIR}/src/google/protobuf/test_messages_proto2.pb.cc | ||
${protobuf_SOURCE_DIR}/src/google/protobuf/test_messages_proto3.pb.cc | ||
) | ||
|
||
target_include_directories( | ||
conformance_test_runner | ||
PUBLIC ${protobuf_source_dir}/conformance) | ||
PUBLIC ${protobuf_SOURCE_DIR}/conformance) | ||
|
||
target_include_directories( | ||
conformance_cpp | ||
PUBLIC ${protobuf_source_dir}/conformance) | ||
PUBLIC ${protobuf_SOURCE_DIR}/conformance) | ||
|
||
target_link_libraries(conformance_test_runner libprotobuf) | ||
target_link_libraries(conformance_cpp libprotobuf) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.