Adding this definition makes cmake rebuild everything when toggling BUILD_TESTING switch. With the patch applied, one can switch on and off tests without recompiling anything.
Details
- Reviewers
rempt - Group Reviewers
Krita - Commits
- R37:fa23dff3ebb2: Remove unused COMPILING_TESTS definition
- Build Krita with tests (takes 28 min on 4+4 CPU)
- Disable the tests
- Type: 'make -j8 install'
Without the patch cmake will do a full recompile without the tests, which takes 22 min. With the patch, cmake will recompile a couple of files only, taking about 12 seconds(!).
Diff Detail
- Repository
- R37 Krita
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Yes, that definition isn't used anywhere anymore. In Calligra 2.9 it was still used:
CMakeLists.txt: add_definitions(-DCOMPILING_TESTS)
filters/words/rtf/import/3rdparty/rtf-qt/src/rtfreader_export.h:#ifdef COMPILING_TESTS
kexi/kexiutils/KexiTester.h:#ifndef COMPILING_TESTS
krita/image/kritaimage_export.h:#ifdef COMPILING_TESTS
krita/plugins/paintops/libpaintop/kritapaintop_export.h:#ifdef COMPILING_TESTS
krita/plugins/tools/defaulttools/kritadefaulttools_export.h:#ifdef COMPILING_TESTS
krita/plugins/tools/tool_transform2/kritatooltransform_export.h:#ifdef COMPILING_TESTS
krita/ui/kritaui_export.h:#ifdef COMPILING_TESTS
libs/flake/CMakeLists.txt: add_definitions(-DCOMPILING_TESTS)
libs/kopageapp/CMakeLists.txt: add_definitions(-DCOMPILING_TESTS)
libs/koreport/CMakeLists.txt: add_definitions(-DCOMPILING_TESTS)
libs/koreport/koreport_export.h:#ifdef COMPILING_TESTS
libs/kotext/kotext_export.h:#ifdef COMPILING_TESTS
libs/main/komain_export.h:#ifdef COMPILING_TESTS
libs/rdf/kordf_export.h:#ifdef COMPILING_TESTS
libs/textlayout/kotextlayout_export.h:#ifdef COMPILING_TESTS
libs/version/koversion_export.h:#ifdef COMPILING_TESTS
plan/CMakeLists.txt: add_definitions(-DCOMPILING_TESTS)
plan/kplato_export.h:#ifdef COMPILING_TESTS
plan/plugins/schedulers/rcps/kplatorcps_export.h:#ifdef COMPILING_TESTS
plan/plugins/schedulers/tj/kplatotj_export.h:#ifdef COMPILING_TESTS
plan/workpackage/kplatowork_export.h:#ifdef COMPILING_TESTS
sheets/calligra_sheets_export.h:#ifdef COMPILING_TESTS
sheets/calligra_sheets_export.h:#ifdef COMPILING_TESTS
stage/part/CMakeLists.txt: add_definitions(-DCOMPILING_TESTS)
stage/part/stage_export.h:#ifdef COMPILING_TESTS
words/CMakeLists.txt: add_definitions(-DCOMPILING_TESTS)
words/part/tests/CMakeLists.txt:add_definitions(-DCOMPILING_TESTS)
words/part/words_export.h:#ifdef COMPILING_TESTS
lines 1-29/29 (END)