Default to threads = cpus(). Correct multithreaded benchmark with threads.

This commit is contained in:
Christoffer Lerno
2022-12-11 22:21:14 +01:00
committed by Christoffer Lerno
parent 1864c69f31
commit 50d2a04c48
10 changed files with 101 additions and 62 deletions

View File

@@ -248,6 +248,7 @@ add_executable(c3c
src/utils/vmem.c
src/utils/vmem.h
src/utils/whereami.c
src/utils/cpus.c
src/compiler/decltable.c
src/compiler/mac_support.c
src/compiler/tilde_codegen_storeload.c
@@ -300,10 +301,10 @@ if(MSVC)
endif()
else()
message(STATUS "using gcc/clang warning switches")
target_compile_options(c3c PRIVATE -Wall -Werror -Wno-unknown-pragmas -Wno-unused-result
target_link_options(c3c PRIVATE -pthread)
target_compile_options(c3c PRIVATE -pthread -Wall -Werror -Wno-unknown-pragmas -Wno-unused-result
-Wno-unused-function -Wno-unused-variable -Wno-unused-parameter)
if (WIN32)
target_link_options(c3c PRIVATE -pthread)
target_compile_definitions(c3c PRIVATE USE_PTHREAD=1)
endif()
endif()