Skip to content

Commit 49310b1

Browse files
committed
Added a flag to turn on/off the feature tests, which may access the network.
1 parent a465cd8 commit 49310b1

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

CMakeLists.txt

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Copyright (c) Dean Michael Berris 2010.
22
# Copyright (c) Google, Inc. 2012.
3+
# Copyright (c) Glyn Matthews 2013.
34
# Distributed under the Boost Software License, Version 1.0.
45
# (See accompanying file LICENSE_1_0.txt or copy at
56
# http://www.boost.org/LICENSE_1_0.txt)
@@ -14,6 +15,7 @@ option( CPP-NETLIB_BUILD_EXAMPLES "Build the examples using cpp-netlib." ON )
1415
option( CPP-NETLIB_ALWAYS_LOGGING "Allow cpp-netlib to log debug messages even in non-debug mode." OFF )
1516
option( CPP-NETLIB_DISABLE_LOGGING "Disable logging definitely, no logging code will be generated or compiled." OFF )
1617
option( CPP-NETLIB_DISABLE_LIBCXX "Disable using libc++ when compiling with clang." OFF )
18+
option( CPP-NETLIB_DISABLE_FEATURE_TESTS "Disable the feature tests (which may use a network connection)." OFF )
1719

1820
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
1921
find_package( ICU )
@@ -86,13 +88,14 @@ if (Boost_FOUND)
8688
endif(Boost_FOUND)
8789

8890
message(STATUS "CPP-NETLIB options selected:")
89-
message(STATUS " CPP-NETLIB_BUILD_SHARED_LIBS: ${CPP-NETLIB_BUILD_SHARED_LIBS}\t(Build cpp-netlib as shared libraries: OFF, ON)")
90-
message(STATUS " CPP-NETLIB_BUILD_SINGLE_LIB: ${CPP-NETLIB_BUILD_SINGLE_LIB}\t(Build cpp-netlib into a single library: OFF, ON)")
91-
message(STATUS " CPP-NETLIB_BUILD_TESTS: ${CPP-NETLIB_BUILD_TESTS}\t(Build the unit tests: ON, OFF)")
92-
message(STATUS " CPP-NETLIB_BUILD_EXAMPLES: ${CPP-NETLIB_BUILD_EXAMPLES}\t(Build the examples using cpp-netlib: ON, OFF)")
93-
message(STATUS " CPP-NETLIB_ALWAYS_LOGGING: ${CPP-NETLIB_ALWAYS_LOGGING}\t(Allow cpp-netlib to log debug messages even in non-debug mode: ON, OFF)")
94-
message(STATUS " CPP-NETLIB_DISABLE_LOGGING: ${CPP-NETLIB_DISABLE_LOGGING}\t(Disable logging definitely, no logging code will be generated or compiled: ON, OFF)")
95-
message(STATUS " CPP-NETLIB_DISABLE_LIBCXX: ${CPP-NETLIB_DISABLE_LIBCXX}\t(Disable using libc++ when building with clang: ON, OFF)")
91+
message(STATUS " CPP-NETLIB_BUILD_SHARED_LIBS: ${CPP-NETLIB_BUILD_SHARED_LIBS}\t(Build cpp-netlib as shared libraries: OFF, ON)")
92+
message(STATUS " CPP-NETLIB_BUILD_SINGLE_LIB: ${CPP-NETLIB_BUILD_SINGLE_LIB}\t(Build cpp-netlib into a single library: OFF, ON)")
93+
message(STATUS " CPP-NETLIB_BUILD_TESTS: ${CPP-NETLIB_BUILD_TESTS}\t(Build the unit tests: ON, OFF)")
94+
message(STATUS " CPP-NETLIB_BUILD_EXAMPLES: ${CPP-NETLIB_BUILD_EXAMPLES}\t(Build the examples using cpp-netlib: ON, OFF)")
95+
message(STATUS " CPP-NETLIB_ALWAYS_LOGGING: ${CPP-NETLIB_ALWAYS_LOGGING}\t(Allow cpp-netlib to log debug messages even in non-debug mode: ON, OFF)")
96+
message(STATUS " CPP-NETLIB_DISABLE_LOGGING: ${CPP-NETLIB_DISABLE_LOGGING}\t(Disable logging definitely, no logging code will be generated or compiled: ON, OFF)")
97+
message(STATUS " CPP-NETLIB_DISABLE_LIBCXX: ${CPP-NETLIB_DISABLE_LIBCXX}\t(Disable using libc++ when building with clang: ON, OFF)")
98+
message(STATUS " CPP-NETLIB_DISABLE_FEATURE_TESTS: ${CPP-NETLIB_DISABLE_FEATURE_TESTS}\t(Disable the feature tests (which may use a network connection): ON, OFF)")
9699
message(STATUS "CMake build options selected:")
97100

98101
# Takes one or more lists as parameter and prepends the prefix to every element.

http/src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) Glyn Matthews 2011, 2012.
1+
# Copyright (c) Glyn Matthews 2011, 2012, 2013.
22
# Copyright 2011 Dean Michael Berris (dberris@google.com)
33
# Copyright 2012 A. Joel Lamotte (mjklaim@gmail.com)
44
# Copyright 2011 Google, Inc.

http/test/v2/client/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@
44
# http://www.boost.org/LICENSE_1_0.txt)
55

66
add_subdirectory(units)
7-
add_subdirectory(features)
7+
if(NOT CPP-NETLIB_DISABLE_FEATURE_TESTS)
8+
add_subdirectory(features)
9+
endif()

0 commit comments

Comments
 (0)