Using `add_subdirectory(source_dir binary_dir)` with `source_dir` not a
subdirectory needs to add a `[Subprojects]` entry to the source path in
Eclipse. The Eclipse indexer seems to use those entries as reference to
index source files.
Closes: #15984
Imported INTERFACE libraries can specify include directories via
`INTERFACE_INCLUDE_DIRECTORIES` so the default behavior of treating them
as system include directories applies. Allow users to turn this off by
setting `NO_SYSTEM_FROM_IMPORTED` on such targets.
Closes: #16443
This property was added by commit 09cda9d5 (Allow imported INTERFACE
libraries to specify a link library name, 2016-11-03) and is in the
implementation's whitelist. Add it to the documentation too.
80ebc55a cmake: Report if the <LANG>_CLANG_TIDY tool exits with non-zero
ce1abfa4 cmake: If ldd for LINK_WHAT_YOU_USE fails to run then report why
44de6157 cmake: Comment why we ignore the include-what-you-use return code
Expose the binutils' machine name (typically used as a prefix on the
tool names) publicly. This is expected to match the `gcc -dumpmachine`
value.
Suggested-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
The NDK provides prebuilt toolchain files in directories named for the
host architecture. The NDK build system calls this `HOST_TAG`.
Expose the value publicly for use by clients that need to pass it
to external tools.
Suggested-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
When this variable is not set by the user or toolchain file, set it to
the default selected. This will be useful for client code that needs to
pass the value to an external tool that needs to find the same toolchain
in the NDK. Leave it empty for a standalone toolchain.
Suggested-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
Expose the binutils' machine name (typically used as a prefix on the
tool names) publicly. This is expected to match the `gcc -dumpmachine`
value.
Suggested-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
The NDK provides prebuilt toolchain files in directories named for the
host architecture. The NDK build system calls this `HOST_TAG`.
Expose the value publicly for use by clients that need to pass it
to external tools.
Suggested-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
When this variable is not set by the user or toolchain file, set it to
the default selected. This will be useful for client code that needs to
pass the value to an external tool that needs to find the same toolchain
in the NDK. Leave it empty for a standalone toolchain.
Suggested-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
When using `<LANG>_CLANG_TIDY` our internal launcher for the tool must
capture its return code and stderr and report them on failure.
Otherwise incorrect command lines silently fail.
Closes: #16435
The include-what-you-use tool always returns non-zero to indicate that
it did not actually produce an object file as Clang would from the same
command line. Add a comment explaining that this is why we ignore its
return code. Also update our `pseudo_iwyu` test suite tool to always
exit with an error too.
Visual Studio's build system does not cleanly handle itself being
re-generated during the build. Teach `cmake --build` to check whether
the build system needs to be re-generated before launching the native
build tool.
Callers of `_ep_get_build_command` do not initialize the output variable
they pass and expect the function to unconditionally set it. Revise the
function to not check its own output variable. Otherwise if a `cmd`
variable happens to be set when `ExternalProject_Add` is called then it
will be erroneously used as the default `BUILD`, `TEST`, and `INSTALL`
command.
Users or scripts commonly remove or replace `CMakeCache.txt` without
also removing `CMakeFiles/`. In this case the information saved in the
cache from platform information initialization is missing, so we need to
re-initialize it. In such a case, remove the platform information
directory so that re-initialization will occur and restore needed
information to the cache.
Closes: #14820