<commit_before># Dummy plugin used by ctkAbstractPluginFactoryTest1
add_definitions( -DCTKDummyPlugin)

ctkMacroBuildLib(
  NAME "CTKDummyPlugin"
  EXPORT_DIRECTIVE "CTK_DUMMY_EXPORT"
  SRCS ctkDummyPlugin.h ctkDummyPlugin.cpp
  MOC_SRCS "ctkDummyPlugin.h"
  TARGET_LIBRARIES ${CTK_BASE_LIBRARIES}
  LIBRARY_TYPE "SHARED"
  )
remove_definitions(-DCTKDummyPlugin)

set(KIT ${PROJECT_NAME})

#
# Test sources
#
set(KITTests_SRCS
  ctkAbstractFactoryTest1.cpp
  ctkAbstractLibraryFactoryTest1.cpp
  ctkAbstractObjectFactoryTest1.cpp
  ctkAbstractPluginFactoryTest1.cpp
  ctkAbstractQObjectFactoryTest1.cpp
  ctkBackTraceTest.cpp
  ctkBooleanMapperTest.cpp
  ctkCallbackTest1.cpp
  ctkCommandLineParserTest1.cpp
  ctkCoreTestingMacrosTest.cpp
  ctkCoreTestingUtilitiesTest.cpp
  ctkExceptionTest.cpp
  ctkFileLoggerTest.cpp
  ctkHighPrecisionTimerTest.cpp
  ctkLinearValueProxyTest.cpp
  ctkLoggerTest1.cpp
  ctkModelTesterTest1.cpp
  ctkModelTesterTest2.cpp
  ctkUtilsCopyDirRecursivelyTest1.cpp
  ctkUtilsQtHandleToStringTest1.cpp
  ctkUtilsTest.cpp
  ctkUtilsTest1.cpp
  ctkUtilsTest2.cpp
  ctkUtilsTest3.cpp
  ctkUtilsTest4.cpp
  ctkDependencyGraphTest1.cpp
  ctkDependencyGraphTest2.cpp
  ctkPimplTest1.cpp
  ctkScopedCurrentDirTest1.cpp
  ctkSingletonTest1.cpp
  ctkWorkflowTest1.cpp
  ctkWorkflowTest2.cpp
  ctkWorkflowTest3.cpp
  )

if(HAVE_BFD)
  list(APPEND KITTests_SRCS
    ctkBinaryFileDescriptorTest1.cpp
    )
endif()

include_directories(
  ${CMAKE_SOURCE_DIR}/Libs/Testing
  ${CMAKE_CURRENT_BINARY_DIR}
  )

create_test_sourcelist(Tests ${KIT}CppTests.cpp
  ${KITTests_SRCS}
  #EXTRA_INCLUDE TestingMacros.h
  )

set(TestsToRun ${Tests})
remove(TestsToRun ${KIT}CppTests.cpp)

set(LIBRARY_NAME ${PROJECT_NAME})

#
# Tests Helpers sources
#
set(Tests_Helpers_SRCS
  ctkBranchingWorkflowStep.h
  ctkExampleDerivedWorkflowStep.cpp
  ctkExampleDerivedWorkflowStep.h
  ctkExampleWorkflowStepUsingSignalsAndSlots.cpp
  ctkExampleWorkflowStepUsingSignalsAndSlots.h
  ctkSingletonTestHelper.cpp
  ctkSingletonTestHelper.h
  )

set(Tests_Helpers_MOC_SRCS
  ctkExampleWorkflowStepUsingSignalsAndSlots.h
  )

set(Tests_Helpers_MOC_CPPS
  ctkBooleanMapperTest.cpp
  ctkFileLoggerTest.cpp
  ctkLinearValueProxyTest.cpp
  ctkUtilsTest.cpp
  )

set(Tests_Helpers_MOC_CPP)
if(CTK_QT_VERSION VERSION_GREATER "4")
  qt5_wrap_cpp(Tests_Helpers_MOC_CPP ${Tests_Helpers_MOC_SRCS})
  qt5_generate_mocs(${Tests_Helpers_MOC_CPPS})
else()
  QT4_WRAP_CPP(Tests_Helpers_MOC_CPP ${Tests_Helpers_MOC_SRCS})
  QT4_GENERATE_MOCS(${Tests_Helpers_MOC_CPPS})
endif()

if(HAVE_BFD)
  add_executable(ctkBinaryFileDescriptorTestHelper ctkBinaryFileDescriptorTestHelper.cpp)
endif()

if(WIN32)
  add_definitions( /D _CRT_SECURE_NO_WARNINGS)
endif()

#
# Test executable
#
add_executable(${KIT}CppTests ${Tests} ${Tests_Helpers_SRCS} ${Tests_Helpers_MOC_CPP})
target_link_libraries(${KIT}CppTests ${LIBRARY_NAME} ${CTK_BASE_LIBRARIES} CTKDummyPlugin)<commit_msg>Fix compilation with MinGW32 or MinGW64 under Windows OS. Fixes #654<commit_after># Dummy plugin used by ctkAbstractPluginFactoryTest1
add_definitions( -DCTKDummyPlugin)

