build: Improve build system (#327)

* *Add top level CMakeLists.txt, to make it easier to use both independently and from within other projects
* Add a unit_test target, to attach all unit tests to

* * Fix unit tests for windows
* Silence cmake warning regarding missing top project
* update .gitignore for vscode

---------

Co-authored-by: BobSmun <6492115+BobSmun@users.noreply.github.com>
This commit is contained in:
BobSmun
2024-12-17 03:37:38 +08:00
committed by GitHub
parent 63504f59a1
commit e026ff187e
7 changed files with 53 additions and 30 deletions

View File

@@ -1,23 +1,7 @@
cmake_minimum_required(VERSION 3.16)
project(tests)
set(CMAKE_CXX_STANDARD 20)
include(FetchContent)
FetchContent_Declare(
pattern_language
GIT_REPOSITORY https://github.com/WerWolv/PatternLanguage
GIT_TAG master
)
FetchContent_MakeAvailable(pattern_language)
enable_testing()
add_subdirectory(patterns)
add_subdirectory(includes)
add_subdirectory(magic)
add_custom_target(test_all DEPENDS patterns_tests includes_test magic_test)
add_subdirectory(magic)