<commit_before>ADD_SUBDIRECTORY( igtlutil )

find_package(OpenIGTLink REQUIRED)
include(${OpenIGTLink_USE_FILE})
message(${CMAKE_SYSTEM_NAME})
if(CMAKE_SYSTEM_NAME STREQUAL "Windows" AND (NOT(CMAKE_CXX_FLAGS MATCHES "/MD")))
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}/MD" CACHE STRING "compile flags" FORCE)
 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}/MDd" CACHE STRING "compile flags" FORCE)
endif(CMAKE_SYSTEM_NAME STREQUAL "Windows" AND (NOT(CMAKE_CXX_FLAGS MATCHES "/MD")))
  # Download and unpack googletest at configure time
message(${CMAKE_CXX_FLAGS})
configure_file(CMakeLists.txt.in
               googletest-download/CMakeLists.txt)
execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}".
  WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/Testing/googletest-download )
execute_process(COMMAND ${CMAKE_COMMAND} --build .
  WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/Testing/googletest-download )
# Prevent GoogleTest from overriding our compiler/linker options
# when building with Visual Studio
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
 
# Add googletest directly to our build. This adds
# the following targets: gtest, gtest_main, gmock
# and gmock_main
add_subdirectory(${CMAKE_BINARY_DIR}/Testing/gmock
                 ${CMAKE_BINARY_DIR}/Testing/gmock-build)				 

# The gtest/gmock targets carry header search path
# dependencies automatically when using CMake 2.8.11 or
# later. Otherwise we have to add them here ourselves.
include_directories("${gtest_SOURCE_DIR}/include")
include_directories("${gmock_SOURCE_DIR}/include")

ADD_EXECUTABLE(igtlSocketTest   igtlSocketTest.cxx)
ADD_EXECUTABLE(igtlMultiThreaderTest1   igtlMultiThreaderTest1.cxx)
ADD_EXECUTABLE(igtlMultiThreaderTest2   igtlMultiThreaderTest2.cxx)
ADD_EXECUTABLE(igtlMultiThreaderTest3   igtlMultiThreaderTest3.cxx)
ADD_EXECUTABLE(igtlMessageFactoryTest   igtlMessageFactoryTest.cxx)
ADD_EXECUTABLE(igtlTimeStampTest1   igtlTimeStampTest1.cxx)
ADD_EXECUTABLE(igtlMessageBaseTest   igtlMessageBaseTest.cxx)
ADD_EXECUTABLE(igtlImageMessageTest   igtlImageMessageTest.cxx)
ADD_EXECUTABLE(igtlImageMessage2Test   igtlImageMessage2Test.cxx)
ADD_EXECUTABLE(igtlServerSocketTest   igtlServerSocketTest.cxx)
ADD_EXECUTABLE(igtlBindMessageTest   igtlBindMessageTest.cxx)
ADD_EXECUTABLE(igtlSocketTest   igtlSocketTest.cxx)
ADD_EXECUTABLE(igtlClientSocketTest   igtlClientSocketTest.cxx)
ADD_EXECUTABLE(igtlCapabilityMessageTest   igtlCapabilityMessageTest.cxx)
ADD_EXECUTABLE(igtlColorTableMessageTest   igtlColorTableMessageTest.cxx)
ADD_EXECUTABLE(igtlConditionVariableTest   igtlConditionVariableTest.cxx)
ADD_EXECUTABLE(igtlLabelMetaMessageTest   igtlLabelMetaMessageTest.cxx)
ADD_EXECUTABLE(igtlNDArrayMessageTest   igtlNDArrayMessageTest.cxx)
ADD_EXECUTABLE(igtlImageMetaMessageTest   igtlImageMetaMessageTest.cxx)
ADD_EXECUTABLE(igtlPointMessageTest   igtlPointMessageTest.cxx)
ADD_EXECUTABLE(igtlPolyDataMessageTest   igtlPolyDataMessageTest.cxx)

