<commit_before>#------------------------------------------------------------------------------
# User-settable variables and options.
#
# Note that defaults for cmake builtin variables must be set before calling
# project(), otherwise the cmake-provided defaults will get in first!

set(CMAKE_BUILD_TYPE "Release" CACHE STRING
    "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel."
)

if(NOT WIN32)
    set(CMAKE_CXX_FLAGS "-Wall -std=c++0x" CACHE STRING "Flags used by the compiler during all build types.")
endif()

project(displaz)

cmake_minimum_required(VERSION 2.8)

option(DISPLAZ_STATIC "Build against static libraries" FALSE)
option(DISPLAZ_USE_LAS "Build with support for reading las files" TRUE)
option(DISPLAZ_USE_PDAL "Use PDAL for reading las files" FALSE)
option(DISPLAZ_USE_TESTS "Build the test cases" TRUE)
option(DISPLAZ_BUILD_DVOX "Build experimential dvox utility" FALSE)
option(DISPLAZ_EMBED_GLEW "Build GLEW as part of the displaz build process" TRUE)

set(DISPLAZ_EXTERNAL_DIR "${PROJECT_BINARY_DIR}/../build_external/dist"
    CACHE PATH "Directory containing installed third party libraries (laslib, ilmbase, ...)")

#------------------------------------------------------------------------------
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")

if (DISPLAZ_USE_TESTS)
    enable_testing()
endif()

#------------------------------------------------------------------------------
# Find third party dependencies

if (EXISTS ${DISPLAZ_EXTERNAL_DIR})
    list (APPEND CMAKE_PREFIX_PATH ${DISPLAZ_EXTERNAL_DIR})
else()
    message(STATUS "DISPLAZ_EXTERNAL_DIR (= \"${DISPLAZ_EXTERNAL_DIR}\") does not exist.  If you would like LASlib and ilmbase to be built for you, please run the cmake build system in thirdparty/external (see build instructions for details)")
endif()

find_package(Ilmbase 1.0.1 REQUIRED)

if (DISPLAZ_USE_LAS)
    add_definitions(-DDISPLAZ_USE_LAS)
    # Find a library to read .las or .laz
    if (DISPLAZ_USE_PDAL)
        find_package(PDAL REQUIRED)
        find_package(Boost 1.48 REQUIRED)
        add_definitions(-DDISPLAZ_USE_PDAL)
        include_directories(${PDAL_INCLUDE_DIRS})
    else()
        # laslib support
        find_package(LASlib REQUIRED)
        include_directories(${LASLIB_INCLUDE_DIRS})
    endif()
endif()<commit_msg>Put pre-install binaries in convenient location<commit_after>#------------------------------------------------------------------------------
# User-settable variables and options.
#
# Note that defaults for cmake builtin variables must be set before calling
# project(), otherwise the cmake-provided defaults will get in first!

set(CMAKE_BUILD_TYPE "Release" CACHE STRING
    "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel."
)

if(NOT WIN32)
    set(CMAKE_CXX_FLAGS "-Wall -std=c++0x" CACHE STRING "Flags used by the compiler during all build types.")
endif()

project(displaz)

cmake_minimum_required(VERSION 2.8)

option(DISPLAZ_STATIC "Build against static libraries" FALSE)
option(DISPLAZ_USE_LAS "Build with support for reading las files" TRUE)
option(DISPLAZ_USE_PDAL "Use PDAL for reading las files" FALSE)
option(DISPLAZ_USE_TESTS "Build the test cases" TRUE)
option(DISPLAZ_BUILD_DVOX "Build experimential dvox utility" FALSE)
option(DISPLAZ_EMBED_GLEW "Build GLEW as part of the displaz build process" TRUE)

set(DISPLAZ_EXTERNAL_DIR "${PROJECT_BINARY_DIR}/../build_external/dist"
    CACHE PATH "Directory containing installed third party libraries (laslib, ilmbase, ...)")

#------------------------------------------------------------------------------
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")

# More handy location for intermediate build artifacts
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

if (DISPLAZ_USE_TESTS)
    enable_testing()
endif()

#------------------------------------------------------------------------------
# Find third party dependencies

if (EXISTS ${DISPLAZ_EXTERNAL_DIR})
    list (APPEND CMAKE_PREFIX_PATH ${DISPLAZ_EXTERNAL_DIR})
else()
    message(STATUS "DISPLAZ_EXTERNAL_DIR (= \"${DISPLAZ_EXTERNAL_DIR}\") does not exist.  If you would like LASlib and ilmbase to be built for you, please run the cmake build system in thirdparty/external (see build instructions for details)")
endif()

find_package(Ilmbase 1.0.1 REQUIRED)

if (DISPLAZ_USE_LAS)
    add_definitions(-DDISPLAZ_USE_LAS)
    # Find a library to read .las or .laz
    if (DISPLAZ_USE_PDAL)
        find_package(PDAL REQUIRED)
        find_package(Boost 1.48 REQUIRED)
        add_definitions(-DDISPLAZ_USE_PDAL)
        include_directories(${PDAL_INCLUDE_DIRS})
    else()
        # laslib support
        find_package(LASlib REQUIRED)
        include_directories(${LASLIB_INCLUDE_DIRS})
    endif()
endif()
{'fraction_non_alphanumeric': 0.16998407643312102, 'fraction_numerical': 0.004378980891719745, 'mean_word_length': 3.1632145816072907, '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': '3252088', 'n_tokens_mistral': 1625, 'n_tokens_neox': 1515, 'n_words': 427}