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

34
unbench/CMakeLists.txt Normal file
View File

@@ -0,0 +1,34 @@
# 3.11 version is required for `FetchContent`
cmake_minimum_required(VERSION 3.11 FATAL_ERROR)
project(ecs.hpp.unbench)
#
# google benchmark
#
set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "" FORCE)
include(FetchContent)
FetchContent_Declare(
gbench
GIT_REPOSITORY https://github.com/google/benchmark)
FetchContent_GetProperties(gbench)
if(NOT gbench_POPULATED)
FetchContent_Populate(gbench)
add_subdirectory(${gbench_SOURCE_DIR} ${gbench_BINARY_DIR})
endif()
#
# benchmark executable
#
file(GLOB UNBENCH_SOURCES "*.cpp" "*.hpp")
add_executable(${PROJECT_NAME} ${UNBENCH_SOURCES})
target_link_libraries(${PROJECT_NAME}
benchmark_main
ecs.hpp)
add_test(${PROJECT_NAME} ${PROJECT_NAME})

13
unbench/bench_base.hpp Normal file
View File

@@ -0,0 +1,13 @@
/*******************************************************************************
* 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, by Matvey Cherevko (blackmatov@gmail.com)
******************************************************************************/
#pragma once
#include <benchmark/benchmark.h>
namespace ecs_hpp_unbench
{
}

View File

@@ -0,0 +1,11 @@
/*******************************************************************************
* 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, by Matvey Cherevko (blackmatov@gmail.com)
******************************************************************************/
#include "bench_base.hpp"
using namespace ecs_hpp_unbench;
#include "ecs.hpp"
namespace ecs = ecs_hpp;