Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8452e5c

Browse files
committed
Added logging test projects (no code yet)
1 parent5bd2f7b commit8452e5c

File tree

6 files changed

+33
-3
lines changed

6 files changed

+33
-3
lines changed

‎libs/network/src/logging/logging.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace handler
2020
voidstd_log_handler(const log_record& log )
2121
{
2222
std::cerr <<"[network" << log.filename() <<":" << log.line() <<"]"
23-
<< log.message() << std::endl;
23+
<< log.message() << std::endl;
2424
}
2525
}
2626

‎libs/network/test/CMakeLists.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
include_directories(${CPP-NETLIB_SOURCE_DIR}/include)
77

8+
add_subdirectory(logging)
89
add_subdirectory(uri)
910
add_subdirectory(http)
1011

‎libs/network/test/http/CMakeLists.txt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ if (Boost_FOUND)
3333
cppnetlib-http-message-wrappers
3434
cppnetlib-uri
3535
cppnetlib-constants
36-
)
36+
)
3737
target_link_libraries(cpp-netlib-http-${test}
3838
${Boost_LIBRARIES}
3939
${ICU_LIBRARIES}${ICU_I18N_LIBRARIES}
40-
${CMAKE_THREAD_LIBS_INIT}
40+
${CMAKE_THREAD_LIBS_INIT}
4141
cppnetlib-message
4242
cppnetlib-message-wrappers
4343
cppnetlib-http-message
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Copyright (c) A. Joel Lamotte 2012.
2+
# Distributed under the Boost Software License, Version 1.0.
3+
# (See accompanying file LICENSE_1_0.txt or copy at
4+
# http://www.boost.org/LICENSE_1_0.txt)
5+
6+
include_directories(${CPP-NETLIB_SOURCE_DIR}/include)
7+
include_directories(${CPP-NETLIB_SOURCE_DIR})
8+
9+
if (Boost_FOUND)
10+
set(
11+
TESTS
12+
logging_log_record
13+
logging_custom_handler
14+
)
15+
foreach (test${TESTS})
16+
if (${CMAKE_CXX_COMPILER_ID}MATCHES GNU)
17+
set_source_files_properties(${test}.cpp
18+
PROPERTIESCOMPILE_FLAGS"-Wall")
19+
endif()
20+
add_executable(cpp-netlib-${test}${test}.cpp)
21+
add_dependencies(cpp-netlib-${test} cppnetlib-logging)
22+
target_link_libraries(cpp-netlib-${test}
23+
${Boost_LIBRARIES} cppnetlib-logging)
24+
set_target_properties(cpp-netlib-${test}
25+
PROPERTIESRUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR}/tests)
26+
add_test(cpp-netlib-${test}
27+
${CPP-NETLIB_BINARY_DIR}/tests/cpp-netlib-${test})
28+
endforeach (test)
29+
endif()

‎libs/network/test/logging/logging_custom_handler.cpp‎

Whitespace-only changes.

‎libs/network/test/logging/logging_log_record.cpp‎

Whitespace-only changes.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp