<commit_before># Copyright 2016 Google Inc. 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.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License 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.
cmake_minimum_required(VERSION 2.8.12)

# For set_common_build_variables().
include (${CMAKE_CURRENT_LIST_DIR}/../buildutil/cmake_common.txt)

# fbx_compile_options()
#
# Set the build options for projects building against the FBX SDK.
# Sets these variables in the caller's scope:
#    CMAKE_C_FLAGS
#    CMAKE_CXX_FLAGS
#    CMAKE_CXX_LINK_FLAGS
# Links against the proper frameworks on Mac, and supresses errors generated
# by the FBX header files.
#
# Should be called before add_library() or add_executible().
#
function(fbx_compile_options)
  # Grab the standard set of build variables.
  set_common_build_variables()

  # These warnings come from the FBX SDK, and they can't be suppressed
  # by pragmas around #include <fbxsdk.h>, so suppress them here.
  if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
    append_flags(CMAKE_CXX_FLAGS "-Wno-literal-suffix -Wno-comment")
    string(REPLACE "-Wall" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
    string(REPLACE "-pedantic" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
    string(REPLACE "-Werror" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
    string(REPLACE "-Wextra" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
  endif()

  # Needed by the FBX SDK when we call some file manipulation functions.
  if(APPLE)
    set(CMAKE_CXX_LINK_FLAGS "-framework Carbon")
  endif()

  # Statically link the C runtime .so files to make binary more portable.
  if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
    set(CMAKE_CXX_LINK_FLAGS "-static")
  endif()

  # Set the compile and link flags in the calling scope.
  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}" PARENT_SCOPE)
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" PARENT_SCOPE)
  set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS}" PARENT_SCOPE)
endfunction()


# fbx_configure_target(target)
#
# Calls target_include_directories() and target_link_libraries() on the
# specified target so that it can build against the FBX SDK.
#
# Should be called *after* add_library() or add_executible(), with the target
# created by that calls.
#
function(fbx_configure_target target)
  # Autodesk's FBX SDK must be installed to build the pipeline.
  set(fbx_sdk_dir $ENV{FBX_SDK})
  if("${fbx_sdk_dir}" STREQUAL "")
    message(FATAL_ERROR "The FBX SDK must be installed and the FBX_SDK environment variable must be set to the SDK directory.")
  endif()

  # Get the directory with the FBX SDK library.
  if(${CMAKE_CXX_COMPILER_ID} STREQUAL Clang)
    set(fbx_sdk_lib_dir "${fbx_sdk_dir}/lib/clang")

  elseif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
    set(fbx_sdk_lib_dir "${fbx_sdk_dir}/lib/gcc4/x64")

  elseif(MSVC)
    # Each version of Visual Studio has a different FBX SDK library.
    if(MSVC_VERSION LESS 1600)
      set(fbx_sdk_msvc_dir "vs2008")
    elseif(MSVC_VERSION LESS 1700)
      set(fbx_sdk_msvc_dir "vs2010")
    elseif(MSVC_VERSION LESS 1800)
      set(fbx_sdk_msvc_dir "vs2012")
    elseif(MSVC_VERSION LESS 1900)
      set(fbx_sdk_msvc_dir "vs2013")
    elseif(MSVC_VERSION LESS 2000)
      set(fbx_sdk_msvc_dir "vs2015")
    else()
      message(FATAL_ERROR "The FBX SDK library directory is unknown for this version of Visual Studio.")
    endif()

    # Search for the FBX library.
    # Visual Studio 64 bit option can be specified with
    # `cmake -G "Visual Studio 11 Win64"`
    if(CMAKE_CL_64)
      set(fbx_sdk_msvc_arch "x64")
    else()
      set(fbx_sdk_msvc_arch "x86")
    endif()

    set(fbx_sdk_lib_dir
        "${fbx_sdk_dir}\\lib\\${fbx_sdk_msvc_dir}\\${fbx_sdk_msvc_arch}")

  else()
    message(FATAL_ERROR "The FBX SDK library subdirectory is unknown for your compiler.")
  endif()

  # Prefer the static library '.a' over the sharedlibrary '.so'.
  find_library(fbx_sdk_lib_release
    NAMES libfbxsdk.a fbxsdk libfbxsdk-md.lib
    PATHS ${fbx_sdk_lib_dir}/release)

  find_library(fbx_sdk_lib_debug
    NAMES libfbxsdk.a fbxsdk libfbxsdk-md.lib
    PATHS ${fbx_sdk_lib_dir}/debug)

  set(fbx_sdk_lib debug ${fbx_sdk_lib_debug} optimized ${fbx_sdk_lib_release})

  if(NOT fbx_sdk_lib)
    message(FATAL_ERROR "Cannot find the FBX SDK library. For your compiler, it should be in ${fbx_sdk_lib_dir}.")
  endif()

  # Linux and Mac require these libs too.
  if(NOT MSVC)
    set(fbx_sdk_extra_libs pthread dl)
  endif()

  # Don't link fbx_common to itself.
  if(NOT ${target} STREQUAL "fbx_common")
    set(fbx_common_library "fbx_common")
  endif()

  # Add the location of #include <fbxsdk.h>.
  target_include_directories(${target} PRIVATE
      ${fbx_sdk_dir}/include
      ${dependencies_fplutil_dir}/fbx_common/include)

  # Link the executable with the FBX SDK and the static libraries that the
  # FBX SDK needs.
  target_link_libraries(${target}
                        ${fbx_sdk_lib}
                        ${fbx_sdk_extra_libs}
                        ${fbx_common_library})
endfunction()

<commit_msg>Update prebuilts of mesh_pipeline, anim_pipeline, and fplviewer.<commit_after># Copyright 2016 Google Inc. 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.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License 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.
cmake_minimum_required(VERSION 2.8.12)

# For set_common_build_variables().
include (${CMAKE_CURRENT_LIST_DIR}/../buildutil/cmake_common.txt)

# fbx_compile_options()
#
# Set the build options for projects building against the FBX SDK.
# Sets these variables in the caller's scope:
#    CMAKE_C_FLAGS
#    CMAKE_CXX_FLAGS
#    CMAKE_CXX_LINK_FLAGS
# Links against the proper frameworks on Mac, and supresses errors generated
# by the FBX header files.
#
# Should be called before add_library() or add_executible().
#
function(fbx_compile_options)
  # Grab the standard set of build variables.
  set_common_build_variables()

  # These warnings come from the FBX SDK, and they can't be suppressed
  # by pragmas around #include <fbxsdk.h>, so suppress them here.
  if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
    append_flags(CMAKE_CXX_FLAGS "-Wno-literal-suffix -Wno-comment")
    string(REPLACE "-Wall" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
    string(REPLACE "-pedantic" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
    string(REPLACE "-Werror" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
    string(REPLACE "-Wextra" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
  endif()

  # Needed by the FBX SDK when we call some file manipulation functions.
  if(APPLE)
    set(CMAKE_CXX_LINK_FLAGS "-framework Carbon")
  endif()

  # Statically link the C runtime .so files to make binary more portable.
  if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
    set(CMAKE_CXX_LINK_FLAGS "-static")
  endif()

  # Set the compile and link flags in the calling scope.
  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}" PARENT_SCOPE)
  set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}" PARENT_SCOPE)
  set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}" PARENT_SCOPE)
  set(CMAKE_C_FLAGS_DEFAULT "${CMAKE_C_FLAGS}" PARENT_SCOPE)
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" PARENT_SCOPE)
  set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}" PARENT_SCOPE)
  set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}" PARENT_SCOPE)
  set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS}" PARENT_SCOPE)
  set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}" PARENT_SCOPE)
