mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-06-03 14:01:20 +00:00
Use HECL_MULTIPROCESSOR macro for enabling multithreaded work
This commit is contained in:
parent
326f24d831
commit
e698a27d1c
@ -2,6 +2,7 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
|||||||
cmake_minimum_required(VERSION 3.0)
|
cmake_minimum_required(VERSION 3.0)
|
||||||
project(hecl)
|
project(hecl)
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
|
||||||
# Shaddup MSVC
|
# Shaddup MSVC
|
||||||
add_definitions(-DUNICODE=1 -D_UNICODE=1 -D_CRT_SECURE_NO_WARNINGS=1 /wd4267 /wd4244)
|
add_definitions(-DUNICODE=1 -D_UNICODE=1 -D_CRT_SECURE_NO_WARNINGS=1 /wd4267 /wd4244)
|
||||||
else()
|
else()
|
||||||
|
2
hecl/extern/athena
vendored
2
hecl/extern/athena
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 2a4fc3e3b362de33a1cd3d997a5af94776788c85
|
Subproject commit 89968f1c31f76d518b6cc86e2350097fddafe7c4
|
@ -20,6 +20,10 @@ atdna(atdna_Frontend.cpp ../include/hecl/Frontend.hpp)
|
|||||||
atdna(atdna_Runtime.cpp ../include/hecl/Runtime.hpp)
|
atdna(atdna_Runtime.cpp ../include/hecl/Runtime.hpp)
|
||||||
atdna(atdna_CVar.cpp ../include/hecl/CVar.hpp)
|
atdna(atdna_CVar.cpp ../include/hecl/CVar.hpp)
|
||||||
|
|
||||||
|
if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR "${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo")
|
||||||
|
add_definitions(-DHECL_MULTIPROCESSOR)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_library(hecl-common
|
add_library(hecl-common
|
||||||
${BLENDER_SOURCES}
|
${BLENDER_SOURCES}
|
||||||
${BACKEND_SOURCES}
|
${BACKEND_SOURCES}
|
||||||
|
@ -102,8 +102,8 @@ void ClientProcess::Worker::proc()
|
|||||||
ClientProcess::ClientProcess(int verbosityLevel)
|
ClientProcess::ClientProcess(int verbosityLevel)
|
||||||
: m_verbosity(verbosityLevel)
|
: m_verbosity(verbosityLevel)
|
||||||
{
|
{
|
||||||
#if defined(NDEBUG)
|
#ifdef HECL_MULTIPROCESSOR
|
||||||
int cpuCount = GetCPUCount();
|
const int cpuCount = GetCPUCount();
|
||||||
#else
|
#else
|
||||||
constexpr int cpuCount = 1;
|
constexpr int cpuCount = 1;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user