<commit_before>﻿#
# Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
#  http://aws.amazon.com/apache2.0
#
# or in the "license" file accompanying this file. This file is distributed
# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
# express or implied. See the License for the specific language governing
# permissions and limitations under the License.
#

import argparse
import os
import platform
import re
import sdk_directories
import shutil
import subprocess

def GetPlatformEnvironments():
    return { 'Windows' : { 'default_install_directory' : 'C:\\temp\\AWSNativeSDK',
                           'global_build_call' : [ "msbuild", "ALL_BUILD.vcxproj" ],
                           'parallel_option' : '-m:??' },
             'Linux' : { 'default_install_directory' : '/tmp/AWSNativeSDK',
                         'global_build_call' : [ "make" ],
                         'parallel_option' : '-j??' },
             'Darwin' : { 'default_install_directory' : '/tmp/AWSNativeSDK',
                          'global_build_call' : [ "make" ],
                          'parallel_option' : '-j??' } }


def GetPlatformBuildTargets():
    return { 'Windows' : { 'buildPlatforms' : [ 'Windows' ],
                           'configs' : { 'DebugDynamic' : { 'directory' : '_build_windows_dynamic_debug', 
                                                            'cmake_params' : "-DSTATIC_LINKING=0",
                                                            'build_params' : [ "-p:Configuration=Debug" ],
                                                            'config' : 'Debug' }, 
                                         'DebugStatic' : { 'directory' : '_build_windows_static_debug', 
                                                           'cmake_params' : "-DSTATIC_LINKING=1",
                                                           'build_params' : [ "-p:Configuration=Debug" ],
                                                           'config' : 'Debug' }, 
                                         'ReleaseDynamic' : { 'directory' : '_build_windows_dynamic_release', 
                                                              'cmake_params' : "-DSTATIC_LINKING=0",
                                                              'build_params' : [ "-p:Configuration=Release" ],
                                                              'config' : 'Release' }, 
                                         'ReleaseStatic' : { 'directory' : '_build_windows_static_release', 
                                                             'cmake_params' : "-DSTATIC_LINKING=1",
                                                             'build_params' : [ "-p:Configuration=Release" ],
                                                             'config' : 'Release' } }, 
                           'global_cmake_params' : "-G \"Visual Studio 12 Win64\" -DCUSTOM_MEMORY_MANAGEMENT=1 -DGENERATE_VERSION_INFO=0 -DCMAKE_CONFIGURATION_TYPES=\"Debug;Release;MinSizeRel;RelWithDebInfo\" -DCMAKE_CXX_FLAGS_DEBUGOPT=\"\" -DCMAKE_EXE_LINKER_FLAGS_DEBUGOPT=\"\" -DCMAKE_SHARED_LINKER_FLAGS_DEBUGOPT=\"\"" },
             'Android' : { 'buildPlatforms' : [ 'Linux' ],
                           'configs' : { 'DebugDynamic' : { 'directory' : '_build_android_dynamic_debug', 
                                                            'cmake_params' : "-DSTATIC_LINKING=0 -DANDROID_STL=gnustl_shared -DCMAKE_BUILD_TYPE=Debug",
                                                            'build_params' : [],
                                                            'config' : 'Debug' },
                                         'DebugStatic' : { 'directory' : '_build_android_dynamic_static', 
                                                           'cmake_params' : "-DSTATIC_LINKING=1 -DANDROID_STL=gnustl_static -DCMAKE_BUILD_TYPE=Debug",
                                                           'build_params' : [],
                                                           'config' : 'Debug' },
                                         'ReleaseDynamic' : { 'directory' : '_build_android_dynamic_release', 
                                                              'cmake_params' : "-DSTATIC_LINKING=0 -DANDROID_STL=gnustl_shared -DCMAKE_BUILD_TYPE=Release",
                                                              'build_params' : [],
                                                              'config' : 'Release' }, 
                                         'ReleaseStatic' : { 'directory' : '_build_android_static_release', 
                                                             'cmake_params' : "-DSTATIC_LINKING=1 -DANDROID_STL=gnustl_static -DCMAKE_BUILD_TYPE=Release",
                                                             'build_params' : [],
                                                             'config' : 'Release' } },
                           'global_cmake_params' : "-DSIMPLE_INSTALL=OFF " \
                                                   "-DCUSTOM_MEMORY_MANAGEMENT=1 " \
                                                   "-DGENERATE_VERSION_INFO=0" \
                                                   "-DANDROID_STL_FORCE_FEATURES=OFF " \
                                                   "-DTARGET_ARCH=ANDROID " \
                                                   "-DANDROID_ABI=armeabi-v7a " \
                                                   "-DANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-4.9 " \
                                                   "-DMINIMIZE_SIZE=ON" },
             'Linux' : { 'buildPlatforms' : [ 'Linux' ],
                         'configs' : { 'DebugDynamic' : { 'directory' : '_build_linux_dynamic_debug', 
                                                          'cmake_params' : "-DSTATIC_LINKING=0 -DCMAKE_BUILD_TYPE=Debug",
                                                          'build_params' : [],
                                                          'config' : 'Debug' },
                                       'DebugStatic' : { 'directory' : '_build_linux_dynamic_static', 
                                                         'cmake_params' : "-DSTATIC_LINKING=1 -DCMAKE_BUILD_TYPE=Debug",
                                                         'build_params' : [],
                                                         'config' : 'Debug' },
                                       'ReleaseDynamic' : { 'directory' : '_build_linux_dynamic_release', 
                                                            'cmake_params' : "-DSTATIC_LINKING=0 -DCMAKE_BUILD_TYPE=Release",
                                                            'build_params' : [],
                                                            'config' : 'Release' },
                                       'ReleaseStatic' : { 'directory' : '_build_linux_static_release', 
                                                           'cmake_params' : "-DSTATIC_LINKING=1 -DCMAKE_BUILD_TYPE=Release",
                                                           'build_params' : [],
                                                           'config' : 'Release' } },
                         'global_cmake_params' : "-DSIMPLE_INSTALL=OFF -DCUSTOM_MEMORY_MANAGEMENT=1 -DGENERATE_VERSION_INFO=0 -DMINIMIZE_SIZE=ON" },
             'Darwin' : { 'buildPlatforms' : [ 'Darwin' ],
                                      'configs' : { 'DebugDynamic' : { 'directory' : '_build_darwin_dynamic_debug', 
                                                          'cmake_params' : "-DSTATIC_LINKING=0 -DCMAKE_BUILD_TYPE=Debug",
                                                          'build_params' : [],
                                                          'config' : 'Debug' },
                                       'DebugStatic' : { 'directory' : '_build_darwin_dynamic_static', 
                                                         'cmake_params' : "-DSTATIC_LINKING=1 -DCMAKE_BUILD_TYPE=Debug",
                                                         'build_params' : [],
                                                         'config' : 'Debug' },
                                       'ReleaseDynamic' : { 'directory' : '_build_darwin_dynamic_release', 
                                                            'cmake_params' : "-DSTATIC_LINKING=0 -DCMAKE_BUILD_TYPE=Release",
                                                            'build_params' : [],
                                                            'config' : 'Release' }, 
                                       'ReleaseStatic' : { 'directory' : '_build_darwin_static_release', 
                                                           'cmake_params' : "-DSTATIC_LINKING=1 -DCMAKE_BUILD_TYPE=Release",
                                                           'build_params' : [],
                                                           'config' : 'Release' } },
                         'global_cmake_params' : "-DSIMPLE_INSTALL=OFF -DCUSTOM_MEMORY_MANAGEMENT=1 -DGENERATE_VERSION_INFO=0" } }

