<commit_before># TODO: Check if we have to install the buildin freetype version
# or if we can use the system version of frretype. 
# Up to now we don't check and install the buildin version anyway.
##is_root_install_option_enabled(builtin_f)
##if(option_builtin_pcre_is_enabled)
###  MESSAGE("BLA: ${option_builtin_pcre_is_enabled}")
###  add_subdirectory (core/pcre)
##endif(option_builtin_pcre_is_enabled)

# This is not a verry clean solution, but the problem is that the pcre has its
# own tarfile and its own buildsystem. So we have to unpack the tarfile and
# then call the build system of pcre. The created library is imported into
# the scope of cmake, so even make clean works.

#---Define package related variables------------------------------------------------------------ 
set(FREETYPE_SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}/src)
set(FREETYPE_VERSION freetype-2.3.12)
set(FREETYPE_VERSION ${FREETYPE_VERSION} PARENT_SCOPE)
set(FREETYPE_TARGZFILE ${FREETYPE_SRCDIR}/${FREETYPE_VERSION}.tar.gz)
set(FREETYPE_TARFILE ${FREETYPE_SRCDIR}/${FREETYPE_VERSION}.tar)

if(WIN32)
  set(freetypelib  ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/freetype.lib)
  if(winrtdebug)  
    set(freetypeliba ${CMAKE_CURRENT_BINARY_DIR}/${FREETYPE_VERSION}/objs/freetype2312MT_D.lib)
    set(freetypebuild "freetype - Win32 Debug Multithreaded")
  else()
    set(freetypeliba ${CMAKE_CURRENT_BINARY_DIR}/${FREETYPE_VERSION}/objs/freetype2312MT.lib)
    set(freetypebuild "freetype - Win32 Release Multithreaded")
  endif()
  add_custom_command( OUTPUT ${freetypeliba}
                      COMMAND cmake -E copy_directory ${FREETYPE_SRCDIR}/win win
                      COMMAND cmake -E tar xvzf ${FREETYPE_TARGZFILE}
                      COMMAND cmake -E copy win/freetype.mak ${FREETYPE_VERSION}/builds/win32/visualc
                      COMMAND cmake -E copy win/freetype.dep ${FREETYPE_VERSION}/builds/win32/visualc
                      COMMAND cmake -E chdir ${FREETYPE_VERSION}/builds/win32/visualc 
                              nmake -nologo -f freetype.mak CFG=${freetypebuild} NMAKECXXFLAGS="-D_CRT_SECURE_NO_DEPRECATE" )
else()
  set(freetypelib  ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libfreetype.a)
  set(freetypeliba ${CMAKE_CURRENT_BINARY_DIR}/${FREETYPE_VERSION}/objs/.libs/libfreetype.a)

  #---Define special compiler settings for freetype-----------------------------------------------
  set(FREETYPE_CC ${CMAKE_C_COMPILER})
  set(FREETYPE_CFLAGS "-O")
  if(ROOT_ARCHITECTURE MATCHES alphacxx6)
    set(FREETYPE_CC "cc")  
  elseif(ROOT_ARCHITECTURE MATCHES linuxx8664gcc)
    set(FREETYPE_CFLAGS "-m64 -O")
  elseif(ROOT_ARCHITECTURE MATCHES linuxicc)
    set(FREETYPE_CFLAGS "-m32 -O")
  elseif(ROOT_ARCHITECTURE MATCHES linuxx8664icc)
    set(FREETYPE_CFLAGS "-m64 -O")
  elseif(ROOT_ARCHITECTURE MATCHES linuxppc64gcc)  
    set(FREETYPE_CFLAGS "-m64 -O")
  elseif(ROOT_ARCHITECTURE MATCHES linux)
    set(FREETYPE_CFLAGS "-m32 -O")<commit_msg>Frome Pere: Add missing compiler flag<commit_after># TODO: Check if we have to install the buildin freetype version
