Remove unused COMPILING_TESTS definition
ClosedPublic

Authored by dkazakov on Jan 5 2018, 7:53 AM.

Details

Summary

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.

Test Plan
  1. Build Krita with tests (takes 28 min on 4+4 CPU)
  2. Disable the tests
  3. 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.
dkazakov requested review of this revision.Jan 5 2018, 7:53 AM
dkazakov created this revision.
dkazakov edited the summary of this revision. (Show Details)Jan 5 2018, 7:55 AM
dkazakov edited the test plan for this revision. (Show Details)
dkazakov added a project: Krita.
Restricted Application added a subscriber: woltherav. · View Herald TranscriptJan 5 2018, 7:55 AM
rempt accepted this revision.Jan 5 2018, 8:51 AM

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)

This revision is now accepted and ready to land.Jan 5 2018, 8:51 AM
This revision was automatically updated to reflect the committed changes.