From d845543433f555103ab86d2f5e6b4dda9abd3152 Mon Sep 17 00:00:00 2001 From: BlackMATov Date: Tue, 11 Dec 2018 22:05:25 +0700 Subject: [PATCH] speedup unit tests compilation --- CMakeLists.txt | 4 ---- tests.cpp | 4 +++- tests_main.cpp | 9 +++++++++ 3 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 tests_main.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c5177d..dce5455 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,9 +9,5 @@ set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD_REQUIRED YES CXX_EXTENSIONS NO) -if(MSVC) - target_compile_options(${PROJECT_NAME} PRIVATE /bigobj) -endif(MSVC) - enable_testing() add_test(${PROJECT_NAME} ${PROJECT_NAME}) diff --git a/tests.cpp b/tests.cpp index ae722fa..f366468 100644 --- a/tests.cpp +++ b/tests.cpp @@ -4,12 +4,14 @@ * Copyright (C) 2018 Matvey Cherevko ******************************************************************************/ -#define CATCH_CONFIG_MAIN +#define CATCH_CONFIG_FAST_COMPILE #include "catch.hpp" #include "promise.hpp" namespace pr = promise_hpp; +#include + namespace { struct obj_t { diff --git a/tests_main.cpp b/tests_main.cpp new file mode 100644 index 0000000..637c53c --- /dev/null +++ b/tests_main.cpp @@ -0,0 +1,9 @@ +/******************************************************************************* + * This file is part of the "promise.hpp" + * For conditions of distribution and use, see copyright notice in LICENSE.md + * Copyright (C) 2018 Matvey Cherevko + ******************************************************************************/ + +#define CATCH_CONFIG_MAIN +#define CATCH_CONFIG_FAST_COMPILE +#include "catch.hpp"