ctkMacroBuildLib(
  NAME "CTKDummyPlugin"
  EXPORT_DIRECTIVE "CTK_DUMMY_EXPORT"
  SRCS ctkDummyPlugin.h ctkDummyPlugin.cpp
  MOC_SRCS "ctkDummyPlugin.h"
  TARGET_LIBRARIES ${CTK_BASE_LIBRARIES}
  LIBRARY_TYPE "SHARED"
  )
remove_definitions(-DCTKDummyPlugin)

set(KIT ${PROJECT_NAME})

#
# Test sources
#
set(KITTests_SRCS
  ctkAbstractFactoryTest1.cpp
  ctkAbstractLibraryFactoryTest1.cpp
  ctkAbstractObjectFactoryTest1.cpp
  ctkAbstractPluginFactoryTest1.cpp
  ctkAbstractQObjectFactoryTest1.cpp
  ctkBackTraceTest.cpp
  ctkBooleanMapperTest.cpp
  ctkCallbackTest1.cpp
  ctkCommandLineParserTest1.cpp
  ctkCoreTestingMacrosTest.cpp
  ctkCoreTestingUtilitiesTest.cpp
  ctkExceptionTest.cpp
  ctkFileLoggerTest.cpp
  ctkHighPrecisionTimerTest.cpp
  ctkLinearValueProxyTest.cpp
  ctkLoggerTest1.cpp
  ctkModelTesterTest1.cpp
  ctkModelTesterTest2.cpp
  ctkUtilsCopyDirRecursivelyTest1.cpp
  ctkUtilsQtHandleToStringTest1.cpp
  ctkUtilsTest.cpp
  ctkUtilsTest1.cpp
  ctkUtilsTest2.cpp
  ctkUtilsTest3.cpp
  ctkUtilsTest4.cpp
  ctkDependencyGraphTest1.cpp
  ctkDependencyGraphTest2.cpp
  ctkPimplTest1.cpp
  ctkScopedCurrentDirTest1.cpp
  ctkSingletonTest1.cpp
  ctkWorkflowTest1.cpp
  ctkWorkflowTest2.cpp
  ctkWorkflowTest3.cpp
  )

if(HAVE_BFD)
  list(APPEND KITTests_SRCS
    ctkBinaryFileDescriptorTest1.cpp
    )
endif()

include_directories(
  ${CMAKE_SOURCE_DIR}/Libs/Testing
  ${CMAKE_CURRENT_BINARY_DIR}
  )

create_test_sourcelist(Tests ${KIT}CppTests.cpp
  ${KITTests_SRCS}
  #EXTRA_INCLUDE TestingMacros.h
  )

set(TestsToRun ${Tests})
remove(TestsToRun ${KIT}CppTests.cpp)

set(LIBRARY_NAME ${PROJECT_NAME})

#
# Tests Helpers sources
#
set(Tests_Helpers_SRCS
  ctkBranchingWorkflowStep.h
  ctkExampleDerivedWorkflowStep.cpp
  ctkExampleDerivedWorkflowStep.h
  ctkExampleWorkflowStepUsingSignalsAndSlots.cpp
  ctkExampleWorkflowStepUsingSignalsAndSlots.h
  ctkSingletonTestHelper.cpp
  ctkSingletonTestHelper.h
  )

set(Tests_Helpers_MOC_SRCS
  ctkExampleWorkflowStepUsingSignalsAndSlots.h
  )

set(Tests_Helpers_MOC_CPPS
  ctkBooleanMapperTest.cpp
  ctkFileLoggerTest.cpp
  ctkLinearValueProxyTest.cpp
  ctkUtilsTest.cpp
  )

set(Tests_Helpers_MOC_CPP)
if(CTK_QT_VERSION VERSION_GREATER "4")
  qt5_wrap_cpp(Tests_Helpers_MOC_CPP ${Tests_Helpers_MOC_SRCS})
  qt5_generate_mocs(${Tests_Helpers_MOC_CPPS})
else()
  QT4_WRAP_CPP(Tests_Helpers_MOC_CPP ${Tests_Helpers_MOC_SRCS})
  QT4_GENERATE_MOCS(${Tests_Helpers_MOC_CPPS})
endif()

if(HAVE_BFD)
  add_executable(ctkBinaryFileDescriptorTestHelper ctkBinaryFileDescriptorTestHelper.cpp)
endif()

if(MSVC)
  add_definitions( /D _CRT_SECURE_NO_WARNINGS)
endif()

#
# Test executable
#
add_executable(${KIT}CppTests ${Tests} ${Tests_Helpers_SRCS} ${Tests_Helpers_MOC_CPP})
target_link_libraries(${KIT}CppTests ${LIBRARY_NAME} ${CTK_BASE_LIBRARIES} CTKDummyPlugin)
{'fraction_non_alphanumeric': 0.06986162672966588, 'fraction_numerical': 0.011981100236247048, 'mean_word_length': 7.0094594594594595, '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': '5432513', 'n_tokens_mistral': 2379, 'n_tokens_neox': 2342, 'n_words': 267}