<commit_before>cmake_minimum_required(VERSION 2.8)

if(POLICY CMP0043)
	cmake_policy(SET CMP0043 OLD)
endif()

option(TESTS "build tests" ON)
option(VIEWERS "build viewers" ON)
option(SAMPLES "build samples" ON)

option(D2D_RENDERER "enable Direct2D renderer" OFF)
option(CAIRO_RENDERER "enable Cairo renderer" OFF)

if(CAIRO_RENDERER)
	if(UNIX)
		if(NOT CAIRO_LIB)
			# default name in system lib paths
			set(CAIRO_LIB "cairo")
		endif()
	endif()

	include_directories(${CAIRO_INCLUDE})
endif()

find_package(wxWidgets COMPONENTS xrc html adv core xml base REQUIRED)
include("${wxWidgets_USE_FILE}")

if(${CMAKE_COMPILER_IS_GNUCXX})
	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11 -Wall")
else()
	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4514 /wd4251 /wd4275")
	add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif()

add_subdirectory(src/lib)

if(${VIEWERS})
    add_subdirectory(src/viewers)
endif()

if(${SAMPLES})
	add_subdirectory(samples)<commit_msg>added wxWidgets version checking<commit_after>cmake_minimum_required(VERSION 2.8)

if(POLICY CMP0043)
	cmake_policy(SET CMP0043 OLD)
endif()

option(TESTS "build tests" ON)
option(VIEWERS "build viewers" ON)
option(SAMPLES "build samples" ON)

option(D2D_RENDERER "enable Direct2D renderer" OFF)
option(CAIRO_RENDERER "enable Cairo renderer" OFF)

if(CAIRO_RENDERER)
	if(UNIX)
		if(NOT CAIRO_LIB)
			# default name in system lib paths
			set(CAIRO_LIB "cairo")
		endif()
	endif()

	include_directories(${CAIRO_INCLUDE})
endif()

find_package(wxWidgets COMPONENTS xrc html adv core xml base REQUIRED)
include("${wxWidgets_USE_FILE}")

if(${wxWidgets_VERSION_MAJOR} EQUAL "2")
	message(FATAL_ERROR "not supported wxWidgets version ${wxWidgets_VERSION_STRING}, required 3.x")
endif()

if(${CMAKE_COMPILER_IS_GNUCXX})
	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11 -Wall")
else()
	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4514 /wd4251 /wd4275")
	add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif()

add_subdirectory(src/lib)

if(${VIEWERS})
    add_subdirectory(src/viewers)
endif()

if(${SAMPLES})
	add_subdirectory(samples)
{'fraction_non_alphanumeric': 0.12158927716610819, 'fraction_numerical': 0.02584968884633796, 'mean_word_length': 7.260869565217392, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '3339520', 'n_tokens_mistral': 913, 'n_tokens_neox': 841, 'n_words': 164}