Skip to content

Commit 38467f8

Browse files
authored
CXX-2753 Refactor CMake config files to reflect new directory structure (#1037)
* Use CMAKE_BUILD_PARALLEL_LEVEL in compile.sh * Group minimum C Driver library version variables * Format CMake config files * Move package config commands into cmake/CMakeLists.txt * Move header commands into include/CMakeLists.txt * Move lib commands into lib/CMakeLists.txt * Move example variables into example config files * Move test commands into test/CMakeLists.txt * Update modeless message() commands to STATUS mode
1 parent 3c1c9c5 commit 38467f8

28 files changed

+1619
-1475
lines changed

.evergreen/compile.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@ fi
1919
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
2020

2121
if [ -f /proc/cpuinfo ]; then
22-
CONCURRENCY=$(grep -c ^processor /proc/cpuinfo)
22+
CMAKE_BUILD_PARALLEL_LEVEL=$(grep -c ^processor /proc/cpuinfo)
2323
elif which sysctl; then
24-
CONCURRENCY=$(sysctl -n hw.logicalcpu)
24+
CMAKE_BUILD_PARALLEL_LEVEL=$(sysctl -n hw.logicalcpu)
2525
else
26-
echo "$0: can't figure out what value of -j to pass to 'make'" >&2
26+
echo "$0: can't figure out what build parallel level to use" >&2
2727
exit 1
2828
fi
29+
export CMAKE_BUILD_PARALLEL_LEVEL
2930

3031
case "$OS" in
3132
darwin|linux)
3233
GENERATOR=${GENERATOR:-"Unix Makefiles"}
33-
CMAKE_BUILD_OPTS="-j $CONCURRENCY"
3434
CMAKE_EXAMPLES_TARGET=examples
3535
if [ "$RUN_DISTCHECK" ]; then
3636
_RUN_DISTCHECK=$RUN_DISTCHECK
@@ -39,7 +39,7 @@ case "$OS" in
3939

4040
cygwin*)
4141
GENERATOR=${GENERATOR:-"Visual Studio 14 2015 Win64"}
42-
CMAKE_BUILD_OPTS="/verbosity:minimal /maxcpucount:$CONCURRENCY"
42+
CMAKE_BUILD_OPTS="/verbosity:minimal"
4343
CMAKE_EXAMPLES_TARGET=examples/examples
4444
;;
4545

.mci.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,12 @@ functions:
461461
export LD_LIBRARY_PATH=.:$PREFIX/lib/
462462
export DYLD_LIBRARY_PATH=.:$PREFIX/lib/
463463
fi
464-
export PATH=$(pwd)/src/bsoncxx/${build_type}:$(pwd)/src/mongocxx/${build_type}:$PREFIX/bin:$(pwd)/install/bin:$PATH
464+
PATH="$(pwd)/src/mongocxx/test/${build_type}:$PATH"
465+
PATH="$(pwd)/src/bsoncxx/test/${build_type}:$PATH"
466+
PATH="$(pwd)/src/mongocxx/${build_type}:$PATH"
467+
PATH="$(pwd)/src/bsoncxx/${build_type}:$PATH"
468+
PATH="$PREFIX/bin:$PATH"
469+
PATH="$(pwd)/install/bin:$PATH"
465470
466471
export CHANGE_STREAMS_UNIFIED_TESTS_PATH="$(pwd)/../data/change-streams/unified"
467472
export CLIENT_SIDE_ENCRYPTION_LEGACY_TESTS_PATH="$(pwd)/../data/client_side_encryption/legacy"

0 commit comments

Comments
 (0)