<commit_before>cmake_minimum_required (VERSION 2.8)
PROJECT( CLOTHO CXX )

SET (${PROJECT_NAME}_LIB_CORENAME "clotho")

set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")

SET (${PROJECT_NAME}_VER_MAJ 0)
SET (${PROJECT_NAME}_VER_MIN 1)
SET (${PROJECT_NAME}_VER_RELEASE 0 )

SET (${PROJECT_NAME}_RESOURCES_DIR ${${PROJECT_NAME}_SOURCE_DIR}/cmake)
SET (${PROJECT_NAME}_SRC_DIR       ${${PROJECT_NAME}_SOURCE_DIR}/src)
SET( ${PROJECT_NAME}_INCLUDE_DIR   ${${PROJECT_NAME}_SOURCE_DIR}/include )
SET( ${PROJECT_NAME}_UNITTEST_DIR   ${${PROJECT_NAME}_SOURCE_DIR}/unittest )

SET (CMAKE_INSTALL_PREFIX "./clotho" CACHE PATH "Install path prefix, prepended onto install directories")

IF (NOT ${PROJECT_NAME}_INSTALL_BIN_DIR )
    SET (${PROJECT_NAME}_INSTALL_BIN_DIR bin )
ENDIF (NOT ${PROJECT_NAME}_INSTALL_BIN_DIR )

IF (NOT ${PROJECT_NAME}_INSTALL_LIB_DIR )
    SET (${PROJECT_NAME}_INSTALL_LIB_DIR lib )
ENDIF (NOT ${PROJECT_NAME}_INSTALL_LIB_DIR )

IF (NOT ${PROJECT_NAME}_INSTALL_INCLUDE_DIR )
    SET(${PROJECT_NAME}_INSTALL_INCLUDE_DIR include)
ENDIF (NOT ${PROJECT_NAME}_INSTALL_INCLUDE_DIR )

################################################################################
SET ( ${PROJECT_NAME}_PACKAGE "clotho" )
SET ( ${PROJECT_NAME}_PACKAGE_NAME "${PROJECT_NAME}" )
SET (${PROJECT_NAME}_PACKAGE_VERSION "${${PROJECT_NAME}_VER_MAJ}.${${PROJECT_NAME}_VER_MIN}.${${PROJECT_NAME}_VER_RELEASE}")
SET (${PROJECT_NAME}_PACKAGE_VER_MAJOR "${${PROJECT_NAME}_VER_MAJ}.${${PROJECT_NAME}_VER_MIN}")
SET (${PROJECT_NAME}_PACKAGE_VER_MINOR "${${PROJECT_NAME}_VER_RELEASE}")
SET (${PROJECT_NAME}_PACKAGE_STRING "${${PROJECT_NAME}_PACKAGE_NAME} ${${PROJECT_NAME}_PACKAGE_VERSION}")
SET (${PROJECT_NAME}_PACKAGE_BUGREPORT "<EMAIL>")

MESSAGE( STATUS ${${PROJECT_NAME}_PACKAGE_STRING} )

IF (NOT ${PROJECT_NAME}_EXTERNALLY_CONFIGURED )
    SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY 
        ${PROJECT_BINARY_DIR}/bin CACHE PATH "Executable directory")
    SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY
        ${PROJECT_BINARY_DIR}/lib CACHE PATH "Libraries directory")
    SET( CMAKE_ARCHIVE_OUTPUT_DIRECTORY
        ${PROJECT_BINARY_DIR}/lib CACHE PATH "Static Libraries directory")
ELSE (NOT ${PROJECT_NAME}_EXTERNALLY_CONFIGURED )
    IF (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY )
        SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH} )
    ENDIF (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY )
ENDIF (NOT ${PROJECT_NAME}_EXTERNALLY_CONFIGURED )

################################################################################
FIND_PACKAGE( Boost COMPONENTS program_options filesystem system thread unit_test_framework chrono REQUIRED )
IF( Boost_FOUND )
    INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIR} )
    MESSAGE (STATUS "Boost Include: " ${Boost_INCLUDE_DIR} )
    MESSAGE (STATUS "Boost Library: " ${Boost_LIBRARIES} )
ENDIF( Boost_FOUND )
LIST( APPEND COMMON_LIBRARIES ${Boost_LIBRARIES} )

