Ninja: Consider only custom commands deps as side-effects (#14972)

Since commit v2.8.12~248^2 (Ninja: Custom Command file depends don't
need to exist before building, 2013-06-07) all explicit dependencies
inside build folder were considered as possible build command
side-effects and phony rules were produced for them in case they don't
exist when starting to build. This is unnecessary since regular compile
inputs need to exist or cmake will fail.  Moreover the exception for
sources having GENERATED property that can be missing is already handled
by WriteAssumedSourceDependencies.

This fixes unwanted phony rules for all regular source files when doing
in-source build, causing Ninja not complain when such files gets missing,
i.e. during development. Also this reduces number of rules in ninja.build.

Now only custom command dependencies are considered as possible side-effects.
Ninja: Don't limit custom cmd side-effects to build folder (#14972)

Actually custom command can write wherever it wants to, such as temporary
folder or source folder, possibly violating rules that only build folder should
be affected. Therefore we should consider custom command dependency at any path
as possible side effect adding phony rule.

We avoid adding phony rules for regular source files (since the paraent
commit) so we no longer need the in-build-tree test to avoid them.
Ninja: Skip generating empty phony rules

Ninja generator ensures that all custom commands being target
dependencies are run before other source compilations. However in case
there are no such dependencies it currently generates empty phony rules
which clutter the build graph.

Teach the Ninja generator to produce such rules only when necessary.
FindCUDA: Fix OSX Clang & no C language enabled

When setting default CUDA_HOST_COMPILER we must dereference CMAKE_C_COMPILER,
i.e. /usr/bin/clang should be used instead /usr/bin/cc which is symlink.
Otherwise CUDA thinks it is GCC and issues -dumpspecs which is unknown option
to Clang.

Also in case neither CMAKE_C_COMPILER is defined (project does not use C
language) nor CUDA_HOST_COMPILER is specified manually we should skip -ccbin
and let nvcc use its own default C compiler.
Tests: Refactor RunCMake.File_Generate to drop RunCMake_TEST_FILE

Drop use of RunCMake_TEST_FILE and pass the test file in through a
definition in RunCMake_TEST_OPTIONS.
Tests: Refactor RunCMake.include_directories to drop RunCMake_TEST_FILE

Drop use of RunCMake_TEST_FILE and pass the test file in through a
definition in RunCMake_TEST_OPTIONS.
Tests: Drop broken and now unused RunCMake_TEST_FILE option

We cannot use -DRunCMake_TEST=${RunCMake_TEST_FILE} because test cases
use project(${RunCMake_TEST}) and the project name cannot be a path to a
file.  The parent and grandparent commits removed the only uses of the
option.  Drop it now.
Tests: Speed up RunCMake.include_directories test

Remove unnecessary language initializations.  Change the main
CMakeLists.txt project() call to specify NONE.  Use enable_language(CXX)
instead of project() in cases that need it to avoid enabling C too.
FindVTK: Drop support for finding VTK 4.0

Convert to a simple thin-wrapper around the find_package(VTK NO_MODULE).
This makes the code much simpler and improves error messages.
Merge topic 'FindVTK-drop-4.0-support'

117e7e11 FindVTK: Drop support for finding VTK 4.0
Merge topic 'cuda_osx_clang'

32bcec5f FindCUDA: Fix OSX Clang & no C language enabled
Merge topic 'ninja-no-phony-sources'

93371ed5 Ninja: Skip generating empty phony rules
7243c951 Ninja: Don't limit custom cmd side-effects to build folder (#14972)
a33cf6d0 Ninja: Consider only custom commands deps as side-effects (#14972)
Merge topic 'test-speedup-RunCMake.include_directories'

9998d78d Tests: Speed up RunCMake.include_directories test
6eee5d74 Tests: Drop broken and now unused RunCMake_TEST_FILE option
f0f15b93 Tests: Refactor RunCMake.include_directories to drop RunCMake_TEST_FILE
8707814e Tests: Refactor RunCMake.File_Generate to drop RunCMake_TEST_FILE