Verify and/or Fix setting cflags/cppflags/ldflags during Cmake
completed by: gcking
BRL-CAD uses the CMake build system generator. CMake generates build systems such as Makefile, MSVC, and XCode projects. Our build system provides a lot of variables for setting compilation and linker flags -- one such is BRLCAD_FLAGS_DEBUG which turns on debugging symbols (-g for gcc).
This task is two-part. The first is verifying whether setting any of the built-in CMAKE variables that set cflags/cppflags/ldflags will play nicely with our variables or whether our settings always override. See the cmake documentation for details but CMAKE_C_FLAGS is one such flag. In theory, running the following command should either append or replace our flag settings (ideally get appended to the end):
cmake path/to/srcdir -DCMAKE_C_FLAGS="-DCOWGOESMOO=1" -DBRLCAD_FLAGS_DEBUG=ON
If cmake completes successfully, you should see your added flag in the summary and when you run "make VERBOSE=1" you should see your flag getting used during compilation.
IF IT WORKS, provide a transcript of everything you tried including the entire output so we can confirm you tested everything correctly.
IF IT DOES NOT WORK, make it work by editing our CMake source files (see misc/CMake/*.cmake).