FIND_PACKAGE( GSL )
IF( GSL_FOUND )
    MESSAGE( STATUS "GSL Library: " ${GSL_LIBRARIES} )
ENDIF( GSL_FOUND )
LIST( APPEND COMMON_LIBRARIES ${GSL_LIBRARIES} )

FIND_PACKAGE( CUDA REQUIRED )
MESSAGE( STATUS "CXX: " ${CMAKE_CXX_COMPILER})
SET(CUDA_HOST_COMPILER ${CMAKE_CXX_COMPILER})
SET(CUDA_SEPARABLE_COMPILATION ON )
SET(CUDA_PROPAGATE_HOST_FLAGS OFF)
#SET(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};-gencode arch=compute_20,code=sm_20")


SET( Gperftools_DIR "/opt/gperftools/latest" )
find_library( TCMALLOC_LIBRARY NAMES tcmalloc PATHS ${Gperftools_DIR}/lib )
find_library( PROFILER_LIBRARY NAMES profiler PATHS ${Gperftools_DIR}/lib )

MESSAGE( STATUS "TCMALLOC: " ${TCMALLOC_LIBRARY})
LIST( APPEND COMMON_LIBRARIES ${TCMALLOC_LIBRARY} )
MESSAGE( STATUS "PROFILER: " ${PROFILER_LIBRARY})
LIST( APPEND COMMON_LIBRARIES ${PROFILER_LIBRARY} )

find_library( REALTIME_LIB NAMES rt )
LIST( APPEND COMMON_LIBRARIES ${REALTIME_LIB} )

find_library( PTHREAD_LIB NAMES pthread )
LIST( APPEND COMMON_LIBRARIES ${PTHREAD_LIB})

FOREACH( L ${COMMON_LIBRARIES} ) 
    MESSAGE( STATUS ${L} )
ENDFOREACH(L)

<commit_msg>Hardcoded g++ as compiler for CUDA code.  Clang++ was not working with c++0x<commit_after>cmake_minimum_required (VERSION 2.8)
PROJECT( CLOTHO CXX )

SET (${PROJECT_NAME}_LIB_CORENAME "clotho")

set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")

SET (${PROJECT_NAME}_VER_MAJ 0)
SET (${PROJECT_NAME}_VER_MIN 1)
SET (${PROJECT_NAME}_VER_RELEASE 0 )

SET (${PROJECT_NAME}_RESOURCES_DIR ${${PROJECT_NAME}_SOURCE_DIR}/cmake)
SET (${PROJECT_NAME}_SRC_DIR       ${${PROJECT_NAME}_SOURCE_DIR}/src)
SET( ${PROJECT_NAME}_INCLUDE_DIR   ${${PROJECT_NAME}_SOURCE_DIR}/include )
SET( ${PROJECT_NAME}_UNITTEST_DIR   ${${PROJECT_NAME}_SOURCE_DIR}/unittest )

SET (CMAKE_INSTALL_PREFIX "./clotho" CACHE PATH "Install path prefix, prepended onto install directories")

IF (NOT ${PROJECT_NAME}_INSTALL_BIN_DIR )
    SET (${PROJECT_NAME}_INSTALL_BIN_DIR bin )
ENDIF (NOT ${PROJECT_NAME}_INSTALL_BIN_DIR )

IF (NOT ${PROJECT_NAME}_INSTALL_LIB_DIR )
    SET (${PROJECT_NAME}_INSTALL_LIB_DIR lib )
ENDIF (NOT ${PROJECT_NAME}_INSTALL_LIB_DIR )

IF (NOT ${PROJECT_NAME}_INSTALL_INCLUDE_DIR )
    SET(${PROJECT_NAME}_INSTALL_INCLUDE_DIR include)
ENDIF (NOT ${PROJECT_NAME}_INSTALL_INCLUDE_DIR )

