<commit_before>cmake_minimum_required(VERSION 2.8.4)

# Project configuration

project(GE)

set(GE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src)
set(GE_VERSION_MAJOR 0)
set(GE_VERSION_MINOR 0)

# Windows configuration

if(MSVC)

#	 Library directory

	if(CMAKE_SIZEOF_VOID_P EQUAL 4)
		set(GE_WIN_LIBRARIES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/x86)
	else(CMAKE_SIZEOF_VOID_P EQUAL 4)
		set(GE_WIN_LIBRARIES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/x64)
	endif(CMAKE_SIZEOF_VOID_P EQUAL 4)

#	SDL2
	
	set(SDL2_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include/sdl2)
	set(SDL2_LIBRARIES ${GE_WIN_LIBRARIES_DIR}/SDL2.lib)

#	GL
	find_package(OPENGL REQUIRED)
	if(NOT OPENGL_FOUND)
		message(ERROR " OPENGL not found!")
	endif(NOT OPENGL_FOUND)

#	GLEW

	set(GLEW_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include/glew)
	set(GLEW_LIBRARIES ${GE_WIN_LIBRARIES_DIR}/glew32.lib)

endif(MSVC)

# Cygwin configuration

if(CYGWIN)

#	Library directory

	if(CMAKE_SIZEOF_VOID_P EQUAL 4)
		set(GE_WIN_LIBRARIES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/i686)
	else(CMAKE_SIZEOF_VOID_P EQUAL 4)
		set(GE_WIN_LIBRARIES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/x86_64)
	endif(CMAKE_SIZEOF_VOID_P EQUAL 4)

#	SDL2

	set(SDL2_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include/sdl2)
	set(SDL2_LIBRARIES ${GE_WIN_LIBRARIES_DIR}/libSDL2.dll.a)

#	GL
	set(OPENGL_LIBRARIES /lib/w32api/libopengl32.a)

#	GLEW

	set(GLEW_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include/glew)
	set(GLEW_LIBRARIES ${GE_WIN_LIBRARIES_DIR}/libglew32.dll.a)
	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mwin32")

endif(CYGWIN)

# MinGW configuration

if(MINGW)
	
#	Library directory

	if(CMAKE_SIZEOF_VOID_P EQUAL 4)
		set(GE_WIN_LIBRARIES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/i686)
	else(CMAKE_SIZEOF_VOID_P EQUAL 4)
		set(GE_WIN_LIBRARIES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/x86_64)
	endif(CMAKE_SIZEOF_VOID_P EQUAL 4)

	message(${GE_WIN_LIBRARIES_DIR})
	
#	SDL2

	set(SDL2_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include/sdl2)
	set(SDL2_LIBRARIES ${GE_WIN_LIBRARIES_DIR}/libSDL2.dll.a)

#	GL
	set(OPENGL_LIBRARIES /MinGW/lib/libopengl32.a)

#	GLEW

	set(GLEW_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include/glew)
	set(GLEW_LIBRARIES ${GE_WIN_LIBRARIES_DIR}/libglew32.dll.a)
	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mwin32")
	
endif(MINGW)

# Linux configuration

if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")

#	SDL2

	set(SDL2_SEARCH_PATHS
		/usr/local
		/usr
	)
	
	find_path(SDL2_INCLUDE_DIR SDL.h
		PATH_SUFFIXES include/SDL2 include
		PATHS ${SDL2_SEARCH_PATHS}
	)
	
	find_library(SDL2_LIBRARIES_TEMP
		NAMES SDL2
		PATH_SUFFIXES lib64 lib
		PATHS ${SDL2_SEARCH_PATHS}
	)
	
	set(SDL2_LIBRARIES ${SDL2_LIBRARIES_TEMP})

#	GL

	find_package(OpenGL REQUIRED)
	if(NOT OPENGL_FOUND)
		message(ERROR " OPENGL not found!")
	endif(NOT OPENGL_FOUND)
	
#	GLEW
	
	find_package(GLEW REQUIRED)
	if(NOT GLEW_FOUND)
		message(ERROR " GLEW not found!")
	endif(NOT GLEW_FOUND)
	set(GLEW_INCLUDE_DIR ${GLEW_INCLUDE_DIRS}/GL)

endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")

# Target configuration

add_executable(GE ${GE_SOURCE_DIR}/main.cpp)
set_target_properties(GE PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/bin")

# Source configuration

configure_file("${GE_SOURCE_DIR}/config.h.in" "${GE_SOURCE_DIR}/config.h")
<commit_msg>Added OSX support to the CMake<commit_after>cmake_minimum_required(VERSION 2.8.4)

# Project configuration

project(GE)

set(GE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src)
set(GE_VERSION_MAJOR 0)
set(GE_VERSION_MINOR 0)

# Windows configuration

if(MSVC)

#	 Library directory

	if(CMAKE_SIZEOF_VOID_P EQUAL 4)
		set(GE_WIN_LIBRARIES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/x86)
	else(CMAKE_SIZEOF_VOID_P EQUAL 4)
		set(GE_WIN_LIBRARIES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/x64)
	endif(CMAKE_SIZEOF_VOID_P EQUAL 4)

#	SDL2
	
	set(SDL2_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include/sdl2)
	set(SDL2_LIBRARIES ${GE_WIN_LIBRARIES_DIR}/SDL2.lib)

#	GL
	find_package(OPENGL REQUIRED)
	if(NOT OPENGL_FOUND)
		message(ERROR " OPENGL not found!")
	endif(NOT OPENGL_FOUND)

#	GLEW

	set(GLEW_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include/glew)
	set(GLEW_LIBRARIES ${GE_WIN_LIBRARIES_DIR}/glew32.lib)

endif(MSVC)

# Cygwin configuration

if(CYGWIN)

#	Library directory

	if(CMAKE_SIZEOF_VOID_P EQUAL 4)
		set(GE_WIN_LIBRARIES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/i686)
	else(CMAKE_SIZEOF_VOID_P EQUAL 4)
		set(GE_WIN_LIBRARIES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/x86_64)
	endif(CMAKE_SIZEOF_VOID_P EQUAL 4)

#	SDL2

	set(SDL2_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include/sdl2)
	set(SDL2_LIBRARIES ${GE_WIN_LIBRARIES_DIR}/libSDL2.dll.a)

#	GL
	set(OPENGL_LIBRARIES /lib/w32api/libopengl32.a)

#	GLEW

	set(GLEW_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include/glew)
	set(GLEW_LIBRARIES ${GE_WIN_LIBRARIES_DIR}/libglew32.dll.a)
	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mwin32")

endif(CYGWIN)

# MinGW configuration

if(MINGW)
	
#	Library directory

	if(CMAKE_SIZEOF_VOID_P EQUAL 4)
		set(GE_WIN_LIBRARIES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/i686)
	else(CMAKE_SIZEOF_VOID_P EQUAL 4)
		set(GE_WIN_LIBRARIES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/x86_64)
	endif(CMAKE_SIZEOF_VOID_P EQUAL 4)

	message(${GE_WIN_LIBRARIES_DIR})
	
#	SDL2

	set(SDL2_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include/sdl2)
	set(SDL2_LIBRARIES ${GE_WIN_LIBRARIES_DIR}/libSDL2.dll.a)

#	GL
	set(OPENGL_LIBRARIES /MinGW/lib/libopengl32.a)

#	GLEW

	set(GLEW_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include/glew)
	set(GLEW_LIBRARIES ${GE_WIN_LIBRARIES_DIR}/libglew32.dll.a)
	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mwin32")
	
endif(MINGW)

# Linux configuration

if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")

#	SDL2

	set(SDL2_SEARCH_PATHS
		/usr/local
		/usr
	)
	
	find_path(SDL2_INCLUDE_DIR SDL.h
		PATH_SUFFIXES include/SDL2 include
		PATHS ${SDL2_SEARCH_PATHS}
	)
	
	find_library(SDL2_LIBRARIES_TEMP
		NAMES SDL2
		PATH_SUFFIXES lib64 lib
		PATHS ${SDL2_SEARCH_PATHS}
	)
	
	set(SDL2_LIBRARIES ${SDL2_LIBRARIES_TEMP})

#	GL

	find_package(OpenGL REQUIRED)
	if(NOT OPENGL_FOUND)
		message(ERROR " OPENGL not found!")
	endif(NOT OPENGL_FOUND)
	
#	GLEW
	
	find_package(GLEW REQUIRED)
	if(NOT GLEW_FOUND)
		message(ERROR " GLEW not found!")
	endif(NOT GLEW_FOUND)
	set(GLEW_INCLUDE_DIR ${GLEW_INCLUDE_DIRS}/GL)

endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")

# OSX configuration

if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")

#	SDL2

	set(SDL2_SEARCH_PATHS
		/usr/local
		/usr
		/Library/Frameworks
	)
	
	find_path(SDL2_INCLUDE_DIR SDL.h
		PATH_SUFFIXES include/SDL2 include
		PATHS ${SDL2_SEARCH_PATHS}
	)
	
	find_library(SDL2_LIBRARIES_TEMP
		NAMES SDL2
		PATH_SUFFIXES lib64 lib
		PATHS ${SDL2_SEARCH_PATHS}
	)
	
	set(SDL2_LIBRARIES ${SDL2_LIBRARIES_TEMP})

#	GL

	find_package(OpenGL REQUIRED)
	if(NOT OPENGL_FOUND)
		message(ERROR " OPENGL not found!")
	endif(NOT OPENGL_FOUND)
	
#	GLEW
	
	find_package(GLEW REQUIRED)
	if(NOT GLEW_FOUND)
		message(ERROR " GLEW not found!")
	endif(NOT GLEW_FOUND)
	set(GLEW_INCLUDE_DIR ${GLEW_INCLUDE_DIRS}/GL)

endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")

# Target configuration

add_executable(GE ${GE_SOURCE_DIR}/main.cpp)
set_target_properties(GE PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/bin")

# Source configuration

configure_file("${GE_SOURCE_DIR}/config.h.in" "${GE_SOURCE_DIR}/config.h")

{'fraction_non_alphanumeric': 0.10345301967258219, 'fraction_numerical': 0.022286421791167972, 'mean_word_length': 6.557172557172557, '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': '6472238', 'n_tokens_mistral': 3671, 'n_tokens_neox': 3181, 'n_words': 433}