Skip to content

Commit

Permalink
Merge pull request #196 from bobsummerwill/opencl
Browse files Browse the repository at this point in the history
Added "AND GUI" conditional around OpenCL hack.
  • Loading branch information
bobsummerwill committed Jun 7, 2016
2 parents f8caf2c + fe51fc7 commit bff5c69
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmake/UseEth.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function(eth_apply TARGET REQUIRED SUBMODULE)

# workaround for https://github.com/ethereum/alethzero/issues/69
# force linking to libOpenCL as early as possible
if ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux" AND ETHASHCL)
if ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux" AND ETHASHCL AND GUI)
find_package (OpenCL)
if (OpenCL_FOUND)
target_link_libraries(${TARGET} "-Wl,--no-as-needed -l${OpenCL_LIBRARIES} -Wl,--as-needed")
Expand Down
2 changes: 1 addition & 1 deletion cmake/UseOpenCL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ function(eth_apply TARGET REQUIRED)
eth_show_dependency(OpenCL OpenCL)
if (OpenCL_FOUND)
target_include_directories(${TARGET} SYSTEM PUBLIC ${OpenCL_INCLUDE_DIRS})
if ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux" AND ETHASHCL)
if ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux" AND ETHASHCL AND GUI)
# workaround for https://github.com/ethereum/alethzero/issues/69
# force linking to libOpenCL as early as possible
target_link_libraries(${TARGET} "-Wl,--no-as-needed -l${OpenCL_LIBRARIES} -Wl,--as-needed")
Expand Down

0 comments on commit bff5c69

Please sign in to comment.