Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What happens for C/C++ builds if CMAKE_BUILD_TYPE is empty?

Tags:

cmake

When the variable CMAKE_BUILD_TYPE is empty which compiler flags are used? Does the compiler then simply use CMAKE_CXX_FLAGS and CMAKE_C_FLAGS for C++ and C?

like image 275
HorstKevin Avatar asked Sep 27 '22 19:09

HorstKevin


1 Answers

The default will be "empty" or "Debug" depending on the compiler. The value of the variable will be only of interest in places where SOME_VAR_${CONFIG} is used. So to answer your question. From my understanding the debug flags could be added. The documentation (http://www.cmake.org/cmake/help/v3.3/variable/CMAKE_BUILD_TYPE.html) is unfortunately not so clear.

like image 79
Jan Christoph Uhde Avatar answered Sep 30 '22 08:09

Jan Christoph Uhde