Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
protobuf-c
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
spbro
protobuf-c
Commits
0b629e68
Unverified
Commit
0b629e68
authored
Apr 27, 2024
by
Robert Edmonds
Committed by
GitHub
Apr 27, 2024
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #714 from clementperon/fix_cmake
Fix CI issues with CMake
parents
5c13d7df
af0ea6fa
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
13 deletions
+32
-13
.github/workflows/build.yml
.github/workflows/build.yml
+12
-4
build-cmake/CMakeLists.txt
build-cmake/CMakeLists.txt
+20
-9
No files found.
.github/workflows/build.yml
View file @
0b629e68
...
...
@@ -17,7 +17,9 @@ jobs:
-
uses
:
actions/checkout@v2
-
name
:
Install Linux dependencies
if
:
startsWith(matrix.os, 'ubuntu')
run
:
sudo apt-get install -y protobuf-compiler libprotobuf-dev libprotoc-dev
run
:
|
sudo apt-get update -y
sudo apt-get install -y protobuf-compiler libprotobuf-dev libprotoc-dev
-
name
:
Install Mac dependencies
if
:
startsWith(matrix.os, 'macos')
run
:
brew install protobuf automake
...
...
@@ -60,7 +62,9 @@ jobs:
steps
:
-
uses
:
actions/checkout@v2
-
name
:
Install dependencies
run
:
sudo apt-get install -y protobuf-compiler libprotobuf-dev libprotoc-dev valgrind
run
:
|
sudo apt-get update -y
sudo apt-get install -y protobuf-compiler libprotobuf-dev libprotoc-dev valgrind
-
name
:
Run distcheck with valgrind
run
:
|
./autogen.sh
...
...
@@ -72,7 +76,9 @@ jobs:
steps
:
-
uses
:
actions/checkout@v2
-
name
:
Install dependencies
run
:
sudo apt-get install -y protobuf-compiler libprotobuf-dev libprotoc-dev lcov
run
:
|
sudo apt-get update -y
sudo apt-get install -y protobuf-compiler libprotobuf-dev libprotoc-dev lcov
-
name
:
Run coverage build
run
:
|
./autogen.sh
...
...
@@ -96,7 +102,9 @@ jobs:
-
uses
:
actions/checkout@v2
-
name
:
Install Linux dependencies
if
:
startsWith(matrix.os, 'ubuntu')
run
:
sudo apt-get install -y protobuf-compiler libprotobuf-dev libprotoc-dev
run
:
|
sudo apt-get update -y
sudo apt-get install -y protobuf-compiler libprotobuf-dev libprotoc-dev
-
name
:
Install Mac dependencies
if
:
startsWith(matrix.os, 'macos')
run
:
brew install protobuf abseil
...
...
build-cmake/CMakeLists.txt
View file @
0b629e68
...
...
@@ -8,6 +8,10 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.10 FATAL_ERROR)
cmake_policy
(
SET CMP0074 NEW
)
cmake_policy
(
SET CMP0091 NEW
)
cmake_policy
(
SET CMP0112 NEW
)
# TODO: Convert DART to CTEST
if
(
POLICY CMP0145
)
cmake_policy
(
SET CMP0145 OLD
)
endif
()
PROJECT
(
protobuf-c C CXX
)
...
...
@@ -15,7 +19,14 @@ if (MSVC AND NOT BUILD_SHARED_LIBS)
SET
(
Protobuf_USE_STATIC_LIBS ON
)
endif
(
MSVC AND NOT BUILD_SHARED_LIBS
)
FIND_PACKAGE
(
Protobuf REQUIRED
)
FIND_PACKAGE
(
Protobuf CONFIG
)
if
(
Protobuf_FOUND
)
# Keep compatibility with FindProtobuf CMake module
set
(
PROTOBUF_PROTOC_EXECUTABLE $<TARGET_FILE:protobuf::protoc>
)
else
()
MESSAGE
(
STATUS
"Protobuf CMake config not found fallback to Cmake Module"
)
FIND_PACKAGE
(
Protobuf REQUIRED
)
endif
()
file
(
REAL_PATH
"
${
PROTOBUF_INCLUDE_DIR
}
"
PROTOBUF_INCLUDE_DIR
)
INCLUDE_DIRECTORIES
(
${
PROTOBUF_INCLUDE_DIR
}
)
...
...
@@ -209,7 +220,7 @@ GENERATE_TEST_SOURCES(${TEST_DIR}/test-full.proto t/test-full.pb-c.c t/test-full
ADD_EXECUTABLE
(
cxx-generate-packed-data
${
TEST_DIR
}
/generated-code2/cxx-generate-packed-data.cc t/test-full.pb.h t/test-full.pb.cc protobuf-c/protobuf-c.pb.cc protobuf-c/protobuf-c.pb.h
)
TARGET_LINK_LIBRARIES
(
cxx-generate-packed-data
${
PROTOBUF_LIBRARY
}
protobuf::libprotobuf
${
protobuf_ABSL_USED_TARGETS
}
${
protobuf_UTF8_USED_TARGETS
}
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment