Upgrade Clap 3 to 3.2.23
[hiphop-php.git] / CMake / Options.cmake
blobd49f6401e08113eff5da83cbc8dfdca95ce209cc
1 #set(CMAKE_BUILD_TYPE Debug)
3 option(ALWAYS_ASSERT "Enabled asserts in a release build" OFF)
4 option(ENABLE_SSP "Enabled GCC/LLVM stack-smashing protection" OFF)
5 option(STATIC_CXX_LIB "Statically link libstd++ and libgcc." OFF)
6 option(ENABLE_AVX2 "Enable the use of AVX2 instructions" OFF)
7 option(ENABLE_AARCH64_CRC "Enable the use of CRC instructions" OFF)
8 option(ENABLE_FASTCGI "Enable the FastCGI interface." ON)
9 option(ENABLE_SSE4_2 "Enable SSE4.2 supported code." OFF)
11 option(EXECUTION_PROFILER "Enable the execution profiler" OFF)
13 option(USE_JEMALLOC "Use jemalloc" ON)
14 option(FORCE_TP_JEMALLOC "Always build and statically link jemalloc instead of using system version" OFF)
16 option(ENABLE_HHPROF "Enable HHProf" OFF)
18 option(CLANG_FORCE_LIBSTDCXX "Force libstdc++ when building against Clang/LLVM" OFF)
20 option(USE_TCMALLOC "Use tcmalloc (if jemalloc is not used)" ON)
21 option(USE_GOOGLE_HEAP_PROFILER "Use Google heap profiler" OFF)
22 option(USE_GOOGLE_CPU_PROFILER "Use Google cpu profiler" OFF)
24 option(DISABLE_HARDWARE_COUNTERS "Disable hardware counters (for XenU systems)" OFF)
26 option(ENABLE_TRACE "Enable tracing in release build" OFF)
27 option(CPACK_GENERATOR "Enable build of distribution packages using CPack" OFF)
29 option(ENABLE_COTIRE "Speed up the build by precompiling headers" OFF)
31 include(CheckCXXSymbolExists)
33 # Mcrouter uses Folly's AtomicSharedPtr, which only supports libstdc++
34 # See https://github.com/facebook/hhvm/blob/156a77d5a301033200601ddefb4dcaf26eb1ff9c/third-party/folly/src/folly/concurrency/detail/AtomicSharedPtr-detail.h#L28-L34
35 check_cxx_symbol_exists(__GLIBCXX__ cstdlib DEFAULT_STDLIB_IS_LIBSTDCXX)
36 if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CLANG_FORCE_LIBSTDCXX OR DEFAULT_STDLIB_IS_LIBSTDCXX)
37   option(ENABLE_MCROUTER "Build the mcrouter library and extension" ON)
38 else()
39   option(ENABLE_MCROUTER "Build the mcrouter library and extension" OFF)
40 endif()
42 option(ENABLE_PROXYGEN_SERVER "Build the Proxygen HTTP server" ON)
44 option(ENABLE_SPLIT_DWARF "Reduce linker memory usage by putting debugging information into .dwo files" OFF)
46 IF (LINUX)
47     option(MAP_TEXT_HUGE_PAGES "Remap hot static code onto huge pages" ON)
48 ENDIF()
50 IF (NOT DEFAULT_CONFIG_DIR)
51   set(DEFAULT_CONFIG_DIR "/etc/hhvm/" CACHE STRING
52     "Default directory to find php.ini")
53 ENDIF()
55 option(ENABLE_XED "Use the XED library for HHVM. If ON, tc-print will be built for X86." OFF)
56 option(ENABLE_SYSTEM_LOCALE_ARCHIVE "Use system locale archive as the default LOCALE_ARCHIVE for nix patched glibc." OFF)