no rtti and no exceptions
Some checks failed
Bigfoot / Clang Format Checks (push) Successful in 10s
Bigfoot / Build And Upload Conan Dependencies to BigfootPackages (push) Successful in 1m27s
Bigfoot / Build & Test Debug with ./ConanProfiles/clang (Unity Build: ON) (push) Successful in 38s
Bigfoot / Build & Test Debug with ./ConanProfiles/clang (Unity Build: OFF) (push) Successful in 43s
Bigfoot / Build & Test Debug with ./ConanProfiles/clang_asan (Unity Build: OFF) (push) Failing after 50s
Bigfoot / Build & Test Debug with ./ConanProfiles/clang_asan (Unity Build: ON) (push) Failing after 47s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang (Unity Build: ON) (push) Successful in 37s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang (Unity Build: OFF) (push) Successful in 41s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang_asan (Unity Build: OFF) (push) Successful in 45s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang_asan (Unity Build: ON) (push) Successful in 47s
Bigfoot / Build & Test Release with ./ConanProfiles/clang (Unity Build: OFF) (push) Successful in 27s
Bigfoot / Build & Test Release with ./ConanProfiles/clang (Unity Build: ON) (push) Successful in 22s
Bigfoot / Build & Test Release with ./ConanProfiles/clang_asan (Unity Build: ON) (push) Failing after 26s
Bigfoot / Build & Test Release with ./ConanProfiles/clang_asan (Unity Build: OFF) (push) Failing after 28s

This commit is contained in:
2026-04-14 21:44:31 +02:00
parent 2ffe0c4860
commit 85d136a91f
8 changed files with 61 additions and 28 deletions

View File

@@ -114,6 +114,20 @@ function(bigfoot_create_package_tests ParentFolder BigfootDependencies)
set_target_properties(${PROJECT_NAME} PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE TRUE)
endif()
##################ASAN SETUP###################
if(${ASAN})
if (MSVC)
get_filename_component(MSVC_BIN_DIR "${CMAKE_CXX_COMPILER}" DIRECTORY)
set(ASAN_DLL "${MSVC_BIN_DIR}/clang_rt.asan_dynamic-x86_64.dll")
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E echo "Copying ASan DLL: ${ASAN_DLL} to $<TARGET_FILE_DIR:${PROJECT_NAME}>"
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${ASAN_DLL}" "$<TARGET_FILE_DIR:${PROJECT_NAME}>"
)
endif()
endif()
##################COPY FIXTURE FOLDER###################
if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/Fixture)

View File

@@ -0,0 +1,30 @@
include_guard()
# Find ccache executable
find_program(CCACHE_PROGRAM NAMES ccache)
if(CCACHE_PROGRAM)
message(STATUS "ccache found: ${CCACHE_PROGRAM}, enabling via CMake launcher and environment.")
if (CMAKE_GENERATOR MATCHES "Visual Studio")
# Copy original ccache.exe and rename to cl.exe, this way intermediate cmd file is not needed
file(COPY_FILE ${CCACHE_PROGRAM} ${CMAKE_BINARY_DIR}/cl.exe ONLY_IF_DIFFERENT)
# Set Visual Studio global variables:
# - Use above cl.exe (ccache.exe) as a compiler
# - Enable parallel compilation
list(APPEND CMAKE_VS_GLOBALS
"CLToolExe=cl.exe"
"CLToolPath=${CMAKE_BINARY_DIR}"
"UseMultiToolTask=true"
"UseStructuredOutput=false"
)
elseif(CMAKE_GENERATOR MATCHES "Ninja" OR CMAKE_GENERATOR MATCHES "Unix Makefiles")
message(STATUS "Using ccache as compiler launcher for Ninja or Makefiles.")
set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE_PROGRAM} CACHE FILEPATH "CXX compiler cache used" FORCE)
set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE_PROGRAM} CACHE FILEPATH "C compiler cache used" FORCE)
else()
message(WARNING "Unsupported generator for ccache integration: ${CMAKE_GENERATOR}. ccache will not be used.")
endif()
else()
message(WARNING "ccache not found. Not enabling ccache integration.")
endif()

View File

@@ -10,7 +10,7 @@ compiler.runtime=static
build_type=Release
[conf]
tools.cmake.cmaketoolchain:extra_variables={'CMAKE_CXX_COMPILER_LAUNCHER': 'ccache', 'CMAKE_C_COMPILER_LAUNCHER': 'ccache'}
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/ccache.cmake
tools.system.package_manager:mode=install
tools.system.package_manager:sudo=True
@@ -18,6 +18,8 @@ tools.system.package_manager:sudo=True
tools.build:exelinkflags=["-fuse-ld=mold"]
tools.build:sharedlinkflags=["-fuse-ld=mold"]
tools.build:cxxflags=["-fno-exceptions", "-fno-rtti"]
tools.build:compiler_executables={"c": "clang", "cpp": "clang++"}
tools.cmake.cmaketoolchain:generator=Ninja

