File tree Expand file tree Collapse file tree 2 files changed +23
-27
lines changed
Expand file tree Collapse file tree 2 files changed +23
-27
lines changed Original file line number Diff line number Diff line change @@ -440,20 +440,17 @@ pipeline {
440440 }
441441 def ceph_extra_cmake_args = " " ;
442442 def deb_build_profiles = " " ;
443- switch (env. FLAVOR ) {
444- case " default" :
445- ceph_extra_cmake_args + = " -DALLOCATOR=tcmalloc"
446- ceph_extra_cmake_args + = " -DWITH_SYSTEM_BOOST=OFF -DWITH_BOOST_VALGRIND=ON"
447- if (os. version_name == " focal" ) {
448- ceph_extra_cmake_args + = " -DWITH_STATIC_LIBSTDCXX=ON"
449- }
450- break
451- case " debug" :
452- ceph_extra_cmake_args + = " -DCMAKE_BUILD_TYPE=Debug -DWITH_CEPH_DEBUG_MUTEX=ON"
453- break
454- default :
455- println " FLAVOR=${ env.FLAVOR} is invalid"
456- assert false
443+ ceph_extra_cmake_args + = " -DALLOCATOR=tcmalloc"
444+ ceph_extra_cmake_args + = " -DWITH_SYSTEM_BOOST=OFF -DWITH_BOOST_VALGRIND=ON"
445+ if (os. version_name == " focal" ) {
446+ ceph_extra_cmake_args + = " -DWITH_STATIC_LIBSTDCXX=ON"
447+ }
448+ if (env. FLAVOR == " debug" ) {
449+ ceph_extra_cmake_args + = " -DCMAKE_BUILD_TYPE=Debug -DWITH_CEPH_DEBUG_MUTEX=ON"
450+ }
451+ if (env. FLAVOR != " default" && env. FLAVOR != " debug" ) {
452+ println " FLAVOR=${ env.FLAVOR} is invalid"
453+ assert false
457454 }
458455 bwc_command = " ${ bwc_command} ${ bwc_cmd_sccache_flags} "
459456 if ( os. pkg_type == " deb" ) {
Original file line number Diff line number Diff line change @@ -876,21 +876,20 @@ ceph_build_args_from_flavor() {
876876 shift
877877
878878 # shellcheck disable=SC2034
879- case " ${flavor} " in
880- default)
881- CEPH_EXTRA_RPMBUILD_ARGS=" --with tcmalloc"
882- CEPH_EXTRA_CMAKE_ARGS+=" -DALLOCATOR=tcmalloc"
883- # build boost with valgrind=on for https://tracker.ceph.com/issues/56500
884- CEPH_EXTRA_CMAKE_ARGS+=" -DWITH_SYSTEM_BOOST=OFF -DWITH_BOOST_VALGRIND=ON"
885- DEB_BUILD_PROFILES=" "
886- ;;
887- debug)
879+ CEPH_EXTRA_RPMBUILD_ARGS=" --with tcmalloc"
880+ CEPH_EXTRA_CMAKE_ARGS+=" -DALLOCATOR=tcmalloc"
881+ # build boost with valgrind=on for https://tracker.ceph.com/issues/56500
882+ CEPH_EXTRA_CMAKE_ARGS+=" -DWITH_SYSTEM_BOOST=OFF -DWITH_BOOST_VALGRIND=ON"
883+ DEB_BUILD_PROFILES=" "
884+
885+ if [[ " $flavor " == " debug" ]]; then
888886 CEPH_EXTRA_CMAKE_ARGS+=" -DCMAKE_BUILD_TYPE=Debug -DWITH_CEPH_DEBUG_MUTEX=ON"
889- ;;
890- * )
891- echo " unknown FLAVOR: ${FLAVOR} " >&2
887+ fi
888+
889+ if [[ " $flavor " != " default" && " $flavor " != " debug" ]]; then
890+ echo " unknown FLAVOR: ${FLAVOR} " >&2 "
892891 exit 1
893- esac
892+ fi
894893}
895894
896895write_dist_files()
You can’t perform that action at this time.
0 commit comments