Files
CMake/Modules
Craig Scott 6b6d593351 ExternalProject: Use -S and -B args to robustly set configure dirs
Previously, the build directory was not explicitly specified. Instead, the
current working directory was assumed to be the build directory and the
source directory was passed as a positional argument. However, if the
source directory contained a CMakeCache.txt, it was treated as a binary
directory instead. For the scenario where a project is built in-source and
it calls ExternalProject_Add() with its own source directory but a different
build directory (e.g. to build itself with a different set of configure arguments),
this results in a build error.

Explicitly list both the source and build directories using the -S and -B options
respectively. This unambiguously sets both, avoiding the above problem.

Fixes: #24081
2022-10-27 18:44:01 +11:00
..
2022-10-25 10:33:20 -04:00
2022-04-11 14:08:01 -04:00
2022-03-30 16:01:59 -04:00
2022-09-19 10:19:12 -04:00

See the "Find Modules" section of the cmake-developer(7) manual page.

For more information about how to contribute modules to CMake, see this page:
https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/dev/Module-Maintainers