<commit_before>set(QBS_APP_INSTALL_DIR "bin")
set(QBS_LIBDIR_NAME "lib")

if(APPLE)
    set(QBS_LIB_RPATH "@loader_path")
    set(QBS_LIBEXEC_RPATH "@loader_path/../../${QBS_LIBDIR_NAME}")
    set(QBS_APP_RPATH "@loader_path/../${QBS_LIBDIR_NAME}")
    set(QBS_PLUGINS_RPATH "@loader_path/../../../${QBS_LIBDIR_NAME}")
elseif(WIN32)
    set(QBS_LIB_RPATH "")
    set(QBS_LIBEXEC_RPATH "")
    set(QBS_APP_RPATH "")
    set(QBS_PLUGINS_RPATH "")
else()
    set(QBS_LIB_RPATH "\$ORIGIN")
    set(QBS_LIBEXEC_RPATH "\$ORIGIN/../../${QBS_LIBDIR_NAME}")
    set(QBS_APP_RPATH "\$ORIGIN/../${QBS_LIBDIR_NAME}")
    set(QBS_PLUGINS_RPATH "\$ORIGIN/../../../${QBS_LIBDIR_NAME}")
endif()

if(WIN32)
    set(QBS_LIB_INSTALL_DIR ${QBS_APP_INSTALL_DIR})
    set(QBS_LIBEXEC_PATH ${QBS_APP_INSTALL_DIR})
else()
    set(QBS_LIB_INSTALL_DIR ${QBS_LIBDIR_NAME})
    set(QBS_LIBEXEC_PATH "libexec/qbs")
endif()

if(WITH_UNIT_TESTS)
    set(QBS_UNIT_TESTS_DEFINES "QBS_ENABLE_UNIT_TESTS")
else()
    set(QBS_UNIT_TESTS_DEFINES "")
endif()

if(WITH_PROJECT_FILE_UPDATES)
    set(QBS_PROJECT_FILE_UPDATES_DEFINES "QBS_ENABLE_PROJECT_FILE_UPDATES")
else()
    set(QBS_PROJECT_FILE_UPDATES_DEFINES "")
endif()

set(QBS_PLUGINS_INSTALL_DIR "${QBS_LIBDIR_NAME}/qbs/plugins")
set(QBS_RELATIVE_LIBEXEC_PATH "../${QBS_LIBEXEC_PATH}")
set(QBS_RELATIVE_SEARCH_PATH "..")
set(QBS_RELATIVE_PLUGINS_PATH "../${QBS_LIBDIR_NAME}")
set(QBS_RESOURCES_INSTALL_DIR "")
set(QBS_HEADERS_INSTALL_DIR "include/qbs")

set(DEFAULT_DEFINES "")
if(WIN32)
  list(APPEND DEFAULT_DEFINES UNICODE _UNICODE _CRT_SECURE_NO_WARNINGS)
endif()

# CMake 3.10 doesn't have list(TRANSFORM)
function(list_transform_prepend var prefix)
    set(temp "")
    foreach(f ${${var}})
        list(APPEND temp "${prefix}${f}")
    endforeach()
    set(${var} "${temp}" PARENT_SCOPE)
endfunction()

function(add_qbs_app target_name)
    cmake_parse_arguments(_arg
        ""
        "DESTINATION"
        "DEFINES;PUBLIC_DEFINES;DEPENDS;PUBLIC_DEPENDS;INCLUDES;PUBLIC_INCLUDES;SOURCES;"
        ${ARGN}
        )

    if (${_arg_UNPARSED_ARGUMENTS})
        message(FATAL_ERROR "add_qbs_app had unparsed arguments")
    endif()<commit_msg>cmake: fix default defines<commit_after>set(QBS_APP_INSTALL_DIR "bin")
set(QBS_LIBDIR_NAME "lib")

if(APPLE)
    set(QBS_LIB_RPATH "@loader_path")
    set(QBS_LIBEXEC_RPATH "@loader_path/../../${QBS_LIBDIR_NAME}")
    set(QBS_APP_RPATH "@loader_path/../${QBS_LIBDIR_NAME}")
    set(QBS_PLUGINS_RPATH "@loader_path/../../../${QBS_LIBDIR_NAME}")
elseif(WIN32)
    set(QBS_LIB_RPATH "")
    set(QBS_LIBEXEC_RPATH "")
    set(QBS_APP_RPATH "")
    set(QBS_PLUGINS_RPATH "")
else()
    set(QBS_LIB_RPATH "\$ORIGIN")
    set(QBS_LIBEXEC_RPATH "\$ORIGIN/../../${QBS_LIBDIR_NAME}")
    set(QBS_APP_RPATH "\$ORIGIN/../${QBS_LIBDIR_NAME}")
    set(QBS_PLUGINS_RPATH "\$ORIGIN/../../../${QBS_LIBDIR_NAME}")
endif()

if(WIN32)
    set(QBS_LIB_INSTALL_DIR ${QBS_APP_INSTALL_DIR})
    set(QBS_LIBEXEC_PATH ${QBS_APP_INSTALL_DIR})
else()
    set(QBS_LIB_INSTALL_DIR ${QBS_LIBDIR_NAME})
    set(QBS_LIBEXEC_PATH "libexec/qbs")
endif()

if(WITH_UNIT_TESTS)
    set(QBS_UNIT_TESTS_DEFINES "QBS_ENABLE_UNIT_TESTS")
else()
    set(QBS_UNIT_TESTS_DEFINES "")
endif()

if(WITH_PROJECT_FILE_UPDATES)
    set(QBS_PROJECT_FILE_UPDATES_DEFINES "QBS_ENABLE_PROJECT_FILE_UPDATES")
else()
    set(QBS_PROJECT_FILE_UPDATES_DEFINES "")
endif()

set(QBS_PLUGINS_INSTALL_DIR "${QBS_LIBDIR_NAME}/qbs/plugins")
set(QBS_RELATIVE_LIBEXEC_PATH "../${QBS_LIBEXEC_PATH}")
set(QBS_RELATIVE_SEARCH_PATH "..")
set(QBS_RELATIVE_PLUGINS_PATH "../${QBS_LIBDIR_NAME}")
set(QBS_RESOURCES_INSTALL_DIR "")
set(QBS_HEADERS_INSTALL_DIR "include/qbs")

set(DEFAULT_DEFINES "")
if(WIN32)
  list(APPEND DEFAULT_DEFINES UNICODE _UNICODE _SCL_SECURE_NO_WARNINGS)
endif()

# CMake 3.10 doesn't have list(TRANSFORM)
function(list_transform_prepend var prefix)
    set(temp "")
    foreach(f ${${var}})
        list(APPEND temp "${prefix}${f}")
    endforeach()
    set(${var} "${temp}" PARENT_SCOPE)
endfunction()

function(add_qbs_app target_name)
    cmake_parse_arguments(_arg
        ""
        "DESTINATION"
        "DEFINES;PUBLIC_DEFINES;DEPENDS;PUBLIC_DEPENDS;INCLUDES;PUBLIC_INCLUDES;SOURCES;"
        ${ARGN}
        )

    if (${_arg_UNPARSED_ARGUMENTS})
        message(FATAL_ERROR "add_qbs_app had unparsed arguments")
    endif()
{'fraction_non_alphanumeric': 0.14764638346727899, 'fraction_numerical': 0.0041331802525832375, 'mean_word_length': 5.222857142857142, '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': '7614765', 'n_tokens_mistral': 1890, 'n_tokens_neox': 1836, 'n_words': 206}