]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cmake: set CMAKE_BUILD_TYPE only if .git exists 42129/head
authorKefu Chai <kchai@redhat.com>
Thu, 1 Jul 2021 07:24:50 +0000 (15:24 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 1 Jul 2021 08:57:20 +0000 (16:57 +0800)
commita7e3ece459111d157a20d05de3a92cf4dab6bde6
treefeeffdb7c1a52e6161438bd719b0e5f47f300fd6
parente9717a47353325312565d524e52fd3f3e557b8ca
cmake: set CMAKE_BUILD_TYPE only if .git exists

distros intend to fine tune the CFLAGS and CXXFLAGS by themselves, see

- https://git.alpinelinux.org/abuild/tree/abuild.conf
- https://wiki.archlinux.org/title/CMake_package_guidelines#CMake_undesired_behaviors
- https://github.com/Debian/debhelper/blob/5d1bb29841043d8e47ebbdd043e6cd086cad508e/lib/Debian/Debhelper/Buildsystem/cmake.pm#L16

so instead of setting a CMAKE_BUILD_TYPE when building from a
dist tarball, let's just leave it empty.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/CMakeLists.txt