File tree Expand file tree Collapse file tree 4 files changed +15
-3
lines changed Expand file tree Collapse file tree 4 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ case "$OS" in
50
50
esac
51
51
52
52
cd build
53
- " ${cmake_binary} " -G " $GENERATOR " " -DCMAKE_BUILD_TYPE=${BUILD_TYPE} " -DMONGOCXX_ENABLE_SLOW_TESTS=ON -DENABLE_UNINSTALL=ON " $@ " ..
53
+ " ${cmake_binary} " -G " $GENERATOR " " -DCMAKE_BUILD_TYPE=${BUILD_TYPE} " -DBUILD_TESTING=ON - DMONGOCXX_ENABLE_SLOW_TESTS=ON -DENABLE_UNINSTALL=ON " $@ " ..
54
54
" ${cmake_binary} " --build . --config $BUILD_TYPE -- $CMAKE_BUILD_OPTS
55
55
" ${cmake_binary} " --build . --config $BUILD_TYPE --target install -- $CMAKE_BUILD_OPTS
56
56
" ${cmake_binary} " --build . --config $BUILD_TYPE --target $CMAKE_EXAMPLES_TARGET -- $CMAKE_BUILD_OPTS
Original file line number Diff line number Diff line change @@ -20,6 +20,10 @@ endif()
20
20
21
21
project (MONGO_CXX_DRIVER LANGUAGES CXX )
22
22
23
+ if (NOT DEFINED BUILD_TESTING )
24
+ set (BUILD_TESTING OFF ) # Set this to OFF by default
25
+ endif ()
26
+
23
27
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" )
24
28
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.8.2" )
25
29
message (FATAL_ERROR "Insufficient GCC version - GCC 4.8.2+ required" )
@@ -102,8 +106,8 @@ if(NEED_DOWNLOAD_C_DRIVER)
102
106
add_subdirectory (${mongo-c-driver_SOURCE_DIR} ${mongo-c-driver_BINARY_DIR} )
103
107
set (CMAKE_CXX_FLAGS ${OLD_CMAKE_CXX_FLAGS} )
104
108
set (CMAKE_C_FLAGS ${OLD_CMAKE_C_FLAGS} )
105
- set (ENABLE_TESTS OLD_ENABLE_TESTS )
106
- set (BUILD_TESTING OLD_BUILD_TESTING )
109
+ set (ENABLE_TESTS ${ OLD_ENABLE_TESTS} )
110
+ set (BUILD_TESTING ${ OLD_BUILD_TESTING} )
107
111
endif ()
108
112
message (STATUS "Download and configure C driver version ${LIBMONGOC_DOWNLOAD_VERSION} ... end" )
109
113
endif ()
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
+ if (NOT BUILD_TESTING )
16
+ set_property (DIRECTORY PROPERTY EXCLUDE_FROM_ALL TRUE )
17
+ endif ()
18
+
15
19
include_directories (
16
20
${MONGO_CXX_DRIVER_SOURCE_DIR} /src/third_party/catch/include
17
21
)
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
+ if (NOT BUILD_TESTING )
16
+ set_property (DIRECTORY PROPERTY EXCLUDE_FROM_ALL TRUE )
17
+ endif ()
18
+
15
19
include_directories (
16
20
${THIRD_PARTY_SOURCE_DIR} /catch/include
17
21
)
You can’t perform that action at this time.
0 commit comments