<commit_before>
#find_package(Ceres PATHS ${INSTALL_DIRECTORY}/ceres/lib/cmake/Ceres ${ceres_DIR})

if(Ceres_FOUND)
    message(STATUS "ceres FOUND IN SYSTEM: ${CERES_ROOT}")
    #    get_target_property(CERES_LIBRARY ceres  INTERFACE_LINK_LIBRARIES)
    #    set_target_properties(ceres PROPERTIES INTERFACE_LINK_LIBRARIES "")
    #    set_target_properties(ceres PROPERTIES INTERFACE_COMPILE_FEATURES "")
    #    target_link_libraries(ceres INTERFACE  blas lapack lapacke ${CERES_LIBRARY} Threads::Threads )
else()
    message(STATUS "ceres will be installed into ${INSTALL_DIRECTORY}/ceres on first build.")
    get_target_property(EIGEN3_INCLUDE_DIR Eigen3::Eigen INTERFACE_INCLUDE_DIRECTORIES)
#    get_target_property(GFLAGS_INCLUDE_DIR   gflags    INTERFACE_INCLUDE_DIRECTORIES)
#    get_target_property(GFLAGS_LIBRARIES     gflags    INTERFACE_LINK_LIBRARIES)
#
#    get_target_property(GLOG_INCLUDE_DIR   glog    INTERFACE_INCLUDE_DIRECTORIES)
#    get_target_property(GLOG_LIBRARIES     glog    INTERFACE_LINK_LIBRARIES)

    list (GET EIGEN3_INCLUDE_DIR 0 EIGEN3_INCLUDE_DIR)

#    set(FLAGS "-DEIGEN_MAX_STATIC_ALIGN_BYTES=0 -DNDEBUG -O3 -fstack-protector  -g -fno-omit-frame-pointer -D_GLIBCXX_DEBUG_PEDANTIC -D_GLIBCXX_DEBUG -D_FORTIFY_SOURCE=2")
#    set(FLAGS "-DEIGEN_MAX_STATIC_ALIGN_BYTES=0 -DNDEBUG -O3 -fstack-protector  -g -fno-omit-frame-pointer -D_FORTIFY_SOURCE=2")
    unset(FLAGS CACHE)
    if(CMAKE_BUILD_TYPE MATCHES Debug)
        set(FLAGS "${COMMON_OPTIONS} ${DEBUG_OPTIONS}")
    elseif(CMAKE_BUILD_TYPE MATCHES Release)
        set(FLAGS "${COMMON_OPTIONS} ${RELEASE_OPTIONS}")
    elseif(CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
        set(FLAGS "${COMMON_OPTIONS} ${RELWITHDEBINFO_OPTIONS}")
    endif()


    ################################
    ### Compiler-dependent flags ###
    ################################

#    if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
#        set(FLAGS "${FLAGS} -static --gcc-toolchain=${GCC_TOOLCHAIN} -stdlib=libstdc++")
#    endif()
    set(FLAGS "${FLAGS} -I${GLOG_INCLUDE_DIR} -L${GLOG_LIBRARY_DIR} -I${GFLAGS_INCLUDE_DIR}  -L${GFLAGS_LIBRARY_DIR}")<commit_msg>Trying my own Eigen fork to fix SVD segfault<commit_after>
#find_package(Ceres PATHS ${INSTALL_DIRECTORY}/ceres/lib/cmake/Ceres ${ceres_DIR})

if(Ceres_FOUND)
    message(STATUS "ceres FOUND IN SYSTEM: ${CERES_ROOT}")
    #    get_target_property(CERES_LIBRARY ceres  INTERFACE_LINK_LIBRARIES)
    #    set_target_properties(ceres PROPERTIES INTERFACE_LINK_LIBRARIES "")
    #    set_target_properties(ceres PROPERTIES INTERFACE_COMPILE_FEATURES "")
    #    target_link_libraries(ceres INTERFACE  blas lapack lapacke ${CERES_LIBRARY} Threads::Threads )
else()
    message(STATUS "ceres will be installed into ${INSTALL_DIRECTORY}/ceres on first build.")
    get_target_property(EIGEN3_INCLUDE_DIR Eigen3::Eigen INTERFACE_INCLUDE_DIRECTORIES)
#    get_target_property(GFLAGS_INCLUDE_DIR   gflags    INTERFACE_INCLUDE_DIRECTORIES)
#    get_target_property(GFLAGS_LIBRARIES     gflags    INTERFACE_LINK_LIBRARIES)
#
#    get_target_property(GLOG_INCLUDE_DIR   glog    INTERFACE_INCLUDE_DIRECTORIES)
#    get_target_property(GLOG_LIBRARIES     glog    INTERFACE_LINK_LIBRARIES)

    list (GET EIGEN3_INCLUDE_DIR 0 EIGEN3_INCLUDE_DIR)

#    set(FLAGS "-DEIGEN_MAX_STATIC_ALIGN_BYTES=0 -DNDEBUG -O3 -fstack-protector  -g -fno-omit-frame-pointer -D_GLIBCXX_DEBUG_PEDANTIC -D_GLIBCXX_DEBUG -D_FORTIFY_SOURCE=2")
#    set(FLAGS "-DEIGEN_MAX_STATIC_ALIGN_BYTES=0 -DNDEBUG -O3 -fstack-protector  -g -fno-omit-frame-pointer -D_FORTIFY_SOURCE=2")
    unset(FLAGS CACHE)
    set(FLAGS "${COMMON_OPTIONS}")
    if(CMAKE_BUILD_TYPE MATCHES Debug)
        set(FLAGS "${FLAGS} ${DEBUG_OPTIONS}")
    elseif(CMAKE_BUILD_TYPE MATCHES Release)
        set(FLAGS "${FLAGS} ${RELEASE_OPTIONS}")
    elseif(CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
        set(FLAGS "${FLAGS} ${RELWITHDEBINFO_OPTIONS}")
    endif()


    ################################
    ### Compiler-dependent flags ###
    ################################

    if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
        set(FLAGS "${FLAGS}  -Wno-unused-local-typedef -Wno-unused-parameter -Wno-ignored-qualifiers")
    endif()
    set(FLAGS "${FLAGS} -I${GLOG_INCLUDE_DIR} -L${GLOG_LIBRARY_DIR} -I${GFLAGS_INCLUDE_DIR}  -L${GFLAGS_LIBRARY_DIR}")
{'fraction_non_alphanumeric': 0.1306555863342567, 'fraction_numerical': 0.0050784856879039705, 'mean_word_length': 5.094233473980309, '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': '1340059', 'n_tokens_mistral': 1692, 'n_tokens_neox': 1557, 'n_words': 239}