Skip to content

Commit ca3ce41

Browse files
authored
Merge pull request #386 from AndreyAlifanov/master
Build library as part of another product without conflicts
2 parents 4fed92c + d53d658 commit ca3ce41

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@ INCLUDE (subdirs)
77
INCLUDE (openssl)
88
INCLUDE (version)
99

10-
OPTION (BUILD_BENCHMARK "Build benchmark" OFF)
11-
OPTION (BUILD_TESTS "Build tests" OFF)
12-
OPTION (BUILD_SHARED_LIBS "Build shared libs" OFF)
10+
# use global flags only for standalone build
11+
IF ("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
12+
OPTION (BUILD_BENCHMARK "Build benchmark" OFF)
13+
OPTION (BUILD_TESTS "Build tests" OFF)
14+
OPTION (BUILD_SHARED_LIBS "Build shared libs" OFF)
15+
ENDIF ()
1316
OPTION (WITH_OPENSSL "Use OpenSSL for TLS connections" OFF)
1417
OPTION (WITH_SYSTEM_ABSEIL "Use system ABSEIL" OFF)
1518
OPTION (WITH_SYSTEM_LZ4 "Use system LZ4" OFF)

0 commit comments

Comments
 (0)