summaryrefslogtreecommitdiff
path: root/test/libapt/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* Use different variable name in GTest source path detectionDavid Kalnischkies2023-11-181-5/+5
| | | | | | | | | | | | | | | | | | | | | | We used GTEST_ROOT, which becomes an issue with 3.27 as that variable would influence find_package behaviour by providing PREFIXES – introduced with potentially mixed-cased name in 3.12. CMake Warning (dev) at test/libapt/CMakeLists.txt:8 (find_package): Policy CMP0144 is not set: find_package uses upper-case <PACKAGENAME>_ROOT variables. Run "cmake --help-policy CMP0144" for policy details. Use the cmake_policy command to set the policy and suppress this warning. CMake variable GTEST_ROOT is set to: /usr/src/googletest/googletest For compatibility, find_package is ignoring the variable, but code in a .cmake module might still use it. As using this new feature isn't what we wanted at all, we just use a different variable name to avoid the warning and potential future problems if we would keep using this name.
* Add support for GTest 1.9, do not fail silently if its missingJulian Andres Klode2020-01-071-24/+31
| | | | | | Require passing -DWITH_TESTS=OFF to CMakeList to disable unit tests, rather than ignoring them if GTest cannot be found; which just happened on CI...
* Fix use of GTest to adjust for GTest 1.9Julian Andres Klode2019-09-191-1/+1
| | | | | | GTest 1.9 uses a variable defined in the parent directory, thus failing to configure. Configure the project in the parent directory instead.
* CMake: Enforce "override" use on overriden methodsJulian Andres Klode2019-05-061-0/+2
| | | | | This ensures that we do not accidentally stop overriding a method because it's signature changed in an API break.
* Merge libapt-inst into libapt-pkgJulian Andres Klode2019-05-061-1/+1
|
* CMake: Use ${PROJECT_NAME} instead of hardcoding aptDavid Kalnischkies2018-08-141-6/+7
| | | | | | | Completely pointless as it makes no difference for apt, but copying the file to other projects becomes a lot easier. Gbp-Dch: Ignore
* Prevent GTest from flooding us with compiler warningsDavid Kalnischkies2018-05-041-0/+5
| | | | | | | | | | | | | | GTest has a bunch of undefined macros which causes the compiler to spit out warnings for each one on each test file. There isn't much we can do, so we just disable the warning for the testcases. Other warnings like sign-promo and sign-compare we can avoid by being more explicit about our expected integer constants being unsigned. As we are just changing testcases, there is no user visible change which would deserve to be noted in the changelog. Gbp-Dch: Ignore Reported-By: gcc-8
* Fix build with new gtestJulian Andres Klode2018-05-041-1/+1
| | | | | | Still allow the older one to be used. Closes: #897149
* CMake: Document that the globs are expanded during CMakeJulian Andres Klode2017-01-171-0/+3
| | | | | | | This will avoid people from thinking that they have to do nothing when they change the set of files. Gbp-Dch: ignore
* follow the googletest merge in build-dependsDavid Kalnischkies2016-11-251-2/+4
|
* CMake: test/libapt: Use a prebuilt GTest library if availableJulian Andres Klode2016-09-021-15/+26
| | | | | | | If a non-existing source directory is specified, try finding the system gtest library. Debian derived distributions are a bit strange because they only ship the source code and not the library...
* CMake: Add unit testsJulian Andres Klode2016-08-101-0/+22
Add support for our GTest based unit tests. By default, CMake will look in /usr/src/gtest for the external GTest project, but this can be overriden by defining GTEST_ROOT when invoking cmake. Gbp-Dch: ignore