TARGET_LINK_LIBRARIES(igtlSocketTest OpenIGTLink)
TARGET_LINK_LIBRARIES(igtlMultiThreaderTest1 OpenIGTLink)
TARGET_LINK_LIBRARIES(igtlMultiThreaderTest2 OpenIGTLink)
TARGET_LINK_LIBRARIES(igtlMultiThreaderTest3 OpenIGTLink)
TARGET_LINK_LIBRARIES(igtlMessageFactoryTest OpenIGTLink)
TARGET_LINK_LIBRARIES(igtlTimeStampTest1 OpenIGTLink)
TARGET_LINK_LIBRARIES(igtlMessageBaseTest OpenIGTLink gtest_main gtest gmock_main gmock)
TARGET_LINK_LIBRARIES(igtlImageMessageTest OpenIGTLink gtest_main gtest gmock_main gmock)
TARGET_LINK_LIBRARIES(igtlImageMessage2Test OpenIGTLink gtest_main gtest gmock_main gmock)
TARGET_LINK_LIBRARIES(igtlServerSocketTest OpenIGTLink gtest_main gtest gmock_main gmock)
TARGET_LINK_LIBRARIES(igtlBindMessageTest OpenIGTLink gtest_main gtest gmock_main gmock)
TARGET_LINK_LIBRARIES(igtlSocketTest OpenIGTLink gtest_main gtest gmock_main gmock)
TARGET_LINK_LIBRARIES(igtlClientSocketTest OpenIGTLink gtest_main gtest gmock_main gmock)
TARGET_LINK_LIBRARIES(igtlCapabilityMessageTest OpenIGTLink gtest_main gtest gmock_main gmock)
TARGET_LINK_LIBRARIES(igtlColorTableMessageTest OpenIGTLink gtest_main gtest gmock_main gmock)
TARGET_LINK_LIBRARIES(igtlConditionVariableTest OpenIGTLink gtest_main gtest gmock_main gmock)
TARGET_LINK_LIBRARIES(igtlLabelMetaMessageTest OpenIGTLink gtest_main gtest gmock_main gmock)
TARGET_LINK_LIBRARIES(igtlNDArrayMessageTest OpenIGTLink gtest_main gtest gmock_main gmock)
TARGET_LINK_LIBRARIES(igtlImageMetaMessageTest OpenIGTLink gtest_main gtest gmock_main gmock)
TARGET_LINK_LIBRARIES(igtlPointMessageTest OpenIGTLink gtest_main gtest gmock_main gmock)
TARGET_LINK_LIBRARIES(igtlPolyDataMessageTest OpenIGTLink gtest_main gtest gmock_main gmock)

ADD_TEST(igtlSocketTest ${OpenIGTLink_EXECUTABLE_PATH}/igtlSocketTest)
ADD_TEST(igtlMultiThreaderTest1 ${OpenIGTLink_EXECUTABLE_PATH}/igtlMultiThreaderTest1)
ADD_TEST(igtlMultiThreaderTest2 ${OpenIGTLink_EXECUTABLE_PATH}/igtlMultiThreaderTest2)
ADD_TEST(igtlMultiThreaderTest3 ${OpenIGTLink_EXECUTABLE_PATH}/igtlMultiThreaderTest3)
ADD_TEST(igtlMessageFactoryTest ${OpenIGTLink_EXECUTABLE_PATH}/igtlMessageFactoryTest)
ADD_TEST(igtlTimeStampTest1 ${OpenIGTLink_EXECUTABLE_PATH}/igtlTimeStampTest1)
ADD_TEST(igtlMessageBaseTest ${OpenIGTLink_EXECUTABLE_PATH}/igtlMessageBaseTest)
ADD_TEST(igtlImageMessageTest ${OpenIGTLink_EXECUTABLE_PATH}/igtlImageMessageTest)
ADD_TEST(igtlImageMessage2Test ${OpenIGTLink_EXECUTABLE_PATH}/igtlImageMessage2Test)
ADD_TEST(igtlServerSocketTest ${OpenIGTLink_EXECUTABLE_PATH}/igtlServerSocketTest)
ADD_TEST(igtlBindMessageTest ${OpenIGTLink_EXECUTABLE_PATH}/igtlBindMessageTest)
ADD_TEST(igtlSocketTest ${OpenIGTLink_EXECUTABLE_PATH}/igtlSocketTest)
ADD_TEST(igtlClientSocketTest ${OpenIGTLink_EXECUTABLE_PATH}/igtlSocketTest)
ADD_TEST(igtlCapabilityMessageTest ${OpenIGTLink_EXECUTABLE_PATH}/igtlCapabilityMessageTest)
ADD_TEST(igtlColorTableMessageTest ${OpenIGTLink_EXECUTABLE_PATH}/igtlColorTableMessageTest)
ADD_TEST(igtlConditionVariableTest ${OpenIGTLink_EXECUTABLE_PATH}/igtlConditionVariableTest)
ADD_TEST(igtlLabelMetaMessageTest ${OpenIGTLink_EXECUTABLE_PATH}/igtlLabelMetaMessageTest)
ADD_TEST(igtlNDArrayMessageTest ${OpenIGTLink_EXECUTABLE_PATH}/igtlNDArrayMessage)
ADD_TEST(igtlImageMetaMessageTest ${OpenIGTLink_EXECUTABLE_PATH}/igtlLabelMetaMessageTest)
ADD_TEST(igtlPointMessageTest ${OpenIGTLink_EXECUTABLE_PATH}/igtlPointMessageTest)
ADD_TEST(igtlPolyDataMessageTest ${OpenIGTLink_EXECUTABLE_PATH}/igtlPolyDataMessageTest)
<commit_msg>Test program Location problem fixed<commit_after>ADD_SUBDIRECTORY( igtlutil )

find_package(OpenIGTLink REQUIRED)
include(${OpenIGTLink_USE_FILE})
message(${CMAKE_SYSTEM_NAME})
if(CMAKE_SYSTEM_NAME STREQUAL "Windows" AND (NOT(CMAKE_CXX_FLAGS MATCHES "/MD")))
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}/MD" CACHE STRING "compile flags" FORCE)
 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}/MDd" CACHE STRING "compile flags" FORCE)
endif(CMAKE_SYSTEM_NAME STREQUAL "Windows" AND (NOT(CMAKE_CXX_FLAGS MATCHES "/MD")))
  # Download and unpack googletest at configure time
message(${CMAKE_CXX_FLAGS})
configure_file(CMakeLists.txt.in
               googletest-download/CMakeLists.txt)
execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}".
  WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/Testing/googletest-download )
execute_process(COMMAND ${CMAKE_COMMAND} --build .
  WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/Testing/googletest-download )
# Prevent GoogleTest from overriding our compiler/linker options
# when building with Visual Studio
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
 
# Add googletest directly to our build. This adds
# the following targets: gtest, gtest_main, gmock
# and gmock_main
add_subdirectory(${CMAKE_BINARY_DIR}/Testing/gmock
                 ${CMAKE_BINARY_DIR}/Testing/gmock-build)				 

# The gtest/gmock targets carry header search path
# dependencies automatically when using CMake 2.8.11 or
# later. Otherwise we have to add them here ourselves.
include_directories("${gtest_SOURCE_DIR}/include")
include_directories("${gmock_SOURCE_DIR}/include")

ADD_EXECUTABLE(igtlSocketTest   igtlSocketTest.cxx)
ADD_EXECUTABLE(igtlMultiThreaderTest1   igtlMultiThreaderTest1.cxx)
ADD_EXECUTABLE(igtlMultiThreaderTest2   igtlMultiThreaderTest2.cxx)
ADD_EXECUTABLE(igtlMultiThreaderTest3   igtlMultiThreaderTest3.cxx)
ADD_EXECUTABLE(igtlMessageFactoryTest   igtlMessageFactoryTest.cxx)
ADD_EXECUTABLE(igtlTimeStampTest1   igtlTimeStampTest1.cxx)
ADD_EXECUTABLE(igtlMessageBaseTest   igtlMessageBaseTest.cxx)
ADD_EXECUTABLE(igtlImageMessageTest   igtlImageMessageTest.cxx)
ADD_EXECUTABLE(igtlImageMessage2Test   igtlImageMessage2Test.cxx)
ADD_EXECUTABLE(igtlServerSocketTest   igtlServerSocketTest.cxx)
ADD_EXECUTABLE(igtlBindMessageTest   igtlBindMessageTest.cxx)
ADD_EXECUTABLE(igtlSocketTest   igtlSocketTest.cxx)
ADD_EXECUTABLE(igtlClientSocketTest   igtlClientSocketTest.cxx)
ADD_EXECUTABLE(igtlCapabilityMessageTest   igtlCapabilityMessageTest.cxx)
ADD_EXECUTABLE(igtlColorTableMessageTest   igtlColorTableMessageTest.cxx)
ADD_EXECUTABLE(igtlConditionVariableTest   igtlConditionVariableTest.cxx)
ADD_EXECUTABLE(igtlLabelMetaMessageTest   igtlLabelMetaMessageTest.cxx)
ADD_EXECUTABLE(igtlNDArrayMessageTest   igtlNDArrayMessageTest.cxx)
ADD_EXECUTABLE(igtlImageMetaMessageTest   igtlImageMetaMessageTest.cxx)
ADD_EXECUTABLE(igtlPointMessageTest   igtlPointMessageTest.cxx)
ADD_EXECUTABLE(igtlPolyDataMessageTest   igtlPolyDataMessageTest.cxx)

TARGET_LINK_LIBRARIES(igtlSocketTest OpenIGTLink)
TARGET_LINK_LIBRARIES(igtlMultiThreaderTest1 OpenIGTLink)
TARGET_LINK_LIBRARIES(igtlMultiThreaderTest2 OpenIGTLink)
TARGET_LINK_LIBRARIES(igtlMultiThreaderTest3 OpenIGTLink)
TARGET_LINK_LIBRARIES(igtlMessageFactoryTest OpenIGTLink)
TARGET_LINK_LIBRARIES(igtlTimeStampTest1 OpenIGTLink)
TARGET_LINK_LIBRARIES(igtlMessageBaseTest OpenIGTLink gtest_main gtest gmock_main gmock)
TARGET_LINK_LIBRARIES(igtlImageMessageTest OpenIGTLink gtest_main gtest gmock_main gmock)
TARGET_LINK_LIBRARIES(igtlImageMessage2Test OpenIGTLink gtest_main gtest gmock_main gmock)
TARGET_LINK_LIBRARIES(igtlServerSocketTest OpenIGTLink gtest_main gtest gmock_main gmock)
TARGET_LINK_LIBRARIES(igtlBindMessageTest OpenIGTLink gtest_main gtest gmock_main gmock)
TARGET_LINK_LIBRARIES(igtlSocketTest OpenIGTLink gtest_main gtest gmock_main gmock)
TARGET_LINK_LIBRARIES(igtlClientSocketTest OpenIGTLink gtest_main gtest gmock_main gmock)
TARGET_LINK_LIBRARIES(igtlCapabilityMessageTest OpenIGTLink gtest_main gtest gmock_main gmock)
TARGET_LINK_LIBRARIES(igtlColorTableMessageTest OpenIGTLink gtest_main gtest gmock_main gmock)
TARGET_LINK_LIBRARIES(igtlConditionVariableTest OpenIGTLink gtest_main gtest gmock_main gmock)
TARGET_LINK_LIBRARIES(igtlLabelMetaMessageTest OpenIGTLink gtest_main gtest gmock_main gmock)
TARGET_LINK_LIBRARIES(igtlNDArrayMessageTest OpenIGTLink gtest_main gtest gmock_main gmock)
TARGET_LINK_LIBRARIES(igtlImageMetaMessageTest OpenIGTLink gtest_main gtest gmock_main gmock)
TARGET_LINK_LIBRARIES(igtlPointMessageTest OpenIGTLink gtest_main gtest gmock_main gmock)
TARGET_LINK_LIBRARIES(igtlPolyDataMessageTest OpenIGTLink gtest_main gtest gmock_main gmock)

ADD_TEST(igtlSocketTest ${OpenIGTLink_EXECUTABLE_PATH}/igtlSocketTest)
ADD_TEST(igtlMultiThreaderTest1 ${OpenIGTLink_EXECUTABLE_PATH}/igtlMultiThreaderTest1)
ADD_TEST(igtlMultiThreaderTest2 ${OpenIGTLink_EXECUTABLE_PATH}/igtlMultiThreaderTest2)
ADD_TEST(igtlMultiThreaderTest3 ${OpenIGTLink_EXECUTABLE_PATH}/igtlMultiThreaderTest3)
ADD_TEST(igtlMessageFactoryTest ${OpenIGTLink_EXECUTABLE_PATH}/igtlMessageFactoryTest)
ADD_TEST(igtlTimeStampTest1 ${OpenIGTLink_EXECUTABLE_PATH}/igtlTimeStampTest1)
ADD_TEST(igtlMessageBaseTest ${OpenIGTLink_EXECUTABLE_PATH}/igtlMessageBaseTest)
ADD_TEST(igtlImageMessageTest ${OpenIGTLink_EXECUTABLE_PATH}/igtlImageMessageTest)
ADD_TEST(igtlImageMessage2Test ${OpenIGTLink_EXECUTABLE_PATH}/igtlImageMessage2Test)
ADD_TEST(igtlServerSocketTest ${OpenIGTLink_EXECUTABLE_PATH}/igtlServerSocketTest)
ADD_TEST(igtlBindMessageTest ${OpenIGTLink_EXECUTABLE_PATH}/igtlBindMessageTest)
ADD_TEST(igtlSocketTest ${OpenIGTLink_EXECUTABLE_PATH}/igtlSocketTest)
ADD_TEST(igtlClientSocketTest ${OpenIGTLink_EXECUTABLE_PATH}/igtlSocketTest)
ADD_TEST(igtlCapabilityMessageTest ${OpenIGTLink_EXECUTABLE_PATH}/igtlCapabilityMessageTest)
ADD_TEST(igtlColorTableMessageTest ${OpenIGTLink_EXECUTABLE_PATH}/igtlColorTableMessageTest)
ADD_TEST(igtlConditionVariableTest ${OpenIGTLink_EXECUTABLE_PATH}/igtlConditionVariableTest)
ADD_TEST(igtlLabelMetaMessageTest ${OpenIGTLink_EXECUTABLE_PATH}/igtlLabelMetaMessageTest)
ADD_TEST(igtlNDArrayMessageTest ${OpenIGTLink_EXECUTABLE_PATH}/igtlNDArrayMessageTest)
ADD_TEST(igtlImageMetaMessageTest ${OpenIGTLink_EXECUTABLE_PATH}/igtlLabelMetaMessageTest)
ADD_TEST(igtlPointMessageTest ${OpenIGTLink_EXECUTABLE_PATH}/igtlPointMessageTest)
ADD_TEST(igtlPolyDataMessageTest ${OpenIGTLink_EXECUTABLE_PATH}/igtlPolyDataMessageTest)

{'fraction_non_alphanumeric': 0.05982641041537508, 'fraction_numerical': 0.004494730316181029, 'mean_word_length': 12.235897435897435, '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': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2720727', 'n_tokens_mistral': 4554, 'n_tokens_neox': 4425, 'n_words': 606}