From 2d665099ef6b14713beb0cac1bd405073a49e791 Mon Sep 17 00:00:00 2001 From: CNugteren Date: Mon, 4 Jul 2016 19:46:14 +0200 Subject: [PATCH] Fixed a linking issue with the tuners on Visual Studio --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 70e4198c..adb87658 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -221,9 +221,15 @@ if(TUNERS) # Includes CLTune include_directories(${CLTUNE_INCLUDE_DIRS}) + # Visual Studio requires the sources of non-exported objects/libraries + set(TUNERS_COMMON ) + if(MSVC) + set(TUNERS_COMMON ${TUNERS_COMMON} src/utilities.cpp) + endif() + # Adds tuning executables foreach(KERNEL ${KERNELS}) - add_executable(clblast_tuner_${KERNEL} src/tuning/kernels/${KERNEL}.cpp) + add_executable(clblast_tuner_${KERNEL} ${TUNERS_COMMON} src/tuning/kernels/${KERNEL}.cpp) target_link_libraries(clblast_tuner_${KERNEL} clblast ${CLTUNE_LIBRARIES} ${OPENCL_LIBRARIES}) install(TARGETS clblast_tuner_${KERNEL} DESTINATION bin) endforeach()