<commit_before>INCLUDE(ExternalProject)

if(WIN32)
	set(CLBLAS_CLEW_LIB ${CMAKE_INSTALL_PREFIX}/lib/clew.lib)
else()
	set(CLBLAS_CLEW_LIB ${CMAKE_INSTALL_PREFIX}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}clew${CMAKE_SHARED_LIBRARY_SUFFIX})
endif()

message("CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}")
ExternalProject_Add(
    clBLAS-external
    SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/clMathLibraries/clBLAS/src
    PREFIX ${CMAKE_BINARY_DIR}/clBLAS
    STAMP_DIR ${CMAKE_BINARY_DIR}/clBLAS/stamp
    CMAKE_CACHE_ARGS 
    -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
    -DBUILD_SHARED_LIBS:BOOL=ON
    -DBUILD_CLIENT:BOOL=OFF
    -DBUILD_TEST:BOOL=OFF
    -DOPENCL_INCLUDE_DIRS:STRING=${CMAKE_CURRENT_SOURCE_DIR}/EasyCL/thirdparty/clew/include;${CMAKE_CURRENT_SOURCE_DIR}/EasyCL/thirdparty/clew/include/proxy-opencl
	-DOPENCL_LIBRARIES:STRING=${CLBLAS_CLEW_LIB}
    -DBUILD_KTEST:BOOL=OFF
    -DSUFFIX_LIB:STRING=
    -DCORR_TEST_WITH_ACML:BOOL=OFF
    -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
    )

#ExternalProject_Get_Property(clBLAS-external install_dir)
ADD_LIBRARY(clBLAS SHARED IMPORTED)
SET_PROPERTY(TARGET clBLAS PROPERTY IMPORTED_LOCATION "${CMAKE_INSTALL_PREFIX}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}clBLAS${CMAKE_SHARED_LIBRARY_SUFFIX}")
SET_PROPERTY(TARGET clBLAS PROPERTY IMPORTED_IMPLIB "${CMAKE_INSTALL_PREFIX}/lib/clBLAS.lib")
#SET_TARGET_PROPERTIES(clBLAS PROPERTIES IMPORTED_LOCATION ${clBLAS_location})
ADD_DEPENDENCIES(clBLAS clBLAS-external)
SET(CLBLAS_INCLUDE_DIRS ${CMAKE_INSTALL_PREFIX}/include)
SET(CLBLAS_LIBRARIES ${CMAKE_INSTALL_PREFIX}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}clBLAS${CMAKE_SHARED_LIBRARY_SUFFIX})
SET(CLBLAS_FOUND ON)

#add_custom_target(clblas_delete_stamp clBLAS-external EasyCL-external
#  ${CMAKE_COMMAND} -E  remove_directory "${CMAKE_BINARY_DIR}/clBLAS/stamp"
#)

#add_dependencies(clBLAS-external EasyCL-external)
#add_dependencies(clBLAS-external EasyCL)
#add_dependencies(clBLAS EasyCL)
<commit_msg>change implib directory for clblas<commit_after>INCLUDE(ExternalProject)

if(WIN32)
	set(CLBLAS_CLEW_LIB ${CMAKE_INSTALL_PREFIX}/lib/clew.lib)
else()
	set(CLBLAS_CLEW_LIB ${CMAKE_INSTALL_PREFIX}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}clew${CMAKE_SHARED_LIBRARY_SUFFIX})
endif()

message("CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}")
ExternalProject_Add(
    clBLAS-external
    SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/clMathLibraries/clBLAS/src
    PREFIX ${CMAKE_BINARY_DIR}/clBLAS
    STAMP_DIR ${CMAKE_BINARY_DIR}/clBLAS/stamp
    CMAKE_CACHE_ARGS 
    -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
    -DBUILD_SHARED_LIBS:BOOL=ON
    -DBUILD_CLIENT:BOOL=OFF
    -DBUILD_TEST:BOOL=OFF
    -DOPENCL_INCLUDE_DIRS:STRING=${CMAKE_CURRENT_SOURCE_DIR}/EasyCL/thirdparty/clew/include;${CMAKE_CURRENT_SOURCE_DIR}/EasyCL/thirdparty/clew/include/proxy-opencl
	-DOPENCL_LIBRARIES:STRING=${CLBLAS_CLEW_LIB}
    -DBUILD_KTEST:BOOL=OFF
    -DSUFFIX_LIB:STRING=
    -DCORR_TEST_WITH_ACML:BOOL=OFF
    -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
    )

#ExternalProject_Get_Property(clBLAS-external install_dir)
ADD_LIBRARY(clBLAS SHARED IMPORTED)
SET_PROPERTY(TARGET clBLAS PROPERTY IMPORTED_LOCATION "${CMAKE_INSTALL_PREFIX}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}clBLAS${CMAKE_SHARED_LIBRARY_SUFFIX}")
SET_PROPERTY(TARGET clBLAS PROPERTY IMPORTED_IMPLIB "${CMAKE_INSTALL_PREFIX}/lib/import/clBLAS.lib")
#SET_TARGET_PROPERTIES(clBLAS PROPERTIES IMPORTED_LOCATION ${clBLAS_location})
ADD_DEPENDENCIES(clBLAS clBLAS-external)
SET(CLBLAS_INCLUDE_DIRS ${CMAKE_INSTALL_PREFIX}/include)
SET(CLBLAS_LIBRARIES ${CMAKE_INSTALL_PREFIX}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}clBLAS${CMAKE_SHARED_LIBRARY_SUFFIX})
SET(CLBLAS_FOUND ON)

#add_custom_target(clblas_delete_stamp clBLAS-external EasyCL-external
#  ${CMAKE_COMMAND} -E  remove_directory "${CMAKE_BINARY_DIR}/clBLAS/stamp"
#)

#add_dependencies(clBLAS-external EasyCL-external)
#add_dependencies(clBLAS-external EasyCL)
#add_dependencies(clBLAS EasyCL)

{'fraction_non_alphanumeric': 0.10249237029501526, 'fraction_numerical': 0.001017293997965412, 'mean_word_length': 9.033163265306122, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3373388', 'n_tokens_mistral': 1652, 'n_tokens_neox': 1549, 'n_words': 142}