Skip to content

Commit 0320f9d

Browse files
committed
CDRIVER-663 windows 32-bit build variant
Disable SSL and SASL on Windows 32-bit for now.
1 parent 0b27229 commit 0320f9d

File tree

2 files changed

+30
-10
lines changed

2 files changed

+30
-10
lines changed

.mci.yml

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -124,17 +124,19 @@ c_driver_variables:
124124
set -o verbose
125125
cmake="/cygdrive/c/cmake/bin/cmake"
126126
msbuild="/cygdrive/c/Program Files (x86)/MSBuild/12.0/Bin/MSBuild.exe"
127-
generator="Visual Studio 12 2013 Win64"
127+
dumpbin="/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/dumpbin.exe"
128128
# In Autotools builds, autogen.sh does this, we must do it here.
129129
git submodule init
130130
git submodule update
131131
cd src/libbson
132-
"$cmake" -G "$generator" "-DCMAKE_INSTALL_PREFIX=C:/mongo-c-driver"
132+
"$cmake" -G "$GENERATOR" "-DCMAKE_INSTALL_PREFIX=C:/mongo-c-driver"
133133
"$msbuild" /m ALL_BUILD.vcxproj
134+
"$dumpbin" /HEADERS Debug/libbson-1.0.dll | head -n 25
134135
"$msbuild" /m INSTALL.vcxproj
135136
cd ../..
136-
"$cmake" -G "$generator" "-DCMAKE_INSTALL_PREFIX=C:/mongo-c-driver" "-DBSON_ROOT_DIR=C:/mongo-c-driver" "-DCMAKE_INCLUDE_PATH=C:/sasl/include" "-DCMAKE_LIBRARY_PATH=C:/sasl/lib"
137+
"$cmake" -G "$GENERATOR" "-DCMAKE_INSTALL_PREFIX=C:/mongo-c-driver" "-DBSON_ROOT_DIR=C:/mongo-c-driver" "$cmake_defs"
137138
"$msbuild" /m ALL_BUILD.vcxproj
139+
"$dumpbin" /HEADERS Debug/mongoc-1.0.lib | head -n 25
138140
"$msbuild" /m INSTALL.vcxproj
139141
140142
integration_tests:
@@ -178,12 +180,13 @@ c_driver_variables:
178180
msbuild: # ???
179181
dllpath: "c:/openssl/bin,c:/sasl/bin,c:/curl/dlls"
180182
## msvc2013, 32-bit
181-
msvc2013-32: &with_msvc2010_32bit
182-
generator: Visual Studio 10 2010
183-
msbuild: # ???
184-
dllpath: "c:/openssl/bin,c:/sasl/bin"
183+
msvc2013_32bit: &with_msvc2013_32bit
184+
generator: Visual Studio 12 2013
185+
cmake_defs: "-DSEARCH_OPEN_SSL:BOOL=OFF"
186+
msbuild: /cygdrive/c/Program Files (x86)/MSBuild/12.0/Bin/MSBuild.exe
185187
msvc2013: &with_msvc2013
186188
generator: Visual Studio 12 2013 Win64
189+
cmake_defs: "-DCMAKE_INCLUDE_PATH=C:/sasl/include -DCMAKE_LIBRARY_PATH=C:/sasl/lib"
187190
msbuild: /cygdrive/c/Program Files (x86)/MSBuild/12.0/Bin/MSBuild.exe
188191
dllpath: "c:/openssl/bin,c:/sasl/bin"
189192

@@ -253,6 +256,8 @@ functions:
253256
working_dir: "mongo-c-driver"
254257
script: |
255258
export PATH=${extra_path}:$PATH
259+
export GENERATOR="${generator}" # For CMake on Windows
260+
export cmake_defs="${cmake_defs}" # For CMake on Windows
256261
${compile_script}
257262
258263
"set version latest" :
@@ -498,6 +503,16 @@ buildvariants:
498503
# Windows Buildvariants #
499504
#######################################
500505

506+
- name: windows-32-vs2013
507+
display_name: "Windows 32-bit CMake Visual Studio 2013"
508+
expansions:
509+
<<: *msvc_common
510+
<<: *mongo_url_windows64
511+
<<: *with_msvc2013_32bit
512+
run_on:
513+
- windows-64-vs2013-compile
514+
tasks: *std_tests
515+
501516
- name: windows-64-vs2013
502517
display_name: "Windows 64-bit CMake Visual Studio 2013"
503518
expansions:

CMakeLists.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@ cmake_minimum_required(VERSION 2.8)
22

33
project (libmongoc)
44

5+
option(SEARCH_OPEN_SSL "SEARCH_OPEN_SSL" ON)
6+
57
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/build/cmake)
68

79
include(InstallRequiredSystemLibraries)
8-
include(FindOpenSSL)
10+
11+
if (SEARCH_OPEN_SSL)
12+
include(FindOpenSSL)
13+
endif ()
914

1015
include(FindBSON REQUIRED)
1116
include(FindSASL2)
@@ -25,7 +30,7 @@ set (CPACK_PACKAGE_VERSION_MINOR ${MONGOC_MINOR_VERSION})
2530

2631
include (CPack)
2732

28-
if (OPENSSL_FOUND)
33+
if (SEARCH_OPEN_SSL AND OPENSSL_FOUND)
2934
set (MONGOC_ENABLE_SSL 1)
3035
else()
3136
set (MONGOC_ENABLE_SSL 0)
@@ -273,7 +278,7 @@ set(test-libmongoc-sources
273278
${SOURCE_DIR}/tests/test-write-commands.c
274279
)
275280

276-
if (OPENSSL_FOUND)
281+
if (SEARCH_OPEN_SSL AND OPENSSL_FOUND)
277282
set(test-libmongoc-sources ${test-libmongoc-sources}
278283
${SOURCE_DIR}/tests/test-x509.c
279284
${SOURCE_DIR}/tests/ssl-test.c

0 commit comments

Comments
 (0)