<commit_before>#
# Create a core library (Algorithms, DataStructures etc.)
# 
# No parameters. Expects files.cmake in the same directory and CMake
# variables LIBPOSTFIX and KITNAME to be set correctly
#
MACRO(CREATE_CORE_LIB)
  INCLUDE(files.cmake)
  IF(MITK_CMAKE_DEBUG)
    FILE(GLOB_RECURSE CPP_FILES_GLOB RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp)
    FOREACH(CPP_FILE ${CPP_FILES})  
      IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${CPP_FILE})
        LIST(REMOVE_ITEM CPP_FILES_GLOB ${CPP_FILE}) 
      ELSE(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${CPP_FILE})
        # this does not work since there are some generated files added by template macro
        # MESSAGE(STATUS "WARNING: referenced file from files.cmake does not exist: ${CPP_FILE}")
        # LIST(REMOVE_ITEM CPP_FILES ${CPP_FILE}) 
      ENDIF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${CPP_FILE})
    ENDFOREACH(CPP_FILE)
    IF(CPP_FILES_GLOB)
      MESSAGE(STATUS "WARNING: possibly obsolete files: ${CPP_FILES_GLOB}")
    ENDIF(CPP_FILES_GLOB)
  ENDIF(MITK_CMAKE_DEBUG)
  IF(MITK_USE_GLOBBING)
    FILE(GLOB_RECURSE CPP_FILES_GLOB RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp)
    SET(CPP_FILES ${CPP_FILES_GLOB})
  ENDIF(MITK_USE_GLOBBING)

  GET_FILENAME_COMPONENT(LIBNAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
  SET(LIBNAME mitk${LIBNAME}${LIBPOSTFIX})
  ADD_LIBRARY(${LIBNAME} ${CPP_FILES})
  TARGET_LINK_LIBRARIES(${LIBNAME} ${LIBRARIES_FOR_${KITNAME}_CORE})
ENDMACRO(CREATE_CORE_LIB)

MACRO(CREATE_QMITK)
  SUPPRESS_VC8_DEPRECATED_WARNINGS()
  INCLUDE(files.cmake)
  INCLUDE_DIRECTORIES(${Q${KITNAME}_INCLUDE_DIRS})
  ADD_DEFINITIONS(${QT_DEFINITIONS})
  IF(UI_FILES)
  QT_WRAP_UI(Qmitk${LIBPOSTFIX} Q${KITNAME}_GENERATED_H Q${KITNAME}_GENERATED_CPP ${UI_FILES})
  ENDIF(UI_FILES)
  IF(MOC_H_FILES)
  QT_WRAP_CPP(Qmitk${LIBPOSTFIX} Q${KITNAME}_GENERATED_CPP ${MOC_H_FILES})

  ENDIF(MOC_H_FILES)
  ADD_LIBRARY(Qmitk${LIBPOSTFIX} ${ARGV0} ${CPP_FILES} ${Q${KITNAME}_GENERATED_CPP})
  TARGET_LINK_LIBRARIES(Qmitk${LIBPOSTFIX} ${QT_LIBRARIES} ${${KITNAME}_CORE_LIBRARIES})
ENDMACRO(CREATE_QMITK)

MACRO(CREATE_Q4MITK)
  SUPPRESS_VC8_DEPRECATED_WARNINGS()
  INCLUDE(files.cmake)
  INCLUDE_DIRECTORIES(${Q${KITNAME}_INCLUDE_DIRS})
  ADD_DEFINITIONS(${QT_DEFINITIONS})
  IF(UI_FILES)
  QT4_WRAP_UI(${UI_FILES})
  ENDIF(UI_FILES)
  IF(MOC_H_FILES)
  QT4_WRAP_CPP(Q${KITNAME}_GENERATED_CPP ${MOC_H_FILES})

  ENDIF(MOC_H_FILES)
  ADD_LIBRARY(Qmitk${LIBPOSTFIX} ${ARGV0} ${CPP_FILES} ${Q${KITNAME}_GENERATED_CPP})
  TARGET_LINK_LIBRARIES(Qmitk${LIBPOSTFIX} ${QT_LIBRARIES} ${${KITNAME}_CORE_LIBRARIES})
ENDMACRO(CREATE_Q4MITK)

MACRO(APPLY_VTK_FLAGS)
  IF(NOT MITK_VTK_FLAGS_APPLIED)<commit_msg>COMP (#581): fixed missing generation of ui files for Qt4<commit_after>#
# Create a core library (Algorithms, DataStructures etc.)
# 
# No parameters. Expects files.cmake in the same directory and CMake
# variables LIBPOSTFIX and KITNAME to be set correctly
#
MACRO(CREATE_CORE_LIB)
  INCLUDE(files.cmake)
  IF(MITK_CMAKE_DEBUG)
    FILE(GLOB_RECURSE CPP_FILES_GLOB RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp)
    FOREACH(CPP_FILE ${CPP_FILES})  
      IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${CPP_FILE})
        LIST(REMOVE_ITEM CPP_FILES_GLOB ${CPP_FILE}) 
      ELSE(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${CPP_FILE})
        # this does not work since there are some generated files added by template macro
        # MESSAGE(STATUS "WARNING: referenced file from files.cmake does not exist: ${CPP_FILE}")
        # LIST(REMOVE_ITEM CPP_FILES ${CPP_FILE}) 
      ENDIF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${CPP_FILE})
    ENDFOREACH(CPP_FILE)
    IF(CPP_FILES_GLOB)
      MESSAGE(STATUS "WARNING: possibly obsolete files: ${CPP_FILES_GLOB}")
    ENDIF(CPP_FILES_GLOB)
  ENDIF(MITK_CMAKE_DEBUG)
  IF(MITK_USE_GLOBBING)
    FILE(GLOB_RECURSE CPP_FILES_GLOB RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp)
    SET(CPP_FILES ${CPP_FILES_GLOB})
  ENDIF(MITK_USE_GLOBBING)

  GET_FILENAME_COMPONENT(LIBNAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
  SET(LIBNAME mitk${LIBNAME}${LIBPOSTFIX})
  ADD_LIBRARY(${LIBNAME} ${CPP_FILES})
  TARGET_LINK_LIBRARIES(${LIBNAME} ${LIBRARIES_FOR_${KITNAME}_CORE})
ENDMACRO(CREATE_CORE_LIB)

MACRO(CREATE_QMITK)
  SUPPRESS_VC8_DEPRECATED_WARNINGS()
  INCLUDE(files.cmake)
  INCLUDE_DIRECTORIES(${Q${KITNAME}_INCLUDE_DIRS})
  ADD_DEFINITIONS(${QT_DEFINITIONS})
  IF(UI_FILES)
  QT_WRAP_UI(Qmitk${LIBPOSTFIX} Q${KITNAME}_GENERATED_H Q${KITNAME}_GENERATED_CPP ${UI_FILES})
  ENDIF(UI_FILES)
  IF(MOC_H_FILES)
  QT_WRAP_CPP(Qmitk${LIBPOSTFIX} Q${KITNAME}_GENERATED_CPP ${MOC_H_FILES})

  ENDIF(MOC_H_FILES)
  ADD_LIBRARY(Qmitk${LIBPOSTFIX} ${ARGV0} ${CPP_FILES} ${Q${KITNAME}_GENERATED_CPP})
  TARGET_LINK_LIBRARIES(Qmitk${LIBPOSTFIX} ${QT_LIBRARIES} ${${KITNAME}_CORE_LIBRARIES})
ENDMACRO(CREATE_QMITK)

MACRO(CREATE_Q4MITK)
  SUPPRESS_VC8_DEPRECATED_WARNINGS()
  INCLUDE(files.cmake)
  INCLUDE_DIRECTORIES(${Q${KITNAME}_INCLUDE_DIRS})
  ADD_DEFINITIONS(${QT_DEFINITIONS})
  IF(UI_FILES)
  QT4_WRAP_UI(Q${KITNAME}_GENERATED_CPP ${UI_FILES})
  ENDIF(UI_FILES)
  IF(MOC_H_FILES)
  QT4_WRAP_CPP(Q${KITNAME}_GENERATED_CPP ${MOC_H_FILES})

  ENDIF(MOC_H_FILES)
  ADD_LIBRARY(Qmitk${LIBPOSTFIX} ${ARGV0} ${CPP_FILES} ${Q${KITNAME}_GENERATED_CPP})
  TARGET_LINK_LIBRARIES(Qmitk${LIBPOSTFIX} ${QT_LIBRARIES} ${${KITNAME}_CORE_LIBRARIES})
ENDMACRO(CREATE_Q4MITK)

MACRO(APPLY_VTK_FLAGS)
  IF(NOT MITK_VTK_FLAGS_APPLIED)
{'fraction_non_alphanumeric': 0.11853368068477857, 'fraction_numerical': 0.003721622627465575, 'mean_word_length': 7.01043219076006, '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': '5594157', 'n_tokens_mistral': 2378, 'n_tokens_neox': 2150, 'n_words': 305}