<commit_before>cmake_minimum_required(VERSION 3.10)
project(QuickStart CXX)

# NOTE: Remove /RTC1 option from default compiler options for Visual Studio
STRING(REGEX REPLACE "/RTC(su|[1su])" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")

set(PRODUCT_NAME QuickStart)
set(POMDOG_DIR "../..")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED on)
set(CMAKE_CXX_EXTENSIONS off)
set(CMAKE_CONFIGURATION_TYPES Debug Release)

set(SOURCE_FILES
  Source/QuickStartGame.cpp
  Source/QuickStartGame.hpp
)

set(RESOURCE_FILES Content)

include_directories(
  ${POMDOG_DIR}/include
  ${POMDOG_DIR}/experimental
  ${POMDOG_DIR}/dependencies/iutest/include
)

if(APPLE)
  list(APPEND SOURCE_FILES
    Platform.Cocoa/main.mm
    Platform.Cocoa/AppDelegate.h
    Platform.Cocoa/AppDelegate.mm
    Platform.Cocoa/GameViewController.h
    Platform.Cocoa/GameViewController.mm
  )
  list(APPEND RESOURCE_FILES
    Platform.Cocoa/Assets.xcassets
    Platform.Cocoa/Base.lproj/MainMenu.xib
  )
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
  list(APPEND SOURCE_FILES
    Platform.X11/main.cpp
  )
elseif(WIN32)
  list(APPEND SOURCE_FILES
    Platform.Win32/main.cpp
    Platform.Win32/Resource.hpp
    Platform.Win32/game.rc
  )
endif()

add_executable(${PRODUCT_NAME} WIN32 ${SOURCE_FILES} ${RESOURCE_FILES})

target_compile_definitions(${PRODUCT_NAME} PRIVATE
  "$<$<CONFIG:DEBUG>:_DEBUG>"
  "$<$<CONFIG:RELEASE>:NDEBUG>"
)

if ((CMAKE_CXX_COMPILER_ID MATCHES "Clang") OR (CMAKE_CXX_COMPILER_ID MATCHES "GNU"))
  target_compile_options(${PRODUCT_NAME} PRIVATE
    -pedantic
    "$<$<CONFIG:DEBUG>:-g;-O0>"
    "$<$<CONFIG:RELEASE>:-O3>"
  )
endif()

if(WIN32)
  target_compile_options(${PRODUCT_NAME} PRIVATE
    /W4
    "$<$<CONFIG:DEBUG>:/Od;/MTd>"
    "$<$<CONFIG:RELEASE>:/O2;/Ob2;/MT>"
  )

  target_compile_definitions(${PRODUCT_NAME} PRIVATE
    WIN32_LEAN_AND_MEAN
    NOMINMAX
  )

  # Replace with target_link_options() when upgrading CMake 3.12
  target_link_libraries(${PRODUCT_NAME}
    debug -INCREMENTAL
    debug -DEBUG
    optimized -INCREMENTAL:NO<commit_msg>Replace _DEBUG macro with DEBUG<commit_after>cmake_minimum_required(VERSION 3.10)
project(QuickStart CXX)

# NOTE: Remove /RTC1 option from default compiler options for Visual Studio
STRING(REGEX REPLACE "/RTC(su|[1su])" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")

set(PRODUCT_NAME QuickStart)
set(POMDOG_DIR "../..")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED on)
set(CMAKE_CXX_EXTENSIONS off)
set(CMAKE_CONFIGURATION_TYPES Debug Release)

set(SOURCE_FILES
  Source/QuickStartGame.cpp
  Source/QuickStartGame.hpp
)

set(RESOURCE_FILES Content)

include_directories(
  ${POMDOG_DIR}/include
  ${POMDOG_DIR}/experimental
  ${POMDOG_DIR}/dependencies/iutest/include
)

if(APPLE)
  list(APPEND SOURCE_FILES
    Platform.Cocoa/main.mm
    Platform.Cocoa/AppDelegate.h
    Platform.Cocoa/AppDelegate.mm
    Platform.Cocoa/GameViewController.h
    Platform.Cocoa/GameViewController.mm
  )
  list(APPEND RESOURCE_FILES
    Platform.Cocoa/Assets.xcassets
    Platform.Cocoa/Base.lproj/MainMenu.xib
  )
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
  list(APPEND SOURCE_FILES
    Platform.X11/main.cpp
  )
elseif(WIN32)
  list(APPEND SOURCE_FILES
    Platform.Win32/main.cpp
    Platform.Win32/Resource.hpp
    Platform.Win32/game.rc
  )
endif()

add_executable(${PRODUCT_NAME} WIN32 ${SOURCE_FILES} ${RESOURCE_FILES})

target_compile_definitions(${PRODUCT_NAME} PRIVATE
  "$<$<CONFIG:DEBUG>:DEBUG>"
  "$<$<CONFIG:RELEASE>:NDEBUG>"
)

if ((CMAKE_CXX_COMPILER_ID MATCHES "Clang") OR (CMAKE_CXX_COMPILER_ID MATCHES "GNU"))
  target_compile_options(${PRODUCT_NAME} PRIVATE
    -pedantic
    "$<$<CONFIG:DEBUG>:-g;-O0>"
    "$<$<CONFIG:RELEASE>:-O3>"
  )
endif()

if(WIN32)
  target_compile_options(${PRODUCT_NAME} PRIVATE
    /W4
    "$<$<CONFIG:DEBUG>:/Od;/MTd>"
    "$<$<CONFIG:RELEASE>:/O2;/Ob2;/MT>"
  )

  target_compile_definitions(${PRODUCT_NAME} PRIVATE
    WIN32_LEAN_AND_MEAN
    NOMINMAX
  )

  # Replace with target_link_options() when upgrading CMake 3.12
  target_link_libraries(${PRODUCT_NAME}
    debug -INCREMENTAL
    debug -DEBUG
    optimized -INCREMENTAL:NO
{'fraction_non_alphanumeric': 0.12388955582232893, 'fraction_numerical': 0.0148859543817527, 'mean_word_length': 5.135493372606775, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, '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': '3084659', 'n_tokens_mistral': 1715, 'n_tokens_neox': 1604, 'n_words': 227}