default to -compile-examples

because of popular confusion.
the packaging scripts now need to use -no-compile-examples explicitly.

Task-number: QTBUG-32449
Change-Id: Iecab1f345afe21e540204fe69a2292ef932cbb61
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
Oswald Buddenhagen 2013-07-17 14:34:10 +02:00 committed by The Qt Project
parent c9568da969
commit 54987c6bf5
2 changed files with 4 additions and 19 deletions

12
configure vendored
View File

@ -888,7 +888,7 @@ QT_DEFAULT_BUILD_PARTS="libs tools examples"
CFG_BUILD_PARTS="" CFG_BUILD_PARTS=""
CFG_NOBUILD_PARTS="" CFG_NOBUILD_PARTS=""
CFG_SKIP_MODULES="" CFG_SKIP_MODULES=""
CFG_COMPILE_EXAMPLES=auto CFG_COMPILE_EXAMPLES=yes
CFG_RELEASE_QMAKE=no CFG_RELEASE_QMAKE=no
CFG_AUDIO_BACKEND=auto CFG_AUDIO_BACKEND=auto
CFG_V8SNAPSHOT=auto CFG_V8SNAPSHOT=auto
@ -3204,14 +3204,6 @@ else
QT_HOST_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_DATA"` QT_HOST_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_DATA"`
fi fi
# Do not actually build the examples in production builds with -prefix, unless requested
if [ "$CFG_COMPILE_EXAMPLES" = auto ]; then
if [ "$CFG_DEV" = "yes" ] || [ "x$outpath" = "x$QT_INSTALL_PREFIX" ]; then
CFG_COMPILE_EXAMPLES=yes
else
CFG_COMPILE_EXAMPLES=no
fi
fi
if [ "$CFG_COMPILE_EXAMPLES" = "yes" ]; then if [ "$CFG_COMPILE_EXAMPLES" = "yes" ]; then
QMAKE_CONFIG="$QMAKE_CONFIG compile_examples" QMAKE_CONFIG="$QMAKE_CONFIG compile_examples"
fi fi
@ -3517,7 +3509,7 @@ Additional options:
-skip <module> ..... Exclude an entire module from the build. -skip <module> ..... Exclude an entire module from the build.
-compile-examples .. Compile examples even in a production build. -no-compile-examples ... Install only the sources of examples.
-no-gui ............ Don't build the Qt GUI module and dependencies. -no-gui ............ Don't build the Qt GUI module and dependencies.
+ -gui ............... Build the Qt GUI module and dependencies. + -gui ............... Build the Qt GUI module and dependencies.

View File

@ -256,7 +256,7 @@ Configure::Configure(int& argc, char** argv)
dictionary[ "BUILDDEV" ] = "no"; dictionary[ "BUILDDEV" ] = "no";
dictionary[ "COMPILE_EXAMPLES" ] = "auto"; dictionary[ "COMPILE_EXAMPLES" ] = "yes";
dictionary[ "C++11" ] = "auto"; dictionary[ "C++11" ] = "auto";
@ -1702,7 +1702,7 @@ bool Configure::displayHelp()
desc( "-skip <module>", "Exclude an entire module from the build.\n"); desc( "-skip <module>", "Exclude an entire module from the build.\n");
desc( "-compile-examples", "Compile examples even in a production build.\n"); desc( "-no-compile-examples", "Install only the sources of examples.\n");
desc("WIDGETS", "no", "-no-widgets", "Disable Qt Widgets module.\n"); desc("WIDGETS", "no", "-no-widgets", "Disable Qt Widgets module.\n");
desc("GUI", "no", "-no-gui", "Disable Qt GUI module.\n"); desc("GUI", "no", "-no-gui", "Disable Qt GUI module.\n");
@ -1987,13 +1987,6 @@ QString Configure::defaultTo(const QString &option)
&& (!QFile::exists(sourcePath + "/.git"))) && (!QFile::exists(sourcePath + "/.git")))
return "no"; return "no";
// Do not actually build the examples in production builds with -prefix, unless requested
if (option == "COMPILE_EXAMPLES"
&& QDir::cleanPath(dictionary[ "QT_BUILD_TREE" ])
!= QDir::cleanPath(dictionary[ "QT_INSTALL_PREFIX" ])
&& dictionary[ "BUILDDEV" ] == "no")
return "no";
return "yes"; return "yes";
} }