Make Swift tests conditional on Swift support
This commit is contained in:
parent
4f01ddb1cc
commit
82dbef0c12
2 changed files with 24 additions and 4 deletions
|
@ -1,14 +1,28 @@
|
|||
|
||||
|
||||
if (ENABLE_SWIFT)
|
||||
set(SWIFT_TESTS_SOURCES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_swiftService.cxx
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_swiftAircraftManager.cxx
|
||||
)
|
||||
|
||||
set(SWIFT_TESTS_HEADERS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_swiftService.hxx
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_swiftAircraftManager.hxx
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
set(TESTSUITE_SOURCES
|
||||
${TESTSUITE_SOURCES}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/TestSuite.cxx
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_swiftService.cxx
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_swiftAircraftManager.cxx
|
||||
${SWIFT_TESTS_SOURCES}
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
set(TESTSUITE_HEADERS
|
||||
${TESTSUITE_HEADERS}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_swiftService.hxx
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_swiftAircraftManager.hxx
|
||||
${SWIFT_TESTS_HEADERS}
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
|
|
|
@ -3,9 +3,15 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#if defined(ENABLE_SWIFT)
|
||||
|
||||
#include "test_swiftAircraftManager.hxx"
|
||||
#include "test_swiftService.hxx"
|
||||
|
||||
// Set up the unit tests.
|
||||
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(SwiftAircraftManagerTest, "Unit tests");
|
||||
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(SwiftServiceTest, "Unit tests");
|
||||
|
||||
#endif
|
Loading…
Reference in a new issue