Open learn-more opened 1 month ago
That's just how it has always been. You can run ./configure.py
from another location (much like you would typically do with cmake
), to build out-of-source:
mkdir my_build
cd my_build
../configure.py --build-tool=ninja
ninja
Another option is $(pwd)/configure.py --with-build-dir=<...>
, but that seems to not work properly, if configure.py
isn't called with an absolute path (i.e. the $(pwd)
). I'll look into that next week.
That's just how it has always been. You can run
./configure.py
from another location (much like you would typically do withcmake
), to build out-of-source:mkdir my_build cd my_build ../configure.py --build-tool=ninja ninja
Another option is
$(pwd)/configure.py --with-build-dir=<...>
, but that seems to not work properly, ifconfigure.py
isn't called with an absolute path (i.e. the$(pwd)
). I'll look into that next week.
That is quite surprising behavior, because when you specify an output dir for cmake (cmake -B build
) it will put all files there, not just 'most' files.
With #4245 ./configure.py --with-build-dir=
(which is the equivalent of cmake -B
) should work as expected now. It should not drop any generated files into the repository root, when running .
If you invoke configure.py
from a different directory (as stated above), the build won't drop anything into the repo root either. And this has been the case for a while now. As mentioned, calling the configure script from some other (empty) directory, should be a viable workaround for the broken --with-build-dir=
up to and including Botan 3.5.0.
With #4245
./configure.py --with-build-dir=
(which is the equivalent ofcmake -B
) should work as expected now. It should not drop any generated files into the repository root, when running .If you invoke
configure.py
from a different directory (as stated above), the build won't drop anything into the repo root either. And this has been the case for a while now. As mentioned, calling the configure script from some other (empty) directory, should be a viable workaround for the broken--with-build-dir=
up to and including Botan 3.5.0.
I can confirm that this does work for my case.
mkdir botan\build
pushd botan\build
python3 ../configure.py --cc=msvc --os=windows --build-tool=ninja --disable-shared-library --prefix=install
ninja install
popd
It does create a build/build
folder, but other than that, the install
is inside the build
folder as expected so for now this works for me, thanks!
It does create a build/build folder, but other than that, the install is inside the build folder as expected so for now this works for me, thanks!
Yeah, the build/build
folder is expected. That's just how our build system works. It uses this as hard-coded scratch space inside the custom build location you define.
Reproduction steps (Win10, VS2022, Python 3.12):
x64 Native Tools Command Prompt for VS 2022
botan
is cloned (git describe
results in1.11.30-9833-gb8af12b5c
)python3 configure.py --cc=msvc --os=windows --build-tool=ninja --prefix=build/install --disable-shared-library
The
build.ninja
is placed in the repository root instead of in thebuild
folderThis results in some build artifacts also being dropped in the repository root (when building):