aboutsummaryrefslogtreecommitdiffstats
path: root/nihil.core/CMakeLists.txt
blob: 97b2d0185e3ff6f121c0b0e9a783db5547acce5a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# This source code is released into the public domain.

add_library(nihil.core STATIC)
target_link_libraries(nihil.core PRIVATE nihil.std)
target_include_directories(nihil.core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_sources(nihil.core
	PUBLIC FILE_SET modules TYPE CXX_MODULES FILES
	nihil.core.ccm

	capture_stream.ccm
	construct.ccm
	ctype.ccm
	errc.ccm
	error.ccm
	features.ccm
	flagset.ccm
	generator.ccm
	guard.ccm
	match.ccm
	monad.ccm
	next_word.ccm
	parse_size.ccm
	save_errno.ccm
	skipws.ccm
	sys_error.ccm
	tabulate.ccm
	uuid.ccm
)

if (NIHIL_TESTS)
	add_executable(nihil.core.test
		capture_stream.test.cc
		ctype.test.cc
		error.test.cc
		flagset.test.cc
		generator.test.cc
		guard.test.cc
		match.test.cc
		monad.test.cc
		next_word.test.cc
		parse_size.test.cc
		skipws.test.cc
		tabulate.test.cc
		uuid.test.cc
	)

	target_link_libraries(nihil.core.test PRIVATE
		nihil.std
		nihil.core
		Catch2::Catch2WithMain)

	include(CTest)
	include(Catch)
	catch_discover_tests(nihil.core.test)

	enable_testing()
endif ()