diff options
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CMakeLists.txt | 4 | ||||
-rw-r--r-- | Tests/FindXalanC/CMakeLists.txt | 10 | ||||
-rw-r--r-- | Tests/FindXalanC/Test/CMakeLists.txt | 17 | ||||
-rw-r--r-- | Tests/FindXalanC/Test/main.cxx | 10 |
4 files changed, 41 insertions, 0 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 043b757..240144f 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1379,6 +1379,10 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release add_subdirectory(FindTIFF) endif() + if(CMake_TEST_FindXalanC) + add_subdirectory(FindXalanC) + endif() + if(CMake_TEST_FindXercesC) add_subdirectory(FindXercesC) endif() diff --git a/Tests/FindXalanC/CMakeLists.txt b/Tests/FindXalanC/CMakeLists.txt new file mode 100644 index 0000000..7872929 --- /dev/null +++ b/Tests/FindXalanC/CMakeLists.txt @@ -0,0 +1,10 @@ +add_test(NAME FindXalanC.Test COMMAND + ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION> + --build-and-test + "${CMake_SOURCE_DIR}/Tests/FindXalanC/Test" + "${CMake_BINARY_DIR}/Tests/FindXalanC/Test" + ${build_generator_args} + --build-project TestFindXalanC + --build-options ${build_options} + --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION> + ) diff --git a/Tests/FindXalanC/Test/CMakeLists.txt b/Tests/FindXalanC/Test/CMakeLists.txt new file mode 100644 index 0000000..b445e0e --- /dev/null +++ b/Tests/FindXalanC/Test/CMakeLists.txt @@ -0,0 +1,17 @@ +cmake_minimum_required(VERSION 3.1) +project(TestFindXalanC CXX) +include(CTest) + +# CMake does not actually provide FindXalanC publicly. +set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../Source/Modules) + +find_package(XalanC REQUIRED) + +add_executable(test_xalanc_tgt main.cxx) +target_link_libraries(test_xalanc_tgt XalanC::XalanC) +add_test(NAME test_xalanc_tgt COMMAND test_xalanc_tgt) + +add_executable(test_xalanc_var main.cxx) +target_include_directories(test_xalanc_var PRIVATE ${XalanC_INCLUDE_DIRS}) +target_link_libraries(test_xalanc_var PRIVATE ${XalanC_LIBRARIES}) +add_test(NAME test_xalanc_var COMMAND test_xalanc_var) diff --git a/Tests/FindXalanC/Test/main.cxx b/Tests/FindXalanC/Test/main.cxx new file mode 100644 index 0000000..3b4a2df --- /dev/null +++ b/Tests/FindXalanC/Test/main.cxx @@ -0,0 +1,10 @@ +#include <xercesc/util/PlatformUtils.hpp> +#include <xalanc/XalanTransformer/XalanTransformer.hpp> + +int main() +{ + xercesc::XMLPlatformUtils::Initialize(); + xalanc::XalanTransformer::initialize(); + xalanc::XalanTransformer::terminate(); + xercesc::XMLPlatformUtils::Terminate(); +} |