<commit_msg>Transition from MINIMIZE_SIZE to ENABLE_UNITY_BUILD; disable SIMPLE_INSTALL on all builds<commit_after>﻿#
# Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
#  http://aws.amazon.com/apache2.0
#
# or in the "license" file accompanying this file. This file is distributed
# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
# express or implied. See the License for the specific language governing
# permissions and limitations under the License.
#

import argparse
import os
import platform
import re
import sdk_directories
import shutil
import subprocess

def GetPlatformEnvironments():
    return { 'Windows' : { 'default_install_directory' : 'C:\\temp\\AWSNativeSDK',
                           'global_build_call' : [ "msbuild", "ALL_BUILD.vcxproj" ],
                           'parallel_option' : '-m:??' },
             'Linux' : { 'default_install_directory' : '/tmp/AWSNativeSDK',
                         'global_build_call' : [ "make" ],
                         'parallel_option' : '-j??' },
             'Darwin' : { 'default_install_directory' : '/tmp/AWSNativeSDK',
                          'global_build_call' : [ "make" ],
                          'parallel_option' : '-j??' } }


def GetPlatformBuildTargets():
    return { 'Windows' : { 'buildPlatforms' : [ 'Windows' ],
                           'configs' : { 'DebugDynamic' : { 'directory' : '_build_windows_dynamic_debug', 
                                                            'cmake_params' : "-DSTATIC_LINKING=0",
                                                            'build_params' : [ "-p:Configuration=Debug" ],
                                                            'config' : 'Debug' }, 
                                         'DebugStatic' : { 'directory' : '_build_windows_static_debug', 
                                                           'cmake_params' : "-DSTATIC_LINKING=1",
                                                           'build_params' : [ "-p:Configuration=Debug" ],
                                                           'config' : 'Debug' }, 
                                         'ReleaseDynamic' : { 'directory' : '_build_windows_dynamic_release', 
                                                              'cmake_params' : "-DSTATIC_LINKING=0",
                                                              'build_params' : [ "-p:Configuration=Release" ],
                                                              'config' : 'Release' }, 
                                         'ReleaseStatic' : { 'directory' : '_build_windows_static_release', 
                                                             'cmake_params' : "-DSTATIC_LINKING=1",
                                                             'build_params' : [ "-p:Configuration=Release" ],
                                                             'config' : 'Release' } }, 
                           'global_cmake_params' : "-G \"Visual Studio 12 Win64\" -DCUSTOM_MEMORY_MANAGEMENT=1 -DGENERATE_VERSION_INFO=0 -DSIMPLE_INSTALL=OFF -DENABLE_UNITY_BUILD=ON -DCMAKE_CONFIGURATION_TYPES=\"Debug;Release;MinSizeRel;RelWithDebInfo\" -DCMAKE_CXX_FLAGS_DEBUGOPT=\"\" -DCMAKE_EXE_LINKER_FLAGS_DEBUGOPT=\"\" -DCMAKE_SHARED_LINKER_FLAGS_DEBUGOPT=\"\"" },
             'Android' : { 'buildPlatforms' : [ 'Linux' ],
                           'configs' : { 'DebugDynamic' : { 'directory' : '_build_android_dynamic_debug', 
                                                            'cmake_params' : "-DSTATIC_LINKING=0 -DANDROID_STL=gnustl_shared -DCMAKE_BUILD_TYPE=Debug",
                                                            'build_params' : [],
                                                            'config' : 'Debug' },
                                         'DebugStatic' : { 'directory' : '_build_android_dynamic_static', 
                                                           'cmake_params' : "-DSTATIC_LINKING=1 -DANDROID_STL=gnustl_static -DCMAKE_BUILD_TYPE=Debug",
                                                           'build_params' : [],
                                                           'config' : 'Debug' },
                                         'ReleaseDynamic' : { 'directory' : '_build_android_dynamic_release', 
                                                              'cmake_params' : "-DSTATIC_LINKING=0 -DANDROID_STL=gnustl_shared -DCMAKE_BUILD_TYPE=Release",
                                                              'build_params' : [],
                                                              'config' : 'Release' }, 
                                         'ReleaseStatic' : { 'directory' : '_build_android_static_release', 
                                                             'cmake_params' : "-DSTATIC_LINKING=1 -DANDROID_STL=gnustl_static -DCMAKE_BUILD_TYPE=Release",
                                                             'build_params' : [],
                                                             'config' : 'Release' } },
                           'global_cmake_params' : "-DSIMPLE_INSTALL=OFF " \
                                                   "-DCUSTOM_MEMORY_MANAGEMENT=1 " \
                                                   "-DGENERATE_VERSION_INFO=0 " \
                                                   "-DSIMPLE_INSTALL=OFF " \
                                                   "-DENABLE_UNITY_BUILD=ON " \
                                                   "-DANDROID_STL_FORCE_FEATURES=OFF " \
                                                   "-DTARGET_ARCH=ANDROID " \
                                                   "-DANDROID_ABI=armeabi-v7a " \
                                                   "-DANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-4.9 "},
             'Linux' : { 'buildPlatforms' : [ 'Linux' ],
                         'configs' : { 'DebugDynamic' : { 'directory' : '_build_linux_dynamic_debug', 
                                                          'cmake_params' : "-DSTATIC_LINKING=0 -DCMAKE_BUILD_TYPE=Debug",
                                                          'build_params' : [],
                                                          'config' : 'Debug' },
                                       'DebugStatic' : { 'directory' : '_build_linux_dynamic_static', 
                                                         'cmake_params' : "-DSTATIC_LINKING=1 -DCMAKE_BUILD_TYPE=Debug",
                                                         'build_params' : [],
                                                         'config' : 'Debug' },
                                       'ReleaseDynamic' : { 'directory' : '_build_linux_dynamic_release', 
                                                            'cmake_params' : "-DSTATIC_LINKING=0 -DCMAKE_BUILD_TYPE=Release",
                                                            'build_params' : [],
                                                            'config' : 'Release' },
                                       'ReleaseStatic' : { 'directory' : '_build_linux_static_release', 
                                                           'cmake_params' : "-DSTATIC_LINKING=1 -DCMAKE_BUILD_TYPE=Release",
                                                           'build_params' : [],
                                                           'config' : 'Release' } },
                         'global_cmake_params' : "-DSIMPLE_INSTALL=OFF -DCUSTOM_MEMORY_MANAGEMENT=1 -DGENERATE_VERSION_INFO=0 -DENABLE_UNITY_BUILD=ON" },
             'Darwin' : { 'buildPlatforms' : [ 'Darwin' ],
                                      'configs' : { 'DebugDynamic' : { 'directory' : '_build_darwin_dynamic_debug', 
                                                          'cmake_params' : "-DSTATIC_LINKING=0 -DCMAKE_BUILD_TYPE=Debug",
                                                          'build_params' : [],
                                                          'config' : 'Debug' },
                                       'DebugStatic' : { 'directory' : '_build_darwin_dynamic_static', 
                                                         'cmake_params' : "-DSTATIC_LINKING=1 -DCMAKE_BUILD_TYPE=Debug",
                                                         'build_params' : [],
                                                         'config' : 'Debug' },
                                       'ReleaseDynamic' : { 'directory' : '_build_darwin_dynamic_release', 
                                                            'cmake_params' : "-DSTATIC_LINKING=0 -DCMAKE_BUILD_TYPE=Release",
                                                            'build_params' : [],
                                                            'config' : 'Release' }, 
                                       'ReleaseStatic' : { 'directory' : '_build_darwin_static_release', 
                                                           'cmake_params' : "-DSTATIC_LINKING=1 -DCMAKE_BUILD_TYPE=Release",
                                                           'build_params' : [],
                                                           'config' : 'Release' } },
                         'global_cmake_params' : "-DSIMPLE_INSTALL=OFF -DCUSTOM_MEMORY_MANAGEMENT=1 -DGENERATE_VERSION_INFO=0" } }


{'fraction_non_alphanumeric': 0.09469396392107073, 'fraction_numerical': 0.004549542400677141, 'mean_word_length': 0.9446558995988067, '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': 260, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5292827', 'n_tokens_mistral': 4094, 'n_tokens_neox': 3901, 'n_words': 650}