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.
master
Jochen Sprickerhof 2017-07-17 10:34:14 +02:00 committed by Damon Kohler
parent 10a19d0a3f
commit e345ae8280
1 changed files with 4 additions and 0 deletions

View File

@ -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()