new project structure

This commit is contained in:
2019-05-13 21:51:03 +07:00
parent ee4f2e07bc
commit c08d4995f6
13 changed files with 137 additions and 14415 deletions

32
untests/CMakeLists.txt Normal file
View File

@@ -0,0 +1,32 @@
# 3.11 version is required for `FetchContent`
cmake_minimum_required(VERSION 3.11 FATAL_ERROR)
project(flat.hpp.untests)
set(CATCH_BUILD_TESTING OFF CACHE BOOL "" FORCE)
include(FetchContent)
FetchContent_Declare(
catch2
GIT_REPOSITORY https://github.com/catchorg/catch2)
FetchContent_GetProperties(catch2)
if(NOT catch2_POPULATED)
FetchContent_Populate(catch2)
add_subdirectory(${catch2_SOURCE_DIR} ${catch2_BINARY_DIR})
endif()
option(BUILD_WITH_COVERAGE "Build with coverage" OFF)
if(BUILD_WITH_COVERAGE AND (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang"))
set(COVERAGE_FLAGS "--coverage")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${COVERAGE_FLAGS}")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${COVERAGE_FLAGS}")
set(CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} ${COVERAGE_FLAGS}")
endif()
file(GLOB UNTESTS_SOURCES "*.cpp" "*.hpp")
add_executable(${PROJECT_NAME} ${UNTESTS_SOURCES})
target_link_libraries(${PROJECT_NAME}
Catch2
ecs.hpp)
add_test(${PROJECT_NAME} ${PROJECT_NAME})

9
untests/catch_main.cpp Normal file
View File

@@ -0,0 +1,9 @@
/*******************************************************************************
* This file is part of the "https://github.com/blackmatov/ecs.hpp"
* For conditions of distribution and use, see copyright notice in LICENSE.md
* Copyright (C) 2018-2019 Matvey Cherevko
******************************************************************************/
#define CATCH_CONFIG_MAIN
#define CATCH_CONFIG_FAST_COMPILE
#include <catch2/catch.hpp>

1317
untests/ecs_tests.cpp Normal file

File diff suppressed because it is too large Load Diff