aboutsummaryrefslogtreecommitdiff
path: root/support/misc
diff options
context:
space:
mode:
authorGravatar Samuel Martin <s.martin49@gmail.com>2016-10-16 13:12:38 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-10-22 16:15:32 +0200
commita471150a7b773b40af5585fa0c49275549014791 (patch)
treeeda0ec164130960d148c5584ce542fbe4a306ad3 /support/misc
parent104bb29e0490bfb487e2e665448dd3ca07fcc2b5 (diff)
downloadbuildroot-a471150a7b773b40af5585fa0c49275549014791.tar.gz
buildroot-a471150a7b773b40af5585fa0c49275549014791.tar.bz2
package/pkg-cmake.mk: move CMAKE_BUILD_TYPE definition into toolchainfile.cmake
The chosen CMAKE_BUILD_TYPE encodes an option of the Buildroot configuration, so it makes more sense to save it in the toolchainfile.cmake than to pass it during configure. It is still possible to override the build type on the cmake command line. Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Signed-off-by: Samuel Martin <s.martin49@gmail.com> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> [Thomas: reword description in the CHANGES file.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'support/misc')
-rw-r--r--support/misc/toolchainfile.cmake.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/support/misc/toolchainfile.cmake.in b/support/misc/toolchainfile.cmake.in
index 649b52d72a..1c5031f26a 100644
--- a/support/misc/toolchainfile.cmake.in
+++ b/support/misc/toolchainfile.cmake.in
@@ -13,6 +13,9 @@ string(REPLACE "/usr/share/buildroot" "" RELOCATED_HOST_DIR ${CMAKE_CURRENT_LIST
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR @@CMAKE_SYSTEM_PROCESSOR@@)
+# Build type from the Buildroot configuration
+set(CMAKE_BUILD_TYPE @@CMAKE_BUILD_TYPE@@ CACHE STRING "Buildroot build configuration")
+
set(CMAKE_C_FLAGS "@@TARGET_CFLAGS@@ ${CMAKE_C_FLAGS}" CACHE STRING "Buildroot CFLAGS")
set(CMAKE_CXX_FLAGS "@@TARGET_CXXFLAGS@@ ${CMAKE_CXX_FLAGS}" CACHE STRING "Buildroot CXXFLAGS")
set(CMAKE_EXE_LINKER_FLAGS "@@TARGET_LDFLAGS@@ ${CMAKE_EXE_LINKER_FLAGS}" CACHE STRING "Buildroot LDFLAGS")