<commit_before>cmake_minimum_required (VERSION 3.2.0)

SET(CMAKE_COLOR_MAKEFILE ON)

project (flat CXX)

set (CMAKE_RUNTIME_OUTPUT_DIRECTORY bin)
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY lib)
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY lib)

file(GLOB HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/src/*.h) # Get all header files
set(HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/src/flat.h ${HEADERS}) # Add the generated header file

add_executable(test_flat EXCLUDE_FROM_ALL src/Button.cpp src/Camera.cpp src/CollisionDetector.cpp
	src/DeltatimeMonitor.cpp src/Entity.cpp src/EntityContainer.cpp src/EntityProperties.cpp
	src/FlatBuilder.cpp src/GameController.cpp src/GameControllerContainer.cpp src/GameEngine.cpp
	src/MediaUtil.cpp src/Mixer.cpp src/Square.cpp src/Texture.cpp src/Timer.cpp src/UID.cpp
	src/Window.cpp
	testsrc/ButtonTest.cpp testsrc/CollisionDetectorTest.cpp testsrc/EntityContainerTest.cpp
	testsrc/EntityPropertiesTest.cpp testsrc/Flat2dTest.cpp testsrc/SquareTest.cpp
	testsrc/UIDTest.cpp testsrc/CameraTest.cpp testsrc/AlgorithmTest.cpp
	src/RuntimeAnalyzer.cpp)

target_link_libraries(test_flat -lSDL2 -lSDL2_image -lSDL2_mixer -lSDL2_ttf)
target_compile_options(test_flat PRIVATE -std=c++11 -g -Wall)<commit_msg>Check for sdl2 with pkg-config in cmake<commit_after>cmake_minimum_required (VERSION 3.2.0)

SET(CMAKE_COLOR_MAKEFILE ON)
#SET(CMAKE_VERBOSE_MAKEFILE ON)

project (flat CXX)

# Look for deps
INCLUDE(FindPkgConfig)
PKG_SEARCH_MODULE(SDL2 REQUIRED sdl2)
PKG_SEARCH_MODULE(SDL2IMAGE REQUIRED SDL2_image>=2.0.0)
PKG_SEARCH_MODULE(SDL2TTF REQUIRED SDL2_ttf>=2.0.0)
PKG_SEARCH_MODULE(SDL2MIXER REQUIRED SDL2_mixer>=2.0.0)

set (CMAKE_RUNTIME_OUTPUT_DIRECTORY bin)
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY lib)
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY lib)

file(GLOB HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/src/*.h) # Get all header files
set(HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/src/flat.h ${HEADERS}) # Add the generated header file

add_executable(test_flat EXCLUDE_FROM_ALL src/Button.cpp src/Camera.cpp src/CollisionDetector.cpp
	src/DeltatimeMonitor.cpp src/Entity.cpp src/EntityContainer.cpp src/EntityProperties.cpp
	src/FlatBuilder.cpp src/GameController.cpp src/GameControllerContainer.cpp src/GameEngine.cpp
	src/MediaUtil.cpp src/Mixer.cpp src/Square.cpp src/Texture.cpp src/Timer.cpp src/UID.cpp
	src/Window.cpp
	testsrc/ButtonTest.cpp testsrc/CollisionDetectorTest.cpp testsrc/EntityContainerTest.cpp
	testsrc/EntityPropertiesTest.cpp testsrc/Flat2dTest.cpp testsrc/SquareTest.cpp
	testsrc/UIDTest.cpp testsrc/CameraTest.cpp testsrc/AlgorithmTest.cpp
	src/RuntimeAnalyzer.cpp)

target_link_libraries(test_flat -lSDL2 -lSDL2_image -lSDL2_mixer -lSDL2_ttf)
target_compile_options(test_flat PRIVATE -std=c++11 -g -Wall)
{'fraction_non_alphanumeric': 0.09161147902869757, 'fraction_numerical': 0.013980868285504048, 'mean_word_length': 6.768571428571429, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '2917096', 'n_tokens_mistral': 1046, 'n_tokens_neox': 992, 'n_words': 167}