Last active
March 21, 2019 17:33
-
-
Save dennisklein/3f5f3d300bf5918805327e391b98cc0d to your computer and use it in GitHub Desktop.
aliBuild version dependent dependency and CMake option?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/fairmq.sh b/fairmq.sh | |
index c900238..a66e92c 100644 | |
@@ -9,6 +9,7 @@ requires: | |
- nanomsg | |
- msgpack | |
- DDS | |
+ - asiofi | |
build_requires: | |
- CMake | |
- "GCC-Toolchain:(?!osx)" | |
@@ -32,7 +33,18 @@ case $ARCHITECTURE in | |
;; | |
esac | |
+# Check, if we want to build the ofi transport, which is for all versions v1.4.2+ | |
+function fairmq_build_ofi() { | |
+ pushd $SOURCEDIR | |
+ git --no-pager tag -l --merged HEAD --contains "v1.4.2" >/dev/null 2>&1 | |
+ local res=$? | |
+ popd | |
+ return $res | |
+} | |
+if fairmq_build_ofi; then BUILD_OFI=ON; fi | |
+ | |
cmake $SOURCEDIR \ | |
+ ${CXXSTD:+-DCMAKE_CXX_STANDARD=$CXXSTD} \ | |
${CXX_COMPILER:+-DCMAKE_CXX_COMPILER=$CXX_COMPILER} \ | |
${CMAKE_BUILD_TYPE:+-DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE} \ | |
-DCMAKE_INSTALL_PREFIX=$INSTALLROOT \ | |
@@ -43,14 +55,15 @@ cmake $SOURCEDIR \ | |
${NANOMSG_ROOT:+-DNANOMSG_ROOT=$NANOMSG_ROOT} \ | |
${MSGPACK_ROOT:+-DMSGPACK_ROOT=$MSGPACK_ROOT} \ | |
${DDS_ROOT:+-DDDS_ROOT=$DDS_ROOT} \ | |
+ ${BUILD_OFI:+-DASIOFI_ROOT=$ASIOFI_ROOT} \ | |
-DDISABLE_COLOR=ON \ | |
-DBUILD_DDS_PLUGIN=ON \ | |
-DBUILD_NANOMSG_TRANSPORT=ON \ | |
+ ${BUILD_OFI:+-DBUILD_OFI_TRANSPORT=ON} \ | |
-DBUILD_EXAMPLES=ON \ | |
-DCMAKE_INSTALL_LIBDIR=lib \ | |
-DCMAKE_INSTALL_BINDIR=bin | |
-cmake --build . ${JOBS:+-- -j$JOBS} | |
cmake --build . --target install ${JOBS:+-- -j$JOBS} | |
# Tests will not run unless ALIBUILD_FAIRMQ_TESTS is set |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment