aboutsummaryrefslogtreecommitdiff
path: root/test/CMakeLists.txt
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-03-19 13:21:54 +0100
committerHampusM <hampus@hampusmat.com>2022-06-13 17:56:56 +0200
commit55c93fe609888be73677317978959040cf35b2ff (patch)
tree41ee53961eb5667136432b69773ef7acf3ad8259 /test/CMakeLists.txt
parent020303df1410d10546f53d0bfee4f48797d4f067 (diff)
refactor: implement matrix iterator
Diffstat (limited to 'test/CMakeLists.txt')
-rw-r--r--test/CMakeLists.txt45
1 files changed, 45 insertions, 0 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
new file mode 100644
index 0000000..ac84f42
--- /dev/null
+++ b/test/CMakeLists.txt
@@ -0,0 +1,45 @@
+file(GLOB SOURCES
+ main.cpp
+ string_matrix.test.cpp
+ ${CMAKE_SOURCE_DIR}/src/engine/data/vector2.cpp
+ ${CMAKE_SOURCE_DIR}/src/engine/data/bounds.cpp
+ ${CMAKE_SOURCE_DIR}/src/engine/graphics/string_matrix.cpp
+)
+
+add_executable(tests ${SOURCES})
+
+target_compile_features(tests PUBLIC cxx_std_20)
+
+target_compile_options(
+ tests
+ PRIVATE
+ -Wall -Wextra -Wpedantic -Wshadow
+ -Wold-style-cast -Wcast-align -Wno-unused
+ -Wconversion -Wcast-qual -Wctor-dtor-privacy
+ -Wdisabled-optimization -Wformat=2 -Winit-self
+ -Wmissing-declarations -Wmissing-include-dirs
+ -Woverloaded-virtual -Wredundant-decls
+ -Wsign-conversion -Wsign-promo
+ -Wstrict-overflow=5 -Wswitch-default
+ -Wundef -Werror
+ -pedantic -fsanitize=address -fno-exceptions
+)
+
+if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+ target_compile_options(
+ tests
+ PRIVATE
+ -Wlogical-op -Wnoexcept -Wstrict-null-sentinel
+ )
+endif()
+
+target_include_directories(
+ tests
+ PRIVATE
+ "${CMAKE_SOURCE_DIR}/src"
+ "${CMAKE_SOURCE_DIR}/test"
+)
+
+target_link_libraries(tests GSL doctest)
+
+target_link_options(tests PRIVATE -fsanitize=address)