mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Enable the qt backend test on windows
The ```configuration``` is required by the visual studio generator to determine whether to use a Debug or a Release setup (or a user customized one). It's required by whatever uses that generator rather then just the GUI code. Add instructions for the Visual Studio Project File generator to the README and enable the test on Windows.
This commit is contained in:
parent
9e4ecb638f
commit
1c31c92fd4
@ -8,8 +8,18 @@ ZINT_TEST option enabled:
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DZINT_TEST=ON ..
|
||||
make
|
||||
cmake --build .
|
||||
|
||||
When using generators that support multiple build configurations, such as
|
||||
Visual C++ Project Files (the default generator on win32), the configuration
|
||||
can be provided via --config:
|
||||
|
||||
cd <project-dir>
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DZINT_TEST=ON ..
|
||||
cmake --build . --config Debug
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
In order to run the test suite, the path of the zint library may need to be
|
||||
@ -29,6 +39,12 @@ To run all tests (within <build-dir>):
|
||||
|
||||
ctest
|
||||
|
||||
When using a generator that does support multiple build configurations, the
|
||||
configuration that was used to build the project has to be explicitly provided
|
||||
to ctest, even if it was the default one:
|
||||
|
||||
ctest -C Debug
|
||||
|
||||
For various useful options, e.g. matching (-R) and excluding (-E) tests, see
|
||||
https://cmake.org/cmake/help/latest/manual/ctest.1.html#options
|
||||
|
||||
|
@ -21,7 +21,7 @@ target_include_directories(${PROJECT_NAME} PUBLIC "${CMAKE_SOURCE_DIR}/backend")
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} zint Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Gui)
|
||||
|
||||
if(ZINT_TEST AND NOT WIN32) # Fails with "Test not available without configuration" on Windows so skip
|
||||
if(ZINT_TEST)
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user