Running 'ninja -v' should enable output of the compile commands, maybe they will include some "unexpected" defines? (EDIT: Or "make VERBOSE=1" as it looks like you're using makefiles)
Make sure you didn't have anything in CXXFLAGS (or CMAKE_CXXFLAGS) when doing the initial cmake configuration
Make sure you didn't have anything in CXXFLAGS (or CMAKE_CXXFLAGS) when doing the initial cmake configuration