mirror of https://github.com/CrowCpp/Crow.git
unittest: make use of precompiled headers.
This commit is contained in:
parent
392e696cb3
commit
115ee4d091
|
@ -1,7 +1,7 @@
|
|||
#####################################
|
||||
# Define Project-Wide Settings
|
||||
#####################################
|
||||
cmake_minimum_required(VERSION 3.15.0 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.16.0 FATAL_ERROR)
|
||||
|
||||
# Define the project name and language
|
||||
project(Crow
|
||||
|
@ -92,7 +92,7 @@ if(CROW_BUILD_EXAMPLES)
|
|||
endif()
|
||||
|
||||
# Tests
|
||||
if(NOT MSVC AND CROW_BUILD_TESTS)
|
||||
if(CROW_BUILD_TESTS)
|
||||
if(NOT "compression" IN_LIST CROW_FEATURES)
|
||||
message(STATUS "Compression tests are omitted. (Configure with CROW_FEATURES containing 'compression' to enable them)")
|
||||
endif()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
cmake_minimum_required(VERSION 3.15)
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
project(crow_examples)
|
||||
|
||||
include(${CMAKE_SOURCE_DIR}/cmake/compiler_options.cmake)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
cmake_minimum_required(VERSION 3.15)
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
project(crow_test)
|
||||
|
||||
add_subdirectory(unittest)
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
cmake_minimum_required(VERSION 3.15)
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
file(COPY . DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
cmake_minimum_required(VERSION 3.15)
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
project(template_test)
|
||||
|
||||
set(PROJECT_INCLUDE_DIR
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
cmake_minimum_required(VERSION 3.15)
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
project(crow_test)
|
||||
|
||||
include(${CMAKE_SOURCE_DIR}/cmake/compiler_options.cmake)
|
||||
|
@ -31,7 +31,13 @@ endif()
|
|||
add_executable(unittest ${TEST_SRCS})
|
||||
target_include_directories(unittest PRIVATE include)
|
||||
target_link_libraries(unittest Crow::Crow)
|
||||
target_precompile_headers(unittest PRIVATE include/catch.hpp)
|
||||
add_warnings_optimizations(unittest)
|
||||
set_source_files_properties(src/catch.cpp
|
||||
PROPERTIES
|
||||
SKIP_PRECOMPILE_HEADERS ON
|
||||
)
|
||||
|
||||
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
set_target_properties(unittest PROPERTIES COMPILE_FLAGS "--coverage -fprofile-arcs -ftest-coverage")
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
#define CROW_LOG_LEVEL 0
|
||||
#define LOCALHOST_ADDRESS "127.0.0.1"
|
||||
|
||||
#include "catch.hpp"
|
||||
#include "crow.h"
|
||||
|
||||
using namespace std;
|
||||
|
|
Loading…
Reference in New Issue