File tree Expand file tree Collapse file tree 6 files changed +40
-32
lines changed Expand file tree Collapse file tree 6 files changed +40
-32
lines changed Original file line number Diff line number Diff line change @@ -5,11 +5,10 @@ set -o pipefail
5
5
6
6
# Sanity-check that static library macros are not set when building against the shared library.
7
7
# Users don't need to include this section in their projects.
8
- (pkg-config --cflags libbsoncxx | grep -v -- -DBSONCXX_STATIC) ||
9
- (
10
- echo " Expected BSONCXX_STATIC to not be set" >&2
11
- exit 1
12
- )
8
+ if ! pkg-config --cflags libbsoncxx | grep -v -q -- -DBSONCXX_STATIC; then
9
+ echo " Expected BSONCXX_STATIC to not be set" >&2
10
+ exit 1
11
+ fi
13
12
14
13
rm -rf build/*
15
14
cd build
Original file line number Diff line number Diff line change @@ -5,11 +5,16 @@ set -o pipefail
5
5
6
6
# Sanity-check that static library macros are set when building against the static library. Users
7
7
# don't need to include this section in their projects.
8
- (pkg-config --cflags libbsoncxx-static | grep -- -DBSONCXX_STATIC) ||
9
- (
10
- echo " Expected BSONCXX_STATIC to be set" >&2
11
- exit 1
12
- )
8
+ if ! pkg-config --cflags libbsoncxx-static | grep -q -- -DBSONCXX_STATIC; then
9
+ echo " Expected BSONCXX_STATIC to be set" >&2
10
+ exit 1
11
+ fi
12
+
13
+ # Sanity-check that static libbson is required. Regression test for CXX-3290.
14
+ if ! pkg-config --print-requires libbsoncxx-static | grep -q -- bson2-static; then
15
+ echo " Expected bson2-static to be required" >&2
16
+ exit 1
17
+ fi
13
18
14
19
rm -rf build/*
15
20
cd build
Original file line number Diff line number Diff line change @@ -5,16 +5,15 @@ set -o pipefail
5
5
6
6
# Sanity-check that static library macros are not set when building against the shared library.
7
7
# Users don't need to include this section in their projects.
8
- (pkg-config --cflags libmongocxx | grep -v -- -DBSONCXX_STATIC) ||
9
- (
10
- echo " Expected BSONCXX_STATIC to not be set" >&2
11
- exit 1
12
- )
13
- (pkg-config --cflags libmongocxx | grep -v -- -DMONGOCXX_STATIC) ||
14
- (
15
- echo " Expected MONGOCXX_STATIC to not be set" >&2
16
- exit 1
17
- )
8
+ if ! pkg-config --cflags libmongocxx | grep -v -q -- -DBSONCXX_STATIC; then
9
+ echo " Expected BSONCXX_STATIC to not be set" >&2
10
+ exit 1
11
+ fi
12
+
13
+ if ! pkg-config --cflags libmongocxx | grep -v -q -- -DMONGOCXX_STATIC; then
14
+ echo " Expected MONGOCXX_STATIC to not be set" >&2
15
+ exit 1
16
+ fi
18
17
19
18
rm -rf build/*
20
19
cd build
Original file line number Diff line number Diff line change @@ -5,16 +5,21 @@ set -o pipefail
5
5
6
6
# Sanity-check that static library macros are set when building against the static library. Users
7
7
# don't need to include this section in their projects.
8
- (pkg-config --cflags libmongocxx-static | grep -- -DBSONCXX_STATIC) ||
9
- (
10
- echo " Expected BSONCXX_STATIC to be set" >&2
11
- exit 1
12
- )
13
- (pkg-config --cflags libmongocxx-static | grep -- -DMONGOCXX_STATIC) ||
14
- (
15
- echo " Expected MONGOCXX_STATIC to be set" >&2
16
- exit 1
17
- )
8
+ if ! pkg-config --cflags libmongocxx-static | grep -q -- -DBSONCXX_STATIC; then
9
+ echo " Expected BSONCXX_STATIC to be set" >&2
10
+ exit 1
11
+ fi
12
+
13
+ if ! pkg-config --cflags libmongocxx-static | grep -q -- -DMONGOCXX_STATIC; then
14
+ echo " Expected MONGOCXX_STATIC to be set" >&2
15
+ exit 1
16
+ fi
17
+
18
+ # Sanity-check that static libmongoc is required. Regression test for CXX-3290.
19
+ if ! pkg-config --print-requires libmongocxx-static | grep -q -- mongoc2-static; then
20
+ echo " Expected mongoc2-static to be required" >&2
21
+ exit 1
22
+ fi
18
23
19
24
rm -rf build/*
20
25
cd build
Original file line number Diff line number Diff line change 26
26
set (requires "" )
27
27
28
28
if (is_static )
29
- list (APPEND requires "bson2 >= ${bson_req_ver} " )
29
+ list (APPEND requires "bson2-static >= ${bson_req_ver} " )
30
30
endif ()
31
31
32
32
list (JOIN requires ", " requires )
Original file line number Diff line number Diff line change 28
28
29
29
if (is_static )
30
30
list (APPEND requires "lib${bsoncxx_name} >= ${version} " )
31
- list (APPEND requires "mongoc2 >= ${mongoc_req_ver} " )
31
+ list (APPEND requires "mongoc2-static >= ${mongoc_req_ver} " )
32
32
else ()
33
33
list (APPEND requires "lib${bsoncxx_name} >= ${version} " )
34
34
endif ()
You can’t perform that action at this time.
0 commit comments