-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
72 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,24 @@ | ||
qt5_wrap_cpp(QTERM_TEST_MOC qterminal_test.h) | ||
# Check if QT_MAJOR_VERSION was not defined | ||
if(NOT DEFINED QT_MAJOR_VERSION) | ||
message(FATAL_ERROR "QT_MAJOR_VERSION not set.") | ||
endif() | ||
|
||
# Use appropriate wrap_cpp command based on QT_MAJOR_VERSION | ||
if("${QT_MAJOR_VERSION}" STREQUAL "5") | ||
qt5_wrap_cpp(QTERM_TEST_MOC qterminal_test.h) | ||
set(QT_TEST_LIB Qt5::Test) | ||
elseif("${QT_MAJOR_VERSION}" STREQUAL "6") | ||
qt6_wrap_cpp(QTERM_TEST_MOC qterminal_test.h) | ||
set(QT_TEST_LIB Qt6::Test) | ||
else() | ||
message(FATAL_ERROR "Unsupported QT_MAJOR_VERSION: ${QT_MAJOR_VERSION}") | ||
endif() | ||
|
||
add_executable(qterminal_test | ||
qterminal_test.cpp | ||
${CMAKE_SOURCE_DIR}/src/qterminalutils.cpp | ||
${QTERM_TEST_MOC}) | ||
target_link_libraries(qterminal_test Qt5::Test) | ||
|
||
target_link_libraries(qterminal_test ${QT_TEST_LIB}) | ||
|
||
add_test(NAME qterminal_test COMMAND qterminal_test) |