<commit_before>#-------------------------------------------------------------------
# This file is part of the CMake build system for OGRE
#     (Object-oriented Graphics Rendering Engine)
# For the latest info, see http://www.ogre3d.org/
#
# The contents of this file are placed in the public domain. Feel
# free to make use of it in any way you like.
#-------------------------------------------------------------------

set(HEADER_FILES
    include/TestContext.h
	../Common/include/ImageValidator.h
	../Common/include/TestBatch.h
	../Common/include/TestResultWriter.h
	../Common/include/SimpleResultWriter.h
	../Common/include/HTMLWriter.h
	../Common/include/VisualTest.h
	../Common/include/TinyHTML.h
	)

set(SOURCE_FILES
    src/TestContext.cpp)

if(APPLE)
  set_source_files_properties(src/TestContext.cpp PROPERTIES COMPILE_FLAGS "-x objective-c++")
endif()

include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
include_directories(${OGRE_SOURCE_DIR}/Samples/Common/include)
include_directories(${OGRE_SOURCE_DIR}/Samples/Browser/include)
include_directories(${OGRE_SOURCE_DIR}/Tests/VisualTests/Common/include)

ogre_add_component_include_dir(Terrain)
ogre_add_component_include_dir(Paging)
ogre_add_component_include_dir(RTShaderSystem)
ogre_add_component_include_dir(Overlay)

ogre_add_executable(TestContext ${HEADER_FILES} ${SOURCE_FILES})
target_link_libraries(TestContext ${OGRE_LIBRARIES} ${OGRE_PLUGIN_LIBRARIES} ${OIS_LIBRARIES} ${SAMPLE_LIBRARIES} OgreOverlay)
ogre_config_common(TestContext)

if (APPLE AND NOT OGRE_BUILD_PLATFORM_APPLE_IOS)
    set(OGRE_OSX_BUILD_CONFIGURATION "$(CONFIGURATION)/")
	set_property(TARGET TestContext PROPERTY MACOSX_BUNDLE TRUE)
	set_property(TARGET TestContext PROPERTY MACOSX_BUNDLE_ICON_FILE SampleBrowser_OSX.icns)
	set_property(TARGET TestContext PROPERTY MACOSX_BUNDLE_INFO_PLIST ${OGRE_SOURCE_DIR}/Tests/VisualTests/Context/misc/Info.plist)
	set(MACOSX_BUNDLE_GUI_IDENTIFIER "org.ogre3d.\${PRODUCT_NAME:rfc1034identifier}")
    set_target_properties(TestContext PROPERTIES XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH "NO")
    set_target_properties(TestContext PROPERTIES
        LINK_FLAGS "-framework IOKit -framework Cocoa -framework Carbon -framework OpenGL -framework CoreVideo")
	set (OGRE_TESTCONTEXT_CONTENTS_PATH
		${OGRE_BINARY_DIR}/bin/$(CONFIGURATION)/TestContext.app/Contents)
	add_custom_command(TARGET TestContext POST_BUILD
		COMMAND mkdir ARGS -p ${OGRE_TESTCONTEXT_CONTENTS_PATH}/Frameworks
		COMMAND ln ARGS -s -f ${OGRE_BINARY_DIR}/lib/${OGRE_OSX_BUILD_CONFIGURATION}Ogre.framework
		${OGRE_TESTCONTEXT_CONTENTS_PATH}/Frameworks/
		COMMAND ln ARGS -s -f ${Cg_LIBRARY_REL}
		${OGRE_TESTCONTEXT_CONTENTS_PATH}/Frameworks/
		)
	# now cfg files<commit_msg>[OS X] Visual test build fix.<commit_after>#-------------------------------------------------------------------
# This file is part of the CMake build system for OGRE
#     (Object-oriented Graphics Rendering Engine)
# For the latest info, see http://www.ogre3d.org/
#
# The contents of this file are placed in the public domain. Feel
# free to make use of it in any way you like.
#-------------------------------------------------------------------

set(HEADER_FILES
    include/TestContext.h
	../Common/include/ImageValidator.h
	../Common/include/TestBatch.h
	../Common/include/TestResultWriter.h
	../Common/include/SimpleResultWriter.h
	../Common/include/HTMLWriter.h
	../Common/include/VisualTest.h
	../Common/include/TinyHTML.h
	)

set(SOURCE_FILES
    src/TestContext.cpp)

if(APPLE)
  set_source_files_properties(src/TestContext.cpp PROPERTIES COMPILE_FLAGS "-x objective-c++")
endif()

include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
include_directories(${OGRE_SOURCE_DIR}/Samples/Common/include)
include_directories(${OGRE_SOURCE_DIR}/Samples/Browser/include)
include_directories(${OGRE_SOURCE_DIR}/Tests/VisualTests/Common/include)

ogre_add_component_include_dir(Terrain)
ogre_add_component_include_dir(Paging)
ogre_add_component_include_dir(RTShaderSystem)
ogre_add_component_include_dir(Overlay)

ogre_add_executable(TestContext ${HEADER_FILES} ${SOURCE_FILES})
target_link_libraries(TestContext ${OGRE_LIBRARIES} ${OGRE_PLUGIN_LIBRARIES} ${OIS_LIBRARIES} ${SAMPLE_LIBRARIES} OgreOverlay)
ogre_config_common(TestContext)

if (APPLE AND NOT OGRE_BUILD_PLATFORM_APPLE_IOS)
    set(OGRE_OSX_BUILD_CONFIGURATION "$(PLATFORM_NAME)/$(CONFIGURATION)")
	set_property(TARGET TestContext PROPERTY MACOSX_BUNDLE TRUE)
	set_property(TARGET TestContext PROPERTY MACOSX_BUNDLE_ICON_FILE SampleBrowser_OSX.icns)
	set_property(TARGET TestContext PROPERTY MACOSX_BUNDLE_INFO_PLIST ${OGRE_SOURCE_DIR}/Tests/VisualTests/Context/misc/Info.plist)
	set(MACOSX_BUNDLE_GUI_IDENTIFIER "org.ogre3d.\${PRODUCT_NAME:rfc1034identifier}")
    set_target_properties(TestContext PROPERTIES XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH "NO")
    set_target_properties(TestContext PROPERTIES
        LINK_FLAGS "-framework IOKit -framework Cocoa -framework Carbon -framework OpenGL -framework CoreVideo")
	set (OGRE_TESTCONTEXT_CONTENTS_PATH
		${OGRE_BINARY_DIR}/bin/$(CONFIGURATION)/TestContext.app/Contents)
	add_custom_command(TARGET TestContext POST_BUILD
		COMMAND mkdir ARGS -p ${OGRE_TESTCONTEXT_CONTENTS_PATH}/Frameworks
		COMMAND ln ARGS -s -f ${OGRE_BINARY_DIR}/lib/${OGRE_OSX_BUILD_CONFIGURATION}Ogre.framework
		${OGRE_TESTCONTEXT_CONTENTS_PATH}/Frameworks/
		COMMAND ln ARGS -s -f ${Cg_LIBRARY_REL}
		${OGRE_TESTCONTEXT_CONTENTS_PATH}/Frameworks/
		)
	# now cfg files
{'fraction_non_alphanumeric': 0.14014598540145987, 'fraction_numerical': 0.0021897810218978104, 'mean_word_length': 4.8370607028754, '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': '7473555', 'n_tokens_mistral': 1869, 'n_tokens_neox': 1825, 'n_words': 304}