<commit_before>
########################################################################################
############################################################################################################################
#####                ################################################################################################################
###  Compiler Options  #################################################################################################################
#####                ################################################################################################################
############################################################################################################################
########################################################################################


if( NOT ENGINE_LINK_SHARED )
   set( PROJECT_DEFINES_GCC   "-DGLEW_STATIC" )
   set( PROJECT_DEFINES_CLANG "-DGLEW_STATIC" )
   set( PROJECT_DEFINES_INTEL "<insert here>" ) # TODO
   set( PROJECT_DEFINES_MSVC  "<insert here>" ) # TODO
endif( NOT ENGINE_LINK_SHARED )

if( LOG_FALLBACK )
  set( PROJECT_DEFINES_GCC   "${PROJECT_DEFINES_GCC}   -DLOG_FALLBACK" )
  set( PROJECT_DEFINES_CLANG "${PROJECT_DEFINES_CLANG} -DLOG_FALLBACK" )
  set( PROJECT_DEFINES_INTEL "${PROJECT_DEFINES_INTEL} <insert here>"  ) # TODO
  set( PROJECT_DEFINES_MSVC  "${PROJECT_DEFINES_MSVC}  <insert here>"  ) # TODO
endif( LOG_FALLBACK )

if( ENGINE_VERBOSE )
   set( GCC_VERBOSE   "--verbose" )
   set( CLANG_VERBOSE "-v" )
   set( INTEL_VERBOSE "<verbose flag>" ) # TODO
   set( MSVC_VERBOSE  "<verbose flag>" ) # TODO
endif( ENGINE_VERBOSE )


set( ENGINE_COMPILER_VERSION ${CMAKE_CXX_COMPILER_VERSION} )



# Options GCC

# CMAKE_CXX_COMPILER_VERSION doesent work always defined, so this is needed
if( CMAKE_CXX_COMPILER_ID MATCHES GNU )
   if( NOT DEFINED CMAKE_CXX_COMPILER_VERSION )
      execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_COMPILER_VERSION)
   else( NOT DEFINED CMAKE_CXX_COMPILER_VERSION )
      set( GCC_COMPILER_VERSION ${CMAKE_CXX_COMPILER_VERSION} )
   endif( NOT DEFINED CMAKE_CXX_COMPILER_VERSION )
   
   set( ENGINE_COMPILER_VERSION ${GCC_COMPILER_VERSION} )
endif( CMAKE_CXX_COMPILER_ID MATCHES GNU )

set( GCC_ENABLE_CXX_11 "-std=c++11" )
if( CMAKE_CXX_COMPILER_ID MATCHES GNU AND GCC_COMPILER_VERSION LESS 4.8 )
   if( GCC_COMPILER_VERSION LESS 4.8 )
      message( FATAL_ERROR "Your GCC compiler version is to old! You need at least GCC v4.8" )
   endif( GCC_COMPILER_VERSION LESS 4.8 )
   set( GCC_ENABLE_CXX_14 "-std=c++0x" )
endif( CMAKE_CXX_COMPILER_ID MATCHES GNU AND GCC_COMPILER_VERSION LESS 4.8 )

set( GNU_COMPILER_OPTIONS_DEBUG   "-Wall ${GCC_ENABLE_CXX_11} ${PROJECT_DEFINES_GCC} ${GCC_VERBOSE}" )
set( GNU_COMPILER_OPTIONS_RELEASE "-Wall ${GCC_ENABLE_CXX_11} ${PROJECT_DEFINES_GCC} ${GCC_VERBOSE} -O3" )

if( DEFINED EXTRA_WARNINGS )
   set( GNU_COMPILER_OPTIONS_DEBUG   "-Winline -Werror ${GNU_COMPILER_OPTIONS_DEBUG}" )
   set( GNU_COMPILER_OPTIONS_RELEASE "-Winline -Werror ${GNU_COMPILER_OPTIONS_RELEASE}" )
endif( DEFINED EXTRA_WARNINGS )




# Options LLVM
set( CLANG_ENABLE_CXX_11 "-std=c++11")

set( CLANG_COMPILER_OPTIONS_DEBUG   "${CLANG_ENABLE_CXX_11} ${PROJECT_DEFINES_CLANG} ${CLANG_VERBOSE}" )
set( CLANG_COMPILER_OPTIONS_RELEASE "${CLANG_ENABLE_CXX_11} ${PROJECT_DEFINES_CLANG} ${CLANG_VERBOSE}" )