endfunction()


# fbx_configure_target(target)
#
# Calls target_include_directories() and target_link_libraries() on the
# specified target so that it can build against the FBX SDK.
#
# Should be called *after* add_library() or add_executible(), with the target
# created by that calls.
#
function(fbx_configure_target target)
  # Autodesk's FBX SDK must be installed to build the pipeline.
  set(fbx_sdk_dir $ENV{FBX_SDK})
  if("${fbx_sdk_dir}" STREQUAL "")
    message(FATAL_ERROR "The FBX SDK must be installed and the FBX_SDK environment variable must be set to the SDK directory.")
  endif()

  # Get the directory with the FBX SDK library.
  if(${CMAKE_CXX_COMPILER_ID} STREQUAL Clang)
    set(fbx_sdk_lib_dir "${fbx_sdk_dir}/lib/clang")

  elseif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
    set(fbx_sdk_lib_dir "${fbx_sdk_dir}/lib/gcc4/x64")

  elseif(MSVC)
    # Each version of Visual Studio has a different FBX SDK library.
    if(MSVC_VERSION LESS 1600)
      set(fbx_sdk_msvc_dir "vs2008")
    elseif(MSVC_VERSION LESS 1700)
      set(fbx_sdk_msvc_dir "vs2010")
    elseif(MSVC_VERSION LESS 1800)
      set(fbx_sdk_msvc_dir "vs2012")
    elseif(MSVC_VERSION LESS 1900)
      set(fbx_sdk_msvc_dir "vs2013")
    elseif(MSVC_VERSION LESS 2000)
      set(fbx_sdk_msvc_dir "vs2015")
    else()
      message(FATAL_ERROR "The FBX SDK library directory is unknown for this version of Visual Studio.")
    endif()

    # Search for the FBX library.
    # Visual Studio 64 bit option can be specified with
    # `cmake -G "Visual Studio 11 Win64"`
    if(CMAKE_CL_64)
      set(fbx_sdk_msvc_arch "x64")
    else()
      set(fbx_sdk_msvc_arch "x86")
    endif()

    set(fbx_sdk_lib_dir
        "${fbx_sdk_dir}\\lib\\${fbx_sdk_msvc_dir}\\${fbx_sdk_msvc_arch}")

  else()
    message(FATAL_ERROR "The FBX SDK library subdirectory is unknown for your compiler.")
  endif()

  # Prefer the static library '.a' over the sharedlibrary '.so'.
  find_library(fbx_sdk_lib_release
    NAMES libfbxsdk.a fbxsdk libfbxsdk-mt.lib
    PATHS ${fbx_sdk_lib_dir}/release)

  find_library(fbx_sdk_lib_debug
    NAMES libfbxsdk.a fbxsdk libfbxsdk-mt.lib
    PATHS ${fbx_sdk_lib_dir}/debug)

  set(fbx_sdk_lib debug ${fbx_sdk_lib_debug} optimized ${fbx_sdk_lib_release})

  if(NOT fbx_sdk_lib)
    message(FATAL_ERROR "Cannot find the FBX SDK library. For your compiler, it should be in ${fbx_sdk_lib_dir}.")
  endif()

  # Linux and Mac require these libs too.
  if(NOT MSVC)
    set(fbx_sdk_extra_libs pthread dl)
  endif()

  # Don't link fbx_common to itself.
  if(NOT ${target} STREQUAL "fbx_common")
    set(fbx_common_library "fbx_common")
  endif()

  # Add the location of #include <fbxsdk.h>.
  target_include_directories(${target} PRIVATE
      ${fbx_sdk_dir}/include
      ${dependencies_fplutil_dir}/fbx_common/include)

  # Link the executable with the FBX SDK and the static libraries that the
  # FBX SDK needs.
  target_link_libraries(${target}
                        ${fbx_sdk_lib}
                        ${fbx_sdk_extra_libs}
                        ${fbx_common_library})
endfunction()


{'fraction_non_alphanumeric': 0.0912283782597243, 'fraction_numerical': 0.011765738870840285, 'mean_word_length': 4.2585410895660205, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '204847', 'n_tokens_mistral': 4303, 'n_tokens_neox': 3887, 'n_words': 1082}