Adds: - barebones CMakeLists.txt with googletest and doxygen included - GPL v3.0 or later license - simple .gitignore - .clang-format and .clang-tidy The clang-tidy is only applied within the sources of this project. If it was included on the top-level CMakeLists.txt it would throw errors on the gtest compilation. Let's have some fun!
37 lines
823 B
CMake
37 lines
823 B
CMake
cmake_minimum_required(VERSION 3.12)
|
|
project(pf-core VERSION 0.1.0 LANGUAGES CXX)
|
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
|
|
|
# c++ compiler features
|
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
|
|
|
include(CTest)
|
|
enable_testing()
|
|
|
|
add_subdirectory(libs)
|
|
|
|
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
|
|
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
|
|
include(CPack)
|
|
|
|
# additional libraries
|
|
include(FetchContent)
|
|
|
|
FetchContent_Declare(
|
|
googletest
|
|
GIT_REPOSITORY https://github.com/google/googletest
|
|
GIT_TAG main
|
|
)
|
|
|
|
FetchContent_MakeAvailable(googletest)
|
|
|
|
find_package(Doxygen REQUIRED dot)
|
|
if(DOXYGEN_FOUND)
|
|
set(DOXYGEN_JAVADOC_AUTOBRIEF YES)
|
|
set(DOXYGEN_USE_MDFILE_AS_MAINPAGE README.md)
|
|
doxygen_add_docs(doc README.md libs COMMENT "Generate documentation")
|
|
endif()
|