1 # Flags to control each individual feature
2 option(LLDB_BUILD_INTEL_MPX "Enable Building of Intel(R) Memory Protection Extensions" ON)
4 # Return if all features are OFF
5 if (NOT LLDB_BUILD_INTEL_MPX)
9 LIST (APPEND FEATURE_LIBS "")
11 # Add feature specific subdirectories based on flags
12 if (LLDB_BUILD_INTEL_MPX AND CMAKE_SYSTEM_NAME MATCHES "Linux")
13 add_subdirectory(intel-mpx)
14 LIST (APPEND FEATURE_LIBS ${FEATURE_LIBS} lldbIntelMPX)
15 SET (CLI_WRAPPER_PREPROCESSORS "${CLI_WRAPPER_PREPROCESSORS} -DBUILD_INTEL_MPX")
18 if (NOT CLI_WRAPPER_PREPROCESSORS)
22 set_source_files_properties(cli-wrapper.cpp PROPERTIES
23 COMPILE_FLAGS ${CLI_WRAPPER_PREPROCESSORS})
25 add_lldb_library(lldbIntelFeatures SHARED
32 install(TARGETS lldbIntelFeatures
33 LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX})