Skip to content

Commit

Permalink
Disambiguate the provided to cmake path to be a src dir
Browse files Browse the repository at this point in the history
cmake treats the provided path differently depending on whether it
contains a CMakeCache.txt or not. If it doesn't contain it -- it's
treated as a path to the source tree, if it does -- as a path to the
build tree. We want it to be treated as a source tree path, but if a
user has CMakeCache.txt in that directory, e.g. from a previous in-tree
build the user has done, cmake will treat it as a build tree instead,
which might lead to unexpected results (improperly configured build) or
an error, with the latter being more likely considering we are building
inside a container and the host paths specified in the user-generated
CMakeCache.txt likely don't exist in there.
  • Loading branch information
nurupo committed Oct 7, 2022
1 parent 7dfa935 commit 933a2aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion other/docker/windows/build_toxcore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ build() {
-DCMAKE_EXE_LINKER_FLAGS="$CMAKE_EXE_LINKER_FLAGS -fstack-protector" \
-DCMAKE_SHARED_LINKER_FLAGS="$CMAKE_SHARED_LINKER_FLAGS" \
$EXTRA_CMAKE_FLAGS \
..
-S ..
cmake --build . --target install -- -j"$(nproc)"

if [ "$ENABLE_TEST" = "true" ]; then
Expand Down

0 comments on commit 933a2aa

Please sign in to comment.