<commit_before>cmake_minimum_required(VERSION 2.8 FATAL_ERROR)

LINK_DIRECTORIES(${EXTERNAL_BINARY_DIR})

SET(PROJECT LoginServer)

project(${PROJECT})

IF(ENABLE_MYSQL_ONE_INSTANCE)
	SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_MYSQL_ONE_INSTANCE")
ENDIF()

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DASIO_STANDALONE")
set(GCC_LINK_FLAGS "")
set(Clang_LINK_FLAGS "")
set(MSVC_LINK_FLAGS " /NODEFAULTLIB:MSVCRTD /NODEFAULTLIB:MSVCRT")

IF (${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)
ELSE()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -Werror")
ENDIF()

IF (${CMAKE_CXX_COMPILER_ID} STREQUAL GNU)
	SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-packed-bitfield-compat -Wl,-Map=${PROJECT}.map")
ELSEIF( ${CMAKE_CXX_COMPILER_ID} STREQUAL Clang )
	SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-keyword-compat")
ENDIF()

# Our Stuff 
#INCLUDE_DIRECTORIES(
#    ${CMAKE_SOURCE_DIR}/src/core/include
#    ${CMAKE_SOURCE_DIR}/src/rosecommon/include
#	${CMAKE_SOURCE_DIR}/src/rosecommon/include/packets
#    ${CMAKE_SOURCE_DIR}/src/proto/include
#    ${CMAKE_CURRENT_SOURCE_DIR}/include
#)

SET( SOURCES_MAIN
  src/main.cpp )
  
SET( SOURCES_HEADER
  include/cloginserver
  include/cloginclient
  include/cloginisc )

SET( SOURCES_BASE
  src/cloginserver
  src/cloginclient
  src/cloginisc )

find_package( Threads REQUIRED )
add_executable(${PROJECT} ${SOURCES_MAIN} ${SOURCES_BASE} ${SOURCES_HEADER})
target_include_directories(${PROJECT} PUBLIC
    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)

SET_TARGET_PROPERTIES(${PROJECT} PROPERTIES LINK_FLAGS
                "${${CMAKE_CXX_COMPILER_ID}_LINK_FLAGS}")

IF(ENABLE_MYSQL)
ENDIF()
				
target_link_libraries(${PROJECT} PRIVATE
	RoseCommon
	${CMAKE_THREAD_LIBS_INIT}
)

IF (${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)
        TARGET_LINK_LIBRARIES(${PROJECT} PRIVATE
                wsock32.lib
                libprotobuf
        )
ELSE()
        TARGET_LINK_LIBRARIES(${PROJECT}
                PRIVATE protobuf
                )
ENDIF()

#INSTALL(
#    TARGETS ${PROJECT}<commit_msg>try to fix this issue<commit_after>cmake_minimum_required(VERSION 2.8 FATAL_ERROR)

link_directories(${EXTERNAL_BINARY_DIR})

set(PROJECT LoginServer)

project(${PROJECT})

IF(ENABLE_MYSQL_ONE_INSTANCE)
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_MYSQL_ONE_INSTANCE")
ENDIF()

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DASIO_STANDALONE")
set(GCC_LINK_FLAGS "")
set(Clang_LINK_FLAGS "")
set(MSVC_LINK_FLAGS " /NODEFAULTLIB:MSVCRTD /NODEFAULTLIB:MSVCRT")

IF (NOT MSVC)
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -Werror")
ENDIF()

IF (${CMAKE_CXX_COMPILER_ID} STREQUAL GNU)
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-packed-bitfield-compat -Wl,-Map=${PROJECT}.map")
ELSEIF( ${CMAKE_CXX_COMPILER_ID} STREQUAL Clang )
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-keyword-compat")
ENDIF()

# Our Stuff 
#include_directories(
#  ${CMAKE_SOURCE_DIR}/src/core/include
#  ${CMAKE_SOURCE_DIR}/src/rosecommon/include
#  ${CMAKE_SOURCE_DIR}/src/rosecommon/include/packets
#  ${CMAKE_SOURCE_DIR}/src/proto/include
#  ${CMAKE_CURRENT_SOURCE_DIR}/include
#)

SET( SOURCES_MAIN
  src/main.cpp )
  
SET( SOURCES_HEADER
  include/cloginserver
  include/cloginclient
  include/cloginisc )

SET( SOURCES_BASE
  src/cloginserver
  src/cloginclient
  src/cloginisc )

find_package( Threads REQUIRED )
add_executable(${PROJECT} ${SOURCES_MAIN} ${SOURCES_BASE} ${SOURCES_HEADER})

target_include_directories(${PROJECT} PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
set_target_properties(${PROJECT} PROPERTIES LINK_FLAGS "${${CMAKE_CXX_COMPILER_ID}_LINK_FLAGS}")

IF(ENABLE_MYSQL)
  #do something?
ENDIF()

target_link_libraries(${PROJECT} PRIVATE RoseCommon)
target_link_libraries(${PROJECT} PRIVATE ${CMAKE_THREAD_LIBS_INIT})

IF (${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)
  target_link_libraries(${PROJECT} PRIVATE wsock32.lib)
  target_link_libraries(${PROJECT} PRIVATE libprotobuf)
ELSE()
  target_link_libraries(${PROJECT} PRIVATE protobuf)
ENDIF()

#INSTALL(
#    TARGETS ${PROJECT}
{'fraction_non_alphanumeric': 0.12515367592820262, 'fraction_numerical': 0.0029505778214900416, 'mean_word_length': 6.238434163701068, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1172472', 'n_tokens_mistral': 1752, 'n_tokens_neox': 1603, 'n_words': 217}