fix logic
[personal-kdelibs.git] / khtml / BUILDING-TESTREGRESSION
blob2d799b947263d388ce77d8b16b9529416de3b51f
1 In order to be able to use testregression, you have to build your Qt and kdelibs in a special manner.
2 Here are the needed steps.
4 1. Set your QTDIR to point to the Qt source tree
5 2. Configure Qt as:
6 configure -prefix $PWD -no-reduce-exports -qt-gif -no-exceptions -debug -fast -qdbus -nomake examples -nomake demos
7 The first 2 parameters are what's needed for testregression, the rest are standard. If you already have Qt configured,
8 make sure to do "make confclean" first.
9 3. Build & Install Qt
10 4. Configure kdelibs:
11 cmake /path/to/kdelibs-src/ -DCMAKE_INSTALL_PREFIX=$KDEDIR -DCMAKE_BUILD_TYPE=debug  -DKHTML_BUILD_TESTREGRESSION=true
12 Obviously, you may use whatever prefix and other flags you want, but you must pass
13 -DKHTML_BUILD_TESTREGRESSION=true and must use a debug or debugfull build type.
15 Unfortunately, other KDE modules don't like visibility-less kdelibs and Qt much, so you may also want to apply this:
16 --- cmake/modules/FindKDE4Internal.cmake        (revision 738780)
17 +++ cmake/modules/FindKDE4Internal.cmake        (working copy)
18 @@ -884,6 +884,8 @@
19        exec_program(${CMAKE_C_COMPILER} ARGS -v OUTPUT_VARIABLE _gcc_alloc_info)
20        string(REGEX MATCH "(--enable-libstdcxx-allocator=mt)" _GCC_COMPILED_WITH_BAD_ALLOCATOR "${_gcc_alloc_info}")
21     endif (GCC_IS_NEWER_THAN_4_1)
23 +   set (__KDE_HAVE_GCC_VISIBILITY 0)
25     if (__KDE_HAVE_GCC_VISIBILITY AND GCC_IS_NEWER_THAN_4_1 AND NOT _GCC_COMPILED_WITH_BAD_ALLOCATOR)
26        set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
29 5. Build & Install kdelibs
30 6. You can now use testregression from kdelibs build dirs bin/ directory. Pass it the path to the regression/ directory in khtmltests.
31 Don't forget to make install after changing KHTML or KJS!