if( DEFINED EXTRA_WARNINGS )
   set( CLANG_COMPILER_OPTIONS_DEBUG   "-Werror -Wthread-safety -ftemplate-backtrace-limit=0 ${CLANG_COMPILER_OPTIONS_DEBUG}" )
   set( CLANG_COMPILER_OPTIONS_RELEASE "-Werror -Wthread-safety -ftemplate-backtrace-limit=0 ${CLANG_COMPILER_OPTIONS_RELEASE}" )
endif( DEFINED EXTRA_WARNINGS )





# Options ICC  - TODO

set( INTEL_COMPILER_OPTIONS_DEBUG   "<insert here> ${PROJECT_DEFINES_INTEL} ${INTEL_VERBOSE}" )
set( INTEL_COMPILER_OPTIONS_RELEASE "<insert here> ${PROJECT_DEFINES_INTEL} ${INTEL_VERBOSE}" )

if( DEFINED EXTRA_WARNINGS )
   set( INTEL_COMPILER_OPTIONS_DEBUG   "<insert here> ${INTEL_COMPILER_OPTIONS_DEBUG}" )
   set( INTEL_COMPILER_OPTIONS_RELEASE "<insert here> ${INTEL_COMPILER_OPTIONS_RELEASE}" )
endif( DEFINED EXTRA_WARNINGS )




# Options MSVC

set( MSVC_COMPILER_OPTIONS_DEBUG   "/Od ${PROJECT_DEFINES_MSVC} ${MSVC_VERBOSE}" )
set( MSVC_COMPILER_OPTIONS_RELEASE "/O2 ${PROJECT_DEFINES_MSVC} ${MSVC_VERBOSE}" )

if( DEFINED EXTRA_WARNINGS )
   set( MSVC_COMPILER_OPTIONS_DEBUG   "<insert here> ${MSVC_COMPILER_OPTIONS_DEBUG}" )
   set( MSVC_COMPILER_OPTIONS_RELEASE "<insert here> ${MSVC_COMPILER_OPTIONS_RELEASE}" )
endif( DEFINED EXTRA_WARNINGS )




<commit_msg>Fixed cmake. Plus additional debug output.<commit_after>
########################################################################################
############################################################################################################################
#####                ################################################################################################################
###  Compiler Options  #################################################################################################################
#####                ################################################################################################################
############################################################################################################################
########################################################################################


if( NOT ENGINE_LINK_SHARED )
   set( PROJECT_DEFINES_GCC   "-DGLEW_STATIC" )
   set( PROJECT_DEFINES_CLANG "-DGLEW_STATIC" )
   set( PROJECT_DEFINES_INTEL "<insert here>" ) # TODO
   set( PROJECT_DEFINES_MSVC  "<insert here>" ) # TODO
endif( NOT ENGINE_LINK_SHARED )

if( LOG_FALLBACK )
  set( PROJECT_DEFINES_GCC   "${PROJECT_DEFINES_GCC}   -DLOG_FALLBACK" )
  set( PROJECT_DEFINES_CLANG "${PROJECT_DEFINES_CLANG} -DLOG_FALLBACK" )
  set( PROJECT_DEFINES_INTEL "${PROJECT_DEFINES_INTEL} <insert here>"  ) # TODO
  set( PROJECT_DEFINES_MSVC  "${PROJECT_DEFINES_MSVC}  <insert here>"  ) # TODO
endif( LOG_FALLBACK )

if( ENGINE_VERBOSE )
   set( GCC_VERBOSE   "--verbose" )
   set( CLANG_VERBOSE "-v" )
   set( INTEL_VERBOSE "<verbose flag>" ) # TODO
   set( MSVC_VERBOSE  "<verbose flag>" ) # TODO
endif( ENGINE_VERBOSE )


set( ENGINE_COMPILER_VERSION ${CMAKE_CXX_COMPILER_VERSION} )



# Options GCC

# CMAKE_CXX_COMPILER_VERSION doesent work always defined, so this is needed
if( CMAKE_CXX_COMPILER_ID MATCHES GNU )
   if( NOT DEFINED CMAKE_CXX_COMPILER_VERSION )
      execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_COMPILER_VERSION)
   else( NOT DEFINED CMAKE_CXX_COMPILER_VERSION )
      set( GCC_COMPILER_VERSION ${CMAKE_CXX_COMPILER_VERSION} )
   endif( NOT DEFINED CMAKE_CXX_COMPILER_VERSION )
   
   set( ENGINE_COMPILER_VERSION ${GCC_COMPILER_VERSION} )
