Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added logging test projects (no code yet)
  • Loading branch information
Klaim committed Nov 15, 2012
commit 8452e5cb03923d60083e451e66c7ee28f6261e27
2 changes: 1 addition & 1 deletion libs/network/src/logging/logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace handler
void std_log_handler( const log_record& log )
{
std::cerr << "[network " << log.filename() << ":" << log.line() << "] "
<< log.message() << std::endl;
<< log.message() << std::endl;
}
}

Expand Down
1 change: 1 addition & 0 deletions libs/network/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

include_directories(${CPP-NETLIB_SOURCE_DIR}/include)

add_subdirectory(logging)
add_subdirectory(uri)
add_subdirectory(http)

Expand Down
4 changes: 2 additions & 2 deletions libs/network/test/http/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ if (Boost_FOUND)
cppnetlib-http-message-wrappers
cppnetlib-uri
cppnetlib-constants
)
)
target_link_libraries(cpp-netlib-http-${test}
${Boost_LIBRARIES}
${ICU_LIBRARIES} ${ICU_I18N_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
${CMAKE_THREAD_LIBS_INIT}
cppnetlib-message
cppnetlib-message-wrappers
cppnetlib-http-message
Expand Down
29 changes: 29 additions & 0 deletions libs/network/test/logging/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright (c) A. Joel Lamotte 2012.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)

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

if (Boost_FOUND)
set(
TESTS
logging_log_record
logging_custom_handler
)
foreach (test ${TESTS})
if (${CMAKE_CXX_COMPILER_ID} MATCHES GNU)
set_source_files_properties(${test}.cpp
PROPERTIES COMPILE_FLAGS "-Wall")
endif()
add_executable(cpp-netlib-${test} ${test}.cpp)
add_dependencies(cpp-netlib-${test} cppnetlib-logging)
target_link_libraries(cpp-netlib-${test}
${Boost_LIBRARIES} cppnetlib-logging)
set_target_properties(cpp-netlib-${test}
PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR}/tests)
add_test(cpp-netlib-${test}
${CPP-NETLIB_BINARY_DIR}/tests/cpp-netlib-${test})
endforeach (test)
endif()
Empty file.
Empty file.