<commit_before>PROJECT (hawkey)
CMAKE_MINIMUM_REQUIRED (VERSION 2.4)
CMAKE_POLICY (SET CMP0005 OLD)

set (CMAKE_C_FLAGS		"${CMAKE_C_FLAGS} -std=c99 -Wall -Wl,--as-needed")
set (CMAKE_C_FLAGS_RELEASE	"${CMAKE_C_FLAGS} -g -O3")
set (CMAKE_C_FLAGS_DEBUG	"${CMAKE_C_FLAGS} -ggdb -O0 -Wall")
set (CMAKE_BUILD_TYPE DEBUG)

INCLUDE_DIRECTORIES (${CMAKE_SOURCE_DIR})
if (LIBSOLV_PATH)
   MESSAGE(STATUS "Building against custom libsolv build")
   INCLUDE_DIRECTORIES (${LIBSOLV_PATH}/build/)
   FIND_LIBRARY (SOLV_LIBRARY NAMES solv PATHS ${LIBSOLV_PATH}/build/src NO_DEFAULT_PATH)
   FIND_LIBRARY (SOLVEXT_LIBRARY NAMES solvext PATHS ${LIBSOLV_PATH}/build/ext NO_DEFAULT_PATH)
   ADD_CUSTOM_COMMAND (OUTPUT ${LIBSOLV_PATH}/build/solv
                       COMMAND mkdir -p ${LIBSOLV_PATH}/build/solv
                       COMMAND cp ${LIBSOLV_PATH}/src/*.h ${LIBSOLV_PATH}/build/solv
		       COMMAND cp ${LIBSOLV_PATH}/ext/*.h ${LIBSOLV_PATH}/build/solv
		       COMMAND cp ${LIBSOLV_PATH}/build/src/*.h ${LIBSOLV_PATH}/build/solv)
   ADD_CUSTOM_TARGET (generate_libsolv_includes ALL DEPENDS ${LIBSOLV_PATH}/build/solv)
endif (LIBSOLV_PATH)
FIND_PACKAGE (EXPAT REQUIRED)
FIND_PACKAGE (ZLIB REQUIRED)
FIND_LIBRARY (RPMDB_LIBRARY NAMES rpmdb)
FIND_LIBRARY (SOLV_LIBRARY NAMES solv)
FIND_LIBRARY (SOLVEXT_LIBRARY NAMES solvext)
FIND_LIBRARY (CHECK_LIBRARY NAMES check)

# rpm:
FIND_LIBRARY (RPMDB_LIBRARY NAMES rpmdb)
IF (NOT RPMDB_LIBRARY)<commit_msg>cmake: do not duplicate -Wall gcc flag for debug builds<commit_after>PROJECT (hawkey)
CMAKE_MINIMUM_REQUIRED (VERSION 2.4)
CMAKE_POLICY (SET CMP0005 OLD)

set (CMAKE_C_FLAGS		"${CMAKE_C_FLAGS} -std=c99 -Wall -Wl,--as-needed")
set (CMAKE_C_FLAGS_RELEASE	"${CMAKE_C_FLAGS} -g -O3")
set (CMAKE_C_FLAGS_DEBUG	"${CMAKE_C_FLAGS} -ggdb -O0")
set (CMAKE_BUILD_TYPE DEBUG)

INCLUDE_DIRECTORIES (${CMAKE_SOURCE_DIR})
if (LIBSOLV_PATH)
   MESSAGE(STATUS "Building against custom libsolv build")
   INCLUDE_DIRECTORIES (${LIBSOLV_PATH}/build/)
   FIND_LIBRARY (SOLV_LIBRARY NAMES solv PATHS ${LIBSOLV_PATH}/build/src NO_DEFAULT_PATH)
   FIND_LIBRARY (SOLVEXT_LIBRARY NAMES solvext PATHS ${LIBSOLV_PATH}/build/ext NO_DEFAULT_PATH)
   ADD_CUSTOM_COMMAND (OUTPUT ${LIBSOLV_PATH}/build/solv
                       COMMAND mkdir -p ${LIBSOLV_PATH}/build/solv
                       COMMAND cp ${LIBSOLV_PATH}/src/*.h ${LIBSOLV_PATH}/build/solv
		       COMMAND cp ${LIBSOLV_PATH}/ext/*.h ${LIBSOLV_PATH}/build/solv
		       COMMAND cp ${LIBSOLV_PATH}/build/src/*.h ${LIBSOLV_PATH}/build/solv)
   ADD_CUSTOM_TARGET (generate_libsolv_includes ALL DEPENDS ${LIBSOLV_PATH}/build/solv)
endif (LIBSOLV_PATH)
FIND_PACKAGE (EXPAT REQUIRED)
FIND_PACKAGE (ZLIB REQUIRED)
FIND_LIBRARY (RPMDB_LIBRARY NAMES rpmdb)
FIND_LIBRARY (SOLV_LIBRARY NAMES solv)
FIND_LIBRARY (SOLVEXT_LIBRARY NAMES solvext)
FIND_LIBRARY (CHECK_LIBRARY NAMES check)

# rpm:
FIND_LIBRARY (RPMDB_LIBRARY NAMES rpmdb)
IF (NOT RPMDB_LIBRARY)
{'fraction_non_alphanumeric': 0.10628844839371156, 'fraction_numerical': 0.00683526999316473, 'mean_word_length': 5.0350515463917525, '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': '7098229', 'n_tokens_mistral': 1324, 'n_tokens_neox': 1185, 'n_words': 229}