Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mtxclient
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
mtxclient
Commits
ca07c6b7
Verified
Commit
ca07c6b7
authored
2 years ago
by
Nicolas Werner
Browse files
Options
Downloads
Patches
Plain Diff
Add option to disable implicit json conversions
parent
e13a71d3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#3253
passed
2 years ago
Stage: build
Stage: deploy
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+1
-0
1 addition, 0 deletions
.gitlab-ci.yml
CMakeLists.txt
+9
-0
9 additions, 0 deletions
CMakeLists.txt
with
10 additions
and
0 deletions
.gitlab-ci.yml
+
1
−
0
View file @
ca07c6b7
...
...
@@ -69,6 +69,7 @@ build synapse arm64:
-DCMAKE_BUILD_TYPE=Debug -DHUNTER_CONFIGURATION_TYPES=Debug
-DCI_BUILD=ON
-DCOVERAGE=${COVERAGE}
-DJSON_ImplicitConversions=OFF
-
cmake --build build
-
MTXCLIENT_SERVER=synapse GTEST_OUTPUT=xml:junit-output/ make test
after_script
:
...
...
This diff is collapsed.
Click to expand it.
CMakeLists.txt
+
9
−
0
View file @
ca07c6b7
...
...
@@ -53,6 +53,7 @@ option(BUILD_LIB_EXAMPLES "Build examples" ON)
option
(
COVERAGE
"Calculate test coverage"
OFF
)
option
(
IWYU
"Check headers with include-what-you-use"
OFF
)
option
(
BUILD_SHARED_LIBS
"Specifies whether to build mtxclient as a shared library lib or not"
ON
)
option
(
JSON_ImplicitConversions
"Disable implicit conversions in nlohmann/json"
ON
)
list
(
APPEND CMAKE_MODULE_PATH
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake"
)
...
...
@@ -262,6 +263,14 @@ target_include_directories(
PUBLIC
$<BUILD_INTERFACE:
${
CMAKE_CURRENT_SOURCE_DIR
}
/include>
$<INSTALL_INTERFACE:include>
)
if
(
NOT JSON_ImplicitConversions
)
set_target_properties
(
nlohmann_json::nlohmann_json PROPERTIES
INTERFACE_COMPILE_DEFINITIONS
"JSON_USE_IMPLICIT_CONVERSIONS=
\$
<BOOL:OFF>;JSON_DIAGNOSTICS=
\$
<BOOL:OFF>"
)
target_compile_definitions
(
matrix_client PUBLIC JSON_USE_IMPLICIT_CONVERSIONS=0
)
endif
()
target_link_libraries
(
matrix_client
PUBLIC
OpenSSL::Crypto
...
...
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