diff options
author | HampusM <hampus@hampusmat.com> | 2022-02-25 18:13:54 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-06-13 17:56:53 +0200 |
commit | d36ec4670770022c0ec8337f6df4de292ca941db (patch) | |
tree | e4ae33c1470ef3fc63486b5d82b0a5d7377e747f | |
parent | c41090d12f4c7269524124dc0a2b5f9a03a61d93 (diff) |
build: add ctre library dependency
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | lib/CMakeLists.txt | 9 | ||||
-rw-r--r-- | lib/ctre/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/CMakeLists.txt | 3 |
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) |