mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Fix for --display-cmake in configure
Moved build directory creation further down in the script so that --display-cmake has a chance to happen before build tree setup.
This commit is contained in:
parent
4d31335391
commit
8dc120df1d
1 changed files with 13 additions and 13 deletions
26
configure
vendored
26
configure
vendored
|
@ -458,6 +458,19 @@ if [ -z "$CMakeCommand" ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
echo "Using $(cmake --version | head -1)"
|
||||
echo
|
||||
if [ -n "$CMakeGenerator" ]; then
|
||||
cmake="${CMakeCommand} -G ${CMakeGenerator} ${CMakeCacheEntries} ${sourcedir}"
|
||||
else
|
||||
cmake="${CMakeCommand} ${CMakeCacheEntries} ${sourcedir}"
|
||||
fi
|
||||
|
||||
if [ "${display_cmake}" = 1 ]; then
|
||||
echo "${cmake}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -d $builddir ]; then
|
||||
# If build directory exists, check if it has a CMake cache
|
||||
if [ -f $builddir/CMakeCache.txt ]; then
|
||||
|
@ -474,19 +487,6 @@ echo "Build Directory : $builddir"
|
|||
echo "Source Directory: $sourcedir"
|
||||
cd $builddir
|
||||
|
||||
echo "Using $(cmake --version | head -1)"
|
||||
echo
|
||||
if [ -n "$CMakeGenerator" ]; then
|
||||
cmake="${CMakeCommand} -G ${CMakeGenerator} ${CMakeCacheEntries} ${sourcedir}"
|
||||
else
|
||||
cmake="${CMakeCommand} ${CMakeCacheEntries} ${sourcedir}"
|
||||
fi
|
||||
|
||||
if [ "${display_cmake}" = 1 ]; then
|
||||
echo "${cmake}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
eval ${cmake} 2>&1
|
||||
|
||||
echo "# This is the command used to configure this build" >config.status
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue