<commit_before># Copyright (c) ICG. All rights reserved.
#
# Institute for Computer Graphics and Vision
# Graz University of Technology / Austria
#
#
# This software is distributed WITHOUT ANY WARRANTY; without even
# the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE.  See the above copyright notices for more information.
#
#
# Project     : ImageUtilities
# Module      : CMakeFile
# Language    : CMake
# Description : CMakeFile
#
# Author     : <NAME>
# EMail      : <EMAIL>

project(imageutilities_lib CXX C)
#set(CMAKE_BUILD_TYPE Debug)
cmake_minimum_required(VERSION 2.8.0)

# cleanup
set(${IU_PUBLIC_HEADERS} "")

# general settings
set( CMAKE_DEBUG_POSTFIX "d" )

FILE(TO_CMAKE_PATH "$ENV{CMAKE_MODULE_PATH}" OT_CMAKE_MODULE_PATH)
FILE(TO_CMAKE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../cmake" OT_IU_CMAKE_MODULE_PATH)
SET(CMAKE_MODULE_PATH ${OT_CMAKE_MODULE_PATH} ${OT_IU_CMAKE_MODULE_PATH})

##-----------------------------------------------------------------------------
## Current version number:
##-----------------------------------------------------------------------------
set(IMAGEUTILITIES_VERSION "1.3.0")

string(REGEX MATCHALL "[0-9]" IMAGEUTILITIES_VERSION_PARTS "${IMAGEUTILITIES_VERSION}")

list(GET IMAGEUTILITIES_VERSION_PARTS 0 IMAGEUTILITIES_VERSION_MAJOR)
list(GET IMAGEUTILITIES_VERSION_PARTS 1 IMAGEUTILITIES_VERSION_MINOR)
list(GET IMAGEUTILITIES_VERSION_PARTS 2 IMAGEUTILITIES_VERSION_PATCH)
set(IMAGEUTILITIES_SOVERSION "${IMAGEUTILITIES_VERSION_MAJOR}.${IMAGEUTILITIES_VERSION_MINOR}")

if(WIN32)
    # Postfix of DLLs:
    set(IMAGEUTILITIES_DLLVERSION "${IMAGEUTILITIES_VERSION_MAJOR}${IMAGEUTILITIES_VERSION_MINOR}${IMAGEUTILITIES_VERSION_PATCH}")
    set(IMAGEUTILITIES_DEBUG_POSTFIX d)
else()
    # Postfix of so's:
    #set(IMAGEUTILITIES_DLLVERSION "${IMAGEUTILITIES_VERSION_MAJOR}${IMAGEUTILITIES_VERSION_MINOR}${IMAGEUTILITIES_VERSION_PATCH}")
    set(IMAGEUTILITIES_DLLVERSION "")
    set(IMAGEUTILITIES_DEBUG_POSTFIX)
endif()

##-----------------------------------------------------------------------------
## Flags if modules are used.
## The modules are included per default unless dependencies not found or omitted by the user.
## (the core module is always included!)
OPTION(VMLIBRARIES_IU_USE_SPARSE "Including Sparse Matrix module." ON)
OPTION(VMLIBRARIES_IU_USE_IPP "Including IPP module." ON)
OPTION(VMLIBRARIES_IU_USE_MATLAB "Including Matlab module." ON)
OPTION(VMLIBRARIES_IU_USE_GUI "Including GUI module." ON)
OPTION(VMLIBRARIES_IU_USE_IO "Including IO module." ON)
OPTION(VMLIBRARIES_IU_USE_IOPGM "Including IOPGM module." ON)
OPTION(VMLIBRARIES_IU_USE_VIDEOCAPTURE "Including VideCapture IO module." OFF)
OPTION(VMLIBRARIES_IU_USE_PGRCAMERA "Including PointGray IO module." OFF)
OPTION(VMLIBRARIES_IU_BUILD_COMBINED_LIBRARY "Building a complete library package. This is just for compatibility reasons." OFF)


##-----------------------------------------------------------------------------
## Compiler Flags
if(UNIX)
  # enable all warnings
  add_definitions(-Wall)
  # and debug flags
  add_definitions(-g)

  add_definitions(-fPIC)
endif()

IF(WIN32)
  ADD_DEFINITIONS(-DWIN32)
  # for msvc 8 deprecated warning removal
  ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE)
  ADD_DEFINITIONS(-D_CRT_NONSTDC_NO_DEPRECATE)
  ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE_GLOBALS)

  SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB:LIBCMT.lib")
endif(WIN32)

##-----------------------------------------------------------------------------
# CUDA + SDK
find_package(CUDA 3.1 REQUIRED)
find_package(CUDASDK REQUIRED)
cuda_include_directories(${CUDA_INCLUDE_DIRS} ${CUDA_CUT_INCLUDE_DIR})
include_directories(${CUDA_INCLUDE_DIRS} ${CUDA_CUT_INCLUDE_DIR})
set(IU_IUCORE_LIB_DEPENDENCIES ${IU_IUCORE_LIB_DEPENDENCIES} ${CUDA_LIBRARIES})

message(STATUS "IU: using SM 12")
set(CUDA_NVCC_FLAGS -arch=sm_12)

#message(STATUS "IU: using SM 20")
#set(CUDA_NVCC_FLAGS -arch=sm_20)

# Checking cuda version
# set defines due to some missing functions in cuda 3.1
if(CUDA_VERSION_STRING STREQUAL "3.1")
  # using CUDA 3.1
  message(STATUS "IU: using CUDA 3.1")
  add_definitions(-DCUDA_VERSION_31)
elseif(CUDA_VERSION_STRING STREQUAL "3.2")
  # using CUDA 3.2
  message(STATUS "IU: using CUDA 3.2")
  add_definitions(-DCUDA_VERSION_32)<commit_msg>set compute sm flag in cmake to 1.1<commit_after># Copyright (c) ICG. All rights reserved.
#
# Institute for Computer Graphics and Vision
# Graz University of Technology / Austria
#
#
# This software is distributed WITHOUT ANY WARRANTY; without even
# the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE.  See the above copyright notices for more information.
#
#
# Project     : ImageUtilities
# Module      : CMakeFile
# Language    : CMake
# Description : CMakeFile
#
# Author     : <NAME>
# EMail      : <EMAIL>

project(imageutilities_lib CXX C)
#set(CMAKE_BUILD_TYPE Debug)
cmake_minimum_required(VERSION 2.8.0)

# cleanup
set(${IU_PUBLIC_HEADERS} "")

# general settings
set( CMAKE_DEBUG_POSTFIX "d" )

