<commit_before>## The CMakeBuildConfigTemplate.txt defines the default build settings
## that are used when you build a clean checkout.
##
## CMakeBuildConfigTemplate.txt is only a template file! Changes to that file
## do not have any effect on the actual CMake execution.
##
## For the actual configuration, the file CMakeBuildConfigTemplate.txt gets 
## copied to CMakeBuildConfig.txt, in which you can customize your own settings.
##
## The CMakeBuildConfig.txt is not part of the repository, and do not add it there!
## The idea is that everyone can customize the set of modules to build using that 
## file, without having to fear about an accidental commit of these changes.

###### BUILD CONFIGURATION DEFINES ######

## Various flags/defines that configure your build

set(TUNDRACORE_SHARED 1)            # Do we want to build TundraCore as a shared or static library.
set(BUILD_SDK_ONLY 0)               # Configure if you want to build only the SDK, meaning projects from src/Application will be omitted
set(BUILDING_INSTALLER 0)           # Enables additional resources to create icon for the main executable.
set(ENABLE_BUILD_OPTIMIZATIONS 0)   # Only for Windows: Enables optimizations for compiler and linker. Do not enable this if you are planning to distribute your .lib files! Warning: Increases build time significantly.
if (NOT ANDROID)
    set(ENABLE_HYDRAX 1)            # Configure the use of Hydrax, http://www.ogre3d.org/tikiwiki/Hydrax
    set(ENABLE_SKYX 1)              # Configure the use of SkyX, http://www.ogre3d.org/tikiwiki/SkyX
    set(ENABLE_OPEN_ASSET_IMPORT 1) # Enables Open Asset Import Library, which can be used to import various mesh formats.
else()
    set(ENABLE_HYDRAX 0)
    set(ENABLE_SKYX 0)
    set(ENABLE_OPEN_ASSET_IMPORT 0)
endif()

# TUNDRA_NO_BOOST is configured in the root CMakeLists.txt
if (TUNDRA_NO_BOOST)
    add_definitions(-DTUNDRA_NO_BOOST)
endif()

if (ENABLE_OPEN_ASSET_IMPORT)
    add_definitions(-DASSIMP_ENABLED)
endif()

# For now, disable audio on Android
if (ANDROID)
    add_definitions (-DANDROID)
    add_definitions (-DTUNDRA_NO_AUDIO)
endif()

set (ENABLE_PROFILING 1)            # Enable the following flag to add compile with support for a built-in execution time profiler.
set (ENABLE_JS_PROFILING 0)         # Enable js profiling?
set (ENABLE_MEMORY_LEAK_CHECKS 0)   # If the following flag is defined, memory leak checking is enabled in all modules when building on MSVC.

message("\n")

if (TUNDRACORE_SHARED)
    add_definitions(-DTUNDRACORE_SHARED)
endif()
if (ENABLE_PROFILING)
    add_definitions (-DPROFILING)
endif ()
if (ENABLE_JS_PROFILING)
    add_definitions (-DENABLE_JS_PROFILING)
endif()
if (MSVC AND ENABLE_MEMORY_LEAK_CHECKS)
    add_definitions(-DMEMORY_LEAK_CHECK)
endif()
if (MSVC)
    if (ENABLE_BUILD_OPTIMIZATIONS)
        set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /GL /Gy /GF /Ox /Ob2 /Ot /MP")
        set (CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_CXX_FLAGS_RELEASE})
        set (CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /LTCG /INCREMENTAL:NO /OPT:REF /OPT:ICF")
        set (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO ${CMAKE_SHARED_LINKER_FLAGS_RELEASE})
        set (CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG /INCREMENTAL:NO /OPT:REF /OPT:ICF")
        set (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO ${CMAKE_EXE_LINKER_FLAGS_RELEASE})
    else ()
        set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MP")
        set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MP")
    endif ()
endif ()

###### ENTITY-COMPONENTS ######
message("\n=========== Configuring Optional Entity-Components ===========\n")

## The AddEntityComponent macros must appear before any of the add_subdirectory() directives for modules that use the ECs, or otherwise
## they will not be able to conditionally compile the EC.

## The following EC's are declared by TundraProtocolModule and are optional.
## You may comment these lines out to disable any ECs you do not want to include.

AddEntityComponent(EC_Highlight)
AddEntityComponent(EC_Sound)
AddEntityComponent(EC_HoveringText)
AddEntityComponent(EC_TransformGizmo)

## Here are the Application level ECs that wont be added if BUILD_SDK_ONLY is TRUE (default is FALSE)
if (NOT BUILD_SDK_ONLY)
    AddEntityComponent(EC_Script)                   # Optional but used by both PythonScriptModule and JavascriptModule.
    AddEntityComponent(EC_PlanarMirror)
    AddEntityComponent(EC_ProximityTrigger)
    AddEntityComponent(EC_LaserPointer)
endif()

###### TUNDRA FRAMEWORK ######
message("\n=========== Configuring Tundra Framework ===========\n")

## The following are the core modules/libs that are required 
## for the project to build. None of these can be omitted.

AddProject(Core TundraCore)
AddProject(Core Math)

# The Tundra project builds the main exe as a WINDOWS subsystem (or as a unix executable).
AddProject(Core Tundra)

# For Windows, also add a version of the project which builds using CONSOLE subsystem.
# This is otherwise equivalent to the Tundra executable, but this one always shows the console window.
if (MSVC)
    AddProject(Core TundraConsole)
endif()

###### MANDATORY PLUGINS ######
message("\n=========== Configuring Mandatory Plugins ===========\n")
## Here we have plugins that cannot be omitted from the build.
AddProject(Core OgreRenderingModule)
AddProject(Core TundraProtocolModule)
AddProject(Core AssetModule)
AddProject(Core PhysicsModule)          # Optional in theory, if your application doesn't need physics, but currently TundraProtocolModule depends on this. Depends on OgreRenderingModule and EnvironmentModule.
AddProject(Core EnvironmentModule)      # Optional in theory, if you drop PhysicsModule and DebugStatsModule. Depends on OgreRenderingModule.

###### OPTIONAL PLUGINS ######
message("\n=========== Configuring Optional Plugins ===========\n")
if (NOT ANDROID)
    AddProject(Core ECEditorModule)                 # Provides tools for managing scenes, entities, entity-components and assets.
endif()
AddProject(Application SceneInteract)           # Transforms generic mouse and keyboard input events on scene entities to input-related entity actions and signals. Depends on OgreRenderingModule.
AddProject(Application AvatarModule)            # Provides EC_Avatar. Depends on OgreRenderingModule.
AddProject(Application DebugStatsModule)        # Enables a developer window for debugging. Depends on OgreRenderingModule, EnvironmentModule, and PhysicsModule.
AddProject(Application SkyXHydrax)              # Provides photorealistic sky and water components by utilizing SkyX and Hydrax Ogre add-ons.
AddProject(Application JavascriptModule)        # Allows QtScript-created scene script instances.
if (NOT APPLE) # Python and PythonQt are not available currently on Mac.
    if ("$ENV{TUNDRA_PYTHON_ENABLED}" STREQUAL "TRUE") 
        AddProject(Application PythonScriptModule)      # Allows Python-created modules and scene script instances. Depends on OgreRenderingModule, TundraLogicModule, AvatarModule SceneWidgetComponents
    endif ()
endif()
# Note: SceneWidgetComponents depends on BrowserUiPlugin, if SceneWidgetComponents's BROWSER_SHARED_DATA_ENABLED set to 1
# See /src/Application/SceneWidgetComponents/CMakeLists.txt
AddProject(Application SceneWidgetComponents)   # Provides ECs for injecting various QWidgets to the 3D scene eg. EC_WebView.
AddProject(Application BrowserUiPlugin)         # Provides a browser UI for the client. Features multi-tabbed browsing, web login to servers, classic login, world/web bookmarks, web page caching etc.
if (NOT APPLE AND NOT ANDROID)
    AddProject(Application MumblePlugin)            # VOIP communication, implements a Mumble client for the Murmur server. Depends on JavascriptModule, OgreRenderingModule and TundraProtocolModule.
    AddProject(Application VlcPlugin)              # Adds media playback capabilities with libVLC and entity components.
endif()

#AddProject(Application KinectModule)           # Reads Kinect for video, depth and skeleton data and emits it from the 'kinect' dynamic object. Only works on Windows with Visual Studio 10 with VC100 compiler.
if (NOT ANDROID)
    AddProject(Application CAVEStereoModule)        # Provides multi-windowed rendering views for CAVE setups and stereoscopy view modes.
    AddProject(Application OgreAssetEditorModule)   # Enables various asset editors. Depends on OgreRenderingModule.
endif()

if (ENABLE_OPEN_ASSET_IMPORT)
    AddProject(Application OpenAssetImport)         # Allows import of various mesh file formats
endif ()

#AddProject(Application AssetInterestPlugin)    # Options to only keep assets below certain distance threshold in memory. Can also unload all non used assets from memory. Exposed to scripts so scenes can set the behaviour.
AddProject(Application CanvasPlugin)            # Component that draws a graphics scene with any number of widgets into a mesh and provides 3D mouse input.
#AddProject(Application XMPPModule)              # A module that implements XMPP-based chat.
AddProject(Application ArchivePlugin)          # Provides archived asset bundle capabilities. Enables example sub asset referencing into eg. zip files.
<commit_msg>Disable math lib assume prints on optimized release builds.<commit_after>## The CMakeBuildConfigTemplate.txt defines the default build settings
## that are used when you build a clean checkout.
##
## CMakeBuildConfigTemplate.txt is only a template file! Changes to that file
## do not have any effect on the actual CMake execution.
##
## For the actual configuration, the file CMakeBuildConfigTemplate.txt gets 
## copied to CMakeBuildConfig.txt, in which you can customize your own settings.
##
## The CMakeBuildConfig.txt is not part of the repository, and do not add it there!
## The idea is that everyone can customize the set of modules to build using that 
## file, without having to fear about an accidental commit of these changes.

###### BUILD CONFIGURATION DEFINES ######

## Various flags/defines that configure your build

set(TUNDRACORE_SHARED 1)            # Do we want to build TundraCore as a shared or static library.
set(BUILD_SDK_ONLY 0)               # Configure if you want to build only the SDK, meaning projects from src/Application will be omitted
set(BUILDING_INSTALLER 0)           # Enables additional resources to create icon for the main executable.
set(ENABLE_BUILD_OPTIMIZATIONS 0)   # Only for Windows: Enables optimizations for compiler and linker. Do not enable this if you are planning to distribute your .lib files! Warning: Increases build time significantly.
if (NOT ANDROID)
    set(ENABLE_HYDRAX 1)            # Configure the use of Hydrax, http://www.ogre3d.org/tikiwiki/Hydrax
    set(ENABLE_SKYX 1)              # Configure the use of SkyX, http://www.ogre3d.org/tikiwiki/SkyX
    set(ENABLE_OPEN_ASSET_IMPORT 1) # Enables Open Asset Import Library, which can be used to import various mesh formats.
else()
    set(ENABLE_HYDRAX 0)
    set(ENABLE_SKYX 0)
    set(ENABLE_OPEN_ASSET_IMPORT 0)
endif()

# TUNDRA_NO_BOOST is configured in the root CMakeLists.txt
if (TUNDRA_NO_BOOST)
    add_definitions(-DTUNDRA_NO_BOOST)
endif()

if (ENABLE_OPEN_ASSET_IMPORT)
    add_definitions(-DASSIMP_ENABLED)
endif()

# For now, disable audio on Android
if (ANDROID)
    add_definitions (-DANDROID)
    add_definitions (-DTUNDRA_NO_AUDIO)
endif()

set (ENABLE_PROFILING 1)            # Enable the following flag to add compile with support for a built-in execution time profiler.
set (ENABLE_JS_PROFILING 0)         # Enable js profiling?
set (ENABLE_MEMORY_LEAK_CHECKS 0)   # If the following flag is defined, memory leak checking is enabled in all modules when building on MSVC.

message("\n")

if (TUNDRACORE_SHARED)
    add_definitions(-DTUNDRACORE_SHARED)
endif()
if (ENABLE_PROFILING)
    add_definitions (-DPROFILING)
endif ()
if (ENABLE_JS_PROFILING)
    add_definitions (-DENABLE_JS_PROFILING)
endif()
if (MSVC AND ENABLE_MEMORY_LEAK_CHECKS)
    add_definitions(-DMEMORY_LEAK_CHECK)
endif()
if (MSVC)
    if (ENABLE_BUILD_OPTIMIZATIONS)
        add_definitions (-DMATH_SILENT_ASSUME)
        set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /GL /Gy /GF /Ox /Ob2 /Ot /MP")
        set (CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_CXX_FLAGS_RELEASE})
        set (CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /LTCG /INCREMENTAL:NO /OPT:REF /OPT:ICF")
        set (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO ${CMAKE_SHARED_LINKER_FLAGS_RELEASE})
        set (CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG /INCREMENTAL:NO /OPT:REF /OPT:ICF")
        set (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO ${CMAKE_EXE_LINKER_FLAGS_RELEASE})
    else ()
        set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MP")
        set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MP")
    endif ()
endif ()

###### ENTITY-COMPONENTS ######
message("\n=========== Configuring Optional Entity-Components ===========\n")

## The AddEntityComponent macros must appear before any of the add_subdirectory() directives for modules that use the ECs, or otherwise
## they will not be able to conditionally compile the EC.

## The following EC's are declared by TundraProtocolModule and are optional.
## You may comment these lines out to disable any ECs you do not want to include.

AddEntityComponent(EC_Highlight)
AddEntityComponent(EC_Sound)
AddEntityComponent(EC_HoveringText)
AddEntityComponent(EC_TransformGizmo)

## Here are the Application level ECs that wont be added if BUILD_SDK_ONLY is TRUE (default is FALSE)
if (NOT BUILD_SDK_ONLY)
    AddEntityComponent(EC_Script)                   # Optional but used by both PythonScriptModule and JavascriptModule.
    AddEntityComponent(EC_PlanarMirror)
    AddEntityComponent(EC_ProximityTrigger)
    AddEntityComponent(EC_LaserPointer)
endif()

###### TUNDRA FRAMEWORK ######
message("\n=========== Configuring Tundra Framework ===========\n")

## The following are the core modules/libs that are required 
## for the project to build. None of these can be omitted.

AddProject(Core TundraCore)
AddProject(Core Math)

# The Tundra project builds the main exe as a WINDOWS subsystem (or as a unix executable).
AddProject(Core Tundra)

# For Windows, also add a version of the project which builds using CONSOLE subsystem.
# This is otherwise equivalent to the Tundra executable, but this one always shows the console window.
if (MSVC)
    AddProject(Core TundraConsole)
endif()

###### MANDATORY PLUGINS ######
message("\n=========== Configuring Mandatory Plugins ===========\n")
## Here we have plugins that cannot be omitted from the build.
AddProject(Core OgreRenderingModule)
AddProject(Core TundraProtocolModule)
AddProject(Core AssetModule)
AddProject(Core PhysicsModule)          # Optional in theory, if your application doesn't need physics, but currently TundraProtocolModule depends on this. Depends on OgreRenderingModule and EnvironmentModule.
AddProject(Core EnvironmentModule)      # Optional in theory, if you drop PhysicsModule and DebugStatsModule. Depends on OgreRenderingModule.

###### OPTIONAL PLUGINS ######
message("\n=========== Configuring Optional Plugins ===========\n")
if (NOT ANDROID)
    AddProject(Core ECEditorModule)                 # Provides tools for managing scenes, entities, entity-components and assets.
endif()
AddProject(Application SceneInteract)           # Transforms generic mouse and keyboard input events on scene entities to input-related entity actions and signals. Depends on OgreRenderingModule.
AddProject(Application AvatarModule)            # Provides EC_Avatar. Depends on OgreRenderingModule.
AddProject(Application DebugStatsModule)        # Enables a developer window for debugging. Depends on OgreRenderingModule, EnvironmentModule, and PhysicsModule.
AddProject(Application SkyXHydrax)              # Provides photorealistic sky and water components by utilizing SkyX and Hydrax Ogre add-ons.
AddProject(Application JavascriptModule)        # Allows QtScript-created scene script instances.
if (NOT APPLE) # Python and PythonQt are not available currently on Mac.
    if ("$ENV{TUNDRA_PYTHON_ENABLED}" STREQUAL "TRUE") 
        AddProject(Application PythonScriptModule)      # Allows Python-created modules and scene script instances. Depends on OgreRenderingModule, TundraLogicModule, AvatarModule SceneWidgetComponents
    endif ()
endif()
# Note: SceneWidgetComponents depends on BrowserUiPlugin, if SceneWidgetComponents's BROWSER_SHARED_DATA_ENABLED set to 1
# See /src/Application/SceneWidgetComponents/CMakeLists.txt
AddProject(Application SceneWidgetComponents)   # Provides ECs for injecting various QWidgets to the 3D scene eg. EC_WebView.
AddProject(Application BrowserUiPlugin)         # Provides a browser UI for the client. Features multi-tabbed browsing, web login to servers, classic login, world/web bookmarks, web page caching etc.
if (NOT APPLE AND NOT ANDROID)
    AddProject(Application MumblePlugin)            # VOIP communication, implements a Mumble client for the Murmur server. Depends on JavascriptModule, OgreRenderingModule and TundraProtocolModule.
    AddProject(Application VlcPlugin)              # Adds media playback capabilities with libVLC and entity components.
endif()

#AddProject(Application KinectModule)           # Reads Kinect for video, depth and skeleton data and emits it from the 'kinect' dynamic object. Only works on Windows with Visual Studio 10 with VC100 compiler.
if (NOT ANDROID)
    AddProject(Application CAVEStereoModule)        # Provides multi-windowed rendering views for CAVE setups and stereoscopy view modes.
    AddProject(Application OgreAssetEditorModule)   # Enables various asset editors. Depends on OgreRenderingModule.
endif()

if (ENABLE_OPEN_ASSET_IMPORT)
    AddProject(Application OpenAssetImport)         # Allows import of various mesh file formats
endif ()

#AddProject(Application AssetInterestPlugin)    # Options to only keep assets below certain distance threshold in memory. Can also unload all non used assets from memory. Exposed to scripts so scenes can set the behaviour.
AddProject(Application CanvasPlugin)            # Component that draws a graphics scene with any number of widgets into a mesh and provides 3D mouse input.
#AddProject(Application XMPPModule)              # A module that implements XMPP-based chat.
AddProject(Application ArchivePlugin)          # Provides archived asset bundle capabilities. Enables example sub asset referencing into eg. zip files.

{'fraction_non_alphanumeric': 0.0739906707415152, 'fraction_numerical': 0.0025735885475309636, 'mean_word_length': 4.582759652798563, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '4910313', 'n_tokens_mistral': 5486, 'n_tokens_neox': 5218, 'n_words': 1922}