Building Squish for Qt - Advanced Options
Overriding Build Variables
When configure is run, it will output the configuration it creates—based on the components it automatically detects, but respecting any command line switches we have used to override the automatic detection—into the files config.h and Build.conf.
The config.h file is included with Squish's source code files, and the Build.conf file is used as an input file for the build tool. If the automatic detection produced unsatisfactory results, you could choose to modify these files before running the build application. The variables written to Build.conf can easily be changed, without needing to manually edit the file. This is achieved by specifying arguments of the form VARIABLE=value or VARIABLE+=value at the configure command line. These arguments will replace (if you use =) or extend (if you use +=), the named variables.
Here is an example that replaces a variable's value with a new value; in this case changing the default optimization flag:
configure "CXXOPT=-O1"And here is another example, in this case we extend the values stored by two variables—the effect of this is to change the gcc compiler's default mode of operation, forcing it to do a 32-bit build on a 64-bit system:
configure "CXXFLAGS+=-m32" "LFLAGS+=-m32"
How to configure a different compiler
The configure script searches your PATH for a C++ compiler, the Qt libraries that Squish depends on, the interpreters and header files for the third-party scripting languages Squish supports—Python, Perl, Ruby, and Tcl—and other system components that Squish may need, such as the Java runtime environment. The output indicates which compiler has been detected. If you are testing Qt applications, you should use the same compiler for Squish that you used to build the AUT.
If you want to force configure to use a different compiler from the one it detected, set the CXX environment variable to the executable of the compiler you want Squish to use, as the following examples illustrate.
If configure detected g++ in your PATH, but you want to use an older g++-9, run configure like this:
$ CXX=g++-9 ../configure
If configure detected MSVC++ but you want to use Intel C++, run configure like this:
SQUISHBUILD> set CXX=icl SQUISHBUILD> ..\configure
Next, you run the Squish build tool to compile Squish.
$ ./build
SQUISHBUILD> buildStatically-linked Qt Libraries
Recording and running tests is possible with applications built with statically-linked Qt libraries. Here is a summary of the requirements:
- The correct version/static build of Qt must be installed.
- The Squish source package must be extracted, configured with the correct options, and built against the static Qt library.
- Your AUT must be instrumented to use a built-in hook.
- For
squishidl,squishserver, Squish IDE, andsquishrunner, you will use a Squish binary package that matches the source package version number. squishservermust be configured so thatusesBuiltinHookis set for the AUT.
Instrumenting Your AUT
See Using the Qt Built-in Hook for instructions how to extend your AUT build rules and (if needed) code to make a statically linked Qt application work with the previously built package.
Finally create a new test suite with the appropriate settings and choose the newly instrumented application binary as the Application Under Test.
You should now be able to launch the AUT and record and replay tests.
© 2025 The Qt Company Ltd.
Documentation contributions included herein are the copyrights of
their respective owners.
The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.
Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners.