add support for QNX 7.1/8.0

This commit is contained in:
Pavlo Kleymonov
2025-01-29 16:43:13 +01:00
parent 4e8d92bf02
commit 2b491cce5d
8 changed files with 96 additions and 7 deletions

View File

@@ -681,3 +681,43 @@ endforeach()
list(APPEND CATCH_WARNING_TARGETS SelfTest)
set(CATCH_WARNING_TARGETS ${CATCH_WARNING_TARGETS} PARENT_SCOPE)
if (QNX)
#path to tests on target
set(tests_path ${CMAKE_INSTALL_BINDIR}/catch2_tests)
#list of ut test targets
set(list_tests_targets
Catch2
Catch2WithMain
SelfTest
)
#install tests and libs
install(
TARGETS ${list_tests_targets}
LIBRARY DESTINATION ${tests_path}/lib
RUNTIME DESTINATION ${tests_path}
)
#install tests execution script
install(
PROGRAMS ${QNX_TEST_SCRIPT} ${QNX_CTEST_MODULE} ${QNX_DECODE_CTEST_MODULE}
DESTINATION ${tests_path}
)
#install SelfTest Misc artifacts
install(
DIRECTORY ${SELF_TEST_DIR}/Misc
DESTINATION ${tests_path}
)
#install CTests files
install(
DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
DESTINATION ${tests_path}
FILES_MATCHING PATTERN "CTestTestfile.cmake"
PATTERN "CMakeFiles" EXCLUDE
PATTERN "surrogates" EXCLUDE
)
endif()

View File

@@ -110,7 +110,7 @@ foreach(target DisabledExceptions-DefaultHandler DisabledExceptions-CustomHandle
target_compile_options( ${target}
PUBLIC
$<$<CXX_COMPILER_ID:MSVC>:/EHs-c-;/D_HAS_EXCEPTIONS=0>
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:GNU>,$<CXX_COMPILER_ID:AppleClang>>:-fno-exceptions>
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:GNU>,$<CXX_COMPILER_ID:QCC>,$<CXX_COMPILER_ID:AppleClang>>:-fno-exceptions>
)
target_link_libraries(${target} Catch2_buildall_interface)
endforeach()
@@ -576,3 +576,46 @@ set_tests_properties(
PROPERTIES
PASS_REGULAR_EXPRESSION "All tests passed \\(14 assertions in 3 test cases\\)"
)
if (QNX)
#path to tests on target
set(tests_path ${CMAKE_INSTALL_BINDIR}/catch2_tests)
set(list_tests_targets ${list_tests_targets}
ListenerStdoutCaptureInMultireporter
AssertionStartingEventGoesBeforeAssertionIsEvaluated
PartialTestCaseEvents
DuplicatedReporters
DuplicatedTestCases-DuplicatedTestCaseMethods
ReportingCrashWithJunitReporter
DuplicatedTestCases-SameNameDifferentTags
CapturedStdoutInTestCaseEvents
AllSkipped
DisabledExceptions-CustomHandler
DisableStringification
DuplicatedTestCases-DifferentFixtures
DisabledMacros
AmalgamatedTestCompilation
BazelReporter
FallbackStringifier
CustomArgumentsForReporters
DisabledExceptions-DefaultHandler
ListenerCanAskForCapturedStdout
BenchmarksInCumulativeReporter
DuplicatedTestCases-SameNameAndTags
ListenersGetEventsBeforeReporters
CasingInReporterNames
NoTests
ReporterPreferencesForPassingAssertionsIsRespected
BazelReporterNoCatchConfig
DeferredStaticChecks
PrefixedMacros
)
#install tests and libs
install(
TARGETS ${list_tests_targets}
LIBRARY DESTINATION ${tests_path}/lib
RUNTIME DESTINATION ${tests_path}
)
endif()