<commit_before>
###########################################################################
# GLUT

if(WITH_CYCLES_TEST)
	set(GLUT_ROOT_PATH ${CYCLES_GLUT})

	find_package(GLUT)
	message(STATUS "GLUT_FOUND=${GLUT_FOUND}")

	include_directories(${GLUT_INCLUDE_DIR})
endif()

if(WITH_BUILTIN_GLEW)
	set(CYCLES_GLEW_LIBRARY extern_glew)
else()
	set(CYCLES_GLEW_LIBRARY ${GLEW_LIBRARY})
endif()

###########################################################################
# OpenShadingLanguage

if(WITH_CYCLES_OSL)

	set(CYCLES_OSL "" CACHE PATH "Path to OpenShadingLanguage installation")

	message(STATUS "CYCLES_OSL = ${CYCLES_OSL}")

	find_library(OSL_LIBRARIES NAMES oslexec oslcomp oslquery PATHS ${CYCLES_OSL}/lib ${CYCLES_OSL}/dist)
	find_path(OSL_INCLUDES OSL/oslclosure.h PATHS ${CYCLES_OSL}/include ${CYCLES_OSL}/dist)
	find_program(OSL_COMPILER NAMES oslc PATHS ${CYCLES_OSL}/bin ${CYCLES_OSL}/dist)

	if(OSL_INCLUDES AND OSL_LIBRARIES AND OSL_COMPILER)
		set(OSL_FOUND TRUE)
		message(STATUS "OSL includes = ${OSL_INCLUDES}")
		message(STATUS "OSL library = ${OSL_LIBRARIES}")
		message(STATUS "OSL compiler = ${OSL_COMPILER}")
	else()
		message(STATUS "OSL not found")
	endif()

	include_directories(${OSL_INCLUDES} ${OSL_INCLUDES}/OSL ${OSL_INCLUDES}/../../../src/liboslexec)

endif()

###########################################################################
# Partio

if(WITH_CYCLES_PARTIO)

	set(CYCLES_PARTIO "" CACHE PATH "Path to Partio installation")

	message(STATUS "CYCLES_PARTIO = ${CYCLES_PARTIO}")

	find_library(PARTIO_LIBRARIES NAMES partio PATHS ${CYCLES_PARTIO}/lib)
	find_path(PARTIO_INCLUDES Partio.h ${CYCLES_PARTIO}/include)

	find_package(ZLIB)

	if(PARTIO_INCLUDES AND PARTIO_LIBRARIES AND ZLIB_LIBRARIES)
		list(APPEND PARTIO_LIBRARIES ${ZLIB_LIBRARIES})
		set(PARTIO_FOUND TRUE)
		message(STATUS "PARTIO includes = ${PARTIO_INCLUDES}")
		message(STATUS "PARTIO library = ${PARTIO_LIBRARIES}")
	else()
		message(STATUS "PARTIO not found")
	endif()

	include_directories(${PARTIO_INCLUDES})

endif()

###########################################################################
# Blender

if(WITH_CYCLES_BLENDER)

	set(BLENDER_INCLUDE_DIRS
		${CMAKE_SOURCE_DIR}/intern/guardedalloc
		${CMAKE_SOURCE_DIR}/source/blender/makesdna
		${CMAKE_SOURCE_DIR}/source/blender/makesrna
		${CMAKE_SOURCE_DIR}/source/blender/blenloader
		${CMAKE_BINARY_DIR}/source/blender/makesrna/intern)

	ADD_DEFINITIONS(-DBLENDER_PLUGIN)
endif()

###########################################################################
# CUDA

if(WITH_CYCLES_CUDA)
	if(WIN32)
		set(CYCLES_CUDA "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v4.0" CACHE PATH "Path to CUDA installation")
	else()
		set(CYCLES_CUDA "/usr/local/cuda" CACHE PATH "Path to CUDA installation")
	endif()
	set(CYCLES_CUDA_ARCH sm_10 sm_11 sm_12 sm_13 sm_20 sm_21 CACHE STRING "CUDA architectures to build for")
	set(CYCLES_CUDA_MAXREG 24 CACHE STRING "CUDA maximum number of register to use")

	find_program(CUDA_NVCC NAMES nvcc PATHS ${CYCLES_CUDA}/bin NO_DEFAULT_PATH)

	if(CUDA_NVCC)
		message(STATUS "CUDA nvcc = ${CUDA_NVCC}")
	else()
		message(STATUS "CUDA compiler not found")
	endif()

endif()
<commit_msg>Cycles: * Auto detection of CUDA toolkit, using FIND_PACKAGE(CUDA). (Requires at least CMAKE 2.8) <commit_after>
###########################################################################
# GLUT

if(WITH_CYCLES_TEST)
	set(GLUT_ROOT_PATH ${CYCLES_GLUT})

	find_package(GLUT)
	message(STATUS "GLUT_FOUND=${GLUT_FOUND}")

	include_directories(${GLUT_INCLUDE_DIR})
