diff options
author | Roger Leigh <rleigh@codelibre.net> | 2016-01-19 13:32:38 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-01-20 14:33:38 (GMT) |
commit | f9e45ab9d412b08ded8a11ff1f4f0ef90e10358c (patch) | |
tree | b44d03aca666d72829ff2b856099b851e3ed085c /Tests/FindXalanC/Test | |
parent | 5079cc1243e3ffaea353c88a97b7d605c0807667 (diff) | |
download | CMake-f9e45ab9d412b08ded8a11ff1f4f0ef90e10358c.zip CMake-f9e45ab9d412b08ded8a11ff1f4f0ef90e10358c.tar.gz CMake-f9e45ab9d412b08ded8a11ff1f4f0ef90e10358c.tar.bz2 |
FindXalanC: New module to find the Apache Xalan-C++ library
Diffstat (limited to 'Tests/FindXalanC/Test')
-rw-r--r-- | Tests/FindXalanC/Test/CMakeLists.txt | 17 | ||||
-rw-r--r-- | Tests/FindXalanC/Test/main.cxx | 10 |
2 files changed, 27 insertions, 0 deletions
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(); +} |