endif( CMAKE_CXX_COMPILER_ID MATCHES GNU )

set( GCC_ENABLE_CXX_11 "-std=c++11" )
if( CMAKE_CXX_COMPILER_ID MATCHES GNU AND GCC_COMPILER_VERSION LESS 4.8 )
   if( GCC_COMPILER_VERSION LESS 4.8 )
      message( FATAL_ERROR "Your GCC compiler version is to old! You need at least GCC v4.8" )
   endif( GCC_COMPILER_VERSION LESS 4.8 )
   set( GCC_ENABLE_CXX_14 "-std=c++0x" )
endif( CMAKE_CXX_COMPILER_ID MATCHES GNU AND GCC_COMPILER_VERSION LESS 4.8 )

set( GNU_COMPILER_OPTIONS_DEBUG   "-Wall ${GCC_ENABLE_CXX_11} ${PROJECT_DEFINES_GCC} ${GCC_VERBOSE}" )
set( GNU_COMPILER_OPTIONS_RELEASE "-Wall ${GCC_ENABLE_CXX_11} ${PROJECT_DEFINES_GCC} ${GCC_VERBOSE} -O3" )

if( EXTRA_WARNINGS )
   set( GNU_COMPILER_OPTIONS_DEBUG   "-Winline -Werror ${GNU_COMPILER_OPTIONS_DEBUG}" )
   set( GNU_COMPILER_OPTIONS_RELEASE "-Winline -Werror ${GNU_COMPILER_OPTIONS_RELEASE}" )
endif( EXTRA_WARNINGS )




# Options LLVM
set( CLANG_ENABLE_CXX_11 "-std=c++11")

set( CLANG_COMPILER_OPTIONS_DEBUG   "${CLANG_ENABLE_CXX_11} ${PROJECT_DEFINES_CLANG} ${CLANG_VERBOSE}" )
set( CLANG_COMPILER_OPTIONS_RELEASE "${CLANG_ENABLE_CXX_11} ${PROJECT_DEFINES_CLANG} ${CLANG_VERBOSE}" )

if( EXTRA_WARNINGS )
   set( CLANG_COMPILER_OPTIONS_DEBUG   "-Werror -Wthread-safety -ftemplate-backtrace-limit=0 ${CLANG_COMPILER_OPTIONS_DEBUG}" )
   set( CLANG_COMPILER_OPTIONS_RELEASE "-v -Werror -Wthread-safety -ftemplate-backtrace-limit=0 ${CLANG_COMPILER_OPTIONS_RELEASE}" )
endif( EXTRA_WARNINGS )





# Options ICC  - TODO

set( INTEL_COMPILER_OPTIONS_DEBUG   "<insert here> ${PROJECT_DEFINES_INTEL} ${INTEL_VERBOSE}" )
set( INTEL_COMPILER_OPTIONS_RELEASE "<insert here> ${PROJECT_DEFINES_INTEL} ${INTEL_VERBOSE}" )

if( EXTRA_WARNINGS )
   set( INTEL_COMPILER_OPTIONS_DEBUG   "<insert here> ${INTEL_COMPILER_OPTIONS_DEBUG}" )
   set( INTEL_COMPILER_OPTIONS_RELEASE "<insert here> ${INTEL_COMPILER_OPTIONS_RELEASE}" )
endif( EXTRA_WARNINGS )




# Options MSVC

set( MSVC_COMPILER_OPTIONS_DEBUG   "/Od ${PROJECT_DEFINES_MSVC} ${MSVC_VERBOSE}" )
set( MSVC_COMPILER_OPTIONS_RELEASE "/O2 ${PROJECT_DEFINES_MSVC} ${MSVC_VERBOSE}" )

if( EXTRA_WARNINGS )
   set( MSVC_COMPILER_OPTIONS_DEBUG   "<insert here> ${MSVC_COMPILER_OPTIONS_DEBUG}" )
   set( MSVC_COMPILER_OPTIONS_RELEASE "<insert here> ${MSVC_COMPILER_OPTIONS_RELEASE}" )
endif( EXTRA_WARNINGS )





{'fraction_non_alphanumeric': 0.24978364344439635, 'fraction_numerical': 0.007139766334919948, 'mean_word_length': 6.755872483221476, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, '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': '2619601', 'n_tokens_mistral': 3416, 'n_tokens_neox': 3094, 'n_words': 558}