Skip to content
Snippets Groups Projects
Unverified Commit 1851505d authored by René Fritze's avatar René Fritze
Browse files

make bugged gcc work with DEBUG_ONLY macro

parent a1a4919c
No related branches found
No related tags found
1 merge request!64One more Wheel Building MR
......@@ -67,3 +67,8 @@ check_cxx_source_compiles("
return 0;
};
" HAVE_MAP_EMPLACE)
check_cxx_source_compiles("
void foo([[maybe_unused]] arg) {}
int main(void){};
" HAS_WORKING_UNUSED_ATTRIBUTE)
......@@ -15,13 +15,21 @@
#ifndef NDEBUG
# define DXTC_DEBUG_ONLY
#else
# define DXTC_DEBUG_ONLY [[maybe_unused]]
# if HAS_WORKING_UNUSED_ATTRIBUTE
# define DXTC_DEBUG_ONLY [[maybe_unused]]
# else
# define DXTC_DEBUG_ONLY __attribute__((unused))
# endif
#endif
#if defined(HAVE_MPI) && HAVE_MPI
# define DXTC_MPI_ONLY
#else
# define DXTC_MPI_ONLY [[maybe_unused]]
# if HAS_WORKING_UNUSED_ATTRIBUTE
# define DXTC_DEBUG_ONLY [[maybe_unused]]
# else
# define DXTC_MPI_ONLY __attribute__((unused))
# endif
#endif
#endif // DXTC_UNUSED_HH
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment