diff options
author | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2018-06-11 21:02:27 +0300 |
---|---|---|
committer | Hubert Chathi <hubert@uhoreg.ca> | 2018-10-12 16:22:03 -0400 |
commit | 4e94dfc7e057776b0d1aafbeb72c8dad7918d988 (patch) | |
tree | f78cea96a63f146b161c6feb6e96d3a047498354 /tests/CMakeLists.txt | |
parent | af86a9a8b899eeb3c1c464cb0c54218acd788fa6 (diff) |
Add CMake support
The library can now be installed using CMake v3.0+.
Below is an example configuration.
1. Generate configuation
cmake -H. -Bbuild
-GNinja
-DCMAKE_BUILD_TYPE=Release // The default profile.
-DCMAKE_INSTALL_PREFIX=/usr/local/
-DBUILD_SHARED_LIBS=ON
-DOLM_TESTS=1
-DOLM_FUZZERS=1
2. Build & install the targets
cmake --build build --config Release --target install
3. Run the tests
cd build/test && ctest .
The library can also be used as a dependency with CMake using
find_package(Olm::Olm REQUIRED)
target_link_libraries(my_exe Olm::Olm)
Signed-off-by: Konstantinos Sideris <sideris.konstantin@gmail.com>
Diffstat (limited to 'tests/CMakeLists.txt')
-rw-r--r-- | tests/CMakeLists.txt | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt new file mode 100644 index 0000000..370d124 --- /dev/null +++ b/tests/CMakeLists.txt @@ -0,0 +1,66 @@ +enable_testing() + +add_executable(test_base64 test_base64.cpp) +target_include_directories(test_base64 PRIVATE include) +target_link_libraries(test_base64 Olm::Olm) +add_test(Base64 test_base64) + +add_executable(test_crypto test_crypto.cpp) +target_include_directories(test_crypto PRIVATE include) +target_link_libraries(test_crypto Olm::Olm) +add_test(Crypto test_crypto) + +add_executable(test_group_session test_group_session.cpp) +target_include_directories(test_group_session PRIVATE include) +target_link_libraries(test_group_session Olm::Olm) +add_test(GroupSession test_group_session) + +add_executable(test_list test_list.cpp) +target_include_directories(test_list PRIVATE include) +target_link_libraries(test_list Olm::Olm) +add_test(List test_list) + +add_executable(test_megolm test_megolm.cpp) +target_include_directories(test_megolm PRIVATE include) +target_link_libraries(test_megolm Olm::Olm) +add_test(Megolm test_megolm) + +add_executable(test_message test_message.cpp) +target_include_directories(test_message PRIVATE include) +target_link_libraries(test_message Olm::Olm) +add_test(Message test_message) + +add_executable(test_olm test_olm.cpp) +target_include_directories(test_olm PRIVATE include) +target_link_libraries(test_olm Olm::Olm) +add_test(Olm test_olm) + +add_executable(test_olm_decrypt test_olm_decrypt.cpp) +target_include_directories(test_olm_decrypt PRIVATE include) +target_link_libraries(test_olm_decrypt Olm::Olm) +add_test(OlmDecrypt test_olm_decrypt) + +add_executable(test_olm_sha256 test_olm_sha256.cpp) +target_include_directories(test_olm_sha256 PRIVATE include) +target_link_libraries(test_olm_sha256 Olm::Olm) +add_test(OlmSha256 test_olm_sha256) + +add_executable(test_olm_signature test_olm_signature.cpp) +target_include_directories(test_olm_signature PRIVATE include) +target_link_libraries(test_olm_signature Olm::Olm) +add_test(OlmSignature test_olm_signature) + +add_executable(test_olm_using_malloc test_olm_using_malloc.cpp) +target_include_directories(test_olm_using_malloc PRIVATE include) +target_link_libraries(test_olm_using_malloc Olm::Olm) +add_test(OlmUsingMalloc test_olm_using_malloc) + +add_executable(test_ratchet test_ratchet.cpp) +target_include_directories(test_ratchet PRIVATE include) +target_link_libraries(test_ratchet Olm::Olm) +add_test(Ratchet test_ratchet) + +add_executable(test_session test_session.cpp) +target_include_directories(test_session PRIVATE include) +target_link_libraries(test_session Olm::Olm) +add_test(Session test_session) |