cmake vs no-assert flags

Jakub Bogusz qboosh at pld-linux.org
Fri Mar 7 18:58:23 CET 2025


Adding %set_build_flags in %cmake macro broke no-assert flags passing
in:

    -DCMAKE_CXX_FLAGS_PLD="${CXXFLAGS:-%{rpmcxxflags} -DNDEBUG -DQT_NO_DEBUG}" \\\
    -DCMAKE_C_FLAGS_PLD="${CFLAGS:-%{rpmcflags} -DNDEBUG -DQT_NO_DEBUG}" \\\
    -DCMAKE_Fortran_FLAGS_PLD="${CFLAGS:-%{rpmcflags} -DNDEBUG -DQT_NO_DEBUG}" \\\

because CXXFLAGS/CFLAGS env variables are now defined before.

Maybe -DNDEBUG -DQT_NO_DEBUG should be added to flags regardless of build system?


-- 
Jakub Bogusz    http://qboosh.pl/


More information about the pld-devel-en mailing list