summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-01-21 18:55:50 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-01-21 18:55:50 (GMT)
commitaaf06f2b0f4ce4085e2bf1c60ffc63065968a9c6 (patch)
tree1c41392253a1e8dd788552d3e8639686780663b2 /Tests
parent563a6c7be09c73bdd7e0ee7b0c52dd9bbc20c50a (diff)
parentf9e45ab9d412b08ded8a11ff1f4f0ef90e10358c (diff)
downloadCMake-aaf06f2b0f4ce4085e2bf1c60ffc63065968a9c6.zip
CMake-aaf06f2b0f4ce4085e2bf1c60ffc63065968a9c6.tar.gz
CMake-aaf06f2b0f4ce4085e2bf1c60ffc63065968a9c6.tar.bz2
Merge topic 'add-FindXalanC'
f9e45ab9 FindXalanC: New module to find the Apache Xalan-C++ library
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeLists.txt4
-rw-r--r--Tests/FindXalanC/CMakeLists.txt10
-rw-r--r--Tests/FindXalanC/Test/CMakeLists.txt17
-rw-r--r--Tests/FindXalanC/Test/main.cxx10
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();
+}