Commit Graph

115 Commits

Author SHA1 Message Date
Martchus 9744efda70 Ensure default testfiles directory for working copy exists 2017-11-17 23:36:36 +01:00
Martchus a4e7cbd5c3 Make target 'interface_sources_for_qtcreator' unique 2017-11-16 01:59:43 +01:00
Martchus e283eea1f0 Prevent using executable of header-only lib for coverage 2017-11-15 19:13:36 +01:00
Martchus a7880e3d0c Remove *.qm files from targets when built-in translations enabled
This prevents updating *.ts files twice and in parallel leading to
build errors.
2017-11-02 00:10:06 +01:00
Martchus 2bb4aa36a4 Let tests find the testfiles from sources without extra args
Currently the path of the testfiles always had to be specified
either manually using the -p argument or by running the tests
via the build system targets. The first option is annoying and
the second option not so nice when using Qt Creator and the
debugger.

This commit allows tests to find the testfiles from the source
directory automatically (as fallback). This is achieved by
creating a file containing the path of the source directory
with CMake. Note that this file can only be found if the working
directory is set to the binary directory (default in Qt Creator).
2017-10-30 23:01:07 +01:00
Martchus 2203e0a335 Set dependencies of tidy target correctly 2017-10-24 01:01:29 +02:00
Martchus a869aa8def Do not add sources to header-only libs 2017-10-23 01:12:51 +02:00
Martchus d25265fee1 Don't add include path for config.h to header-only libs
This causes CMake errors and CMake is acutally right, it makes
no sense because the config header is only available during build
but a header-only lib is not being built.
2017-10-23 01:08:25 +02:00
Martchus cb02d5c733 Add target for building all tests
This allows to build all tests at once without
adding them to "all" target. In contrast to the
check target, the tests are not executed.
2017-10-19 16:20:49 +02:00
Martchus ae249140bc Use also actual lib name to check whether dependency is public
In accordance to 'Fix adding public Qt modules in pkg-config'
in qtutilities (b2e3506ff59ae4b610c91bd9ee96333871fa5864).
2017-10-08 20:24:48 +02:00
Martchus 472e0296d0 Fix adding public static lib dependencies 2017-10-08 19:42:55 +02:00
Martchus 05605a1b25 Filter files for tidy 2017-09-09 21:35:55 +02:00
Martchus 7754cf82d8 dependency info: Support prefixed static Qt 5 modules 2017-09-03 17:50:23 +02:00
Martchus 9c8bb44843 Fix mingw-w64 targets 2017-08-31 02:16:05 +02:00
Martchus f8c7a0a0a8 Do not set BUNDLE DESTINATION unless platform is MacOS X
Because that seems to prevent executables from being installed
when using install-binary target
2017-08-31 02:15:56 +02:00
Martchus 032111eef0 Distinguish exporting/enabling resources of static libs
Required because we now allow to provide dynamic libs as
dependencies of static libs
2017-08-31 02:15:46 +02:00
Martchus 17a08baeb5 Fix including config when building app as testlib 2017-08-30 22:53:35 +02:00
Martchus 11e2c48c06 Prevent usage of include_directories
Rather use target_include_directories
2017-08-23 23:10:05 +02:00
Martchus a475ef8693 Make creating overall test coverage depend on awk script 2017-08-17 17:59:08 +02:00
Martchus b45fe7eaeb Allow providing a shared lib as dependency for a static lib
Previously the case when the dependency of a static library
was provided by a dynamic library has not been handled
correctly leading to linker errors when building the final
application.
2017-08-06 00:35:11 +02:00
Martchus 86e12a1164 Fix include dirs for build interface
* The project directory is part of the include
  directives, eg. #include <c++utilities/...
* So the include search path must be one level
  above the project directory.
2017-08-05 18:41:41 +02:00
Martchus b7381eb55c Do not use -static under MacOS 2017-08-05 18:38:02 +02:00
Martchus 6ed336bf94 Allow specifying install destination for bundles
* Install destination for bundles can be set via
  cache variable BUNDLE_INSTALL_DESTINATION
