<commit_before>cmake_minimum_required (VERSION 3.1)
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)

project(libvmm CXX)

set(VERSION "1.0")



if(XW_BUILD_LIBVMM)
    set(CMAKE_INSTALL_PREFIX "${XW_3RDP_ROOT}")
    # xw includes
    INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../..)
    
    
    # turn on/off zwssock handling since 18/07/2016
    set ( LIBVMM_XWLOGGING ON CACHE BOOL "On of we need xw logging." )
    if(LIBVMM_XWLOGGING)
        add_definitions(-D__xw__logign__)
        add_definitions(-DXW_LITTLEENDIAN)
        add_definitions(-D_ENABLE_ATOMIC_ALIGNMENT_FIX)
        add_definitions(-DBOOST_ALL_NO_LIB)
        add_definitions(-DBOOST_ALL_DYN_LINK)
        add_definitions(-DBOOST_CHRONO_HEADER_ONLY)
    endif()
else()
    set ( LIBVMM_XWLOGGING OFF CACHE BOOL "On of we need xw logging. (must be build in xwee tree)" FORCE )    
endif() 




# address space limit
# can be set full 32bit address (should give instability to lj)
# for full 32bit call cmake with  -DXW_USE_FULL_32:bool=on
if ( XW_USE_FULL_32 )
    message(STATUS "Using 32bit addresses! VAS manager will try to reserve 3.5GB of bottom VAS.")
else()
    message(STATUS "Using 31bit addresses! VAS manager will try to reserve 2GB of bottom VAS.")
    add_definitions(-D__LIMIT_TO_31_bit__)
endif()


add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})

macro(set_lib_names target)
    SET_TARGET_PROPERTIES( ${target} PROPERTIES
        OUTPUT_NAME "${target}"
    )
    
    if (NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
        #we need avoid linux "lib" prefix
        SET_TARGET_PROPERTIES( ${target} PROPERTIES PREFIX "")
    endif()
    
endmacro()

# ---------- Set MS Visual version -----------------------
set (XW_3RDP_ROOT ${CMAKE_INSTALL_PREFIX})

if (CMAKE_SYSTEM_NAME STREQUAL "Windows")

    if( "${VC_VERSION}" STREQUAL "" )
    
        set ( VC_VERSION 14 )
    
    endif()

endif()

# ---------- Find Boost Headers/Libraries -----------------------
set (XW_BOOST_MAJOR_VERSION 1 )
set (XW_BOOST_MINOR_VERSION 59)
set (XW_BOOST_PATCH_VERSION 0)

if("${XW_BOOST_PATCH_VERSION}" STREQUAL "0") 
    set (XW_BOOST_VERSION "${XW_BOOST_MAJOR_VERSION}_${XW_BOOST_MINOR_VERSION}" ) 
else()
    set (XW_BOOST_VERSION "${XW_BOOST_MAJOR_VERSION}_${XW_BOOST_MINOR_VERSION}_${XW_BOOST_PATCH_VERSION}" ) 
endif()

set (XW_BOOST_DEPENDS system filesystem)

#handle boost as part of local build system if not defined before
if ("${BOOST_ROOT}" STREQUAL "") 
    
	if("${XW_BOOST_PATCH_VERSION}" STREQUAL "0") 
		set (BOOST_ROOT ${XW_3RDP_ROOT}/include/boost-${XW_BOOST_MAJOR_VERSION}_${XW_BOOST_MINOR_VERSION})
	else()
		set (BOOST_ROOT ${XW_3RDP_ROOT}/include/boost-${XW_BOOST_MAJOR_VERSION}_${XW_BOOST_MINOR_VERSION}_${XW_BOOST_PATCH_VERSION})
	endif()	
	
    set (BOOST_LIBRARYDIR ${XW_3RDP_ROOT}/lib)
endif ()

if (NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
    SET (Boost_COMPILER -gcc48)
endif()

SET (Boost_FIND_REQUIRED ON)
SET (Boost_FIND_QUIETLY ON)
SET (Boost_DEBUG ON)
set (Boost_USE_MULTITHREADED ON)
set (Boost_USE_STATIC_LIBS OFF)
set (Boost_USE_STATIC_RUNTIME OFF)<commit_msg>patch boost version string if patch not present<commit_after>cmake_minimum_required (VERSION 3.1)
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)

project(libvmm CXX)

set(VERSION "1.0")



if(XW_BUILD_LIBVMM)
    set(CMAKE_INSTALL_PREFIX "${XW_3RDP_ROOT}")
    # xw includes
    INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../..)
    
    
    # turn on/off zwssock handling since 18/07/2016
    set ( LIBVMM_XWLOGGING ON CACHE BOOL "On of we need xw logging." )
    if(LIBVMM_XWLOGGING)
        add_definitions(-D__xw__logign__)
        add_definitions(-DXW_LITTLEENDIAN)
        add_definitions(-D_ENABLE_ATOMIC_ALIGNMENT_FIX)
        add_definitions(-DBOOST_ALL_NO_LIB)
        add_definitions(-DBOOST_ALL_DYN_LINK)
        add_definitions(-DBOOST_CHRONO_HEADER_ONLY)
    endif()
