<commit_before>cmake_minimum_required(VERSION 3.15)

if(NOT WIN32)
  # These flags do not work on Windows.
  set(STRICT_COMPILE_FLAGS -Werror=all
                           -Werror=inconsistent-missing-override
                           -Werror=float-conversion)
endif()

project(Orbit C CXX)
enable_testing()

option(WITH_GUI "Setting this option will enable the Qt-based UI client." ON)

set(CMAKE_CXX_STANDARD 17)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")

include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()

# This line is necessary to pick up the cmake-config-files
# generated by conan first.
list(PREPEND CMAKE_PREFIX_PATH "${CMAKE_BINARY_DIR}")

# This line is necessary to pick up the cmake-config-files
# generated by conan under cross compilation conditions.
list(PREPEND CMAKE_FIND_ROOT_PATH "${CMAKE_BINARY_DIR}")

# This line is necessary to pick up package-provided cmake-
# scripts in a cross compilation environment.
list(APPEND CMAKE_FIND_ROOT_PATH "${CONAN_CMAKE_MODULE_PATH}")

if(NOT WIN32 AND WITH_GUI)
  find_package(X11 REQUIRED)
endif()

if(NOT WIN32)
  find_package(OpenSSL CONFIG REQUIRED)
  find_package(unwindstack REQUIRED)
endif()

find_package(Threads REQUIRED)
find_package(cereal CONFIG REQUIRED)
find_package(xxHash REQUIRED)
find_package(multicore REQUIRED)
find_package(concurrentqueue REQUIRED)

if(WITH_GUI)
  find_package(freetype CONFIG REQUIRED)
  find_package(freetype-gl CONFIG REQUIRED)
  find_package(OpenGL REQUIRED)
  find_package(glew CONFIG REQUIRED)
  find_package(imgui CONFIG REQUIRED)
endif()

find_package(CURL CONFIG REQUIRED)
find_package(oqpi REQUIRED)
find_package(capstone CONFIG REQUIRED)
if(WITH_GUI)
  find_package(freeglut CONFIG REQUIRED)
  find_package(Qt5 CONFIG REQUIRED COMPONENTS Core Widgets)
endif()
find_package(abseil CONFIG REQUIRED)
find_package(llvm_object CONFIG REQUIRED)

find_package(lzma REQUIRED)
find_package(asio CONFIG REQUIRED)
find_package(GTest REQUIRED)

if(WIN32)
  find_package(minhook REQUIRED)
  find_package(breakpad CONFIG REQUIRED)
  find_package(DIASDK REQUIRED)
  find_package(DIA2Dump REQUIRED)
  find_package(peparse REQUIRED)
endif()

# Set preprocessor defines These are only necessary for windows, but we will
# define them on all platforms, to keep the builds similar as possible.
add_definitions(-DNOMINMAX)
add_definitions(-DUNICODE -D_UNICODE)

if(WIN32)
  add_definitions(-DWIN32)

  add_subdirectory(OrbitDll)
  add_subdirectory(OrbitAsm)
else()
  # Hack: Some parts on linux depend on headers in OrbitAsm, but OrbitAsm is not
  # available for Windows.
  add_library(OrbitAsm INTERFACE)
  target_include_directories(OrbitAsm INTERFACE OrbitAsm/)

  add_subdirectory(OrbitLinuxTracing)
endif()

add_subdirectory(OrbitCore)
add_subdirectory(OrbitGl)
add_subdirectory(OrbitService)
add_subdirectory(OrbitTest)

if(WITH_GUI)
  add_subdirectory(OrbitQt)
endif()

if(WIN32)
  # Startup Project
  set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT
                                                              "OrbitQt")
endif()
<commit_msg>Separate Clang and GCC compile flags.<commit_after>cmake_minimum_required(VERSION 3.15)

if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
  set(STRICT_COMPILE_FLAGS -Werror=all
                           -Werror=inconsistent-missing-override
                           -Werror=float-conversion)
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
  set(STRICT_COMPILE_FLAGS -Werror=all
                           -Werror=float-conversion)
endif()

project(Orbit C CXX)
enable_testing()

option(WITH_GUI "Setting this option will enable the Qt-based UI client." ON)

set(CMAKE_CXX_STANDARD 17)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")

include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()

# This line is necessary to pick up the cmake-config-files
# generated by conan first.
list(PREPEND CMAKE_PREFIX_PATH "${CMAKE_BINARY_DIR}")

# This line is necessary to pick up the cmake-config-files
# generated by conan under cross compilation conditions.
list(PREPEND CMAKE_FIND_ROOT_PATH "${CMAKE_BINARY_DIR}")

# This line is necessary to pick up package-provided cmake-
# scripts in a cross compilation environment.
list(APPEND CMAKE_FIND_ROOT_PATH "${CONAN_CMAKE_MODULE_PATH}")

if(NOT WIN32 AND WITH_GUI)
  find_package(X11 REQUIRED)
endif()

if(NOT WIN32)
  find_package(OpenSSL CONFIG REQUIRED)
  find_package(unwindstack REQUIRED)
endif()

find_package(Threads REQUIRED)
find_package(cereal CONFIG REQUIRED)
find_package(xxHash REQUIRED)
find_package(multicore REQUIRED)
find_package(concurrentqueue REQUIRED)

if(WITH_GUI)
  find_package(freetype CONFIG REQUIRED)
  find_package(freetype-gl CONFIG REQUIRED)
  find_package(OpenGL REQUIRED)
  find_package(glew CONFIG REQUIRED)
  find_package(imgui CONFIG REQUIRED)
endif()

find_package(CURL CONFIG REQUIRED)
find_package(oqpi REQUIRED)
find_package(capstone CONFIG REQUIRED)
if(WITH_GUI)
  find_package(freeglut CONFIG REQUIRED)
  find_package(Qt5 CONFIG REQUIRED COMPONENTS Core Widgets)
endif()
find_package(abseil CONFIG REQUIRED)
find_package(llvm_object CONFIG REQUIRED)

find_package(lzma REQUIRED)
find_package(asio CONFIG REQUIRED)
find_package(GTest REQUIRED)

if(WIN32)
  find_package(minhook REQUIRED)
  find_package(breakpad CONFIG REQUIRED)
  find_package(DIASDK REQUIRED)
  find_package(DIA2Dump REQUIRED)
  find_package(peparse REQUIRED)
endif()

# Set preprocessor defines These are only necessary for windows, but we will
# define them on all platforms, to keep the builds similar as possible.
add_definitions(-DNOMINMAX)
add_definitions(-DUNICODE -D_UNICODE)

if(WIN32)
  add_definitions(-DWIN32)

  add_subdirectory(OrbitDll)
  add_subdirectory(OrbitAsm)
else()
  # Hack: Some parts on linux depend on headers in OrbitAsm, but OrbitAsm is not
  # available for Windows.
  add_library(OrbitAsm INTERFACE)
  target_include_directories(OrbitAsm INTERFACE OrbitAsm/)

  add_subdirectory(OrbitLinuxTracing)
endif()

add_subdirectory(OrbitCore)
add_subdirectory(OrbitGl)
add_subdirectory(OrbitService)
add_subdirectory(OrbitTest)

if(WITH_GUI)
  add_subdirectory(OrbitQt)
endif()

if(WIN32)
  # Startup Project
  set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT
                                                              "OrbitQt")
endif()

{'fraction_non_alphanumeric': 0.07342328208346408, 'fraction_numerical': 0.006903043614684657, 'mean_word_length': 5.3056379821958455, '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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2041818', 'n_tokens_mistral': 2303, 'n_tokens_neox': 2163, 'n_words': 507}