From 934b44c1f8492db2a1204dc39afa462e14f684b4 Mon Sep 17 00:00:00 2001 From: Romain BOULLARD Date: Fri, 20 Feb 2026 19:44:57 +0100 Subject: [PATCH] Asan --- .gitea/workflows/ci.yml | 9 +++- Bin2CPP/Sources/Bin2CPPExe/CMakeLists.txt | 7 +-- Bin2CPP/Sources/Bin2CPPLib/CMakeLists.txt | 13 +++-- Bin2CPP/Tests/Bin2CPPLib/CMakeLists.txt | 7 +-- CMake/FindDependencies.cmake | 6 ++- CMake/Utils.cmake | 58 ----------------------- CMakeLists.txt | 3 -- ConanProfiles/clang | 26 ++++++++++ ConanProfiles/clang_coverage | 25 ++++++++++ ConanProfiles/clangd | 23 +++++++++ ConanProfiles/msvc | 22 +++++++++ ConanProfiles/msvc_ccache.cmake | 19 ++++++++ ConanProfiles/msvcd | 22 +++++++++ conanfile.py | 6 +-- generate_dependencies.bat | 9 ++-- generate_dependencies.sh | 15 +++--- 16 files changed, 178 insertions(+), 92 deletions(-) delete mode 100644 CMake/Utils.cmake create mode 100644 ConanProfiles/clang create mode 100644 ConanProfiles/clang_coverage create mode 100644 ConanProfiles/clangd create mode 100644 ConanProfiles/msvc create mode 100644 ConanProfiles/msvc_ccache.cmake create mode 100644 ConanProfiles/msvcd diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 2923576..5143c94 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -18,6 +18,13 @@ jobs: strategy: matrix: build_type: ["Debug", "RelWithDebInfo", "Release"] + include: + - build_type: Release + conan_profile: ./ConanProfiles/clang + - build_type: Debug + conan_profile: ./ConanProfiles/clangd + - build_type: RelWithDebInfo + conan_profile: ./ConanProfiles/clangd name: "Build & Test ${{ matrix.build_type }}" steps: - name: Install Node.js @@ -34,7 +41,7 @@ jobs: - name: Build run: | conan profile detect - conan install . --deployer=full_deploy --deployer-folder=build --remote=bigfootpackages --build=missing -s build_type=${{ matrix.build_type }} -o bin2cpp/*:build_tests=True + conan install . --deployer=full_deploy --deployer-folder=build --remote=bigfootpackages -pr:h=${{ matrix.conan_profile }} -pr:b=${{ matrix.conan_profile }} --build=missing -s build_type=${{ matrix.build_type }} -o bin2cpp/*:build_tests=True cmake -S . -B ./build/${{ matrix.build_type }} --toolchain ./build/${{ matrix.build_type }}/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -G "Ninja" cmake --build build/${{ matrix.build_type }} --parallel $(nproc) diff --git a/Bin2CPP/Sources/Bin2CPPExe/CMakeLists.txt b/Bin2CPP/Sources/Bin2CPPExe/CMakeLists.txt index e1d489b..ab00820 100644 --- a/Bin2CPP/Sources/Bin2CPPExe/CMakeLists.txt +++ b/Bin2CPP/Sources/Bin2CPPExe/CMakeLists.txt @@ -19,11 +19,12 @@ target_sources(${PROJECT_NAME} ${SOURCES} ) +target_compile_options(${PROJECT_NAME} PRIVATE ${BIN2CPP_CXX_FLAGS}) +target_link_options(${PROJECT_NAME} PRIVATE ${BIN2CPP_EXE_LINK_FLAGS}) + target_link_libraries(${PROJECT_NAME} PUBLIC CLI11::CLI11 Bin2CPPLib) target_link_libraries(${PROJECT_NAME} PRIVATE ${CMAKE_DL_LIBS}) source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX Src FILES ${SOURCES}) -set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER Bin2CPP/${ParentFolder}) - -bin2cpp_setup_dependencies("Bin2CPPExe") \ No newline at end of file +set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER Bin2CPP/${ParentFolder}) \ No newline at end of file diff --git a/Bin2CPP/Sources/Bin2CPPLib/CMakeLists.txt b/Bin2CPP/Sources/Bin2CPPLib/CMakeLists.txt index 5331509..ac4b6de 100644 --- a/Bin2CPP/Sources/Bin2CPPLib/CMakeLists.txt +++ b/Bin2CPP/Sources/Bin2CPPLib/CMakeLists.txt @@ -20,13 +20,18 @@ target_sources(${PROJECT_NAME} ${SOURCES} ) -target_link_libraries(${PROJECT_NAME} PUBLIC EASTL::EASTL mimalloc quill::quill $<$:cpptrace::cpptrace>) +target_compile_options(${PROJECT_NAME} PRIVATE ${BINN2CPP_CXX_FLAGS}) + +target_link_libraries(${PROJECT_NAME} PUBLIC + EASTL::EASTL + $<$:mimalloc-asan> + $<$:mimalloc-static> + quill::quill + $<$:cpptrace::cpptrace>) target_compile_definitions(${PROJECT_NAME} PUBLIC QUILL_NO_EXCEPTIONS - PUBLIC QUILL_DISABLE_NON_PREFIXED_MACROS - - PUBLIC MI_SHARED_LIB) + PUBLIC QUILL_DISABLE_NON_PREFIXED_MACROS) set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/MimallocImpl.cpp PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON) diff --git a/Bin2CPP/Tests/Bin2CPPLib/CMakeLists.txt b/Bin2CPP/Tests/Bin2CPPLib/CMakeLists.txt index 046f1ca..056e8c9 100644 --- a/Bin2CPP/Tests/Bin2CPPLib/CMakeLists.txt +++ b/Bin2CPP/Tests/Bin2CPPLib/CMakeLists.txt @@ -18,6 +18,9 @@ target_sources(${PROJECT_NAME} ${TEST_SOURCES} ) +target_compile_options(${PROJECT_NAME} PRIVATE ${BIN2CPP_CXX_FLAGS}) +target_link_options(${PROJECT_NAME} PRIVATE ${BIN2CPP_EXE_LINK_FLAGS}) + target_link_libraries(${PROJECT_NAME} PRIVATE gtest::gtest Bin2CPPLib) include(GoogleTest) @@ -48,6 +51,4 @@ add_custom_target(${PROJECT_NAME}Fixture add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}Fixture) -set_target_properties(${PROJECT_NAME}Fixture PROPERTIES FOLDER UtilityTargets/Tests/Bin2CPP/${ParentFolder}) - -bin2cpp_setup_dependencies("Tests/Bin2CPP") \ No newline at end of file +set_target_properties(${PROJECT_NAME}Fixture PROPERTIES FOLDER UtilityTargets/Tests/Bin2CPP/${ParentFolder}) \ No newline at end of file diff --git a/CMake/FindDependencies.cmake b/CMake/FindDependencies.cmake index 4de3717..f81ed4b 100644 --- a/CMake/FindDependencies.cmake +++ b/CMake/FindDependencies.cmake @@ -6,13 +6,17 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") endif() find_package(EASTL REQUIRED) -find_package(mimalloc REQUIRED) find_package(CLI11 REQUIRED) find_package(quill REQUIRED) if(${IS_MULTI_CONFIG}) + find_package(mimalloc REQUIRED) + find_package(mimalloc-asan REQUIRED) find_package(cpptrace REQUIRED) +elseif(${CMAKE_BUILD_TYPE} STREQUAL "Release") + find_package(mimalloc REQUIRED) elseif(${CMAKE_BUILD_TYPE} STREQUAL "Debug" OR ${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo") + find_package(mimalloc-asan REQUIRED) find_package(cpptrace REQUIRED) endif() diff --git a/CMake/Utils.cmake b/CMake/Utils.cmake deleted file mode 100644 index 915a12f..0000000 --- a/CMake/Utils.cmake +++ /dev/null @@ -1,58 +0,0 @@ -function(bin2cpp_setup_dependencies ParentFolder) - set(CONAN_DEPLOYER_DIR "${CMAKE_SOURCE_DIR}/build/full_deploy/host") - - if(EXISTS ${CONAN_DEPLOYER_DIR}) - if(CMAKE_SYSTEM_NAME STREQUAL "Windows") - file(GLOB_RECURSE SHARED_BINARIES ${CONAN_DEPLOYER_DIR}/*mimalloc*.dll) - elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") - file(GLOB_RECURSE SHARED_BINARIES ${CONAN_DEPLOYER_DIR}/*mimalloc*.so*) - endif() - - if(${IS_MULTI_CONFIG}) - foreach(CONFIG ${CMAKE_CONFIGURATION_TYPES}) - foreach(file ${SHARED_BINARIES}) - if(file MATCHES "/${CONFIG}/") - list(APPEND SHARED_BINARIES_${CONFIG} ${file}) - endif() - endforeach() - endforeach() - - add_custom_target(${PROJECT_NAME}CopySharedBinaries - ALL DEPENDS SHARED_BINARIES - COMMAND ${CMAKE_COMMAND} -E make_directory $ - COMMAND ${CMAKE_COMMAND} -E $,copy_if_different,true> ${SHARED_BINARIES_Debug} $ - COMMAND ${CMAKE_COMMAND} -E $,copy_if_different,true> ${SHARED_BINARIES_Release} $ - COMMAND ${CMAKE_COMMAND} -E $,copy_if_different,true> ${SHARED_BINARIES_RelWithDebInfo} $ - COMMENT "Copy shared binaries for ${PROJECT_NAME}" - ) - add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}CopySharedBinaries) - set_target_properties(${PROJECT_NAME}CopySharedBinaries PROPERTIES FOLDER UtilityTargets/${ParentFolder}) - - else() - foreach(file ${SHARED_BINARIES}) - if(file MATCHES "/${CMAKE_BUILD_TYPE}/") - list(APPEND SHARED_BINARIES_${CMAKE_BUILD_TYPE} ${file}) - endif() - endforeach() - - add_custom_target(${PROJECT_NAME}CopySharedBinaries ALL - DEPENDS ${SHARED_BINARIES_${CMAKE_BUILD_TYPE}} - COMMAND ${CMAKE_COMMAND} -E make_directory $ - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${SHARED_BINARIES_${CMAKE_BUILD_TYPE}} $ - COMMENT "Copy shared binaries for ${PROJECT_NAME}" - ) - add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}CopySharedBinaries) - set_target_properties(${PROJECT_NAME}CopySharedBinaries PROPERTIES FOLDER UtilityTargets/${ParentFolder}) - endif() - endif() - - if(CMAKE_SYSTEM_NAME STREQUAL "Windows") - add_custom_target(${PROJECT_NAME}PatchMinject ALL - COMMAND ${MINJECT_EXECUTABLE} -i -f $ - COMMENT "Patching ${PROJECT_NAME} to ensure mimalloc dynamic override" - ) - add_dependencies(${PROJECT_NAME}PatchMinject ${PROJECT_NAME}) - set_target_properties(${PROJECT_NAME}PatchMinject PROPERTIES FOLDER "UtilityTargets/${ParentFolder}") - endif() - -endfunction() \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index e30b8e2..315f7e2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,9 +15,6 @@ set(CMAKE_CONFIGURATION_TYPES "Release;RelWithDebInfo;Debug" CACHE STRING "" FOR option(BUILD_TESTS OFF) include(${CMAKE_SOURCE_DIR}/CMake/FindDependencies.cmake) -include(${CMAKE_SOURCE_DIR}/CMake/Utils.cmake) - -find_program(MINJECT_EXECUTABLE NAMES minject) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(CMAKE_OPTIMIZE_DEPENDENCIES 1) diff --git a/ConanProfiles/clang b/ConanProfiles/clang new file mode 100644 index 0000000..a85443e --- /dev/null +++ b/ConanProfiles/clang @@ -0,0 +1,26 @@ +[settings] +os=Linux +arch=x86_64 +compiler=clang +compiler.version=20 +compiler.libcxx=libstdc++11 +compiler.cppstd=20 +compiler.cstd=17 +build_type=Release +[conf] +tools.cmake.cmaketoolchain:extra_variables={'CMAKE_CXX_COMPILER_LAUNCHER': 'ccache', 'CMAKE_C_COMPILER_LAUNCHER': 'ccache'} +tools.cmake.cmaketoolchain:extra_variables*={'BIN2CPP_CXX_FLAGS': {'value': '-Wall;-Wextra;-Wpedantic;-Werror', 'cache': True, 'type': 'STRING', 'docstring': 'CXX flags for Bigfoot', 'force': True}} +tools.cmake.cmaketoolchain:extra_variables*={'BIN2CPP_C_FLAGS': {'value': '-Wall;-Wextra;-Wpedantic;-Werror', 'cache': True, 'type': 'STRING', 'docstring': 'C flags for Bigfoot', 'force': True}} +tools.cmake.cmaketoolchain:generator=Ninja +tools.system.package_manager:mode=install +tools.system.package_manager:sudo=True +tools.build:compiler_executables={"c": "clang", "cpp": "clang++"} + +tools.build:exelinkflags=["-fuse-ld=mold", "-flto"] +tools.build:sharedlinkflags=["-fuse-ld=mold", "-flto"] + +tools.build:cflags=["-flto"] +tools.build:cxxflags=["-flto"] + +[tool_requires] +!cmake/*: cmake/[>=4.2] \ No newline at end of file diff --git a/ConanProfiles/clang_coverage b/ConanProfiles/clang_coverage new file mode 100644 index 0000000..e94fdfc --- /dev/null +++ b/ConanProfiles/clang_coverage @@ -0,0 +1,25 @@ +[settings] +os=Linux +arch=x86_64 +compiler=clang +compiler.version=20 +compiler.libcxx=libstdc++11 +compiler.cppstd=20 +compiler.cstd=17 +build_type=Debug +[conf] +tools.cmake.cmaketoolchain:extra_variables={'CMAKE_CXX_COMPILER_LAUNCHER': 'ccache', 'CMAKE_C_COMPILER_LAUNCHER': 'ccache'} +tools.cmake.cmaketoolchain:extra_variables*={'BIN2CPP_CXX_FLAGS': {'value': '-Wall;-Wextra;-Wpedantic;-Werror;-fprofile-instr-generate;-fcoverage-mapping', 'cache': True, 'type': 'STRING', 'docstring': 'CXX flags for Bigfoot', 'force': True}} +tools.cmake.cmaketoolchain:extra_variables*={'BIN2CPP_C_FLAGS': {'value': '-Wall;-Wextra;-Wpedantic;-Werror;-fprofile-instr-generate;-fcoverage-mapping', 'cache': True, 'type': 'STRING', 'docstring': 'C flags for Bigfoot', 'force': True}} +tools.cmake.cmaketoolchain:extra_variables*={'BIN2CPP_SHARED_LINK_FLAGS': {'value': '-fprofile-instr-generate', 'cache': True, 'type': 'STRING', 'docstring': 'SHARED link flags for Bigfoot', 'force': True}} +tools.cmake.cmaketoolchain:extra_variables*={'BIN2CPP_EXE_LINK_FLAGS': {'value': '-fprofile-instr-generate', 'cache': True, 'type': 'STRING', 'docstring': 'EXE link flags for Bigfoot', 'force': True}} +tools.cmake.cmaketoolchain:generator=Ninja +tools.system.package_manager:mode=install +tools.system.package_manager:sudo=True +tools.build:compiler_executables={"c": "clang", "cpp": "clang++"} + +tools.build:exelinkflags=["-fuse-ld=mold"] +tools.build:sharedlinkflags=["-fuse-ld=mold"] + +[tool_requires] +!cmake/*: cmake/[>=4.2] \ No newline at end of file diff --git a/ConanProfiles/clangd b/ConanProfiles/clangd new file mode 100644 index 0000000..d3bc840 --- /dev/null +++ b/ConanProfiles/clangd @@ -0,0 +1,23 @@ +[settings] +os=Linux +arch=x86_64 +compiler=clang +compiler.version=20 +compiler.libcxx=libstdc++11 +compiler.cppstd=20 +compiler.cstd=17 +build_type=Debug +[conf] +tools.cmake.cmaketoolchain:extra_variables={'CMAKE_CXX_COMPILER_LAUNCHER': 'ccache', 'CMAKE_C_COMPILER_LAUNCHER': 'ccache'} +tools.cmake.cmaketoolchain:extra_variables*={'BIN2CPP_CXX_FLAGS': {'value': '-Wall;-Wextra;-Wpedantic;-Werror;-fsanitize=address,undefined', 'cache': True, 'type': 'STRING', 'docstring': 'CXX flags for Bigfoot', 'force': True}} +tools.cmake.cmaketoolchain:extra_variables*={'BIN2CPP_C_FLAGS': {'value': '-Wall;-Wextra;-Wpedantic;-Werror;-fsanitize=address,undefined', 'cache': True, 'type': 'STRING', 'docstring': 'C flags for Bigfoot', 'force': True}} +tools.cmake.cmaketoolchain:generator=Ninja +tools.system.package_manager:mode=install +tools.system.package_manager:sudo=True +tools.build:compiler_executables={"c": "clang", "cpp": "clang++"} + +tools.build:exelinkflags=["-fuse-ld=mold"] +tools.build:sharedlinkflags=["-fuse-ld=mold"] + +[tool_requires] +!cmake/*: cmake/[>=4.2] \ No newline at end of file diff --git a/ConanProfiles/msvc b/ConanProfiles/msvc new file mode 100644 index 0000000..769a3fe --- /dev/null +++ b/ConanProfiles/msvc @@ -0,0 +1,22 @@ +[settings] +os=Windows +arch=x86_64 +compiler=msvc +compiler.version=195 +compiler.cppstd=20 +compiler.cstd=17 +compiler.runtime=dynamic +build_type=Release +[conf] +tools.cmake.cmaketoolchain:extra_variables={'BIN2CPP_CXX_FLAGS': {'value': '/W4;/WX;', 'cache': True, 'type': 'STRING', 'docstring': 'CXX flags for Bigfoot', 'force': True}} +tools.cmake.cmaketoolchain:extra_variables*={'BIN2CPP_C_FLAGS': {'value': '/W4;/WX;', 'cache': True, 'type': 'STRING', 'docstring': 'C flags for Bigfoot', 'force': True}} +tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/msvc_ccache.cmake + +tools.build:exelinkflags=["/LTCG", "/INCREMENTAL:NO"] +tools.build:sharedlinkflags=["/LTCG", "/INCREMENTAL:NO"] + +tools.build:cflags=["/Zc:preprocessor", "/Zc:__STDC__", "/D_CRT_DECLARE_NONSTDC_NAMES=1", "/GL"] +tools.build:cxxflags=["/Zc:preprocessor", "/Zc:__cplusplus", "/Zc:enumTypes", "/Zc:templateScope", "/Zc:strictStrings", "/Zc:rvalueCast", "/Zc:hiddenFriend", "/Zc:externConstexpr", "/Zc:ternary", "/GL"] + +[tool_requires] +!cmake/*: cmake/[>=4.2] \ No newline at end of file diff --git a/ConanProfiles/msvc_ccache.cmake b/ConanProfiles/msvc_ccache.cmake new file mode 100644 index 0000000..2818eec --- /dev/null +++ b/ConanProfiles/msvc_ccache.cmake @@ -0,0 +1,19 @@ +# 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 "$<$:Embedded>") + + set(CMAKE_VS_GLOBALS + "CLToolExe=cl.exe" + "CLToolPath=${CMAKE_BINARY_DIR}" + "UseMultiToolTask=true" + ) +endif() \ No newline at end of file diff --git a/ConanProfiles/msvcd b/ConanProfiles/msvcd new file mode 100644 index 0000000..13df5ce --- /dev/null +++ b/ConanProfiles/msvcd @@ -0,0 +1,22 @@ +[settings] +os=Windows +arch=x86_64 +compiler=msvc +compiler.version=195 +compiler.cppstd=20 +compiler.cstd=17 +compiler.runtime=dynamic +build_type=Debug +[conf] +tools.cmake.cmaketoolchain:extra_variables={'BIN2CPP_CXX_FLAGS': {'value': '/W4;/WX', 'cache': True, 'type': 'STRING', 'docstring': 'CXX flags for Bigfoot', 'force': True}} +tools.cmake.cmaketoolchain:extra_variables*={'BIN2CPP_C_FLAGS': {'value': '/W4;/WX', 'cache': True, 'type': 'STRING', 'docstring': 'C flags for Bigfoot', 'force': True}} +tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/msvc_ccache.cmake + +tools.build:exelinkflags=["/INCREMENTAL:NO"] +tools.build:sharedlinkflags=["/INCREMENTAL:NO"] + +tools.build:cflags=["/Zc:preprocessor", "/Zc:__STDC__", "/D_CRT_DECLARE_NONSTDC_NAMES=1", "/fsanitize=address"] +tools.build:cxxflags=["/Zc:preprocessor", "/Zc:__cplusplus", "/Zc:enumTypes", "/Zc:templateScope", "/Zc:strictStrings", "/Zc:rvalueCast", "/Zc:hiddenFriend", "/Zc:externConstexpr", "/Zc:ternary", "/fsanitize=address"] + +[tool_requires] +!cmake/*: cmake/[>=4.2] \ No newline at end of file diff --git a/conanfile.py b/conanfile.py index 7b7cc29..7da4d35 100644 --- a/conanfile.py +++ b/conanfile.py @@ -35,10 +35,8 @@ class Bigfoot(ConanFile): if self.settings.os == "Windows": del self.options.fPIC - self.options['mimalloc'].override = True - self.options['mimalloc'].shared = True - if(self.settings.os == "Windows"): - self.options["mimalloc"].win_redirect = True + if(self.settings.build_type == "RelWithDebInfo" or self.settings.build_type == "Debug"): + self.options["mimalloc"].asan = True def requirements(self): self.requires("quill/11.0.2", transitive_headers=True) diff --git a/generate_dependencies.bat b/generate_dependencies.bat index 9ef984c..8be9eae 100644 --- a/generate_dependencies.bat +++ b/generate_dependencies.bat @@ -22,12 +22,9 @@ if "%~1"=="force" ( REM Add the remote conan remote add bigfootpackages https://conan.romainboullard.com/artifactory/api/conan/BigfootPackages -REM Install the conan configuration -conan config install https://git.romainboullard.com/BigfootDev/ConanProfiles.git - REM Install dependencies with the specified build option -conan install . --deployer=full_deploy --remote=bigfootpackages %build_option% -of build -s build_type=Release -o bin2cpp/*:build_tests=True -conan install . --deployer=full_deploy --remote=bigfootpackages %build_option% -of build -s build_type=RelWithDebInfo -o bin2cpp/*:build_tests=True -conan install . --deployer=full_deploy --remote=bigfootpackages %build_option% -of build -s build_type=Debug -o bin2cpp/*:build_tests=True +conan install . --deployer=full_deploy --remote=bigfootpackages -pr:h=./ConanProfiles/msvc -pr:b=./ConanProfiles/msvc %build_option% -of build -s build_type=Release -o bin2cpp/*:build_tests=True +conan install . --deployer=full_deploy --remote=bigfootpackages -pr:h=./ConanProfiles/msvcd -pr:b=./ConanProfiles/msvcd %build_option% -of build -s build_type=RelWithDebInfo -o bin2cpp/*:build_tests=True +conan install . --deployer=full_deploy --remote=bigfootpackages -pr:h=./ConanProfiles/msvcd -pr:b=./ConanProfiles/msvcd %build_option% -of build -s build_type=Debug -o bin2cpp/*:build_tests=True endlocal diff --git a/generate_dependencies.sh b/generate_dependencies.sh index aed8021..23bdbd8 100755 --- a/generate_dependencies.sh +++ b/generate_dependencies.sh @@ -9,18 +9,15 @@ fi # Add the remote conan remote add bigfootpackages https://conan.romainboullard.com/artifactory/api/conan/BigfootPackages -# Install the conan configuration -conan config install https://git.romainboullard.com/BigfootDev/ConanProfiles.git - # Set the build option based on the argument if [ "$1" == "force" ]; then - conan install . --deployer=full_deploy --remote=bigfootpackages --build='*' -of build -s build_type=Release -o bin2cpp/*:build_tests=True - conan install . --deployer=full_deploy --remote=bigfootpackages --build='*' -of build -s build_type=RelWithDebInfo -o bin2cpp/*:build_tests=True - conan install . --deployer=full_deploy --remote=bigfootpackages --build='*' -of build -s build_type=Debug -o bin2cpp/*:build_tests=True + conan install . --deployer=full_deploy --remote=bigfootpackages -pr:h=./ConanProfiles/clang -pr:b=./ConanProfiles/clang --build='*' -of build -s build_type=Release -o bin2cpp/*:build_tests=True + conan install . --deployer=full_deploy --remote=bigfootpackages -pr:h=./ConanProfiles/clangd -pr:b=./ConanProfiles/clangd --build='*' -of build -s build_type=RelWithDebInfo -o bin2cpp/*:build_tests=True + conan install . --deployer=full_deploy --remote=bigfootpackages -pr:h=./ConanProfiles/clangd -pr:b=./ConanProfiles/clangd --build='*' -of build -s build_type=Debug -o bin2cpp/*:build_tests=True elif [ "$1" == "missing" ]; then - conan install . --deployer=full_deploy --remote=bigfootpackages --build=missing -of build -s build_type=Release -o bin2cpp/*:build_tests=True - conan install . --deployer=full_deploy --remote=bigfootpackages --build=missing -of build -s build_type=RelWithDebInfo -o bin2cpp/*:build_tests=True - conan install . --deployer=full_deploy --remote=bigfootpackages --build=missing -of build -s build_type=Debug -o bin2cpp/*:build_tests=True + conan install . --deployer=full_deploy --remote=bigfootpackages -pr:h=./ConanProfiles/clang -pr:b=./ConanProfiles/clang --build=missing -of build -s build_type=Release -o bin2cpp/*:build_tests=True + conan install . --deployer=full_deploy --remote=bigfootpackages -pr:h=./ConanProfiles/clangd -pr:b=./ConanProfiles/clangd --build=missing -of build -s build_type=RelWithDebInfo -o bin2cpp/*:build_tests=True + conan install . --deployer=full_deploy --remote=bigfootpackages -pr:h=./ConanProfiles/clangd -pr:b=./ConanProfiles/clangd --build=missing -of build -s build_type=Debug -o bin2cpp/*:build_tests=True echo "Invalid argument: $1" echo "Usage: $0 [force|missing]" exit 1