<commit_before># Main config.
PROJECT (sphereserver)
 
CMAKE_MINIMUM_REQUIRED (VERSION 2.8.1)

INCLUDE ("cmake/CMakeSources.cmake")
INCLUDE ("cmake/CMakeGitStatus.cmake")

# Need to clear shared library flags. If not, cmake sets -rdynamic and this
# add to the executable the full symbol table (included unused symbols).
# This is a problem because the binary is ~700 KB bigger.
SET (CMAKE_SHARED_LIBRARY_LINK_C_FLAGS)
SET (CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)


# If we have not specified a toolchain, let's detect which one we should use
IF (NOT TOOLCHAIN)

# MESSAGE (STATUS "Toolchain not specified. Detecting the one to use.")
IF (MSVC)
	INCLUDE ("cmake/toolchains/Windows-MSVC.cmake")
ELSE (MSVC)
	MESSAGE (STATUS "Toolchain not specified. Defaulting to 32 bits compiler.")
	# INCLUDE ("cmake/CMakeDetectArch.cmake")
	# target_architecture("ARCH")

	IF (UNIX)
		SET(CMAKE_SYSTEM_NAME Linux)
		#IF (ARCH STREQUAL "x86")
		#	MESSAGE (STATUS "32 bits architecture detected.")
		#	INCLUDE ("cmake/toolchains/Linux-GNU-32.cmake")
		#ELSEIF (ARCH STREQUAL "x86_64")
		#	MESSAGE (STATUS "64 bits architecture detected.")
		#	INCLUDE ("cmake/toolchains/Linux-GNU-64.cmake")
		#ELSE (ARCH STREQUAL "x86")
		#	MESSAGE (STATUS "Unknown architecture, defaulting to 32 bits.")
			INCLUDE ("cmake/toolchains/Linux-GNU-32.cmake")
		#ENDIF (ARCH STREQUAL "x86")
	ELSE (UNIX)
		SET(CMAKE_SYSTEM_NAME Windows)
		#IF (ARCH STREQUAL "x86")
		#	MESSAGE (STATUS "32 bits architecture detected.")
		#	INCLUDE ("cmake/toolchains/Windows-GNU-32.cmake")
		#ELSEIF (ARCH STREQUAL "x86_64")
		#	MESSAGE (STATUS "64 bits architecture detected.")
		#	INCLUDE ("cmake/toolchains/Windows-GNU-64.cmake")
		#ELSE (ARCH STREQUAL "x86")
		#	MESSAGE (STATUS "Unknown architecture, defaulting to 32 bits.")
			INCLUDE ("cmake/toolchains/Windows-GNU-32.cmake")
		#ENDIF (ARCH STREQUAL "x86")
	ENDIF (UNIX)
ENDIF (MSVC)

ENDIF (NOT TOOLCHAIN)


ADD_EXECUTABLE (spheresvr
		${game_SRCS}
		${items_SRCS}
		${chars_SRCS}
		${clients_SRCS}
		${uofiles_SRCS}
		${common_SRCS}
		${network_SRCS}
		${sphere_SRCS}
		${crashdump_SRCS}
		${libev_SRCS}<commit_msg>Fixed cmake when manually specify a toolchain.<commit_after># Main config.
PROJECT (sphereserver)
 
CMAKE_MINIMUM_REQUIRED (VERSION 2.8.1)

INCLUDE ("cmake/CMakeSources.cmake")
INCLUDE ("cmake/CMakeGitStatus.cmake")

# Need to clear shared library flags. If not, cmake sets -rdynamic and this
# add to the executable the full symbol table (included unused symbols).
# This is a problem because the binary is ~700 KB bigger.
SET (CMAKE_SHARED_LIBRARY_LINK_C_FLAGS)
SET (CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)


# If we have not specified a toolchain, let's detect which one we should use
IF (NOT TOOLCHAIN)

# MESSAGE (STATUS "Toolchain not specified. Detecting the one to use.")
IF (MSVC)
	INCLUDE ("cmake/toolchains/Windows-MSVC.cmake")
ELSE (MSVC)
	MESSAGE (STATUS "Toolchain not specified. Defaulting to 32 bits compiler.")
	# INCLUDE ("cmake/CMakeDetectArch.cmake")
	# target_architecture("ARCH")

	IF (UNIX)
		SET(CMAKE_SYSTEM_NAME Linux)
		#IF (ARCH STREQUAL "x86")
		#	MESSAGE (STATUS "32 bits architecture detected.")
		#	INCLUDE ("cmake/toolchains/Linux-GNU-32.cmake")
		#ELSEIF (ARCH STREQUAL "x86_64")
		#	MESSAGE (STATUS "64 bits architecture detected.")
		#	INCLUDE ("cmake/toolchains/Linux-GNU-64.cmake")
		#ELSE (ARCH STREQUAL "x86")
		#	MESSAGE (STATUS "Unknown architecture, defaulting to 32 bits.")
			INCLUDE ("cmake/toolchains/Linux-GNU-32.cmake")
		#ENDIF (ARCH STREQUAL "x86")
	ELSE (UNIX)
		SET(CMAKE_SYSTEM_NAME Windows)
		#IF (ARCH STREQUAL "x86")
		#	MESSAGE (STATUS "32 bits architecture detected.")
		#	INCLUDE ("cmake/toolchains/Windows-GNU-32.cmake")
		#ELSEIF (ARCH STREQUAL "x86_64")
		#	MESSAGE (STATUS "64 bits architecture detected.")
		#	INCLUDE ("cmake/toolchains/Windows-GNU-64.cmake")
		#ELSE (ARCH STREQUAL "x86")
		#	MESSAGE (STATUS "Unknown architecture, defaulting to 32 bits.")
			INCLUDE ("cmake/toolchains/Windows-GNU-32.cmake")
		#ENDIF (ARCH STREQUAL "x86")
	ENDIF (UNIX)
ENDIF (MSVC)
ELSE (NOT TOOLCHAIN)
INCLUDE (${CMAKE_TOOLCHAIN_FILE})
ENDIF (NOT TOOLCHAIN)


ADD_EXECUTABLE (spheresvr
		${game_SRCS}
		${items_SRCS}
		${chars_SRCS}
		${clients_SRCS}
		${uofiles_SRCS}
		${common_SRCS}
		${network_SRCS}
		${sphere_SRCS}
		${crashdump_SRCS}
		${libev_SRCS}
{'fraction_non_alphanumeric': 0.12254335260115606, 'fraction_numerical': 0.024046242774566472, 'mean_word_length': 4.830188679245283, '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': '5067213', 'n_tokens_mistral': 1839, 'n_tokens_neox': 1563, 'n_words': 426}