<commit_before>
cmake_minimum_required(VERSION 2.6)


# Use relative paths in windows
if(WIN32)
  set(CMAKE_USE_RELATIVE_PATHS true)
  set(CMAKE_SUPPRESS_REGENERATION true)
endif()


project(ALPHA)

# build 3rdParty dependencies
add_subdirectory(3rdParty)

# set build target variables
if (WIN32)
    set(ALPHA_BUILD_TARGET_DIR "Win32")
elseif (UNIX)
    set(ALPHA_BUILD_TARGET_DIR "Unix")
endif ()


set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DALPHA_DEBUG")

if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR
    "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
    set(warnings "-Wall -Wextra -Werror")
    if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
        set(ALPHA_CXX_FLAGS "-g -std=c++0x -lX11 -lGL -lGLU")
    else()
        set(ALPHA_CXX_FLAGS "-std=c++0x -lX11 -lGL -lGLU")
    endif()
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
    set(warnings "/W4 /WX /EHsc")
    set(ALPHA_CXX_FLAGS "")
endif()
set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS} ${warnings}")
set(CMAKE_CXX_FLAGS "${ALPHA_CXX_FLAGS} ${CMAKE_CXX_FLAGS} ${warnings}")

# specify output directories
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin")

# set install location to relative directory
set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/sdk" CACHE PATH "ALPHA install prefix")

set(ALPHA_LIBRARIES AlphaEngine lua)

#include_directories(${CMAKE_CURRENT_SOURCE_DIR})

# build Engine
add_subdirectory(AlphaEngine)

# build Demos
add_subdirectory(Demos)
<commit_msg>Fixed clang build system<commit_after>
cmake_minimum_required(VERSION 2.6)


# Use relative paths in windows
if(WIN32)
  set(CMAKE_USE_RELATIVE_PATHS true)
  set(CMAKE_SUPPRESS_REGENERATION true)
endif()


project(ALPHA)

# build 3rdParty dependencies
add_subdirectory(3rdParty)

# set build target variables
if (WIN32)
    set(ALPHA_BUILD_TARGET_DIR "Win32")
elseif (UNIX)
    set(ALPHA_BUILD_TARGET_DIR "Unix")
endif ()


set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DALPHA_DEBUG")

# set compiler specific flags
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
    set(warnings "-Wall -Wextra -Werror")
    if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
        set(ALPHA_CXX_FLAGS "-g -std=c++11 -lX11 -lGL -lGLU")
    else()
        set(ALPHA_CXX_FLAGS "-std=c++11 -lX11 -lGL -lGLU")
    endif()

elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
    set(warnings "-Wall -Wextra -Werror")
    FIND_LIBRARY(X11_LIB X11)
    FIND_LIBRARY(GL_LIB GL)
    FIND_LIBRARY(GLUT_LIB GLU)
    if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
        set(ALPHA_CXX_FLAGS "-g -std=c++11")
    else()
        set(ALPHA_CXX_FLAGS "-std=c++11")
    endif()

elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
    set(warnings "/W4 /WX /EHsc")
    set(ALPHA_CXX_FLAGS "")

endif()

# apply flags to global settings
set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS} ${warnings}")
set(CMAKE_CXX_FLAGS "${ALPHA_CXX_FLAGS} ${CMAKE_CXX_FLAGS} ${warnings}")

# specify output directories
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin")

# set install location to relative directory
set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/sdk" CACHE PATH "ALPHA install prefix")

#set(ALPHA_LIBRARIES AlphaEngine lua)
set(ALPHA_LIBRARIES AlphaEngine lua ${X11_LIB} ${GL_LIB} ${GLUT_LIB})

#include_directories(${CMAKE_CURRENT_SOURCE_DIR})

# build Engine
add_subdirectory(AlphaEngine)

# build Demos
add_subdirectory(Demos)

{'fraction_non_alphanumeric': 0.12465602641717116, 'fraction_numerical': 0.012658227848101266, 'mean_word_length': 5.937022900763359, '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': '1917482', 'n_tokens_mistral': 1532, 'n_tokens_neox': 1396, 'n_words': 265}