Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-cpplib
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
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
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-cpplib
Merge requests
!42
Release 0.2.0
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Closed
Release 0.2.0
release-0.2.0
into
main
Overview
0
Commits
87
Pipelines
1
Changes
3
Closed
Release 0.2.0
Timm Fitschen
requested to merge
release-0.2.0
into
main
Jul 13, 2022
Overview
0
Commits
87
Pipelines
1
Changes
3
0
0
Merge request reports
Viewing commit
2e5b4785
Prev
Next
Show latest version
3 files
+
76
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Verified
2e5b4785
Revert deletion of test_package
· 2e5b4785
Timm Fitschen
authored
Jul 1, 2022
test_package/CMakeLists.txt
0 → 100644
+
47
−
0
View file @ 2e5b4785
cmake_minimum_required
(
VERSION 3.1
)
project
(
PackageTest CXX
)
#######################################################################
### append test cases here (file name without the ".cpp" suffix)
#######################################################################
set
(
test_cases
test_info
)
###################################################
### Set up tests using GoogleTest (GTest)
###################################################
# dependencies
include
(
${
CMAKE_BINARY_DIR
}
/conanbuildinfo.cmake
)
conan_basic_setup
(
KEEP_RPATHS
)
# supress warnings during build of gtest
cmake_policy
(
SET CMP0054 NEW
)
enable_testing
()
# add special cmake functions for gtest
include
(
GoogleTest REQUIRED
)
# loop over all test cases and add them to the test runner
list
(
LENGTH test_cases len_test_cases
)
math
(
EXPR len_test_cases
"
${
len_test_cases
}
- 1"
)
foreach
(
i RANGE
"
${
len_test_cases
}
"
)
list
(
GET test_cases
${
i
}
test_case_name
)
add_executable
(
${
test_case_name
}
${
test_case_name
}
.cpp
)
target_link_libraries
(
${
test_case_name
}
PRIVATE
${
CONAN_LIBS_CAOSDB
}
${
CONAN_LIBS_GTEST
}
${
CONAN_LIBS_GRPC
}
${
CONAN_LIBS_ABSEIL
}
${
CONAN_LIBS_OPENSSL
}
${
CONAN_LIBS_C-ARES
}
${
CONAN_LIBS_BZIP2
}
${
CONAN_LIBS_PROTOBUF
}
${
CONAN_LIBS_ZLIB
}
)
if
(
"
${
CMAKE_BUILD_TYPE
}
"
MATCHES
"Debug"
)
target_link_libraries
(
${
test_case_name
}
PRIVATE caosdb_grpc
)
endif
()
target_include_directories
(
${
test_case_name
}
PUBLIC
${
CONAN_INCLUDE_DIRS
}
)
set_target_properties
(
${
test_case_name
}
PROPERTIES
CXX_CLANG_TIDY
"
${
_CMAKE_CXX_CLANG_TIDY
}
"
CXX_INCLUDE_WHAT_YOU_USE
"
${
_CMAKE_CXX_INCLUDE_WHAT_YOU_USE
}
"
)
gtest_discover_tests
(
${
test_case_name
}
PROPERTIES
LABELS
"caosdb-cpplib-int-tests"
)
endforeach
()
Loading