View File

@@ -10,7 +10,7 @@ compiler.runtime=static
build_type=Debug
[conf]
tools.cmake.cmaketoolchain:extra_variables={'CMAKE_CXX_COMPILER_LAUNCHER': 'ccache', 'CMAKE_C_COMPILER_LAUNCHER': 'ccache'}
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/ccache.cmake
tools.system.package_manager:mode=install
tools.system.package_manager:sudo=True
@@ -19,7 +19,7 @@ tools.build:exelinkflags=["-fuse-ld=mold", "-fsanitize=address,undefined,leak"]
tools.build:sharedlinkflags=["-fuse-ld=mold", "-fsanitize=address,undefined,leak"]
tools.build:cflags=["-fsanitize=address,undefined,leak", "-fno-sanitize-recover=all"]
tools.build:cxxflags=["-fsanitize=address,undefined,leak", "-fno-sanitize-recover=all"]
tools.build:cxxflags=["-fno-exceptions", "-fno-rtti", "-fsanitize=address,undefined,leak", "-fno-sanitize-recover=all"]
tools.cmake.cmaketoolchain:generator=Ninja

View File

@@ -10,7 +10,7 @@ compiler.runtime=static
build_type=Debug
[conf]
tools.cmake.cmaketoolchain:extra_variables={'CMAKE_CXX_COMPILER_LAUNCHER': 'ccache', 'CMAKE_C_COMPILER_LAUNCHER': 'ccache'}
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/ccache.cmake
tools.system.package_manager:mode=install
tools.system.package_manager:sudo=True
@@ -18,6 +18,8 @@ tools.system.package_manager:sudo=True
tools.build:exelinkflags=["-fuse-ld=mold"]
tools.build:sharedlinkflags=["-fuse-ld=mold"]
tools.build:cxxflags=["-fno-exceptions", "-fno-rtti"]
tools.cmake.cmaketoolchain:generator=Ninja
tools.build:compiler_executables={"c": "clang", "cpp": "clang++"}

View File

@@ -9,10 +9,12 @@ compiler.runtime=static
build_type=Release
[conf]
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/msvc_ccache.cmake
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/ccache.cmake
tools.build:cflags=["/Zc:preprocessor", "/Zc:__STDC__", "/D_CRT_DECLARE_NONSTDC_NAMES=1"]
tools.build:cxxflags=["/Zc:preprocessor", "/permissive-", "/Zc:__cplusplus", "/Zc:enumTypes", "/Zc:templateScope", "/Zc:throwingNew"]
tools.build:cxxflags=["/Zc:preprocessor", "/permissive-", "/Zc:__cplusplus", "/Zc:enumTypes", "/Zc:templateScope", "/EHs-c-", "/GR-"]
tools.build:defines=["_HAS_EXCEPTIONS=0"]
[tool_requires]
!cmake/*: cmake/[>=4.2]

View File

@@ -9,10 +9,12 @@ compiler.runtime=static
build_type=Debug
[conf]
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/msvc_ccache.cmake
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/ccache.cmake
tools.build:cflags=["/Zc:preprocessor", "/Zc:__STDC__", "/D_CRT_DECLARE_NONSTDC_NAMES=1"]
tools.build:cxxflags=["/Zc:preprocessor", "/permissive-", "/Zc:__cplusplus", "/Zc:enumTypes", "/Zc:templateScope", "/Zc:throwingNew"]
tools.build:cflags=["/Zc:preprocessor", "/Zc:__STDC__", "/D_CRT_DECLARE_NONSTDC_NAMES=1", "/fsanitize=address"]
tools.build:cxxflags=["/Zc:preprocessor", "/permissive-", "/Zc:__cplusplus", "/Zc:enumTypes", "/Zc:templateScope", "/EHs-c-", "/GR-", "/fsanitize=address"]
tools.build:defines=["_HAS_EXCEPTIONS=0"]
[tool_requires]
!cmake/*: cmake/[>=4.2]

View File

@@ -1,19 +0,0 @@
# https://github.com/ccache/ccache/wiki/MS-Visual-Studio#usage-with-cmake
find_program(ccache_exe ccache)
if(ccache_exe)
file(COPY_FILE
${ccache_exe} ${CMAKE_BINARY_DIR}/cl.exe
ONLY_IF_DIFFERENT)
# By default Visual Studio generators will use /Zi which is not compatible
# with ccache, so tell Visual Studio to use /Z7 instead.
message(STATUS "Setting MSVC debug information format to 'Embedded'")
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<$<CONFIG:Debug,RelWithDebInfo>:Embedded>")
set(CMAKE_VS_GLOBALS
"CLToolExe=cl.exe"
"CLToolPath=${CMAKE_BINARY_DIR}"
"UseMultiToolTask=true"
)
endif()