Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/backend/cpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@ ADD_DEFINITIONS(-DAF_CPU)

FIND_PACKAGE(CBLAS REQUIRED)

OPTION(BUILD_CPU_ASYNC "Build CPU backend with ASYNC support" ON)
IF(NOT DEFINED BUILD_CPU_ASYNC)
IF("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.8.4")
MESSAGE("Disabling CPU Async as GCC Version ${COMPILER_VERSION} has known issues.")
MESSAGE("CPU Backend will use Synchronous Calls")
OPTION(BUILD_CPU_ASYNC "Build CPU backend with ASYNC support" OFF)
ELSE()
OPTION(BUILD_CPU_ASYNC "Build CPU backend with ASYNC support" ON)
ENDIF()
ENDIF(NOT DEFINED BUILD_CPU_ASYNC)

IF (NOT ${BUILD_CPU_ASYNC})
ADD_DEFINITIONS(-DAF_DISABLE_CPU_ASYNC)
Expand Down