endif()

if(WITH_BUILTIN_GLEW)
	set(CYCLES_GLEW_LIBRARY extern_glew)
else()
	set(CYCLES_GLEW_LIBRARY ${GLEW_LIBRARY})
endif()

###########################################################################
# OpenShadingLanguage

if(WITH_CYCLES_OSL)

	set(CYCLES_OSL "" CACHE PATH "Path to OpenShadingLanguage installation")

	message(STATUS "CYCLES_OSL = ${CYCLES_OSL}")

	find_library(OSL_LIBRARIES NAMES oslexec oslcomp oslquery PATHS ${CYCLES_OSL}/lib ${CYCLES_OSL}/dist)
	find_path(OSL_INCLUDES OSL/oslclosure.h PATHS ${CYCLES_OSL}/include ${CYCLES_OSL}/dist)
	find_program(OSL_COMPILER NAMES oslc PATHS ${CYCLES_OSL}/bin ${CYCLES_OSL}/dist)

	if(OSL_INCLUDES AND OSL_LIBRARIES AND OSL_COMPILER)
		set(OSL_FOUND TRUE)
		message(STATUS "OSL includes = ${OSL_INCLUDES}")
		message(STATUS "OSL library = ${OSL_LIBRARIES}")
		message(STATUS "OSL compiler = ${OSL_COMPILER}")
	else()
		message(STATUS "OSL not found")
	endif()

	include_directories(${OSL_INCLUDES} ${OSL_INCLUDES}/OSL ${OSL_INCLUDES}/../../../src/liboslexec)

endif()

###########################################################################
# Partio

if(WITH_CYCLES_PARTIO)

	set(CYCLES_PARTIO "" CACHE PATH "Path to Partio installation")

	message(STATUS "CYCLES_PARTIO = ${CYCLES_PARTIO}")

	find_library(PARTIO_LIBRARIES NAMES partio PATHS ${CYCLES_PARTIO}/lib)
	find_path(PARTIO_INCLUDES Partio.h ${CYCLES_PARTIO}/include)

	find_package(ZLIB)

	if(PARTIO_INCLUDES AND PARTIO_LIBRARIES AND ZLIB_LIBRARIES)
		list(APPEND PARTIO_LIBRARIES ${ZLIB_LIBRARIES})
		set(PARTIO_FOUND TRUE)
		message(STATUS "PARTIO includes = ${PARTIO_INCLUDES}")
		message(STATUS "PARTIO library = ${PARTIO_LIBRARIES}")
	else()
		message(STATUS "PARTIO not found")
	endif()

	include_directories(${PARTIO_INCLUDES})

endif()

###########################################################################
# Blender

if(WITH_CYCLES_BLENDER)

	set(BLENDER_INCLUDE_DIRS
		${CMAKE_SOURCE_DIR}/intern/guardedalloc
		${CMAKE_SOURCE_DIR}/source/blender/makesdna
		${CMAKE_SOURCE_DIR}/source/blender/makesrna
		${CMAKE_SOURCE_DIR}/source/blender/blenloader
		${CMAKE_BINARY_DIR}/source/blender/makesrna/intern)

	ADD_DEFINITIONS(-DBLENDER_PLUGIN)
endif()

###########################################################################
# CUDA

if(WITH_CYCLES_CUDA)
	FIND_PACKAGE(CUDA) # Try to auto locate CUDA toolkit
	if(CUDA_FOUND)
		set(CYCLES_CUDA ${CUDA_TOOLKIT_ROOT_DIR} CACHE PATH "Path to CUDA installation")
	else()
		if(WIN32)
			set(CYCLES_CUDA "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v4.0" CACHE PATH "Path to CUDA installation")
		else()
			set(CYCLES_CUDA "/usr/local/cuda" CACHE PATH "Path to CUDA installation")
		endif()
	endif()
	set(CYCLES_CUDA_ARCH sm_10 sm_11 sm_12 sm_13 sm_20 sm_21 CACHE STRING "CUDA architectures to build for")
	set(CYCLES_CUDA_MAXREG 24 CACHE STRING "CUDA maximum number of register to use")

	find_program(CUDA_NVCC NAMES nvcc PATHS ${CYCLES_CUDA}/bin NO_DEFAULT_PATH)

	if(CUDA_NVCC)
		message(STATUS "CUDA nvcc = ${CUDA_NVCC}")
	else()
		message(STATUS "CUDA compiler not found")
	endif()

endif()

{'fraction_non_alphanumeric': 0.21521084337349397, 'fraction_numerical': 0.00572289156626506, 'mean_word_length': 7.353459119496855, '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': '6782227', 'n_tokens_mistral': 2709, 'n_tokens_neox': 2450, 'n_words': 437}