Docs
This commit is contained in:
1 parent
ff1b9af0bd
commit
dcfccd46d8
3 files changed
+1096
-1029
No files matched your search
+17
-3
@@ -1,9 +1,9 @@
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
|
||||
project(cmake_test)
|
||||
project(optional)
|
||||
|
||||
# Prepare "Catch" library for other executables
|
||||
set(CATCH_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
set(CATCH_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/test)
|
||||
add_library(Catch INTERFACE)
|
||||
target_include_directories(Catch INTERFACE ${CATCH_INCLUDE_DIR})
|
||||
|
||||
@@ -19,5 +19,19 @@ set(TEST_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/tests/main.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/tests/nullopt.cpp)
|
||||
|
||||
add_executable(tests ${TEST_SOURCES})
|
||||
target_link_libraries(tests Catch)
|
||||
|
||||
add_library(optional INTERFACE)
|
||||
target_sources(optional INTERFACE ${CMAKE_SOURCE_DIR}/optional.hpp)
|
||||
target_include_directories(optional INTERFACE ${CMAKE_SOURCE_DIR})
|
||||
|
||||
target_link_libraries(tests Catch optional)
|
||||
set_property(TARGET tests PROPERTY CXX_STANDARD 14)
|
||||
|
||||
|
||||
find_package(standardese REQUIRED) # find standardese after installation
|
||||
|
||||
# generates a custom target that will run standardese to generate the documentation
|
||||
standardese_generate(optional
|
||||
INCLUDE_DIRECTORY .
|
||||
CONFIG ${CMAKE_SOURCE_DIR}/standardese.config
|
||||
INPUT optional.hpp)
|
||||
Reference in new issue
Block a user