<commit_before>FIND_PACKAGE(Matlab REQUIRED)

CMAKE_DEPENDENT_OPTION(BTK_WRAP_MATLAB_REDISTRIBUABLE_MEX_FILES
                       "Compiler option to be able to redistribute BTK MEX files on machine without the same developper environment (builds BTK in Release mode and links libraries in static mode (if MSVC is the compiler)." OFF
                       BTK_WRAP_MATLAB OFF)

IF (BTK_WRAP_MATLAB_REDISTRIBUABLE_MEX_FILES)
  SET(CMAKE_BUILD_MRD 1 CACHE STRING "State of building BTK with the Matlab Wrapping in redistribuable mode" FORCE)
  SET(CMAKE_OLD_BUILD_TYPE 0 CACHE STRING "CMAKE_BUILD_TYPE old value")
  SET(CMAKE_OLD_CXX_FLAGS_RELEASE 0 CACHE STRING "CMAKE_CXX_FLAGS_RELEASE old value")
  MARK_AS_ADVANCED(CMAKE_BUILD_MRD CMAKE_OLD_BUILD_TYPE CMAKE_OLD_CXX_FLAGS_RELEASE)
  IF(BTK_BUILD_SHARED_LIBS AND MSVC)
    MESSAGE(FATAL_ERROR "The use of options BTK_WRAP_MATLAB_REDISTRIBUABLE_MEX_FILES and BUILD_SHARED_LIBS together are not compatible. The first wants to create a static library and the second a dynamic library. By using BUILD_SHARED_LIBS in Release mode, you can redistribute the MEX-Files, but the target machines need a \"Microsoft Visual C++ Redistributable Package\" corresponding to the used compiler.")
  ENDIF(BTK_BUILD_SHARED_LIBS AND MSVC)

  IF(NOT CMAKE_OLD_BUILD_TYPE)
    SET(CMAKE_OLD_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "CMAKE_BUILD_TYPE old value" FORCE)
  ENDIF(NOT CMAKE_OLD_BUILD_TYPE)
  IF(NOT CMAKE_OLD_CXX_FLAGS_RELEASE)
    SET(CMAKE_OLD_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE} CACHE STRING "CMAKE_CXX_FLAGS_RELEASE old value" FORCE)
  ENDIF(NOT CMAKE_OLD_CXX_FLAGS_RELEASE)

  SET(CMAKE_BUILD_TYPE Release CACHE STRING "The build type is fixed due to the activation of BTK_WRAP_MATLAB_REDISTRIBUABLE_MEX_FILES, Uncheck it to go to previous options." FORCE)
  IF (MSVC)
    IF (${CMAKE_SYSTEM_VERSION} LESS 6.1) # Windows XP, VISTA
      SET(CMAKE_CXX_FLAGS_RELEASE "/MT /O2 /Ob2 /D NDEBUG" CACHE STRING "The CXX flags are fixed due to the activation of BTK_WRAP_MATLAB_REDISTRIBUABLE_MEX_FILES, Uncheck it to go to previous flags." FORCE)
      MESSAGE(STATUS "WARNING: Due to a different mechanism introduced in Windows 7, it is not possible to redistribute the MEX files compiled for Windows XP or Vista into Windows 7.")
    ELSE (${CMAKE_SYSTEM_VERSION} LESS 6.1) # Windows 7 or upper.<commit_msg>[FIX] Compiler error under Windows when the CMake option BTK_WRAP_MATLAB_REDISTRIBUABLE_MEX_FILES is used since the integration of Open3DMotion.<commit_after>FIND_PACKAGE(Matlab REQUIRED)

CMAKE_DEPENDENT_OPTION(BTK_WRAP_MATLAB_REDISTRIBUABLE_MEX_FILES
                       "Compiler option to be able to redistribute BTK MEX files on machine without the same developper environment (builds BTK in Release mode and links libraries in static mode (if MSVC is the compiler)." OFF
                       BTK_WRAP_MATLAB OFF)

