aboutsummaryrefslogtreecommitdiffstats
path: root/nihil.monad/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'nihil.monad/CMakeLists.txt')
-rw-r--r--nihil.monad/CMakeLists.txt24
1 files changed, 24 insertions, 0 deletions
diff --git a/nihil.monad/CMakeLists.txt b/nihil.monad/CMakeLists.txt
new file mode 100644
index 0000000..b0fa095
--- /dev/null
+++ b/nihil.monad/CMakeLists.txt
@@ -0,0 +1,24 @@
+# This source code is released into the public domain.
+
+add_library(nihil.monad STATIC)
+target_link_libraries(nihil.monad PRIVATE nihil.error)
+target_sources(nihil.monad
+ PUBLIC FILE_SET modules TYPE CXX_MODULES FILES
+ monad.ccm
+)
+
+if(NIHIL_TESTS)
+ enable_testing()
+
+ add_executable(nihil.monad.test test.cc)
+ target_link_libraries(nihil.monad.test PRIVATE
+ nihil.monad
+ Catch2::Catch2WithMain
+ )
+
+ find_package(Catch2 REQUIRED)
+
+ include(CTest)
+ include(Catch)
+ catch_discover_tests(nihil.monad.test)
+endif()