Skip to content
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.

cmake: make tests optional #16

Merged
merged 1 commit into from
Jan 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,16 @@ add_library(merry::oaknut ALIAS oaknut)
target_sources(oaknut INTERFACE "$<BUILD_INTERFACE:${header_files}>")
target_include_directories(oaknut INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_LIBDIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
target_compile_features(oaknut INTERFACE cxx_std_20)

# Tests
if (MASTER_PROJECT)
include(CTest)
endif()

if (BUILD_TESTING)
option(OAKNUT_USE_BUNDLED_CATCH "Use the embedded Catch2 submodule" OFF)
if (OAKNUT_USE_BUNDLED_CATCH)
add_subdirectory(externals/catch)
Expand Down
Loading