From 473392d50c4a5266b798b622becf6fb6a0d89c96 Mon Sep 17 00:00:00 2001 From: BlackMATov Date: Thu, 13 Dec 2018 00:56:57 +0700 Subject: [PATCH] speedup unit tests compilation --- CMakeLists.txt | 1 + catch_main.cpp | 9 +++++++++ invoke.hpp | 2 +- tests.cpp => invoke_tests.cpp | 4 ++-- 4 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 catch_main.cpp rename tests.cpp => invoke_tests.cpp (99%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 53e12fc..db640c5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,6 +3,7 @@ project(invoke) file(GLOB test_sources "*.cpp" "*.hpp") add_executable(${PROJECT_NAME} ${test_sources}) + set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 14 CXX_STANDARD_REQUIRED YES diff --git a/catch_main.cpp b/catch_main.cpp new file mode 100644 index 0000000..41ca863 --- /dev/null +++ b/catch_main.cpp @@ -0,0 +1,9 @@ +/******************************************************************************* + * This file is part of the "https://github.com/blackmatov/invoke.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" diff --git a/invoke.hpp b/invoke.hpp index 4df38aa..01d2f13 100644 --- a/invoke.hpp +++ b/invoke.hpp @@ -1,5 +1,5 @@ /******************************************************************************* - * This file is part of the "invoke.hpp" + * This file is part of the "https://github.com/blackmatov/invoke.hpp" * For conditions of distribution and use, see copyright notice in LICENSE.md * Copyright (C) 2018 Matvey Cherevko ******************************************************************************/ diff --git a/tests.cpp b/invoke_tests.cpp similarity index 99% rename from tests.cpp rename to invoke_tests.cpp index 69270fb..14d0c5e 100644 --- a/tests.cpp +++ b/invoke_tests.cpp @@ -1,10 +1,10 @@ /******************************************************************************* - * This file is part of the "invoke.hpp" + * This file is part of the "https://github.com/blackmatov/invoke.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" #include "invoke.hpp"