<commit_before>cmake_minimum_required( VERSION 2.6 FATAL_ERROR )

project( libmygpo-qt )

set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII" )

# Don't use absolute path in Mygpo-qtTargets-$buildType.cmake
# (This will have no effect with CMake < 2.8)
set(QT_USE_IMPORTED_TARGETS TRUE)

find_package( Qt4 COMPONENTS QtCore QtNetwork QtTest REQUIRED )
set( QT_DONT_USE_QTGUI TRUE )

find_package(QJSON REQUIRED)

include( ${QT_USE_FILE} )

set( MYGPO_QT_VERSION_MAJOR "1" )
set( MYGPO_QT_VERSION_MINOR "0" )
set( MYGPO_QT_VERSION_PATCH "5" )
set( MYGPO_QT_VERSION "${MYGPO_QT_VERSION_MAJOR}.${MYGPO_QT_VERSION_MINOR}.${MYGPO_QT_VERSION_PATCH}" )

set( MYGPO_QT_SONAME "${MYGPO_QT_VERSION_MAJOR}")

if (CMAKE_COMPILER_IS_GNUCXX)
    ADD_DEFINITIONS( -Wcast-align -Wchar-subscripts -Wpointer-arith
       -Wwrite-strings -Wpacked -Wformat-security -Wmissing-format-attribute
       -Wold-style-cast -Woverloaded-virtual -Wnon-virtual-dtor  -Wall -Wextra
       -Wformat=2 -Wundef -Wlogical-op -Wstack-protector -Wmissing-include-dirs
       -Winit-self -Wunsafe-loop-optimizations  -ggdb3 -fno-inline -DQT_STRICT_ITERATORS )
    if ( NOT WIN32 )
        add_definitions( -fvisibility=hidden )
    endif()
endif(CMAKE_COMPILER_IS_GNUCXX)

option(MYGPO_BUILD_TESTS "Build all unit tests" ON)

if(MYGPO_BUILD_TESTS)
    INCLUDE(CTest)
    enable_testing()
endif(MYGPO_BUILD_TESTS)

set( CPACK_GENERATOR "TBZ2" "DEB" )
set( CPACK_PACKAGE_VERSION_MAJOR "${MYGPO_QT_VERSION_MAJOR}" )
set( CPACK_PACKAGE_VERSION_MINOR "${MYGPO_QT_VERSION_MINOR}" )
set( CPACK_PACKAGE_VERSION_PATCH "${MYGPO_QT_VERSION_PATCH}" )
set( CPACK_PACKAGE_VERSION "${MYGPO_QT_VERSION}" )
set( CPACK_DEBIAN_PACKAGE_MAINTAINER "<EMAIL>" )
set( CPACK_PACKAGE_DESCRIPTION_SUMMARY "A c++/qt library to access the APIs provided by gpodder.net." )

set(LIB_SUFFIX "" CACHE STRING "The directories where to install libraries to")
set(LIB_INSTALL_DIR lib${LIB_SUFFIX} )
set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include/mygpo-qt" CACHE PATH "The directory the headers are installed in")
set(CMAKECONFIG_INSTALL_DIR ${LIB_INSTALL_DIR}/cmake/mygpo-qt )

if( APPLE )<commit_msg>Check if the compiler supports the -Wlogical-op flag - it was only added in GCC in 4.3.0, and the mingw compiler in Ubuntu is at 4.2.1<commit_after>cmake_minimum_required( VERSION 2.6 FATAL_ERROR )

project( libmygpo-qt )

set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII" )

# Don't use absolute path in Mygpo-qtTargets-$buildType.cmake
# (This will have no effect with CMake < 2.8)
set(QT_USE_IMPORTED_TARGETS TRUE)

find_package( Qt4 COMPONENTS QtCore QtNetwork QtTest REQUIRED )
set( QT_DONT_USE_QTGUI TRUE )

find_package(QJSON REQUIRED)

include( ${QT_USE_FILE} )

set( MYGPO_QT_VERSION_MAJOR "1" )
set( MYGPO_QT_VERSION_MINOR "0" )
set( MYGPO_QT_VERSION_PATCH "5" )
set( MYGPO_QT_VERSION "${MYGPO_QT_VERSION_MAJOR}.${MYGPO_QT_VERSION_MINOR}.${MYGPO_QT_VERSION_PATCH}" )

set( MYGPO_QT_SONAME "${MYGPO_QT_VERSION_MAJOR}")

include(CheckCXXCompilerFlag)

if (CMAKE_COMPILER_IS_GNUCXX)
    ADD_DEFINITIONS( -Wcast-align -Wchar-subscripts -Wpointer-arith
       -Wwrite-strings -Wpacked -Wformat-security -Wmissing-format-attribute
       -Wold-style-cast -Woverloaded-virtual -Wnon-virtual-dtor  -Wall -Wextra
       -Wformat=2 -Wundef -Wstack-protector -Wmissing-include-dirs
       -Winit-self -Wunsafe-loop-optimizations  -ggdb3 -fno-inline -DQT_STRICT_ITERATORS )
    if ( NOT WIN32 )
        add_definitions( -fvisibility=hidden )
    endif()

    check_cxx_compiler_flag( -Wlogical-op GNUCXX_HAS_WLOGICAL_OP )
    if ( GNUCXX_HAS_WLOGICAL_OP )
        add_definitions( -Wlogical-op )
    endif()
endif(CMAKE_COMPILER_IS_GNUCXX)

option(MYGPO_BUILD_TESTS "Build all unit tests" ON)

if(MYGPO_BUILD_TESTS)
    INCLUDE(CTest)
    enable_testing()
endif(MYGPO_BUILD_TESTS)

set( CPACK_GENERATOR "TBZ2" "DEB" )
set( CPACK_PACKAGE_VERSION_MAJOR "${MYGPO_QT_VERSION_MAJOR}" )
set( CPACK_PACKAGE_VERSION_MINOR "${MYGPO_QT_VERSION_MINOR}" )
set( CPACK_PACKAGE_VERSION_PATCH "${MYGPO_QT_VERSION_PATCH}" )
set( CPACK_PACKAGE_VERSION "${MYGPO_QT_VERSION}" )
set( CPACK_DEBIAN_PACKAGE_MAINTAINER "<EMAIL>" )
set( CPACK_PACKAGE_DESCRIPTION_SUMMARY "A c++/qt library to access the APIs provided by gpodder.net." )

set(LIB_SUFFIX "" CACHE STRING "The directories where to install libraries to")
set(LIB_INSTALL_DIR lib${LIB_SUFFIX} )
set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include/mygpo-qt" CACHE PATH "The directory the headers are installed in")
set(CMAKECONFIG_INSTALL_DIR ${LIB_INSTALL_DIR}/cmake/mygpo-qt )

if( APPLE )
{'fraction_non_alphanumeric': 0.10259605399792315, 'fraction_numerical': 0.006645898234683281, 'mean_word_length': 5.735664335664335, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '1013198', 'n_tokens_mistral': 2019, 'n_tokens_neox': 1896, 'n_words': 352}