[CMAKE] Introduce FASTER_BUILD experimental feature (#2438)
authorVladislav Vinogradov <vlad.vinogradov@intel.com>
Mon, 28 Sep 2020 15:53:11 +0000 (18:53 +0300)
committerGitHub <noreply@github.com>
Mon, 28 Sep 2020 15:53:11 +0000 (18:53 +0300)
commitd28a5d6c4f60ebec5b196cc756228ee26d61a004
treee99465c2855da545299833e27755cdc4cf44b870
parent63fbe78d76f0f41d8396fb752d5550e3490d6a63
[CMAKE] Introduce FASTER_BUILD experimental feature (#2438)

It uses CMake 3.16 built-in utilities to speed up build time:

* Unity builds
* Precompiled headers

The feature is controlled via `ENABLE_FASTER_BUILD` CMake option (disabled by default).
The option avaialble only on CMake >= 3.16.
The feature is enabled per-target via `ie_faster_build` function.

Some observations:

* Don't have actual numbers for compile time, but subjectively can see
  speed up locally with VS 2019.
* Unity builds gives much more effect, but has some restriction on source files,
  so are not used everywhere.
36 files changed:
cmake/developer_package.cmake
cmake/faster_build.cmake [new file with mode: 0644]
cmake/features.cmake
inference-engine/src/inference_engine/CMakeLists.txt
inference-engine/src/inference_engine/precomp.hpp [new file with mode: 0644]
inference-engine/src/inference_engine/threading/ie_cpu_streams_executor.cpp
inference-engine/src/legacy_api/CMakeLists.txt
inference-engine/src/legacy_api/src/precomp.hpp [new file with mode: 0644]
inference-engine/src/low_precision_transformations/CMakeLists.txt
inference-engine/src/low_precision_transformations/src/precomp.hpp [new file with mode: 0644]
inference-engine/src/transformations/CMakeLists.txt
inference-engine/src/transformations/include/transformations/rt_info/primitives_priority_attribute.hpp
inference-engine/src/transformations/src/precomp.hpp [new file with mode: 0644]
inference-engine/tests/functional/inference_engine/CMakeLists.txt
inference-engine/tests/functional/inference_engine/ngraph_reader/ngraph_reader_tests.hpp
inference-engine/tests/functional/inference_engine/precomp.hpp [new file with mode: 0644]
inference-engine/tests/functional/plugin/shared/CMakeLists.txt
inference-engine/tests/functional/plugin/shared/include/single_layer_tests/scatter_update.hpp
inference-engine/tests/functional/plugin/shared/src/precomp.hpp [new file with mode: 0644]
inference-engine/tests/functional/plugin/shared/src/single_layer_tests/scatter_update.cpp
inference-engine/tests/ie_test_utils/common_test_utils/CMakeLists.txt
inference-engine/tests/ie_test_utils/common_test_utils/precomp.hpp [new file with mode: 0644]
inference-engine/tests/ie_test_utils/functional_test_utils/CMakeLists.txt
inference-engine/tests/ie_test_utils/functional_test_utils/precomp.hpp [new file with mode: 0644]
inference-engine/tests/ngraph_functions/CMakeLists.txt
inference-engine/tests/ngraph_functions/src/precomp.hpp [new file with mode: 0644]
inference-engine/tests_deprecated/functional/shared_tests/CMakeLists.txt
inference-engine/tests_deprecated/functional/shared_tests/precomp.hpp [new file with mode: 0644]
ngraph/core/CMakeLists.txt
ngraph/core/builder/CMakeLists.txt
ngraph/core/builder/src/precomp.hpp [new file with mode: 0644]
ngraph/core/reference/CMakeLists.txt
ngraph/core/reference/src/precomp.hpp [new file with mode: 0644]
ngraph/core/src/precomp.hpp [new file with mode: 0644]
ngraph/frontend/onnx_import/CMakeLists.txt
ngraph/frontend/onnx_import/src/precomp.hpp [new file with mode: 0644]