Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit 65713d8

Browse files
committed
Merge pull request cpp-netlib#404 from cmorse/0.11-devel
Added CMake options to disable building tests and examples
2 parents 8510393 + 24d8139 commit 65713d8

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

CMakeLists.txt

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ cmake_minimum_required(VERSION 2.8)
77
project(CPP-NETLIB)
88

99
option( CPP-NETLIB_BUILD_SHARED_LIBS "Build cpp-netlib as shared libraries." OFF )
10+
option( CPP-NETLIB_BUILD_TESTS "Build the cpp-netlib project tests." ON)
11+
option( CPP-NETLIB_BUILD_EXAMPLES "Build the cpp-netlib project examples." ON)
1012

1113
include(GNUInstallDirs)
1214

@@ -82,12 +84,16 @@ if (Boost_FOUND)
8284
include_directories(${Boost_INCLUDE_DIRS})
8385
enable_testing()
8486
add_subdirectory(libs/network/src)
85-
add_subdirectory(libs/network/test)
87+
if (CPP-NETLIB_BUILD_TESTS)
88+
add_subdirectory(libs/network/test)
89+
endif (CPP-NETLIB_BUILD_TESTS)
8690
add_subdirectory(libs/network/experiment)
87-
if (NOT MSVC)
91+
if (NOT MSVC AND CPP-NETLIB_BUILD_TESTS)
8892
add_subdirectory(libs/mime/test)
89-
endif(NOT MSVC)
90-
add_subdirectory(libs/network/example)
93+
endif(NOT MSVC AND CPP-NETLIB_BUILD_TESTS)
94+
if (CPP-NETLIB_BUILD_EXAMPLES)
95+
add_subdirectory(libs/network/example)
96+
endif (CPP-NETLIB_BUILD_EXAMPLES)
9197
endif(Boost_FOUND)
9298

9399
if (MSVC)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy