aboutsummaryrefslogtreecommitdiffstats
path: root/nihil.guard/CMakeLists.txt
blob: a5e0fc2ac389f6bfef7d32a1218698fd589ec14b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# This source code is released into the public domain.

add_library(nihil.guard STATIC)
target_link_libraries(nihil.guard PRIVATE nihil.std)
target_sources(nihil.guard
	PUBLIC FILE_SET modules TYPE CXX_MODULES FILES
	guard.ccm
)

if(NIHIL_TESTS)
	enable_testing()

	add_executable(nihil.guard.test test.cc)
	target_link_libraries(nihil.guard.test PRIVATE
		nihil.guard
		Catch2::Catch2WithMain
	)

	include(CTest)
	include(Catch)
	catch_discover_tests(nihil.guard.test)
endif()