Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
coeurl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nheko Reborn
coeurl
Commits
3b64edc5
Verified
Commit
3b64edc5
authored
2 years ago
by
Nicolas Werner
Browse files
Options
Downloads
Patches
Plain Diff
Make tests use FetchContent
parent
6e8f817e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#4123
passed
2 years ago
Stage: build
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+2
-2
2 additions, 2 deletions
.gitlab-ci.yml
CMakeLists.txt
+1
-3
1 addition, 3 deletions
CMakeLists.txt
tests/CMakeLists.txt
+30
-0
30 additions, 0 deletions
tests/CMakeLists.txt
with
33 additions
and
5 deletions
.gitlab-ci.yml
+
2
−
2
View file @
3b64edc5
...
...
@@ -54,7 +54,7 @@ build-cmake:
before_script
:
-
apk update && apk add git curl-dev libevent-dev spdlog-dev g++ cmake pkgconf openssl samurai
script
:
-
cmake -GNinja -S
.
-B build
-
cmake -GNinja -S
tests/
-B build
-
ninja -C build
build-hunter
:
...
...
@@ -64,7 +64,7 @@ build-hunter:
before_script
:
-
apk update && apk add git curl-dev libevent-dev spdlog-dev g++ cmake pkgconf openssl samurai perl make linux-headers
script
:
-
cmake -GNinja -S
.
-B build -DHUNTER_ENABLED=ON
-
cmake -GNinja -S
tests/
-B build -DHUNTER_ENABLED=ON
-
ninja -C build
test-pages
:
...
...
This diff is collapsed.
Click to expand it.
CMakeLists.txt
+
1
−
3
View file @
3b64edc5
...
...
@@ -30,9 +30,7 @@ project(coeurl
HOMEPAGE_URL
"https://nheko.im/nheko-reborn/cocurl"
)
if
(
CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR
)
message
(
STATUS
${
CMAKE_SOURCE_DIR
}
)
message
(
STATUS
${
CMAKE_CURRENT_SOURCE_DIR
}
)
message
(
FATAL_ERROR
"The CMake build for coeurl is not intended for installation or usage outside of FetchContent."
)
message
(
FATAL_ERROR
"The CMake build for coeurl is not intended for installation or usage outside of FetchContent. Use meson instead."
)
endif
()
add_library
(
coeurl lib/client.cpp lib/request.cpp lib/errors.cpp
)
...
...
This diff is collapsed.
Click to expand it.
tests/CMakeLists.txt
0 → 100644
+
30
−
0
View file @
3b64edc5
cmake_minimum_required
(
VERSION 3.12...3.13
)
set
(
CMAKE_TOOLCHAIN_FILE
"
${
CMAKE_CURRENT_LIST_DIR
}
/../toolchain.cmake"
CACHE
FILEPATH
"Default toolchain"
)
set
(
CMAKE_CXX_STANDARD 17 CACHE STRING
"C++ standard"
)
set
(
CMAKE_CXX_STANDARD_REQUIRED ON CACHE BOOL
"Require C++ standard to be supported"
)
set
(
CMAKE_POSITION_INDEPENDENT_CODE ON CACHE BOOL
"compile as PIC by default"
)
option
(
HUNTER_ENABLED
"Enable Hunter package manager"
OFF
)
include
(
"../cmake/HunterGate.cmake"
)
HunterGate
(
URL
"https://github.com/cpp-pm/hunter/archive/v0.24.8.tar.gz"
SHA1
"ca7838dded9a1811b04ffd56175f629e0af82d3d"
)
project
(
coeurl-cmake-buildtest
)
include
(
FetchContent
)
FetchContent_Declare
(
coeurl
GIT_REPOSITORY
"
${
CMAKE_CURRENT_LIST_DIR
}
/.."
GIT_TAG HEAD
)
FetchContent_MakeAvailable
(
coeurl
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment