<commit_before>##############################################################################
#
# Library:   TubeTK
#
# Copyright 2010 Kitware Inc. 28 Corporate Drive,
# Clifton Park, NY, 12065, USA.
#
# 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.
#
##############################################################################

project(TukeTKCompareTools)

if(NOT ITK_SOURCE_DIR)
  find_package( SlicerExecutionModel REQUIRED )
  include( ${SlicerExecutionModel_USE_FILE} )
endif()

if(NOT ITK_SOURCE_DIR)
  find_package( ITK REQUIRED )
  include( ${ITK_USE_FILE} )
endif()

set(_compare_command_targets
  ImageCompareCommand
  TextCompareCommand )

SEMMacroBuildCLI(
  NAME "ImageCompareCommand"
  LOGO_HEADER ${TubeTK_SOURCE_DIR}/Base/CLI/TubeTKLogo.h
  TARGET_LIBRARIES ${ITK_LIBRARIES} TubeTKCommon
  INCLUDE_DIRECTORIES
    ${TubeTK_SLICER_SOURCE_DIR}/Modules/CLI/ExpertAutomatedRegistration
    ${TubeTK_SLICER_SOURCE_DIR}/Modules/CLI/ExpertAutomatedRegistration/ITKRegistrationHelper )

if( TubeTK_USE_JsonCpp )
  list(APPEND _compare_command_targets
    JsonCompareCommand )
  add_executable( JsonCompareCommand JsonCompareCommand.cxx )
  target_link_libraries( JsonCompareCommand
    ${ITK_LIBRARIES}
    ITKIOMeta
    ITKMetaIO
    ${JsonCpp_LIBRARIES} )
endif( TubeTK_USE_JsonCpp )

add_executable( TextCompareCommand TextCompareCommand.cxx )
target_link_libraries( TextCompareCommand ${ITK_LIBRARIES} ITKIOMeta ITKMetaIO)

install( TARGETS
  ${_compare_command_targets}
  DESTINATION ${TubeTK_INSTALL_BIN_DIR}
  COMPONENT Runtime )<commit_msg>STYLE: CompareTools: Simplify build system<commit_after>##############################################################################
#
# Library:   TubeTK
#
# Copyright 2010 Kitware Inc. 28 Corporate Drive,
# Clifton Park, NY, 12065, USA.
#
# 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.
#
##############################################################################

project(TukeTKCompareTools)

if(NOT ITK_SOURCE_DIR)
  find_package( SlicerExecutionModel REQUIRED )
  include( ${SlicerExecutionModel_USE_FILE} )
endif()

if(NOT ITK_SOURCE_DIR)
  find_package( ITK REQUIRED )
  include( ${ITK_USE_FILE} )
endif()

#-----------------------------------------------------------------------------
SEMMacroBuildCLI(
  NAME ImageCompareCommand
  LOGO_HEADER ${TubeTK_SOURCE_DIR}/Base/CLI/TubeTKLogo.h
  TARGET_LIBRARIES ${ITK_LIBRARIES} TubeTKCommon
  INCLUDE_DIRECTORIES
    ${TubeTK_SLICER_SOURCE_DIR}/Modules/CLI/ExpertAutomatedRegistration
    ${TubeTK_SLICER_SOURCE_DIR}/Modules/CLI/ExpertAutomatedRegistration/ITKRegistrationHelper )

#-----------------------------------------------------------------------------
if( TubeTK_USE_JsonCpp )

  set( _toolname JsonCompareCommand )

  message(STATUS "Configuring executable: ${_toolname}")
  add_executable( ${_toolname} ${_toolname}.cxx )
  target_link_libraries( ${_toolname}
    ${ITK_LIBRARIES}
    ITKIOMeta
    ITKMetaIO
    ${JsonCpp_LIBRARIES} )
  install( TARGETS
    ${_toolname}
    DESTINATION ${TubeTK_INSTALL_BIN_DIR}
    COMPONENT Runtime )

endif( TubeTK_USE_JsonCpp )

#-----------------------------------------------------------------------------
set( _toolname TextCompareCommand )
message(STATUS "Configuring executable: ${_toolname}")

add_executable( ${_toolname} ${_toolname}.cxx )
target_link_libraries( ${_toolname} ${ITK_LIBRARIES} ITKIOMeta ITKMetaIO)
install( TARGETS
  ${_toolname}
  DESTINATION ${TubeTK_INSTALL_BIN_DIR}
  COMPONENT Runtime )
{'fraction_non_alphanumeric': 0.19209538529476705, 'fraction_numerical': 0.00662397880326783, 'mean_word_length': 4.298245614035087, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5877579', 'n_tokens_mistral': 1422, 'n_tokens_neox': 1333, 'n_words': 335}