<commit_before>cmake_minimum_required(VERSION 3.3)
project(pixpad)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")

#--------------------------------------------------
# setup 3rd libs
include(ExternalProject)

set(3RD_PATH "${CMAKE_SOURCE_DIR}/3rd")
set(3RD_INSTALL_PATH "${CMAKE_SOURCE_DIR}/install")

# boost
set(Boost_USE_STATIC_LIBS ON)
add_definitions(-DBOOST_ALL_NO_LIB)  # disable boost auto link
find_package(Boost 1.5 REQUIRED COMPONENTS program_options system filesystem)
include_directories(${Boost_INCLUDE_DIRS})

# zlib
# ExternalProject_Add(zlib
#     URL ${3RD_PATH}/zlib-1.2.8.tar.gz
#     CMAKE_ARGS "-DCMAKE_INSTALL_PREFIX=${3RD_INSTALL_PATH}/zlib"
# )
# set(ZLIB_INCLUDE_DIR "${3RD_INSTALL_PATH}/zlib/include")
# link_directories(${3RD_INSTALL_PATH}/zlib/lib)

# libpng
# ExternalProject_Add(libpng
#     URL ${3RD_PATH}/libpng-1.6.21.tar.gz
#     CMAKE_ARGS "-DCMAKE_INSTALL_PREFIX=${3RD_INSTALL_PATH}/libpng"
#     CMAKE_CACHE_DEFAULT_ARGS "-DZLIB_ROOT:string=${3RD_INSTALL_PATH}/zlib"
# )
# set(PNG_INCLUDE_DIR "${3RD_INSTALL_PATH}/libpng/include")
# link_directories(${3RD_INSTALL_PATH}/libpng/lib)
# set(PNG_LIBS libpng16_staticd zlibstaticd)
# add_dependencies(libpng zlib)

# openexr
set(BUILD_SHARED_LIBS OFF)
set(NAMESPACE_VERSIONING ON)
add_definitions("-DPLATFORM_WINDOWS")
set(ILMBASE_PATH ${3RD_PATH}/openexr/IlmBase)
set(ILMBASE_CONFIG_PATH ${ILMBASE_PATH}/config CACHE INTERNAL "")
set(ILMBASE_CONFIG_FILE ${ILMBASE_CONFIG_PATH}/IlmBaseConfig.h CACHE INTERNAL "")
if (NOT EXISTS ${ILMBASE_CONFIG_FILE})
	include(IlmBaseConf)
endif()
include_directories(
	${ILMBASE_CONFIG_PATH}
	${ILMBASE_PATH}/Iex
	${ILMBASE_PATH}/IexMath
	${ILMBASE_PATH}/Imath
)
add_subdirectory(${ILMBASE_PATH}/Iex)
add_subdirectory(${ILMBASE_PATH}/IexMath)
add_subdirectory(${ILMBASE_PATH}/Imath)
<commit_msg>treat warning C4819 as error<commit_after>cmake_minimum_required(VERSION 3.3)
project(pixpad)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")

#--------------------------------------------------
# setup 3rd libs
include(ExternalProject)

set(3RD_PATH "${CMAKE_SOURCE_DIR}/3rd")
set(3RD_INSTALL_PATH "${CMAKE_SOURCE_DIR}/install")

# boost
set(Boost_USE_STATIC_LIBS ON)
add_definitions(-DBOOST_ALL_NO_LIB)  # disable boost auto link
find_package(Boost 1.5 REQUIRED COMPONENTS program_options system filesystem)
include_directories(${Boost_INCLUDE_DIRS})

# zlib
# ExternalProject_Add(zlib
#     URL ${3RD_PATH}/zlib-1.2.8.tar.gz
#     CMAKE_ARGS "-DCMAKE_INSTALL_PREFIX=${3RD_INSTALL_PATH}/zlib"
# )
# set(ZLIB_INCLUDE_DIR "${3RD_INSTALL_PATH}/zlib/include")
# link_directories(${3RD_INSTALL_PATH}/zlib/lib)

# libpng
# ExternalProject_Add(libpng
#     URL ${3RD_PATH}/libpng-1.6.21.tar.gz
#     CMAKE_ARGS "-DCMAKE_INSTALL_PREFIX=${3RD_INSTALL_PATH}/libpng"
#     CMAKE_CACHE_DEFAULT_ARGS "-DZLIB_ROOT:string=${3RD_INSTALL_PATH}/zlib"
# )
# set(PNG_INCLUDE_DIR "${3RD_INSTALL_PATH}/libpng/include")
# link_directories(${3RD_INSTALL_PATH}/libpng/lib)
# set(PNG_LIBS libpng16_staticd zlibstaticd)
# add_dependencies(libpng zlib)

if(WIN32)
	# Warning C4819: The file contains a character that cannot be represented in the current code page
	add_definitions("/we4819")
endif()

# openexr
set(BUILD_SHARED_LIBS OFF)
set(NAMESPACE_VERSIONING ON)
add_definitions("-DPLATFORM_WINDOWS")
set(ILMBASE_PATH ${3RD_PATH}/openexr/IlmBase)
set(ILMBASE_CONFIG_PATH ${ILMBASE_PATH}/config CACHE INTERNAL "")
set(ILMBASE_CONFIG_FILE ${ILMBASE_CONFIG_PATH}/IlmBaseConfig.h CACHE INTERNAL "")
if (NOT EXISTS ${ILMBASE_CONFIG_FILE})
	include(IlmBaseConf)
endif()
include_directories(
	${ILMBASE_CONFIG_PATH}
	${ILMBASE_PATH}/Iex
	${ILMBASE_PATH}/IexMath
	${ILMBASE_PATH}/Imath
)
add_subdirectory(${ILMBASE_PATH}/Iex)
add_subdirectory(${ILMBASE_PATH}/IexMath)
add_subdirectory(${ILMBASE_PATH}/Imath)

{'fraction_non_alphanumeric': 0.14903090623363016, 'fraction_numerical': 0.0178103719224725, 'mean_word_length': 6.5325443786982245, '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': '861550', 'n_tokens_mistral': 1549, 'n_tokens_neox': 1459, 'n_words': 194}