<commit_before>cmake_minimum_required(VERSION 3.6)

# project settings
project(mxx LANGUAGES CXX)

# Add these standard paths to the search paths for FIND_LIBRARY
# to find libraries from these locations first
if(UNIX)
    set(CMAKE_LIBRARY_PATH "${CMAKE_LIBRARY_PATH} /lib /usr/lib")
endif()

# --------------------------------------------------------------
# Indicate CMake 2.7 and above that we don't want to mix relative
#  and absolute paths in linker lib lists.
# Run "cmake --help-policy CMP0003" for more information.
# --------------------------------------------------------------
if(COMMAND cmake_policy)
    cmake_policy(SET CMP0003 NEW)
endif()

add_library(mxx INTERFACE)
target_compile_features(mxx INTERFACE cxx_std_11)
target_include_directories(mxx INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>)


#### MPI
find_package(MPI REQUIRED)
if (MPI_FOUND)
    #set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MPI_COMPILE_FLAGS}")
    #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MPI_COMPILE_FLAGS}")
    #set(CMAKE_LINK_FLAGS "${CMAKE_LINK_FLAGS} ${MPI_LINK_FLAGS}")
    target_link_libraries(mxx INTERFACE ${MPI_CXX_LIBRARIES})
    target_include_directories(mxx INTERFACE ${MPI_CXX_INCLUDE_DIRS})
else (MPI_FOUND)
    message(SEND_ERROR "This application cannot compile without MPI")
endif (MPI_FOUND)

#### cxx-prettyprint
target_include_directories(mxx INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/ext> $<INSTALL_INTERFACE:include/mxx/ext>)

#### Installation
install(DIRECTORY include/mxx/ DESTINATION include/mxx)
install(DIRECTORY ext/ DESTINATION include/mxx FILES_MATCHING PATTERN "*.hpp")

include(CMakePackageConfigHelpers)

install(TARGETS mxx
        EXPORT mxxTargets
        LIBRARY DESTINATION lib
        ARCHIVE DESTINATION lib<commit_msg>try and fix travis mpi issue<commit_after>cmake_minimum_required(VERSION 3.6)

# project settings
project(mxx LANGUAGES CXX)

# Add these standard paths to the search paths for FIND_LIBRARY
# to find libraries from these locations first
if(UNIX)
    set(CMAKE_LIBRARY_PATH "${CMAKE_LIBRARY_PATH} /lib /usr/lib")
endif()

# --------------------------------------------------------------
# Indicate CMake 2.7 and above that we don't want to mix relative
#  and absolute paths in linker lib lists.
# Run "cmake --help-policy CMP0003" for more information.
# --------------------------------------------------------------
if(COMMAND cmake_policy)
    cmake_policy(SET CMP0003 NEW)
endif()

add_library(mxx INTERFACE)
target_compile_features(mxx INTERFACE cxx_std_11)
target_include_directories(mxx INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>)


#### MPI
find_package(MPI REQUIRED)
if (MPI_FOUND)
    #set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MPI_COMPILE_FLAGS}")
    #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MPI_COMPILE_FLAGS}")
    #set(CMAKE_LINK_FLAGS "${CMAKE_LINK_FLAGS} ${MPI_LINK_FLAGS}")
    target_link_libraries(mxx INTERFACE ${MPI_CXX_LIBRARIES})
    target_include_directories(mxx INTERFACE ${MPI_CXX_INCLUDE_PATH})
else (MPI_FOUND)
    message(SEND_ERROR "This application cannot compile without MPI")
endif (MPI_FOUND)

#### cxx-prettyprint
target_include_directories(mxx INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/ext> $<INSTALL_INTERFACE:include/mxx/ext>)

#### Installation
install(DIRECTORY include/mxx/ DESTINATION include/mxx)
install(DIRECTORY ext/ DESTINATION include/mxx FILES_MATCHING PATTERN "*.hpp")

include(CMakePackageConfigHelpers)

install(TARGETS mxx
        EXPORT mxxTargets
        LIBRARY DESTINATION lib
        ARCHIVE DESTINATION lib
{'fraction_non_alphanumeric': 0.15747599451303154, 'fraction_numerical': 0.007681755829903978, 'mean_word_length': 4.106442577030812, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '3459742', 'n_tokens_mistral': 1273, 'n_tokens_neox': 1176, 'n_words': 266}