Adding flags when building bench with CMake (#9)

Since the gnu extensions where removed, executables in bench directory cannon be built correctly.
The fix is adding "-D_POSIX_C_SOURCE=200112L" on those targets. When -std=gnu99 was used,
bench worked without this flag, but that was not the case since we switched to -std=c99.
This commit is contained in:
Vlachopoulou, Eleni
2025-05-16 11:47:39 +01:00
committed by GitHub
parent a2a045cb2e
commit fac4a97118
2 changed files with 2 additions and 0 deletions

View File

@@ -152,6 +152,7 @@ function(benchexe extn)
PRIVATE
# load-var-for,COPTFLAGS
${COPTFLAGS}
${CPPROCFLAGS}
)
if(WIN32 AND BUILD_SHARED_LIBS)
target_compile_definitions(${exec_name}.x

View File

@@ -55,6 +55,7 @@ function(lpgemmbenchexe extn)
PRIVATE
# load-var-for,COPTFLAGS
${COPTFLAGS}
${CPPROCFLAGS}
)
if(WIN32 AND BUILD_SHARED_LIBS)
target_compile_definitions(${exec_name}.x