Skip to content

Commit fac4a97

Browse files
authored
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.
1 parent a2a045c commit fac4a97

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

bench/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ function(benchexe extn)
152152
PRIVATE
153153
# load-var-for,COPTFLAGS
154154
${COPTFLAGS}
155+
${CPPROCFLAGS}
155156
)
156157
if(WIN32 AND BUILD_SHARED_LIBS)
157158
target_compile_definitions(${exec_name}.x

bench/bench_aocl_gemm/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ function(lpgemmbenchexe extn)
5555
PRIVATE
5656
# load-var-for,COPTFLAGS
5757
${COPTFLAGS}
58+
${CPPROCFLAGS}
5859
)
5960
if(WIN32 AND BUILD_SHARED_LIBS)
6061
target_compile_definitions(${exec_name}.x

0 commit comments

Comments
 (0)