Restructure options for Windows build

This commit is contained in:
Marcus Holland-Moritz 2023-06-25 18:55:28 +02:00
parent 12080954e0
commit 3e256287e1

View File

@ -28,21 +28,26 @@ include(CheckCXXSourceCompiles)
option(WITH_TESTS "build with tests" OFF)
option(WITH_BENCHMARKS "build with benchmarks" OFF)
option(WITH_PYTHON "build with Python scripting support" OFF)
option(WITH_LEGACY_FUSE "build fuse2 driver even if we have fuse3" OFF)
option(WITH_MAN_PAGES "build man pages using ronn" ON)
option(ENABLE_ASAN "enable address sanitizer" OFF)
option(ENABLE_TSAN "enable thread sanitizer" OFF)
option(ENABLE_UBSAN "enable undefined behaviour sanitizer" OFF)
option(ENABLE_COVERAGE "enable code coverage" OFF)
option(USE_JEMALLOC "build with jemalloc" ON)
option(PREFER_SYSTEM_LIBFMT "use system libfmt if available" OFF)
option(PREFER_SYSTEM_LIBARCHIVE "use system libarchive if available" OFF)
option(PREFER_SYSTEM_ZSTD "use system zstd if available" OFF)
option(PREFER_SYSTEM_XXHASH "use system xxHash if available" OFF)
option(PREFER_SYSTEM_GTEST "use system gtest if available" OFF)
option(DISABLE_CCACHE "disable ccache" OFF)
option(STATIC_BUILD_DO_NOT_USE "try static build (experimental)" OFF)
if(WIN32)
set(PREFER_SYSTEM_LIBFMT ON)
set(PREFER_SYSTEM_LIBARCHIVE ON)
else()
option(WITH_PYTHON "build with Python scripting support" OFF)
option(WITH_LEGACY_FUSE "build fuse2 driver even if we have fuse3" OFF)
option(WITH_MAN_PAGES "build man pages using ronn" ON)
option(ENABLE_ASAN "enable address sanitizer" OFF)
option(ENABLE_TSAN "enable thread sanitizer" OFF)
option(ENABLE_UBSAN "enable undefined behaviour sanitizer" OFF)
option(ENABLE_COVERAGE "enable code coverage" OFF)
option(USE_JEMALLOC "build with jemalloc" ON)
option(PREFER_SYSTEM_LIBFMT "use system libfmt if available" OFF)
option(PREFER_SYSTEM_LIBARCHIVE "use system libarchive if available" OFF)
option(PREFER_SYSTEM_ZSTD "use system zstd if available" OFF)
option(PREFER_SYSTEM_XXHASH "use system xxHash if available" OFF)
option(PREFER_SYSTEM_GTEST "use system gtest if available" OFF)
option(DISABLE_CCACHE "disable ccache" OFF)
option(STATIC_BUILD_DO_NOT_USE "try static build (experimental)" OFF)
endif()
if(DEFINED ENV{DWARFS_LOCAL_REPO_PATH})
set(LIBFMT_GIT_REPO $ENV{DWARFS_LOCAL_REPO_PATH}/fmt)