mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
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:
commit
9d85c425f4
@ -8,7 +8,17 @@ ZINT_TEST option enabled:
|
|||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake -DZINT_TEST=ON ..
|
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
|
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
|
For various useful options, e.g. matching (-R) and excluding (-E) tests, see
|
||||||
https://cmake.org/cmake/help/latest/manual/ctest.1.html#options
|
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)
|
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)
|
add_subdirectory(tests)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user