IF (BTK_WRAP_MATLAB_REDISTRIBUABLE_MEX_FILES)
  SET(CMAKE_BUILD_MRD 1 CACHE STRING "State of building BTK with the Matlab Wrapping in redistribuable mode" FORCE)
  SET(CMAKE_OLD_BUILD_TYPE 0 CACHE STRING "CMAKE_BUILD_TYPE old value")
  SET(CMAKE_OLD_CXX_FLAGS_RELEASE 0 CACHE STRING "CMAKE_CXX_FLAGS_RELEASE old value")
  MARK_AS_ADVANCED(CMAKE_BUILD_MRD CMAKE_OLD_BUILD_TYPE CMAKE_OLD_CXX_FLAGS_RELEASE)
  IF(BTK_BUILD_SHARED_LIBS AND MSVC)
    MESSAGE(FATAL_ERROR "The use of options BTK_WRAP_MATLAB_REDISTRIBUABLE_MEX_FILES and BUILD_SHARED_LIBS together are not compatible. The first wants to create a static library and the second a dynamic library. By using BUILD_SHARED_LIBS in Release mode, you can redistribute the MEX-Files, but the target machines need a \"Microsoft Visual C++ Redistributable Package\" corresponding to the used compiler.")
  ENDIF(BTK_BUILD_SHARED_LIBS AND MSVC)

  IF(NOT CMAKE_OLD_BUILD_TYPE)
    SET(CMAKE_OLD_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "CMAKE_BUILD_TYPE old value" FORCE)
  ENDIF(NOT CMAKE_OLD_BUILD_TYPE)
  IF(NOT CMAKE_OLD_C_FLAGS_RELEASE)
    SET(CMAKE_OLD_C_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE} CACHE STRING "CMAKE_C_FLAGS_RELEASE old value" FORCE)
  ENDIF(NOT CMAKE_OLD_C_FLAGS_RELEASE)
  IF(NOT CMAKE_OLD_CXX_FLAGS_RELEASE)
    SET(CMAKE_OLD_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE} CACHE STRING "CMAKE_CXX_FLAGS_RELEASE old value" FORCE)
  ENDIF(NOT CMAKE_OLD_CXX_FLAGS_RELEASE)

  SET(CMAKE_BUILD_TYPE Release CACHE STRING "The build type is fixed due to the activation of BTK_WRAP_MATLAB_REDISTRIBUABLE_MEX_FILES, Uncheck it to go to previous options." FORCE)
  IF (MSVC)
    IF (${CMAKE_SYSTEM_VERSION} LESS 6.1) # Windows XP, VISTA
      SET(CMAKE_C_FLAGS_RELEASE "/MT /O2 /Ob2 /D NDEBUG" CACHE STRING "The C flags are fixed due to the activation of BTK_WRAP_SCILAB_REDISTRIBUABLE_FILES, Uncheck it to go to previous flags." FORCE)
      SET(CMAKE_CXX_FLAGS_RELEASE "/MT /O2 /Ob2 /D NDEBUG" CACHE STRING "The CXX flags are fixed due to the activation of BTK_WRAP_MATLAB_REDISTRIBUABLE_MEX_FILES, Uncheck it to go to previous flags." FORCE)
      MESSAGE(STATUS "WARNING: Due to a different mechanism introduced in Windows 7, it is not possible to redistribute the MEX files compiled for Windows XP or Vista into Windows 7.")
    ELSE (${CMAKE_SYSTEM_VERSION} LESS 6.1) # Windows 7 or upper.
{'fraction_non_alphanumeric': 0.04840861444635029, 'fraction_numerical': 0.005145797598627788, 'mean_word_length': 5.32289156626506, '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': '5083662', 'n_tokens_mistral': 1920, 'n_tokens_neox': 1753, 'n_words': 560}