mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-19 04:40:39 -05:00
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
137 KiB
137 KiB