else()
    set ( LIBVMM_XWLOGGING OFF CACHE BOOL "On of we need xw logging. (must be build in xwee tree)" FORCE )    
endif() 




# address space limit
# can be set full 32bit address (should give instability to lj)
# for full 32bit call cmake with  -DXW_USE_FULL_32:bool=on
if ( XW_USE_FULL_32 )
    message(STATUS "Using 32bit addresses! VAS manager will try to reserve 3.5GB of bottom VAS.")
else()
    message(STATUS "Using 31bit addresses! VAS manager will try to reserve 2GB of bottom VAS.")
    add_definitions(-D__LIMIT_TO_31_bit__)
endif()


add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})

macro(set_lib_names target)
    SET_TARGET_PROPERTIES( ${target} PROPERTIES
        OUTPUT_NAME "${target}"
    )
    
    if (NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
        #we need avoid linux "lib" prefix
        SET_TARGET_PROPERTIES( ${target} PROPERTIES PREFIX "")
    endif()
    
endmacro()

# ---------- Set MS Visual version -----------------------
set (XW_3RDP_ROOT ${CMAKE_INSTALL_PREFIX})

if (CMAKE_SYSTEM_NAME STREQUAL "Windows")

    if( "${VC_VERSION}" STREQUAL "" )
    
        set ( VC_VERSION 14 )
    
    endif()

endif()

# ---------- Find Boost Headers/Libraries -----------------------
set (XW_BOOST_MAJOR_VERSION 1 )
set (XW_BOOST_MINOR_VERSION 59)
set (XW_BOOST_PATCH_VERSION 0)
set (XW_BOOST_VERSION "${XW_BOOST_MAJOR_VERSION}_${XW_BOOST_MINOR_VERSION}_${XW_BOOST_PATCH_VERSION}" ) 

set (XW_BOOST_DEPENDS system filesystem)

#handle boost as part of local build system if not defined before
if ("${BOOST_ROOT}" STREQUAL "") 
    
	if("${XW_BOOST_PATCH_VERSION}" STREQUAL "0") 
		set (BOOST_ROOT ${XW_3RDP_ROOT}/include/boost-${XW_BOOST_MAJOR_VERSION}_${XW_BOOST_MINOR_VERSION})
	else()
		set (BOOST_ROOT ${XW_3RDP_ROOT}/include/boost-${XW_BOOST_MAJOR_VERSION}_${XW_BOOST_MINOR_VERSION}_${XW_BOOST_PATCH_VERSION})
	endif()	
	
    set (BOOST_LIBRARYDIR ${XW_3RDP_ROOT}/lib)
endif ()

if (NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
    SET (Boost_COMPILER -gcc48)
endif()

SET (Boost_FIND_REQUIRED ON)
SET (Boost_FIND_QUIETLY ON)
SET (Boost_DEBUG ON)
set (Boost_USE_MULTITHREADED ON)
set (Boost_USE_STATIC_LIBS OFF)
set (Boost_USE_STATIC_RUNTIME OFF)
{'fraction_non_alphanumeric': 0.11497025245216273, 'fraction_numerical': 0.013989387361312108, 'mean_word_length': 4.115131578947368, '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': '306731', 'n_tokens_mistral': 2525, 'n_tokens_neox': 2306, 'n_words': 486}