<commit_before>basis_find_package(ZLIB)
if (ZLIB_FOUND)
  basis_use_package(ZLIB)
endif ()

include_directories(
  "${CMAKE_CURRENT_SOURCE_DIR}/znzlib"
  "${CMAKE_CURRENT_SOURCE_DIR}/niftilib"
)

basis_add_library(nifticlib STATIC
  znzlib/znzlib.h
  znzlib/znzlib.c
  niftilib/nifti1.h
  niftilib/nifti1_io.h
  niftilib/nifti1_io.c
)

if (ZLIB_FOUND)
  target_link_libraries(nifticlib ${ZLIB_LIBRARIES})
endif ()

set_target_properties(nifticlib PROPERTIES
  ARCHIVE_OUTPUT_NAME       MIRTKnifticlib
  POSITION_INDEPENDENT_CODE ${BUILD_SHARED_LIBS}
)<commit_msg>fix: Disable MSVC warnings for build of NiftiCLib [ThirdParty]<commit_after>basis_find_package(ZLIB)
if (ZLIB_FOUND)
  basis_use_package(ZLIB)
endif ()

include_directories(
  "${CMAKE_CURRENT_SOURCE_DIR}/znzlib"
  "${CMAKE_CURRENT_SOURCE_DIR}/niftilib"
)

basis_add_library(nifticlib STATIC
  znzlib/znzlib.h
  znzlib/znzlib.c
  niftilib/nifti1.h
  niftilib/nifti1_io.h
  niftilib/nifti1_io.c
)
basis_get_target_uid(target_uid nifticlib)

if (MSVC)
  # disable all function not secure warnings
  target_compile_definitions(${target_uid} PRIVATE _CRT_SECURE_NO_WARNINGS)
  # disable all conversion from double to float loss of data warnings
  target_compile_options(${target_uid} PRIVATE /wd4244)
  # disable all conversion from size_t to int loss of data and sign warnings
  target_compile_options(${target_uid} PRIVATE /wd4267)
endif ()

if (ZLIB_FOUND)
  target_link_libraries(${target_uid} ${ZLIB_LIBRARIES})
endif ()

set_target_properties(${target_uid} PROPERTIES
  ARCHIVE_OUTPUT_NAME       MIRTKnifticlib
  POSITION_INDEPENDENT_CODE ${BUILD_SHARED_LIBS}
)
{'fraction_non_alphanumeric': 0.08425584255842558, 'fraction_numerical': 0.008610086100861008, 'mean_word_length': 6.3954545454545455, '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': '7640795', 'n_tokens_mistral': 676, 'n_tokens_neox': 657, 'n_words': 104}