<commit_before>#
# project: sokol-samples
#
cmake_minimum_required(VERSION 3.0)
project(sokol-samples)
set(CMAKE_C_STANDARD 99)
if (CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
    set(CMAKE_CXX_STANDARD 17)
else()
    set(CMAKE_CXX_STANDARD 14)
endif()

if (SOKOL_USE_WGPU_DAWN)
    set(USE_DAWN_SDK ON)
endif()

# include the fips main cmake file
get_filename_component(FIPS_ROOT_DIR "../fips" ABSOLUTE)
include("${FIPS_ROOT_DIR}/cmake/fips.cmake")

fips_setup()
fips_ide_group("Imports")
if (NOT USE_SOKOL_APP AND NOT SOKOL_USE_WGPU_DAWN AND NOT SOKOL_USE_D3D11 AND NOT SOKOL_USE_METAL)
    fips_import_fips_glfw_glfw3()
endif()
fips_import_fips_imgui_imgui()
fips_import_fips_cimgui_cimgui()
if (NOT FIPS_UWP)
    fips_import_fips_libmodplug_libmodplug()
endif()
fips_ide_group("")

# just suppress this pesky "missing field initializer warning" for now
if (FIPS_CLANG OR FIPS_GCC)
    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-missing-field-initializers -Wsign-conversion")
endif()
if (FIPS_GCC)
    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-missing-braces")
endif()

# macro to select the sokol-backend and shader dialects
macro(sokol_config)
    add_definitions(-DSOKOL_NO_DEPRECATED)
    if (FIPS_EMSCRIPTEN)
        if (FIPS_EMSCRIPTEN_USE_WEBGPU)
            add_definitions(-DSOKOL_WGPU)
            set(slang "wgpu")
        else()
            add_definitions(-DSOKOL_GLES3)
            set(slang "glsl300es:glsl100")
        endif()
    elseif (FIPS_RASPBERRYPI)
        add_definitions(-DSOKOL_GLES2)
        set(slang "glsl100")
    elseif (FIPS_ANDROID)
        add_definitions(-DSOKOL_GLES3)
        set(slang "glsl300es:glsl100")
    elseif (SOKOL_USE_D3D11)
        add_definitions(-DSOKOL_D3D11)
        set(slang "hlsl4")
    elseif (SOKOL_USE_METAL)
        add_definitions(-DSOKOL_METAL)
        if (FIPS_IOS)
            set(slang "metal_ios:metal_sim")
        else()
            set(slang "metal_macos")
        endif()
    else()
        if (FIPS_IOS)
            add_definitions(-DSOKOL_GLES3)
            set(slang "glsl300es:glsl100")
        else()
            add_definitions(-DSOKOL_GLCORE33)
            set(slang "glsl330")
        endif()
    endif()
endmacro()

if (USE_SOKOL_APP)
    include_directories(libs)
    fips_ide_group("Libs")
    add_subdirectory(libs)
    fips_ide_group("Samples")
    add_subdirectory(sapp)
    fips_ide_group("Tests")
    add_subdirectory(tests)
else()
    if (FIPS_EMSCRIPTEN)
        if (FIPS_EMSCRIPTEN_USE_WEBGPU)
            add_subdirectory(wgpu)
        else()
            add_subdirectory(html5)
        endif()
    elseif (FIPS_RASPBERRYPI)
        add_subdirectory(raspi)
    elseif (SOKOL_USE_D3D11)
        add_subdirectory(d3d11)
    elseif (SOKOL_USE_METAL)
        add_subdirectory(metal)
    elseif (SOKOL_USE_WGPU_DAWN)
        add_subdirectory(libs/dawnutil)
        add_subdirectory(wgpu)
    else()
        add_subdirectory(glfw)
    endif()
endif()

fips_finish()

<commit_msg>remove raspi stuff from toplevel CMakeLists.txt<commit_after>#
# project: sokol-samples
#
cmake_minimum_required(VERSION 3.0)
project(sokol-samples)
set(CMAKE_C_STANDARD 99)
if (CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
    set(CMAKE_CXX_STANDARD 17)
else()
    set(CMAKE_CXX_STANDARD 14)
endif()

if (SOKOL_USE_WGPU_DAWN)
    set(USE_DAWN_SDK ON)
endif()

# include the fips main cmake file
get_filename_component(FIPS_ROOT_DIR "../fips" ABSOLUTE)
include("${FIPS_ROOT_DIR}/cmake/fips.cmake")

fips_setup()
fips_ide_group("Imports")
if (NOT USE_SOKOL_APP AND NOT SOKOL_USE_WGPU_DAWN AND NOT SOKOL_USE_D3D11 AND NOT SOKOL_USE_METAL)
    fips_import_fips_glfw_glfw3()
endif()
fips_import_fips_imgui_imgui()
fips_import_fips_cimgui_cimgui()
if (NOT FIPS_UWP)
    fips_import_fips_libmodplug_libmodplug()
endif()
fips_ide_group("")

# just suppress this pesky "missing field initializer warning" for now
if (FIPS_CLANG OR FIPS_GCC)
    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-missing-field-initializers -Wsign-conversion")
endif()
if (FIPS_GCC)
    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-missing-braces")
endif()

# macro to select the sokol-backend and shader dialects
macro(sokol_config)
    add_definitions(-DSOKOL_NO_DEPRECATED)
    if (FIPS_EMSCRIPTEN)
        if (FIPS_EMSCRIPTEN_USE_WEBGPU)
            add_definitions(-DSOKOL_WGPU)
            set(slang "wgpu")
        else()
            add_definitions(-DSOKOL_GLES3)
            set(slang "glsl300es:glsl100")
        endif()
    elseif (FIPS_ANDROID)
        add_definitions(-DSOKOL_GLES3)
        set(slang "glsl300es:glsl100")
    elseif (SOKOL_USE_D3D11)
        add_definitions(-DSOKOL_D3D11)
        set(slang "hlsl4")
    elseif (SOKOL_USE_METAL)
        add_definitions(-DSOKOL_METAL)
        if (FIPS_IOS)
            set(slang "metal_ios:metal_sim")
        else()
            set(slang "metal_macos")
        endif()
    else()
        if (FIPS_IOS)
            add_definitions(-DSOKOL_GLES3)
            set(slang "glsl300es:glsl100")
        else()
            add_definitions(-DSOKOL_GLCORE33)
            set(slang "glsl330")
        endif()
    endif()
endmacro()

if (USE_SOKOL_APP)
    include_directories(libs)
    fips_ide_group("Libs")
    add_subdirectory(libs)
    fips_ide_group("Samples")
    add_subdirectory(sapp)
    fips_ide_group("Tests")
    add_subdirectory(tests)
else()
    if (FIPS_EMSCRIPTEN)
        if (FIPS_EMSCRIPTEN_USE_WEBGPU)
            add_subdirectory(wgpu)
        else()
            add_subdirectory(html5)
        endif()
    elseif (SOKOL_USE_D3D11)
        add_subdirectory(d3d11)
    elseif (SOKOL_USE_METAL)
        add_subdirectory(metal)
    elseif (SOKOL_USE_WGPU_DAWN)
        add_subdirectory(libs/dawnutil)
        add_subdirectory(wgpu)
    else()
        add_subdirectory(glfw)
    endif()
endif()

fips_finish()


{'fraction_non_alphanumeric': 0.09517241379310344, 'fraction_numerical': 0.018620689655172412, 'mean_word_length': 3.368222891566265, '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': '54007', 'n_tokens_mistral': 2402, 'n_tokens_neox': 2267, 'n_words': 355}