tests: added utils.cpp to avoid gcc warnings
This commit is contained in:
parent
9551c8178c
commit
6feaa29c62
@ -17,7 +17,7 @@ spdlog-async: spdlog-async.cpp
|
|||||||
$(CXX) spdlog-async.cpp -o spdlog-async $(CXXFLAGS) $(CXX_RELEASE_FLAGS)
|
$(CXX) spdlog-async.cpp -o spdlog-async $(CXXFLAGS) $(CXX_RELEASE_FLAGS)
|
||||||
|
|
||||||
|
|
||||||
BOOST_FLAGS = -DBOOST_LOG_DYN_LINK -I/home/gabi/devel/boost_1_56_0/ -L/home/gabi/devel/boost_1_56_0/stage/lib -lboost_log -lboost_log_setup -lboost_filesystem -lboost_system -lboost_thread -lboost_regex -lboost_date_time -lboost_chrono
|
BOOST_FLAGS = -DBOOST_LOG_DYN_LINK -I/usr/include -lboost_log -lboost_log_setup -lboost_filesystem -lboost_system -lboost_thread -lboost_regex -lboost_date_time -lboost_chrono
|
||||||
|
|
||||||
boost-bench: boost-bench.cpp
|
boost-bench: boost-bench.cpp
|
||||||
$(CXX) boost-bench.cpp -o boost-bench $(CXXFLAGS) $(BOOST_FLAGS) $(CXX_RELEASE_FLAGS)
|
$(CXX) boost-bench.cpp -o boost-bench $(CXXFLAGS) $(BOOST_FLAGS) $(CXX_RELEASE_FLAGS)
|
||||||
|
@ -8,16 +8,8 @@
|
|||||||
#include <exception>
|
#include <exception>
|
||||||
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
#include "utils.h"
|
||||||
|
|
||||||
#include "../include/spdlog/spdlog.h"
|
#include "../include/spdlog/spdlog.h"
|
||||||
#include "../include/spdlog/sinks/null_sink.h"
|
#include "../include/spdlog/sinks/null_sink.h"
|
||||||
|
|
||||||
|
|
||||||
static void prepare_logdir()
|
|
||||||
{
|
|
||||||
spdlog::drop_all();
|
|
||||||
#ifdef _WIN32
|
|
||||||
auto rv = system("del /F /Q logs\\*");
|
|
||||||
#else
|
|
||||||
auto rv = system("rm -f logs/*");
|
|
||||||
#endif
|
|
||||||
}
|
|
11
tests/utils.cpp
Normal file
11
tests/utils.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "includes.h"
|
||||||
|
|
||||||
|
void prepare_logdir()
|
||||||
|
{
|
||||||
|
spdlog::drop_all();
|
||||||
|
#ifdef _WIN32
|
||||||
|
auto rv = system("del /F /Q logs\\*");
|
||||||
|
#else
|
||||||
|
auto rv = system("rm -f logs/*");
|
||||||
|
#endif
|
||||||
|
}
|
4
tests/utils.h
Normal file
4
tests/utils.h
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
void prepare_logdir();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user