Fixed some #Includes and LNK Errors#105
Fixed some #Includes and LNK Errors#105Cppuccino wants to merge 0 commit intoluminousmining:mainfrom
Conversation
sources/CMakeLists.txt
Outdated
| ) | ||
| endif() | ||
|
|
||
| if (BUILD_NVIDIA) |
There was a problem hiding this comment.
You totaly ingoring options:
### BUILD EXE
option(BUILD_EXE_MINER "Build miner executable" ON)
option(BUILD_EXE_UNIT_TEST "Build unit test executable" ON)
option(BUILD_EXE_BENCHMARK "Build benchmark executable" ON)
BENCH_EXE must be build only if BUILD_EXE_BENCHMARK is ON.
There was a problem hiding this comment.
Apply this logical with all your modifications ;)
### DEVICE TARGET
option(BUILD_AMD "Build with OpenCL for AMD GPU" ON)
option(BUILD_CPU "Build with OpenMP for CPU(Intel/AMD)" ON)
option(BUILD_NVIDIA "Build with CUDA for Nvidia GPU" ON)
### BUILD EXE
option(BUILD_EXE_MINER "Build miner executable" ON)
option(BUILD_EXE_UNIT_TEST "Build unit test executable" ON)
option(BUILD_EXE_BENCHMARK "Build benchmark executable" ON)
Example:
cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_EXE_MINER=OFF -DBUILD_EXE_UNIT_TEST=OFF -DBUILD_EXE_BENCHMARK=ON -DBUILD_NVIDIA=OFF -DBUILD_CPU=OFF -DBUILD_AMD=ON
*********************************************************************
-- BUILD_AMD : ON
-- OPENCL : 3.0
-- OPENCL Include : /usr/local/include
-- OPENCL Libraries : /usr/local/lib/libOpenCL.so
*********************************************************************
-- BUILD_CPU : OFF
*********************************************************************
-- BUILD_NVIDIA : OFF
*********************************************************************
-- BUILD NVIDIA : OFF
-- BUILD AMD : ON
-- BUILD CPU : OFF
*********************************************************************
-- BUILD MINER : OFF
-- BUILD BENCHMARK : ON
-- BUILD UNIT TEST : OFF
*********************************************************************
The options is a filter to build only what you need !
Atm I need only benchmark with AMD, i'm ignoring other exe and Nvidia device.
sources/CMakeLists.txt
Outdated
| if (BUILD_AMD) | ||
| target_link_libraries(${BENCH_EXE} | ||
| PUBLIC | ||
| ${OpenCL_LIBRARIES} |
There was a problem hiding this comment.
Why delete conditionnal link ? $<$<BOOL:BUILD_AMD>:${OpenCL_LIBRARIES}>
This macro add OpenCL_LIBRARIES only if BUILD_AMD is ON ;)
Let this macro in CMakeLists please.
Apply this everywhere you.
sources/CMakeLists.txt
Outdated
| ${LIB_CRYPTO_NVIDIA} | ||
| > | ||
| $<$<BOOL:BUILD_AMD>:${OpenCL_LIBRARIES}> | ||
| $<$<BOOL:BUILD_NVIDIA>:${CUDA_LIBRARY} ${CUDA_LIBRARIES} ${CUDA_NVRTC_LIBRARY} ${CUDA_NVPTX_LIBRARY} ${CUDA_NVRTC_BUILTINS_LIBRARY} ${LIB_BENCH_NVIDIA}> |
There was a problem hiding this comment.
Please let multi lines link, better to read
$<$<BOOL:BUILD_NVIDIA>:
${CUDA_LIBRARY}
${CUDA_LIBRARIES}
${CUDA_NVRTC_LIBRARY}
${CUDA_NVPTX_LIBRARY}
${CUDA_NVRTC_BUILTINS_LIBRARY}
${LIB_CRYPTO_NVIDIA}
>
sources/CMakeLists.txt
Outdated
| ${CUDA_NVRTC_BUILTINS_LIBRARY} | ||
| ${LIB_BENCH_NVIDIA} | ||
| > | ||
| $<$<BOOL:BUILD_NVIDIA>:${CUDA_LIBRARY} ${CUDA_LIBRARIES} ${CUDA_NVRTC_LIBRARY} ${CUDA_NVPTX_LIBRARY} ${CUDA_NVRTC_BUILTINS_LIBRARY} ${LIB_BENCH_NVIDIA}> |
There was a problem hiding this comment.
Please let multi lines link, better to read
sources/CMakeLists.txt
Outdated
| ${LIB_CRYPTO_NVIDIA} | ||
| > | ||
| $<$<BOOL:BUILD_AMD>:${OpenCL_LIBRARIES}> | ||
| $<$<BOOL:BUILD_NVIDIA>:${CUDA_LIBRARY} ${CUDA_LIBRARIES} ${CUDA_NVRTC_LIBRARY} ${CUDA_NVPTX_LIBRARY} ${CUDA_NVRTC_BUILTINS_LIBRARY} ${LIB_BENCH_NVIDIA}> |
There was a problem hiding this comment.
Please let multi lines link, better to read
Fixed some errors i received while trying to build on Windows, Please double the CmakeList changes before merging, thank you.