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

Restructure dirs#179

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
deanberris merged 7 commits intocpp-netlib:masterfromglynos:restructure_dirs
Dec 27, 2012
Merged
Show file tree
Hide file tree
Changes from1 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
PrevPrevious commit
NextNext commit
Restructured the message framework, passing tests on Linux/GCC 4.7.
  • Loading branch information
@glynos
glynos committedDec 26, 2012
commitfd5e7d59a541530b508b8566320a0cb71140b00e
1 change: 1 addition & 0 deletionsCMakeLists.txt
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -111,3 +111,4 @@ message(STATUS " CPP-NETLIB_DISABLE_LOGGING: ${CPP-NETLIB_DISABLE_LOGGING}\t(
#

add_subdirectory(uri)
add_subdirectory(message)
6 changes: 5 additions & 1 deletionmessage/CMakeLists.txt
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,4 +4,8 @@
# http://www.boost.org/LICENSE_1_0.txt)

add_subdirectory(src)
add_subdirectory(test)

if(CPP-NETLIB_BUILD_TESTS)
enable_testing()
add_subdirectory(test)
endif(CPP-NETLIB_BUILD_TESTS)
29 changes: 29 additions & 0 deletionsmessage/src/CMakeLists.txt
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
# Copyright (c) Glyn Matthews 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)

if (${CMAKE_CXX_COMPILER_ID} MATCHES GNU)
if (HAVE_STD11)
set(CPP-NETLIB_CXXFLAGS "-Wall -std=c++11")
elseif (HAVE_STD0X)
set(CPP-NETLIB_CXXFLAGS "-Wall -std=c++0x")
endif()
elseif (${CMAKE_CXX_COMPILER_ID} MATCHES Clang)
CHECK_CXX_COMPILER_FLAG(-std=c++11 HAVE_STD11)
set(CPP-NETLIB_CXXFLAGS "-Wall -std=c++11 -stdlib=libc++")
set(CPP-NETLIB_CXXFLAGS "-Wall -std=c++11 -stdlib=libc++")
endif()

include_directories(${CPP-NETLIB_SOURCE_DIR}/uri/src ${CPP-NETLIB_SOURCE_DIR}/message/src)
set(CPP-NETLIB_MESSAGE_SRCS message.cpp directives.cpp wrappers.cpp)
add_library(cppnetlib-message ${CPP-NETLIB_MESSAGE_SRCS})
foreach (src_file ${CPP-NETLIB_MESSAGE_SRCS})
if (${CMAKE_CXX_COMPILER_ID} MATCHES GNU)
set_source_files_properties(${src_file}
PROPERTIES COMPILE_FLAGS ${CPP-NETLIB_CXXFLAGS})
elseif (${CMAKE_CXX_COMPILER_ID} MATCHES Clang)
set_source_files_properties(${src_file}
PROPERTIES COMPILE_FLAGS ${CPP-NETLIB_CXXFLAGS})
endif()
endforeach(src_file)
38 changes: 38 additions & 0 deletionsmessage/src/network/detail/debug.hpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
#ifndef NETWORK_DEBUG_HPP_20110410
#define NETWORK_DEBUG_HPP_20110410

// (c) Copyright 2011 Dean Michael Berris.
// Copyright 2012 Google, Inc.
// Copyright 2012 A. Joel Lamotte
// 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)

/** NETWORK_MESSAGE is a debugging macro used by cpp-netlib to
print out network-related errors through standard error. This is only
useful when NETWORK_DEBUG is turned on. Otherwise the macro amounts to a
no-op.

The user can force the logging to be enabled by defining NETWORK_ENABLE_LOGGING.
*/
#if defined(NETWORK_DEBUG) && !defined(NETWORK_ENABLE_LOGGING)
# define NETWORK_ENABLE_LOGGING
#endif

#ifdef NETWORK_ENABLE_LOGGING

# include <network/logging/logging.hpp>
# ifndef NETWORK_MESSAGE
# define NETWORK_MESSAGE(msg) { network::logging::log( network::logging::log_record( __FILE__, __LINE__ ) << msg ); }
# endif

#else

# ifndef NETWORK_MESSAGE
# define NETWORK_MESSAGE(msg)
# endif

#endif


#endif /* end of include guard: NETWORK_DEBUG_HPP_20110410 */
20 changes: 20 additions & 0 deletionsmessage/src/network/detail/directive_base.hpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@

// Copyright Dean Michael Berris 2007.
// Copyright 2012 Google, Inc.
// 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)

#ifndef NETWORK_DETAIL_DIRECTIVE_BASE_HPP__
#define NETWORK_DETAIL_DIRECTIVE_BASE_HPP__

/** Defines the base type from which all directives inherit
* to allow friend access to message and other types' internals.
*/
namespace network { namespace detail {

} // namespace detail

} // namespace network

#endif // NETWORK_DETAIL_DIRECTIVE_BASE_HPP__
12 changes: 12 additions & 0 deletionsmessage/src/network/detail/wrapper_base.hpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@

// Copyright Dean Michael Berris 2007.
// Copyright 2012 Google, Inc.
// 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)

#ifndef NETWORK_DETAIL_WRAPPER_BASE_HPP__
#define NETWORK_DETAIL_WRAPPER_BASE_HPP__

#endif // NETWORK_DETAIL_WRAPPER_BASE_HPP__

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
43 changes: 26 additions & 17 deletionsmessage/test/CMakeLists.txt
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,21 +3,30 @@
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)

include_directories(${CPP-NETLIB_SOURCE_DIR}/uri/src)
include_directories(${CPP-NETLIB_SOURCE_DIR}/message/src)

set(
TESTS
message_test
)
foreach (test ${TESTS})
add_executable(${test} ${test}.cpp)
add_dependencies(${test} message)
target_link_libraries(${test}
${GTEST_BOTH_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} uri)
if (OPENSSL_FOUND)
target_link_libraries(${test} ${OPENSSL_LIBRARIES})
endif()
set_target_properties(${test}
PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${Uri_BINARY_DIR}/tests)
add_test(${test}
${Uri_BINARY_DIR}/tests/${test})
endforeach (test)
if (Boost_FOUND)
set(
TESTS
message_test
message_transform_test
)
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-uri cppnetlib-message)
target_link_libraries(cpp-netlib-${test}
${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} cppnetlib-uri cppnetlib-message)
if (OPENSSL_FOUND)
target_link_libraries(cpp-netlib-${test} ${OPENSSL_LIBRARIES})
endif()
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 (Boost_FOUND)
2 changes: 1 addition & 1 deletionmessage/test/message_transform_test.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,7 +11,7 @@
#define BOOST_TEST_MODULE message test
#include <boost/config/warning_disable.hpp>
#include <boost/test/unit_test.hpp>
#include <network/include/message.hpp>
#include <network/message.hpp>
#include <algorithm>

BOOST_AUTO_TEST_CASE ( message_transform_toupper ) {
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp