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

前端 未结 2 1400
無奈伤痛
無奈伤痛 2021-01-06 08:07

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_FLAG

2条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-06 08:45

    As a comment on https://blog.kitware.com/cmake-and-the-default-build-type/ says, the default (empty) build type is targeted at Linux distributions which want to use the same compiler flags for multiple packages.

提交回复
热议问题