Add files

Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
This commit is contained in:
2024-01-29 21:08:29 +01:00
commit 7d81e22900
68 changed files with 4264 additions and 0 deletions

9
cmake/utile/ccache.cmake Executable file
View File

@@ -0,0 +1,9 @@
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
message(NOTICE "-- ccache is enabled (found here: ${CCACHE_PROGRAM})")
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "\"${CCACHE_PROGRAM}\"")
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "\"${CCACHE_PROGRAM}\"")
else()
message(WARNING "-- ccache has not been found")
endif()

11
cmake/utile/distcc.cmake Executable file
View File

@@ -0,0 +1,11 @@
find_program(DISTCC_PROGRAM distcc)
message(WARNING "distcc module is in beta.")
if(DISTCC_PROGRAM)
message(NOTICE "distcc is enabled (found here: ${DISTCC_PROGRAM})")
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "\"${DISTCC_PROGRAM}\"")
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "\"${DISTCC_PROGRAM}\"")
else()
message(NOTICE "distcc has not been found")
endif()

11
cmake/utile/lto.cmake Executable file
View File

@@ -0,0 +1,11 @@
cmake_minimum_required(VERSION 3.9.0)
include(CheckIPOSupported)
check_ipo_supported(RESULT supported OUTPUT error)
if(supported)
message(STATUS "IPO / LTO enabled")
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
else()
message(STATUS "IPO / LTO not supported: <${error}>")
endif()

9
cmake/utile/ninja_color.cmake Executable file
View File

@@ -0,0 +1,9 @@
option (FORCE_COLORED_OUTPUT "Always produce ANSI-colored output (GNU/Clang only)." TRUE)
if (${FORCE_COLORED_OUTPUT})
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
add_compile_options (-fdiagnostics-color=always)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
add_compile_options (-fcolor-diagnostics)
endif ()
endif ()