<commit_before>cmake_minimum_required(VERSION 2.8)

project(uaiso)

set(UAISO_CXX_FLAGS)
IF (WIN32)
set(UAISO_CXX_FLAGS "${UAISO_CXX_FLAGS} -std=c++1y -g")
ELSE()
set(UAISO_CXX_FLAGS "${UAISO_CXX_FLAGS} -std=c++1y -g -Wno-deprecated-register")
ENDIF()
set(UAISO_CXX_FLAGS "${UAISO_CXX_FLAGS} -fvisibility=hidden")

set(SCRIPTS_PATH Scripts)
set(PARSING_PATH Parsing)
set(AST_PATH Ast)
set(EXTERNAL_PATH External)
set(COMMON_PATH Common)
set(SEMANTIC_PATH Semantic)
set(D_PARSER_PATH D)
set(GO_PARSER_PATH Go)
set(HS_PARSER_PATH Haskell)
set(PY_PARSER_PATH Python)

# File generation.
add_custom_command(
    OUTPUT ${PROJECT_SOURCE_DIR}/${D_PARSER_PATH}/DLexer.h
           ${PROJECT_SOURCE_DIR}/${D_PARSER_PATH}/DLexer.cpp
           ${PROJECT_SOURCE_DIR}/${D_PARSER_PATH}/DParser.h
           ${PROJECT_SOURCE_DIR}/${D_PARSER_PATH}/DParser.cpp
           ${PROJECT_SOURCE_DIR}/${GO_PARSER_PATH}/GoLexer.h
           ${PROJECT_SOURCE_DIR}/${GO_PARSER_PATH}/GoLexer.cpp
           ${PROJECT_SOURCE_DIR}/${GO_PARSER_PATH}/GoParser.h
           ${PROJECT_SOURCE_DIR}/${GO_PARSER_PATH}/GoParser.cpp
           ${PROJECT_SOURCE_DIR}/${AST_PATH}/AstCast.h
           ${PROJECT_SOURCE_DIR}/${PARSING_PATH}/Token.h
           ${PROJECT_SOURCE_DIR}/${PARSING_PATH}/TokenName.cpp
           ${PROJECT_SOURCE_DIR}/TestDataAbsPath.txt
    COMMAND python ${PROJECT_SOURCE_DIR}/${SCRIPTS_PATH}/GenFlexBison.py
    COMMAND python ${PROJECT_SOURCE_DIR}/${SCRIPTS_PATH}/GenAstCast.py
    COMMAND python ${PROJECT_SOURCE_DIR}/${SCRIPTS_PATH}/GenTokens.py
    COMMAND python ${PROJECT_SOURCE_DIR}/${SCRIPTS_PATH}/ConfigTestDataPath.py
)

set(UAISO_TEST_SOURCES
    ${PROJECT_SOURCE_DIR}/Main.cpp
    # Common
    ${PROJECT_SOURCE_DIR}/${COMMON_PATH}/FileInfoTest.cpp
    # D
    ${PROJECT_SOURCE_DIR}/${D_PARSER_PATH}/DCompletionTest.cpp<commit_msg>Set rpath on os x<commit_after>cmake_minimum_required(VERSION 2.8)

project(uaiso)

set(SCRIPTS_PATH Scripts)
set(PARSING_PATH Parsing)
set(AST_PATH Ast)
set(EXTERNAL_PATH External)
set(COMMON_PATH Common)
set(SEMANTIC_PATH Semantic)
set(D_PARSER_PATH D)
set(GO_PARSER_PATH Go)
set(HS_PARSER_PATH Haskell)
set(PY_PARSER_PATH Python)

# Compilation flags
set(UAISO_CXX_FLAGS)
if (WIN32)
    set(UAISO_CXX_FLAGS "${UAISO_CXX_FLAGS} -std=c++1y -g")
else()
    set(UAISO_CXX_FLAGS "${UAISO_CXX_FLAGS} -std=c++1y -g -Wno-deprecated-register")
    if(APPLE)
        set(CMAKE_MACOSX_RPATH ON)
    endif()
endif()
set(UAISO_CXX_FLAGS "${UAISO_CXX_FLAGS} -fvisibility=hidden")

# File generation.
add_custom_command(
    OUTPUT ${PROJECT_SOURCE_DIR}/${D_PARSER_PATH}/DLexer.h
           ${PROJECT_SOURCE_DIR}/${D_PARSER_PATH}/DLexer.cpp
           ${PROJECT_SOURCE_DIR}/${D_PARSER_PATH}/DParser.h
           ${PROJECT_SOURCE_DIR}/${D_PARSER_PATH}/DParser.cpp
           ${PROJECT_SOURCE_DIR}/${GO_PARSER_PATH}/GoLexer.h
           ${PROJECT_SOURCE_DIR}/${GO_PARSER_PATH}/GoLexer.cpp
           ${PROJECT_SOURCE_DIR}/${GO_PARSER_PATH}/GoParser.h
           ${PROJECT_SOURCE_DIR}/${GO_PARSER_PATH}/GoParser.cpp
           ${PROJECT_SOURCE_DIR}/${AST_PATH}/AstCast.h
           ${PROJECT_SOURCE_DIR}/${PARSING_PATH}/Token.h
           ${PROJECT_SOURCE_DIR}/${PARSING_PATH}/TokenName.cpp
           ${PROJECT_SOURCE_DIR}/TestDataAbsPath.txt
    COMMAND python ${PROJECT_SOURCE_DIR}/${SCRIPTS_PATH}/GenFlexBison.py
    COMMAND python ${PROJECT_SOURCE_DIR}/${SCRIPTS_PATH}/GenAstCast.py
    COMMAND python ${PROJECT_SOURCE_DIR}/${SCRIPTS_PATH}/GenTokens.py
    COMMAND python ${PROJECT_SOURCE_DIR}/${SCRIPTS_PATH}/ConfigTestDataPath.py
)

set(UAISO_TEST_SOURCES
    ${PROJECT_SOURCE_DIR}/Main.cpp
    # Common
    ${PROJECT_SOURCE_DIR}/${COMMON_PATH}/FileInfoTest.cpp
    # D
    ${PROJECT_SOURCE_DIR}/${D_PARSER_PATH}/DCompletionTest.cpp
{'fraction_non_alphanumeric': 0.13075898801597868, 'fraction_numerical': 0.003195739014647137, 'mean_word_length': 4.7607361963190185, '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': '3252179', 'n_tokens_mistral': 1468, 'n_tokens_neox': 1452, 'n_words': 157}