From e345ae8280e9f595ba21432288a33d323e2e9fcd Mon Sep 17 00:00:00 2001 From: Jochen Sprickerhof Date: Mon, 17 Jul 2017 10:34:14 +0200 Subject: [PATCH] Support compiling with CMAKE_BUILD_TYPE set to None (#405) Debian defaults to setting CMAKE_BUILD_TYPE to None and setting CFLAGS and alike to Debian standards. --- cmake/functions.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/functions.cmake b/cmake/functions.cmake index a2714ae..5762f8e 100644 --- a/cmake/functions.cmake +++ b/cmake/functions.cmake @@ -104,6 +104,10 @@ macro(google_initialize_cartographer_project) "call CMake with -DFORCE_DEBUG_BUILD=True" ) endif() +# Support for Debian packaging CMAKE_BUILD_TYPE + elseif(CMAKE_BUILD_TYPE STREQUAL "None") + message(WARNING "Building with CMAKE_BUILD_TYPE None, " + "please make sure you have set CFLAGS and CXXFLAGS according to your needs.") else() message(FATAL_ERROR "Unknown CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") endif()