<commit_before>if(APPLE)
  ADD_LIBRARY(osquery_tables_objc
    ../core/osx/NSProcessInfo+PECocoaBackports.mm
    system/osx_version.mm
  )
  TARGET_LINK_LIBRARIES(osquery_tables_objc "-framework Foundation")
  SET_TARGET_PROPERTIES(osquery_tables_objc PROPERTIES COMPILE_FLAGS "-x objective-c++ -fobjc-arc")

  ADD_LIBRARY(osquery_tables_osx
    networking/interfaces.cpp
    networking/listening_ports.cpp
    networking/routes.cpp
    networking/utils.cpp
    system/apps.cpp
    system/cacerts.cpp
    system/firewall.cpp
    system/kextstat.cpp
    system/launchd.cpp
    system/nvram.cpp
    system/processes.cpp
  )
  TARGET_LINK_LIBRARIES(osquery_tables_osx boost_filesystem)
  TARGET_LINK_LIBRARIES(osquery_tables_osx osquery_database)
  TARGET_LINK_LIBRARIES(osquery_tables_osx osquery_filesystem)
  TARGET_LINK_LIBRARIES(osquery_tables_osx "-framework IOKit -framework CoreFoundation -framework Security")
  SET_TARGET_PROPERTIES(osquery_tables_osx PROPERTIES COMPILE_FLAGS "-std=c++11 -stdlib=libc++")
endif()

FILE(GLOB table_sources
  "generated/*.cpp"
  "manual/*.cpp"
)

ADD_LIBRARY(osquery_tables
  registry.cpp
  ${table_sources}
  networking/etc_hosts.cpp
  utility/time.cpp
)

TARGET_LINK_LIBRARIES(osquery_tables glog)
TARGET_LINK_LIBRARIES(osquery_tables osquery_sqlite)
if(APPLE)
  TARGET_LINK_LIBRARIES(osquery_tables osquery_tables_objc)
  TARGET_LINK_LIBRARIES(osquery_tables osquery_tables_osx)
endif()
TARGET_LINK_LIBRARIES(osquery_tables "-Wl,-all_load")
SET_TARGET_PROPERTIES(osquery_tables PROPERTIES COMPILE_FLAGS "-std=c++11 -stdlib=libc++")

ADD_EXECUTABLE(etc_hosts_tests networking/etc_hosts_tests.cpp)
TARGET_LINK_LIBRARIES(etc_hosts_tests glog)
TARGET_LINK_LIBRARIES(etc_hosts_tests gtest)
TARGET_LINK_LIBRARIES(etc_hosts_tests osquery_core)
TARGET_LINK_LIBRARIES(etc_hosts_tests osquery_database)
TARGET_LINK_LIBRARIES(etc_hosts_tests osquery_filesystem)
TARGET_LINK_LIBRARIES(etc_hosts_tests osquery_tables)
SET_TARGET_PROPERTIES(etc_hosts_tests PROPERTIES COMPILE_FLAGS "-std=c++11 -stdlib=libc++")

if(APPLE)
  ADD_EXECUTABLE(apps_tests system/apps_tests.cpp)
  TARGET_LINK_LIBRARIES(apps_tests glog)
  TARGET_LINK_LIBRARIES(apps_tests gtest)
  TARGET_LINK_LIBRARIES(apps_tests osquery_core)
  TARGET_LINK_LIBRARIES(apps_tests osquery_filesystem)
  TARGET_LINK_LIBRARIES(apps_tests osquery_tables)
  SET_TARGET_PROPERTIES(apps_tests PROPERTIES COMPILE_FLAGS "-std=c++11 -stdlib=libc++")

  ADD_EXECUTABLE(cacerts_tests system/cacerts_tests.cpp)
  TARGET_LINK_LIBRARIES(cacerts_tests glog)
  TARGET_LINK_LIBRARIES(cacerts_tests gtest)
  TARGET_LINK_LIBRARIES(cacerts_tests osquery_core)
  TARGET_LINK_LIBRARIES(cacerts_tests osquery_filesystem)
  TARGET_LINK_LIBRARIES(cacerts_tests osquery_tables)
  SET_TARGET_PROPERTIES(cacerts_tests PROPERTIES COMPILE_FLAGS "-std=c++11 -stdlib=libc++")

  ADD_EXECUTABLE(firewall_tests system/firewall_tests.cpp)
  TARGET_LINK_LIBRARIES(firewall_tests glog)
  TARGET_LINK_LIBRARIES(firewall_tests gtest)
  TARGET_LINK_LIBRARIES(firewall_tests osquery_core)
  TARGET_LINK_LIBRARIES(firewall_tests osquery_filesystem)
  TARGET_LINK_LIBRARIES(firewall_tests osquery_tables)
  SET_TARGET_PROPERTIES(firewall_tests PROPERTIES COMPILE_FLAGS "-std=c++11 -stdlib=libc++")

  ADD_EXECUTABLE(launchd_tests system/launchd_tests.cpp)
  TARGET_LINK_LIBRARIES(launchd_tests glog)
  TARGET_LINK_LIBRARIES(launchd_tests gtest)
  TARGET_LINK_LIBRARIES(launchd_tests osquery_core)
  TARGET_LINK_LIBRARIES(launchd_tests osquery_filesystem)
  TARGET_LINK_LIBRARIES(launchd_tests osquery_tables)
  SET_TARGET_PROPERTIES(launchd_tests PROPERTIES COMPILE_FLAGS "-std=c++11 -stdlib=libc++")
