<commit_before>project(Frontier.Engine)

cmake_minimum_required(VERSION 3.2)
SET( CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules"
                       "${CMAKE_MODULE_PATH}" )

# Change default options
option( GLFW_BUILD_TESTS "Build the GLFW test programs" OFF)
option( glew-cmake_BUILD_SHARED "Build the shared glew library" OFF)
option( glew-cmake_BUILD_STATIC "Build the static glew library" ON)
option( freetype-gl_BUILD_DEMOS "Build the freetype-gl example programs" OFF)
option( freetype-gl_BUILD_APIDOC "Build the freetype-gl API documentation" OFF)
option( GLFW_INSTALL "Generate Installation Target" OFF)
option( GLFW_BUILD_EXAMPLES "Build the GLFW example programs" OFF)
option( GLFW_BUILD_DOCS "Build the GLFW documentation" OFF)
option(gtest_force_shared_crt "Use shared (DLL) run-time lib even when Google Test is built as static lib." ON)

add_definitions(-DGLEW_STATIC)

set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}/bin)

get_filename_component(FRONTIER_ENGINE_PARENT_DIR ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY)
# All libraries and executables below this will have folders generated for them
set(FRONTIER_ENGINE_FOLDER_MACRO_DIR ${CMAKE_CURRENT_SOURCE_DIR})


# Rebind these to group up all the ThirdParty Projects so they don't clutter up the IDE
macro (add_library name)
    set (IS_INTERFACE 0)
    FOREACH (e ${ARGN})
        if (e STREQUAL "INTERFACE" OR e STREQUAL "IMPORTED")
            set (IS_INTERFACE 1)
        endif (e STREQUAL "INTERFACE" OR e STREQUAL "IMPORTED")
    ENDFOREACH(e)
		
    if (${IS_INTERFACE})
        _add_library(${name} ${ARGN})
    elseif (CMAKE_CURRENT_SOURCE_DIR MATCHES ${FRONTIER_ENGINE_FOLDER_MACRO_DIR})
        string(REPLACE ${FRONTIER_ENGINE_PARENT_DIR}/ "" FOLDER "${CMAKE_CURRENT_SOURCE_DIR}")
        string(REPLACE "/" "//" FOLDER "${FOLDER}")
		
        _add_library (${name} ${ARGN})
        set_target_properties(${name} PROPERTIES FOLDER ${FOLDER})
	else (${IS_INTERFACE})
		_add_library(${name} ${ARGN})
    endif (${IS_INTERFACE})
endmacro (add_library)

macro (add_executable name)
    set (IS_INTERFACE 0)
    FOREACH (e ${ARGN})
        if (e STREQUAL "INTERFACE")
            set (IS_INTERFACE 1)
        endif (e STREQUAL "INTERFACE")
    ENDFOREACH(e)
	
    if (${IS_INTERFACE})
        _add_executable(${name} ${ARGN})
    elseif (CMAKE_CURRENT_SOURCE_DIR MATCHES ${FRONTIER_ENGINE_FOLDER_MACRO_DIR})
        string(REPLACE ${FRONTIER_ENGINE_PARENT_DIR}/ "" FOLDER "${CMAKE_CURRENT_SOURCE_DIR}")
        string(REPLACE "/" "//" FOLDER "${FOLDER}")

        _add_executable (${name} ${ARGN})
        set_target_properties(${name} PROPERTIES FOLDER ${FOLDER})
	else (${IS_INTERFACE})
		_add_library(${name} ${ARGN})
    endif (${IS_INTERFACE})
endmacro (add_executable)<commit_msg>Fixed peculiar problem where calling CMake from the command line would cause configuration to fail.<commit_after>project(Frontier.Engine)

cmake_minimum_required(VERSION 3.2)
SET( CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules"
                       "${CMAKE_MODULE_PATH}" )

# Change default options
option( GLFW_BUILD_TESTS "Build the GLFW test programs" OFF)
option( glew-cmake_BUILD_SHARED "Build the shared glew library" OFF)
option( glew-cmake_BUILD_STATIC "Build the static glew library" ON)
option( freetype-gl_BUILD_DEMOS "Build the freetype-gl example programs" OFF)
option( freetype-gl_BUILD_APIDOC "Build the freetype-gl API documentation" OFF)
option( GLFW_INSTALL "Generate Installation Target" OFF)
option( GLFW_BUILD_EXAMPLES "Build the GLFW example programs" OFF)
option( GLFW_BUILD_DOCS "Build the GLFW documentation" OFF)
option(gtest_force_shared_crt "Use shared (DLL) run-time lib even when Google Test is built as static lib." ON)

add_definitions(-DGLEW_STATIC)

set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}/bin)

get_filename_component(FRONTIER_ENGINE_PARENT_DIR ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY)
# All libraries and executables below this will have folders generated for them
set(FRONTIER_ENGINE_FOLDER_MACRO_DIR ${CMAKE_CURRENT_SOURCE_DIR})


# Rebind these to group up all the ThirdParty Projects so they don't clutter up the IDE
macro (add_library name)
    set (IS_INTERFACE 0)
    FOREACH (e ${ARGN})
        if (e STREQUAL "INTERFACE" OR e STREQUAL "IMPORTED")
            set (IS_INTERFACE 1)
        endif (e STREQUAL "INTERFACE" OR e STREQUAL "IMPORTED")
    ENDFOREACH(e)
		
    if (${IS_INTERFACE})
        _add_library(${name} ${ARGN})
    elseif (FRONTIER_ENGINE_FOLDER_MACRO_DIR MATCHES ${CMAKE_CURRENT_SOURCE_DIR})
        string(REPLACE ${FRONTIER_ENGINE_PARENT_DIR}/ "" FOLDER "${CMAKE_CURRENT_SOURCE_DIR}")
        string(REPLACE "/" "//" FOLDER "${FOLDER}")
		
        _add_library (${name} ${ARGN})
        set_target_properties(${name} PROPERTIES FOLDER ${FOLDER})
	else (${IS_INTERFACE})
		_add_library(${name} ${ARGN})
    endif (${IS_INTERFACE})
endmacro (add_library)

macro (add_executable name)
    set (IS_INTERFACE 0)
    FOREACH (e ${ARGN})
        if (e STREQUAL "INTERFACE")
            set (IS_INTERFACE 1)
        endif (e STREQUAL "INTERFACE")
    ENDFOREACH(e)
	
    if (${IS_INTERFACE})
        _add_executable(${name} ${ARGN})
    elseif (FRONTIER_ENGINE_FOLDER_MACRO_DIR MATCHES ${CMAKE_CURRENT_SOURCE_DIR})
        string(REPLACE ${FRONTIER_ENGINE_PARENT_DIR}/ "" FOLDER "${CMAKE_CURRENT_SOURCE_DIR}")
        string(REPLACE "/" "//" FOLDER "${FOLDER}")

        _add_executable (${name} ${ARGN})
        set_target_properties(${name} PROPERTIES FOLDER ${FOLDER})
	else (${IS_INTERFACE})
		_add_library(${name} ${ARGN})
    endif (${IS_INTERFACE})
endmacro (add_executable)
{'fraction_non_alphanumeric': 0.10584645036941857, 'fraction_numerical': 0.00256986829424992, 'mean_word_length': 4.999036608863198, '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': '3895213', 'n_tokens_mistral': 2332, 'n_tokens_neox': 2192, 'n_words': 503}