1749b67
@@ -9,5 +9,6 @@
# Do the build
mkdir -p "${__cmake_builddir}"
- "${__cmake}" ${__cmake_flags} "${__cmake_srcdir}" "${__cmake_builddir}"
+ cd "${__cmake_builddir}"
+ "${__cmake}" ${__cmake_flags} "../${__cmake_srcdir}"
exit $?
https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-996d6678c8#comment-1517997
Your proposed behavior is broken too, since it changes the directory of the environment...
Fixed it as e93d8e2.
Pull-Request has been closed by ngompa
https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-3719cd8b93
The cmake-configure script is executed, not sourced. So changing the current working directory inside the script does not change the current working directory in the calling shell.
[ellert@ellert ~]$ cat a.sh #!/bin/bash mkdir -p x cd x [ellert@ellert ~]$ pwd /home/ellert [ellert@ellert ~]$ ./a.sh [ellert@ellert ~]$ pwd /home/ellert [ellert@ellert ~]$ . ./a.sh [ellert@ellert x]$ pwd /home/ellert/x
Yes, but the arguments passed to CMake would be wrong, since we don't assume you're changing directories.
And the assumption that the directory will always be a level up is flawed, unfortunately, because you can change %_vpath_builddir and %_vpath_srcdir to whatever you please.
%_vpath_builddir
%_vpath_srcdir
https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-996d6678c8#comment-1517997