<commit_before>cmake_minimum_required (VERSION 2.8.8)
project (Storage)

set(CMAKE_CXX_FLAGS_DEBUG "-O0 -ggdb")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -Wsign-conversion")
set(DLLIB -ldl)

include_directories(. include ../../thirdparty/Simple-Web-Server ../../thirdparty/rapidjson/include  ../common/include)

find_package(Threads REQUIRED)

set(BOOST_COMPONENTS system thread)
# Late 2017 TODO: remove the following checks and always use std::regex
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
    if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)
        set(BOOST_COMPONENTS ${BOOST_COMPONENTS} regex)
        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_BOOST_REGEX")
    endif()
endif()
find_package(Boost 1.53.0 COMPONENTS ${BOOST_COMPONENTS} REQUIRED)
include_directories(SYSTEM ${Boost_INCLUDE_DIR})

if(APPLE)
    set(OPENSSL_ROOT_DIR "/usr/local/opt/openssl")
endif()

file(GLOB storage_src "*.cpp")
file(GLOB common_src "../common/*.cpp")

add_executable(storage ${storage_src} ${common_src})
target_link_libraries(storage ${Boost_LIBRARIES})
target_link_libraries(storage ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries(storage ${DLLIB})

install(TARGETS storage RUNTIME DESTINATION foglamp/services/storage)

if(MSYS) #TODO: Is MSYS true when MSVC is true?
    target_link_libraries(storage ws2_32 wsock32)
    if(OPENSSL_FOUND)
        target_link_libraries(storage ws2_32 wsock32)
    endif()
endif()<commit_msg>FOGL-676 Make CMakefile install storage binary in the same palce as make does<commit_after>cmake_minimum_required (VERSION 2.8.8)
project (Storage)

set(CMAKE_CXX_FLAGS_DEBUG "-O0 -ggdb")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -Wsign-conversion")
set(DLLIB -ldl)

include_directories(. include ../../thirdparty/Simple-Web-Server ../../thirdparty/rapidjson/include  ../common/include)

find_package(Threads REQUIRED)

set(BOOST_COMPONENTS system thread)
# Late 2017 TODO: remove the following checks and always use std::regex
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
    if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)
        set(BOOST_COMPONENTS ${BOOST_COMPONENTS} regex)
        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_BOOST_REGEX")
    endif()
endif()
find_package(Boost 1.53.0 COMPONENTS ${BOOST_COMPONENTS} REQUIRED)
include_directories(SYSTEM ${Boost_INCLUDE_DIR})

if(APPLE)
    set(OPENSSL_ROOT_DIR "/usr/local/opt/openssl")
endif()

file(GLOB storage_src "*.cpp")
file(GLOB common_src "../common/*.cpp")

add_executable(storage ${storage_src} ${common_src})
target_link_libraries(storage ${Boost_LIBRARIES})
target_link_libraries(storage ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries(storage ${DLLIB})

install(TARGETS storage RUNTIME DESTINATION foglamp/services)

if(MSYS) #TODO: Is MSYS true when MSVC is true?
    target_link_libraries(storage ws2_32 wsock32)
    if(OPENSSL_FOUND)
        target_link_libraries(storage ws2_32 wsock32)
    endif()
endif()
{'fraction_non_alphanumeric': 0.11875843454790823, 'fraction_numerical': 0.018556005398110663, 'mean_word_length': 5.943793911007026, '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': '5265172', 'n_tokens_mistral': 1167, 'n_tokens_neox': 1050, 'n_words': 213}