Hi there!
I’m trying to get cmake to pass -g2 to clang on macOS, and having tried everything in the man page and on Stack Overflow, I’m at a loss. Nothing I do seems to change its mind about whether its doing a Release or Debug build.
I’d really appreciate any pointers.
# How I'm setting up the build directory
adam@PrimeMover physics % cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
-- Failed to find LLVM FileCheck
-- git version: v0.0.0-dirty normalized to 0.0.0
-- Version: 1.5.4
-- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES -- failed to compile
-- Performing Test HAVE_STD_REGEX -- success
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Performing Test HAVE_POSIX_REGEX -- success
-- Performing Test HAVE_STEADY_CLOCK -- success
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/adam/SpacePhysics/physics/build
# How I'm running the build
cmake --build build --config Debug
# Another thing I've tried is putting this in CMakeLists.txt
set(CMAKE_BUILD_TYPE Debug)
None of the above seems to have any effect on the Makefiles cmake generates or what CXX_DEFINES and CXX_FLAGS are set during the build - all of them seem to be just whatever values clang has by default.
Any idea why this might be? I’m sure I’m missing something stupid.