* Default is the dir used for regular applications
2017-08-05 18:33:57 +02:00
Martchus 15bf2779c5 Make pkg-config file for both, dynamic and static target 2017-07-30 00:56:12 +02:00
Martchus e4709099d2 Prevent error in coverage target when building only static libs 2017-07-28 17:34:28 +02:00
Martchus c966e3fb1b Improve finding cppunit
* Add include dir
* Make library/include dir configurable via cache variable
2017-07-22 15:33:41 +02:00
Martchus 36b2498dd6 Allow disabling install targets
Might be useful if install targets cause
problems, eg. under MacOS
2017-07-20 01:43:10 +02:00
Martchus 326551ee02 Allow to force use of external iconv 2017-07-20 01:25:13 +02:00
Martchus 73f11eeb2a detecting 3rdparty libs: Fix overriding cache variables 2017-07-20 01:24:35 +02:00
Martchus 942c14ce3d Fix target include dirs
* Add include path of own header files for build
  and external use via imported target. Previously
  only include dirs required for external libs were
  added.
* Using global include dirs is no longer required.
* When PUBLIC_SHARED_INCLUDE_DIRS is empty, adding
  "${PUBLIC_SHARED_INCLUDE_DIRS}" to public include dirs
  does not leave INTERFACE_INCLUDE_DIRECTORIES property
  empty. Instead the source dir is added. So just don't
  use quotes here.
2017-07-11 22:02:27 +02:00
Martchus 28f76db46e Add install target for 'extra-files'
So additional files like tests/calculateoverallcoverage.awk
and coding-style.clang-format are installed and can be used
by other projects, too.
2017-07-11 19:34:38 +02:00
Martchus 442f7a9b25 Exclude generated files from coverage
* So files generated by moc or qdbusxml2cpp are not
  part of coverage statistics
* When filtering files, llvm-cov prints multiple tables
  showing coverage on function level.
  -> Generate overall coverage stats via awk.
2017-07-09 23:38:11 +02:00
Martchus 6f146072ea Allow overriding 3rd party libs/includes
So passwordfile can be told to use legacy OpenSSL
header in accordance with Qt 5 which still requires
OpenSSL 1.0
2017-07-04 22:44:32 +02:00
Martchus a4fc4024b5 Make tidy and coverage optional and disabled by default
* Prevent warnings about required tools being unavailable
  when tidy/coverage targets aren't desired anyways (eg.
  when packaging)
* Do not automatically execute tidy check when packaging
  in unclean environment
2017-06-20 23:38:45 +02:00
Martchus 57d5d04d9f Merge prof data of subprocesses created when executing tests
So coverage is accounted correctly when tests create subprocesses
of the application to be tested using execApp().
2017-06-20 23:19:49 +02:00
Martchus 1e14b09e64 Fix passing application path to tests 2017-06-19 14:15:44 +02:00
Martchus 64572e6860 Add general coverage target 2017-06-19 14:01:33 +02:00
Martchus 6807d899d2 Enable source code based coverage analysis 2017-06-18 16:17:44 +02:00
Martchus 2174dc516a Allow specifying target compile options via variable 2017-06-18 16:14:45 +02:00
Martchus 5e67a9b691 Make check target depend on .clang-format file 2017-06-01 18:24:14 +02:00
Martchus ecce539a18 Do not set global include dirs
TODO: Set include dirs on target level
2017-05-24 23:29:17 +02:00
Martchus ac348ee3b9 Find cppunit via pkg-config 2017-05-23 00:49:45 +02:00
Martchus 13ac2305d5 Allow not to link tests against cppunit 2017-05-23 00:10:27 +02:00
Martchus 04c1f98361 Format test code, too 2017-05-02 23:31:12 +02:00
Martchus 7e49d3994f Allow skipping creation of tidy target 2017-05-01 03:03:20 +02:00
Martchus 2ef55c439c Add tidy test 2017-05-01 02:57:58 +02:00
Martchus 7e0f65ed78 Call clang-format with all src files 2017-05-01 02:57:58 +02:00
Martchus b74327d961 Move creation of check target to BasicConfig.cmake
* So other tests like tidy check can be added
* Even if there are no tests after all, the
  check target shoudn't cause any problems
2017-05-01 02:57:58 +02:00
Martchus d76ead0483 Add tidy target using clang-format 2017-05-01 02:57:58 +02:00
Martchus ead0fadac3 Unset version info when not available 2017-04-15 23:33:52 +02:00