mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-18 22:42:37 +00:00
build: fix the macro redefinition that fails clang Debug builds (#15759)
libslic3r_version.h defines ORCA_CHECK_GCODE_PLACEHOLDERS from the CMake option, 0 by default, and GCode.hpp then forces it to 1 whenever NDEBUG is undefined. Clang reports the second definition under -Wmacro-redefined, which is on by default, so since -Werror (#15660) every clang Debug build fails at the libslic3r files that include GCode.hpp. Release and RelWithDebInfo define NDEBUG and never compile the override, which is why no CI configuration sees it. The override dates from #3861 and has warned in every Debug build since. Undefine the macro before overriding it. Debug builds get the same value the redefinition already produced, so nothing else changes. Follow-up to #15749, refs #15748.
This commit is contained in:
@@ -710,6 +710,7 @@ private:
|
||||
|
||||
// Always check gcode placeholders when building in debug mode.
|
||||
#if !defined(NDEBUG)
|
||||
#undef ORCA_CHECK_GCODE_PLACEHOLDERS
|
||||
#define ORCA_CHECK_GCODE_PLACEHOLDERS 1
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user