As I am unable to change from release to debug build type, I wonder what am I doing wrong. I am working with Unix Makefiles.
In docs.biicode.com/c++/building.html says how adding SET() in the CMakeLists.txt adds variables to cmake.
I am new to cmake and biicode, and I tried all of:
ADD_DEFINITIONS(-DCMAKE_BUILD_TYPE=Debug)
ADD_DEFINITIONS(-DCMAKE_BUILD_TYPE:STRING=Debug)
SET(CMAKE_BUILD_TYPE Debug)
target_compile_options(my_program PUBLIC $<$<CONFIG:Debug>:-Werror>)
but gdb says that "no debugging symbols found".
Another way, as states bii --help cpp
, is passing to cpp:build parameters that will be passed to cmake, but calling
bii cpp:build -DCMAKE_BUILD_TYPE=Debug
yields
Building: cmake --build . -DCMAKE_BUILD_TYPE=Debug
Unknown argument -DCMAKE_BUILD_TYPE=Debug
but calling directly
cmake -DCMAKE_BUILD_TYPE=Debug --build .
works ok, and I don't know how to change the order in the bii cpp:build
command.
Is all this a misconception, a sintax error, or there must be something else wrong? what is the best place to change between Debug and Release?