aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--lib/CMakeLists.txt9
-rw-r--r--lib/ctre/CMakeLists.txt4
-rw-r--r--src/CMakeLists.txt3
4 files changed, 16 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 920e275..481d035 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,5 +7,5 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
project(game-of-life CXX)
-# add_subdirectory(lib)
+add_subdirectory(lib)
add_subdirectory(src)
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
new file mode 100644
index 0000000..16c32fd
--- /dev/null
+++ b/lib/CMakeLists.txt
@@ -0,0 +1,9 @@
+include(FetchContent)
+
+FetchContent_Declare(
+ ctre
+ GIT_REPOSITORY "https://github.com/hanickadot/compile-time-regular-expressions"
+ GIT_TAG v3.5
+)
+
+add_subdirectory(ctre)
diff --git a/lib/ctre/CMakeLists.txt b/lib/ctre/CMakeLists.txt
new file mode 100644
index 0000000..1f05163
--- /dev/null
+++ b/lib/ctre/CMakeLists.txt
@@ -0,0 +1,4 @@
+message(STATUS "Fetching ctre...")
+
+FetchContent_MakeAvailable(ctre)
+
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 04f3e02..1e4d106 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -32,7 +32,8 @@ target_compile_options(
-pedantic -fsanitize=address -fno-exceptions
)
-
target_include_directories(${PROJECT_NAME} PRIVATE .)
+target_link_libraries_system(${PROJECT_NAME} ctre)
+
target_link_options(${PROJECT_NAME} PRIVATE -fsanitize=address)