From: Samuel Martin Date: Sun, 1 Jun 2014 09:24:29 +0000 (+0200) Subject: pkg-cmake.mk: globally drive the CMAKE_BUILD_TYPE flag using BR2_ENABLE_DEBUG X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=642e44e263e9f25157594f98c393bca21544f745;p=buildroot.git pkg-cmake.mk: globally drive the CMAKE_BUILD_TYPE flag using BR2_ENABLE_DEBUG This CMake flag is usually used to adjust compiler flags (like: -Ox, -g, etc). So, it makes sense for Buildroot to globally drive this CMake flags in the cmake-package infrastructure. However, if a package prefer overriding this default setting, it still can via the _CONF_OPT variable. Signed-off-by: Samuel Martin Reviewed-by: Arnout Vandecappelle (Essensium/Mind) Tested-by: Maxime Hadjinlian Reviewed-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk index 6331e0f3e7..fb8144e87b 100644 --- a/package/pkg-cmake.mk +++ b/package/pkg-cmake.mk @@ -63,6 +63,7 @@ define $(2)_CONFIGURE_CMDS PATH=$(BR_PATH) \ $$($$(PKG)_CONF_ENV) $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \ -DCMAKE_TOOLCHAIN_FILE="$$(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake" \ + -DCMAKE_BUILD_TYPE=$(if $(BR2_ENABLE_DEBUG),Debug,Release) \ -DCMAKE_INSTALL_PREFIX="/usr" \ -DCMAKE_COLOR_MAKEFILE=OFF \ -DBUILD_TESTING=OFF \