summaryrefslogtreecommitdiffstats
path: root/package/pkg-cmake.mk
diff options
context:
space:
mode:
authorSamuel Martin <s.martin49@gmail.com>2014-06-01 11:24:29 +0200
committerPeter Korsgaard <peter@korsgaard.com>2014-06-01 22:19:36 +0200
commit642e44e263e9f25157594f98c393bca21544f745 (patch)
tree4cb7b2865d2a166b6011e369b0d4f07d97dc927d /package/pkg-cmake.mk
parent257a82031ebeb1e155ce74b9cfe87add8b223d66 (diff)
downloadbuildroot-642e44e263e9f25157594f98c393bca21544f745.tar.gz
buildroot-642e44e263e9f25157594f98c393bca21544f745.zip
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 <PKG>_CONF_OPT variable. Signed-off-by: Samuel Martin <s.martin49@gmail.com> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Tested-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/pkg-cmake.mk')
-rw-r--r--package/pkg-cmake.mk1
1 files changed, 1 insertions, 0 deletions
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 \
OpenPOWER on IntegriCloud