endif()<commit_msg>minimum possible linkages<commit_after>if(APPLE)
  ADD_LIBRARY(osquery_tables_objc
    ../core/osx/NSProcessInfo+PECocoaBackports.mm
    system/osx_version.mm
  )
  TARGET_LINK_LIBRARIES(osquery_tables_objc "-framework Foundation")
  SET_TARGET_PROPERTIES(osquery_tables_objc PROPERTIES COMPILE_FLAGS "-x objective-c++ -fobjc-arc")

  ADD_LIBRARY(osquery_tables_osx
    networking/interfaces.cpp
    networking/listening_ports.cpp
    networking/routes.cpp
    networking/utils.cpp
    system/apps.cpp
    system/cacerts.cpp
    system/firewall.cpp
    system/kextstat.cpp
    system/launchd.cpp
    system/nvram.cpp
    system/processes.cpp
  )
  TARGET_LINK_LIBRARIES(osquery_tables_osx boost_filesystem)
  TARGET_LINK_LIBRARIES(osquery_tables_osx osquery_database)
  TARGET_LINK_LIBRARIES(osquery_tables_osx osquery_filesystem)
  TARGET_LINK_LIBRARIES(osquery_tables_osx "-framework IOKit -framework CoreFoundation -framework Security")
  SET_TARGET_PROPERTIES(osquery_tables_osx PROPERTIES COMPILE_FLAGS "-std=c++11 -stdlib=libc++")
endif()

FILE(GLOB table_sources
  "generated/*.cpp"
  "manual/*.cpp"
)

ADD_LIBRARY(osquery_tables
  registry.cpp
  ${table_sources}
  networking/etc_hosts.cpp
  utility/time.cpp
)

TARGET_LINK_LIBRARIES(osquery_tables glog)
TARGET_LINK_LIBRARIES(osquery_tables osquery_core)
TARGET_LINK_LIBRARIES(osquery_tables osquery_database)
TARGET_LINK_LIBRARIES(osquery_tables osquery_filesystem)
TARGET_LINK_LIBRARIES(osquery_tables osquery_sqlite)
if(APPLE)
  TARGET_LINK_LIBRARIES(osquery_tables osquery_tables_objc)
  TARGET_LINK_LIBRARIES(osquery_tables osquery_tables_osx)
endif()
TARGET_LINK_LIBRARIES(osquery_tables "-Wl,-all_load")
SET_TARGET_PROPERTIES(osquery_tables PROPERTIES COMPILE_FLAGS "-std=c++11 -stdlib=libc++")

ADD_EXECUTABLE(etc_hosts_tests networking/etc_hosts_tests.cpp)
TARGET_LINK_LIBRARIES(etc_hosts_tests gtest)
TARGET_LINK_LIBRARIES(etc_hosts_tests osquery_tables)
SET_TARGET_PROPERTIES(etc_hosts_tests PROPERTIES COMPILE_FLAGS "-std=c++11 -stdlib=libc++")

if(APPLE)
  ADD_EXECUTABLE(apps_tests system/apps_tests.cpp)
  TARGET_LINK_LIBRARIES(apps_tests gtest)
  TARGET_LINK_LIBRARIES(apps_tests osquery_tables)
  SET_TARGET_PROPERTIES(apps_tests PROPERTIES COMPILE_FLAGS "-std=c++11 -stdlib=libc++")

  ADD_EXECUTABLE(cacerts_tests system/cacerts_tests.cpp)
  TARGET_LINK_LIBRARIES(cacerts_tests gtest)
  TARGET_LINK_LIBRARIES(cacerts_tests osquery_tables)
  SET_TARGET_PROPERTIES(cacerts_tests PROPERTIES COMPILE_FLAGS "-std=c++11 -stdlib=libc++")

  ADD_EXECUTABLE(firewall_tests system/firewall_tests.cpp)
  TARGET_LINK_LIBRARIES(firewall_tests gtest)
  TARGET_LINK_LIBRARIES(firewall_tests osquery_tables)
  SET_TARGET_PROPERTIES(firewall_tests PROPERTIES COMPILE_FLAGS "-std=c++11 -stdlib=libc++")

  ADD_EXECUTABLE(launchd_tests system/launchd_tests.cpp)
  TARGET_LINK_LIBRARIES(launchd_tests gtest)
  TARGET_LINK_LIBRARIES(launchd_tests osquery_tables)
  SET_TARGET_PROPERTIES(launchd_tests PROPERTIES COMPILE_FLAGS "-std=c++11 -stdlib=libc++")
endif()
{'fraction_non_alphanumeric': 0.07721083345802783, 'fraction_numerical': 0.004189735148885231, 'mean_word_length': 8.118690313778991, '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': '2735990', 'n_tokens_mistral': 2613, 'n_tokens_neox': 2462, 'n_words': 293}