CMake: Add options for tests and documentation.

This commit is contained in:
tastytea 2020-11-08 15:49:45 +01:00
parent cd5803080f
commit 642fc26f46
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
2 changed files with 9 additions and 2 deletions

View File

@ -9,6 +9,9 @@ project(curl_wrapper
DESCRIPTION "Simple libcurl wrapper."
LANGUAGES CXX)
option(WITH_CURL_WRAPPER_TESTS "Compile tests for curl_wrapper." NO)
option(WITH_CURL_WRAPPER_DOC "Compile API reference for curl_wrapper." NO)
find_package(CURL 7.52 REQUIRED)
add_subdirectory("src")

View File

@ -38,10 +38,14 @@ target_link_libraries(test PRIVATE curl_wrapper)
--------------------------------------------------------------------------------
.CMake options:
- `-DWITH_TESTS=YES` compiles the tests.
- `-DWITH_CURL_WRAPPER_TESTS=YES` Compiles the tests.
- `-DWITH_CURL_WRAPPER_DOC=YES` Generate API reference.
== Dependencies
- C++17
- CMake >=3.9
- CMake >= 3.9
- libcurl >= 7.52
- Optional:
- Tests: Catch >= 1.2
- Documentation: Doxygen >= 1.8