<commit_before># Copyright 2010 <NAME>

#  Licensed under the Apache License, Version 2.0 (the "License");
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at

#      http://www.apache.org/licenses/LICENSE-2.0

#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.

cmake_minimum_required(VERSION 2.6)
project(kNet)

# This macro adds to each .cpp file listed in the parameter 'cppFiles' a #define DEBUG_CPP_NAME "thisCppFileName"
#macro(AddCompilationUnitNameDefines cppFiles)
#  message("cppFiles ${cppFiles} ${${cppFiles}}")
#      foreach(srcFile ${cppFiles})
#         get_filename_component(baseName ${srcFile} NAME)
#         set_source_files_properties(${srcFile} PROPERTIES COMPILE_FLAGS "-DDEBUG_CPP_NAME=\"\\\"${baseName}\"\\\"")
#        message("${srcFile} with ${baseName}")
#      endforeach()
#endmacro()

set(USE_BOOST TRUE)
#set(BOOST_ROOT "TODO_SpecifyYourBoostRootHereIfCMakeAutoSearchFails")

#set(USE_TINYXML TRUE)
#set(TINYXML_ROOT "TODO_SpecifyYourTinyXMLRootHereIfUsingTinyXML")

#set(USE_QT TRUE)

# Enable thread context checking in debug mode.
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DTHREAD_CHECKING_ENABLED -DKNET_LOGGING_SUPPORT_ENABLED")

# Enable internal LOG messaging if this flag is enabled. Comment this out to squeeze the last bit of 
# extra performance by avoiding all logging-related string operations.
add_definitions(-DKNET_LOGGING_SUPPORT_ENABLED)

# Enable storing profiling data from different network level events.
add_definitions(-DKNET_NETWORK_PROFILING)

if (USE_BOOST)
   add_definitions(-DKNET_USE_BOOST)

   if (WIN32)
      set(Boost_FIND_REQUIRED TRUE)
      set(Boost_FIND_QUIETLY TRUE)<commit_msg>Remove thread context checking by default in both debug and release mode due to performance issues in these checks.<commit_after># Copyright 2010 <NAME>

#  Licensed under the Apache License, Version 2.0 (the "License");
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at

#      http://www.apache.org/licenses/LICENSE-2.0

#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.

cmake_minimum_required(VERSION 2.6)
project(kNet)

# This macro adds to each .cpp file listed in the parameter 'cppFiles' a #define DEBUG_CPP_NAME "thisCppFileName"
#macro(AddCompilationUnitNameDefines cppFiles)
#  message("cppFiles ${cppFiles} ${${cppFiles}}")
#      foreach(srcFile ${cppFiles})
#         get_filename_component(baseName ${srcFile} NAME)
#         set_source_files_properties(${srcFile} PROPERTIES COMPILE_FLAGS "-DDEBUG_CPP_NAME=\"\\\"${baseName}\"\\\"")
#        message("${srcFile} with ${baseName}")
#      endforeach()
#endmacro()

set(USE_BOOST TRUE)
#set(BOOST_ROOT "TODO_SpecifyYourBoostRootHereIfCMakeAutoSearchFails")

#set(USE_TINYXML TRUE)
#set(TINYXML_ROOT "TODO_SpecifyYourTinyXMLRootHereIfUsingTinyXML")

#set(USE_QT TRUE)

# Enable thread context checking in debug mode.
# set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DTHREAD_CHECKING_ENABLED -DKNET_LOGGING_SUPPORT_ENABLED")

# Enable internal LOG messaging if this flag is enabled. Comment this out to squeeze the last bit of 
# extra performance by avoiding all logging-related string operations.
add_definitions(-DKNET_LOGGING_SUPPORT_ENABLED)

# Enable storing profiling data from different network level events.
add_definitions(-DKNET_NETWORK_PROFILING)

if (USE_BOOST)
   add_definitions(-DKNET_USE_BOOST)

   if (WIN32)
      set(Boost_FIND_REQUIRED TRUE)
      set(Boost_FIND_QUIETLY TRUE)
{'fraction_non_alphanumeric': 0.08606356968215159, 'fraction_numerical': 0.0058679706601467, 'mean_word_length': 5.226788432267885, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '1492240', 'n_tokens_mistral': 1290, 'n_tokens_neox': 1258, 'n_words': 391}