diff options
author | Dawid Wróbel <me@dawidwrobel.com> | 2022-07-12 14:39:58 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-08-30 17:55:07 (GMT) |
commit | e706da5f7ebbdab98098825ff8f7bad89ce06277 (patch) | |
tree | 8724f87cd420c871edae87a2e1904e9d050727e6 /Tests/FindOpenSP/Test/CMakeLists.txt | |
parent | 4bcdf1b992804467bc39710c2670f828df479dff (diff) | |
download | CMake-e706da5f7ebbdab98098825ff8f7bad89ce06277.zip CMake-e706da5f7ebbdab98098825ff8f7bad89ce06277.tar.gz CMake-e706da5f7ebbdab98098825ff8f7bad89ce06277.tar.bz2 |
FindOpenSP: Add module to find the OpenSP library
OpenSP has not seen a release in seventeen years, so is unlikely to ever
provide a CMake package configuration file. Add a find module instead.
Diffstat (limited to 'Tests/FindOpenSP/Test/CMakeLists.txt')
-rw-r--r-- | Tests/FindOpenSP/Test/CMakeLists.txt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Tests/FindOpenSP/Test/CMakeLists.txt b/Tests/FindOpenSP/Test/CMakeLists.txt new file mode 100644 index 0000000..d8992d9 --- /dev/null +++ b/Tests/FindOpenSP/Test/CMakeLists.txt @@ -0,0 +1,16 @@ +cmake_minimum_required(VERSION 3.4) +project(TestFindOpenSP CXX) +include(CTest) + +find_package(OpenSP REQUIRED) + +add_definitions(-DSP_MULTI_BYTE="${OpenSP_MULTI_BYTE}") + +add_executable(test_tgt main.cxx) +target_link_libraries(test_tgt OpenSP::OpenSP) +add_test(NAME test_tgt COMMAND test_tgt) + +add_executable(test_var main.cxx) +target_include_directories(test_var PRIVATE ${OpenSP_INCLUDE_DIRS}) +target_link_libraries(test_var PRIVATE ${OpenSP_LIBRARIES}) +add_test(NAME test_var COMMAND test_var) |