# or if we can use the system version of frretype. 
# Up to now we don't check and install the buildin version anyway.
##is_root_install_option_enabled(builtin_f)
##if(option_builtin_pcre_is_enabled)
###  MESSAGE("BLA: ${option_builtin_pcre_is_enabled}")
###  add_subdirectory (core/pcre)
##endif(option_builtin_pcre_is_enabled)

# This is not a verry clean solution, but the problem is that the pcre has its
# own tarfile and its own buildsystem. So we have to unpack the tarfile and
# then call the build system of pcre. The created library is imported into
# the scope of cmake, so even make clean works.

#---Define package related variables------------------------------------------------------------ 
set(FREETYPE_SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}/src)
set(FREETYPE_VERSION freetype-2.3.12)
set(FREETYPE_VERSION ${FREETYPE_VERSION} PARENT_SCOPE)
set(FREETYPE_TARGZFILE ${FREETYPE_SRCDIR}/${FREETYPE_VERSION}.tar.gz)
set(FREETYPE_TARFILE ${FREETYPE_SRCDIR}/${FREETYPE_VERSION}.tar)

if(WIN32)
  set(freetypelib  ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/freetype.lib)
  if(winrtdebug)  
    set(freetypeliba ${CMAKE_CURRENT_BINARY_DIR}/${FREETYPE_VERSION}/objs/freetype2312MT_D.lib)
    set(freetypebuild "freetype - Win32 Debug Multithreaded")
  else()
    set(freetypeliba ${CMAKE_CURRENT_BINARY_DIR}/${FREETYPE_VERSION}/objs/freetype2312MT.lib)
    set(freetypebuild "freetype - Win32 Release Multithreaded")
  endif()
  add_custom_command( OUTPUT ${freetypeliba}
                      COMMAND cmake -E copy_directory ${FREETYPE_SRCDIR}/win win
                      COMMAND cmake -E tar xvzf ${FREETYPE_TARGZFILE}
                      COMMAND cmake -E copy win/freetype.mak ${FREETYPE_VERSION}/builds/win32/visualc
                      COMMAND cmake -E copy win/freetype.dep ${FREETYPE_VERSION}/builds/win32/visualc
                      COMMAND cmake -E chdir ${FREETYPE_VERSION}/builds/win32/visualc 
                              nmake -nologo -f freetype.mak CFG=${freetypebuild} NMAKECXXFLAGS="-MD -GR -D_CRT_SECURE_NO_DEPRECATE" )
else()
  set(freetypelib  ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libfreetype.a)
  set(freetypeliba ${CMAKE_CURRENT_BINARY_DIR}/${FREETYPE_VERSION}/objs/.libs/libfreetype.a)

  #---Define special compiler settings for freetype-----------------------------------------------
  set(FREETYPE_CC ${CMAKE_C_COMPILER})
  set(FREETYPE_CFLAGS "-O")
  if(ROOT_ARCHITECTURE MATCHES alphacxx6)
    set(FREETYPE_CC "cc")  
  elseif(ROOT_ARCHITECTURE MATCHES linuxx8664gcc)
    set(FREETYPE_CFLAGS "-m64 -O")
  elseif(ROOT_ARCHITECTURE MATCHES linuxicc)
    set(FREETYPE_CFLAGS "-m32 -O")
  elseif(ROOT_ARCHITECTURE MATCHES linuxx8664icc)
    set(FREETYPE_CFLAGS "-m64 -O")
  elseif(ROOT_ARCHITECTURE MATCHES linuxppc64gcc)  
    set(FREETYPE_CFLAGS "-m64 -O")
  elseif(ROOT_ARCHITECTURE MATCHES linux)
    set(FREETYPE_CFLAGS "-m32 -O")
{'fraction_non_alphanumeric': 0.12825278810408922, 'fraction_numerical': 0.015207840486650895, 'mean_word_length': 3.6098130841121496, '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': '7564119', 'n_tokens_mistral': 2260, 'n_tokens_neox': 2126, 'n_words': 438}