################################################################################
SET ( ${PROJECT_NAME}_PACKAGE "clotho" )
SET ( ${PROJECT_NAME}_PACKAGE_NAME "${PROJECT_NAME}" )
SET (${PROJECT_NAME}_PACKAGE_VERSION "${${PROJECT_NAME}_VER_MAJ}.${${PROJECT_NAME}_VER_MIN}.${${PROJECT_NAME}_VER_RELEASE}")
SET (${PROJECT_NAME}_PACKAGE_VER_MAJOR "${${PROJECT_NAME}_VER_MAJ}.${${PROJECT_NAME}_VER_MIN}")
SET (${PROJECT_NAME}_PACKAGE_VER_MINOR "${${PROJECT_NAME}_VER_RELEASE}")
SET (${PROJECT_NAME}_PACKAGE_STRING "${${PROJECT_NAME}_PACKAGE_NAME} ${${PROJECT_NAME}_PACKAGE_VERSION}")
SET (${PROJECT_NAME}_PACKAGE_BUGREPORT "<EMAIL>")

MESSAGE( STATUS ${${PROJECT_NAME}_PACKAGE_STRING} )

IF (NOT ${PROJECT_NAME}_EXTERNALLY_CONFIGURED )
    SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY 
        ${PROJECT_BINARY_DIR}/bin CACHE PATH "Executable directory")
    SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY
        ${PROJECT_BINARY_DIR}/lib CACHE PATH "Libraries directory")
    SET( CMAKE_ARCHIVE_OUTPUT_DIRECTORY
        ${PROJECT_BINARY_DIR}/lib CACHE PATH "Static Libraries directory")
ELSE (NOT ${PROJECT_NAME}_EXTERNALLY_CONFIGURED )
    IF (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY )
        SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH} )
    ENDIF (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY )
ENDIF (NOT ${PROJECT_NAME}_EXTERNALLY_CONFIGURED )

################################################################################
FIND_PACKAGE( Boost COMPONENTS program_options filesystem system thread unit_test_framework chrono REQUIRED )
IF( Boost_FOUND )
    INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIR} )
    MESSAGE (STATUS "Boost Include: " ${Boost_INCLUDE_DIR} )
    MESSAGE (STATUS "Boost Library: " ${Boost_LIBRARIES} )
ENDIF( Boost_FOUND )
LIST( APPEND COMMON_LIBRARIES ${Boost_LIBRARIES} )

FIND_PACKAGE( GSL )
IF( GSL_FOUND )
    MESSAGE( STATUS "GSL Library: " ${GSL_LIBRARIES} )
ENDIF( GSL_FOUND )
LIST( APPEND COMMON_LIBRARIES ${GSL_LIBRARIES} )

FIND_PACKAGE( CUDA REQUIRED )
MESSAGE( STATUS "CXX: " ${CMAKE_CXX_COMPILER})
SET(CUDA_HOST_COMPILER g++)
SET(CUDA_SEPARABLE_COMPILATION ON )
SET(CUDA_PROPAGATE_HOST_FLAGS OFF)
#SET(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};-gencode arch=compute_20,code=sm_20")

MESSAGE( STATUS "CUDA LIBRARIES: " ${CUDA_LIBRARIES} )
MESSAGE( STATUS "CUDA LIBRARIES: " ${CUDA_curand_LIBRARY} )

SET( Gperftools_DIR "/opt/gperftools/latest" )
find_library( TCMALLOC_LIBRARY NAMES tcmalloc PATHS ${Gperftools_DIR}/lib )
find_library( PROFILER_LIBRARY NAMES profiler PATHS ${Gperftools_DIR}/lib )

MESSAGE( STATUS "TCMALLOC: " ${TCMALLOC_LIBRARY})
LIST( APPEND COMMON_LIBRARIES ${TCMALLOC_LIBRARY} )
MESSAGE( STATUS "PROFILER: " ${PROFILER_LIBRARY})
LIST( APPEND COMMON_LIBRARIES ${PROFILER_LIBRARY} )

find_library( REALTIME_LIB NAMES rt )
LIST( APPEND COMMON_LIBRARIES ${REALTIME_LIB} )

find_library( PTHREAD_LIB NAMES pthread )
LIST( APPEND COMMON_LIBRARIES ${PTHREAD_LIB})

FOREACH( L ${COMMON_LIBRARIES} ) 
    MESSAGE( STATUS ${L} )
ENDFOREACH(L)


{'fraction_non_alphanumeric': 0.1543361097501225, 'fraction_numerical': 0.0023272905438510533, 'mean_word_length': 7.884657236126224, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1917529', 'n_tokens_mistral': 3171, 'n_tokens_neox': 2942, 'n_words': 526}