diff --git a/configure b/configure index 40f052a220..b365b7dd2a 100755 --- a/configure +++ b/configure @@ -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