FILE(TO_CMAKE_PATH "$ENV{CMAKE_MODULE_PATH}" OT_CMAKE_MODULE_PATH)
FILE(TO_CMAKE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../cmake" OT_IU_CMAKE_MODULE_PATH)
SET(CMAKE_MODULE_PATH ${OT_CMAKE_MODULE_PATH} ${OT_IU_CMAKE_MODULE_PATH})

##-----------------------------------------------------------------------------
## Current version number:
##-----------------------------------------------------------------------------
set(IMAGEUTILITIES_VERSION "1.3.0")

string(REGEX MATCHALL "[0-9]" IMAGEUTILITIES_VERSION_PARTS "${IMAGEUTILITIES_VERSION}")

list(GET IMAGEUTILITIES_VERSION_PARTS 0 IMAGEUTILITIES_VERSION_MAJOR)
list(GET IMAGEUTILITIES_VERSION_PARTS 1 IMAGEUTILITIES_VERSION_MINOR)
list(GET IMAGEUTILITIES_VERSION_PARTS 2 IMAGEUTILITIES_VERSION_PATCH)
set(IMAGEUTILITIES_SOVERSION "${IMAGEUTILITIES_VERSION_MAJOR}.${IMAGEUTILITIES_VERSION_MINOR}")

if(WIN32)
    # Postfix of DLLs:
    set(IMAGEUTILITIES_DLLVERSION "${IMAGEUTILITIES_VERSION_MAJOR}${IMAGEUTILITIES_VERSION_MINOR}${IMAGEUTILITIES_VERSION_PATCH}")
    set(IMAGEUTILITIES_DEBUG_POSTFIX d)
else()
    # Postfix of so's:
    #set(IMAGEUTILITIES_DLLVERSION "${IMAGEUTILITIES_VERSION_MAJOR}${IMAGEUTILITIES_VERSION_MINOR}${IMAGEUTILITIES_VERSION_PATCH}")
    set(IMAGEUTILITIES_DLLVERSION "")
    set(IMAGEUTILITIES_DEBUG_POSTFIX)
endif()

##-----------------------------------------------------------------------------
## Flags if modules are used.
## The modules are included per default unless dependencies not found or omitted by the user.
## (the core module is always included!)
OPTION(VMLIBRARIES_IU_USE_SPARSE "Including Sparse Matrix module." ON)
OPTION(VMLIBRARIES_IU_USE_IPP "Including IPP module." ON)
OPTION(VMLIBRARIES_IU_USE_MATLAB "Including Matlab module." ON)
OPTION(VMLIBRARIES_IU_USE_GUI "Including GUI module." ON)
OPTION(VMLIBRARIES_IU_USE_IO "Including IO module." ON)
OPTION(VMLIBRARIES_IU_USE_IOPGM "Including IOPGM module." ON)
OPTION(VMLIBRARIES_IU_USE_VIDEOCAPTURE "Including VideCapture IO module." OFF)
OPTION(VMLIBRARIES_IU_USE_PGRCAMERA "Including PointGray IO module." OFF)
OPTION(VMLIBRARIES_IU_BUILD_COMBINED_LIBRARY "Building a complete library package. This is just for compatibility reasons." OFF)


##-----------------------------------------------------------------------------
## Compiler Flags
if(UNIX)
  # enable all warnings
  add_definitions(-Wall)
  # and debug flags
  add_definitions(-g)

  add_definitions(-fPIC)
endif()

IF(WIN32)
  ADD_DEFINITIONS(-DWIN32)
  # for msvc 8 deprecated warning removal
  ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE)
  ADD_DEFINITIONS(-D_CRT_NONSTDC_NO_DEPRECATE)
  ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE_GLOBALS)

  SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB:LIBCMT.lib")
endif(WIN32)

##-----------------------------------------------------------------------------
# CUDA + SDK
find_package(CUDA 3.1 REQUIRED)
find_package(CUDASDK REQUIRED)
cuda_include_directories(${CUDA_INCLUDE_DIRS} ${CUDA_CUT_INCLUDE_DIR})
include_directories(${CUDA_INCLUDE_DIRS} ${CUDA_CUT_INCLUDE_DIR})
set(IU_IUCORE_LIB_DEPENDENCIES ${IU_IUCORE_LIB_DEPENDENCIES} ${CUDA_LIBRARIES})

message(STATUS "IU: using SM 11")
set(CUDA_NVCC_FLAGS -arch=sm_11)

#message(STATUS "IU: using SM 20")
#set(CUDA_NVCC_FLAGS -arch=sm_20)

# Checking cuda version
# set defines due to some missing functions in cuda 3.1
if(CUDA_VERSION_STRING STREQUAL "3.1")
  # using CUDA 3.1
  message(STATUS "IU: using CUDA 3.1")
  add_definitions(-DCUDA_VERSION_31)
elseif(CUDA_VERSION_STRING STREQUAL "3.2")
  # using CUDA 3.2
  message(STATUS "IU: using CUDA 3.2")
  add_definitions(-DCUDA_VERSION_32)
{'fraction_non_alphanumeric': 0.17341772151898735, 'fraction_numerical': 0.011277330264672036, 'mean_word_length': 3.9073969508752118, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '648450', 'n_tokens_mistral': 3194, 'n_tokens_neox': 3005, 'n_words': 600}