Skip to content

Commit

Permalink
Force C++17 for ACE/TAO 8
Browse files Browse the repository at this point in the history
  • Loading branch information
iguessthislldo committed Aug 9, 2024
1 parent c2b4f75 commit fe37893
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
10 changes: 9 additions & 1 deletion build_xerces.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,20 @@ then
popd
fi

extra_configure_opts=()

if [ ! -z "${force_cpp_std+x}" ]
then
extra_configure_opts+=("-DCMAKE_CXX_STANDARD=$force_cpp_std")
fi

pushd xerces_source
cmake \
"-DCMAKE_INSTALL_PREFIX=$XERCESCROOT" \
"-DCMAKE_TOOLCHAIN_FILE=$OPENDDS_ANDROID_NDK/build/cmake/android.toolchain.cmake" \
"-DANDROID_ABI=$abi" "-DANDROID_PLATFORM=android-$api" \
"-DANDROID_CPP_FEATURES=rtti exceptions"
"-DANDROID_CPP_FEATURES=rtti exceptions" \
"${extra_configure_opts[@]}"
$make
mkdir -p $XERCESCROOT
make install
Expand Down
5 changes: 5 additions & 0 deletions configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ then
extra_configure_flags+=("--macros=android_force_clang:=0")
fi

if [ ! -z "${force_cpp_std+x}" ]
then
extra_configure_flags+=("--std=$force_cpp_std")
fi

if ! $use_toolchain
then
extra_configure_flags+=(
Expand Down
8 changes: 6 additions & 2 deletions setenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ download_file() {
}

# Getting Configuration
if [ -z ${ndk+x} ]
if [ -z "${ndk+x}" -o -z "${arch+x}" -o -z "${api+x}" ]
then
if ! [ -f ${workspace}/settings.sh ]
then
echo "Warning: ndk is not set and there are no settings.sh, copying default.settings.sh" 1>&2
echo 'Warning: $ndk, $arch, or $api not set and there is no settings.sh, copying default.settings.sh' 1>&2
cp ${workspace}/default.settings.sh ${workspace}/settings.sh
fi
source ${workspace}/settings.sh
Expand Down Expand Up @@ -113,6 +113,10 @@ export ace_tao=${ace_tao-'doc_group_master'}
case $ace_tao in
'doc_group_master')
export ace_tao_default_branch='master'
if [ $ndk_major_rev -lt 27 ]
then
export force_cpp_std="c++17"
fi
;;

'doc_group_ace6_tao2')
Expand Down

0 comments on commit fe37893

Please sign in to comment.