Merge /u/alonsoschaich/zint/ branch enable-qt-test-on-win32 into master

https://sourceforge.net/p/zint/code/merge-requests/141/
This commit is contained in:
b'Git Lost 2021-11-23 13:05:37 +00:00
commit 9d85c425f4
2 changed files with 18 additions and 2 deletions

View File

@ -8,7 +8,17 @@ 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
------------------------------------------------------------------------------
@ -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

View File

@ -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()