list(APPEND CLANG_TEST_DEPS
clang clang-headers
- c-index-test diagtool arcmt-test c-arcmt-test
+ c-index-test diagtool
clang-check clang-format
clang-tblgen
)
+if (CLANG_ENABLE_ARCMT)
+ list(APPEND CLANG_TEST_DEPS
+ arcmt-test
+ c-arcmt-test
+ )
+endif ()
+
if (ENABLE_CLANG_EXAMPLES)
list(APPEND CLANG_TEST_DEPS
clang-interpreter
add_subdirectory(clang-format-vs)
endif()
+add_subdirectory(c-index-test)
+add_subdirectory(libclang)
+
if(CLANG_ENABLE_ARCMT)
- add_subdirectory(libclang)
- add_subdirectory(c-index-test)
add_subdirectory(arcmt-test)
add_subdirectory(c-arcmt-test)
endif()
extern "C" {
CXRemapping clang_getRemappings(const char *migrate_dir_path) {
+#ifndef CLANG_ENABLE_ARCMT
+ llvm::errs() << "error: feature not enabled in this build\n";
+ return nullptr;
+#else
bool Logging = ::getenv("LIBCLANG_LOGGING");
if (!migrate_dir_path) {
}
return remap.release();
+#endif
}
CXRemapping clang_getRemappingsFromFileList(const char **filePaths,
unsigned numFiles) {
+#ifndef CLANG_ENABLE_ARCMT
+ llvm::errs() << "error: feature not enabled in this build\n";
+ return nullptr;
+#else
bool Logging = ::getenv("LIBCLANG_LOGGING");
std::unique_ptr<Remap> remap(new Remap());
}
return remap.release();
+#endif
}
unsigned clang_remap_getNumFiles(CXRemapping map) {
../../include/clang-c/Index.h
)
+set(LIBS
+ clangAST
+ clangBasic
+ clangFrontend
+ clangIndex
+ clangLex
+ clangSema
+ clangTooling
+)
+
+if (CLANG_ENABLE_ARCMT)
+ list(APPEND LIBS clangARCMigrate)
+endif ()
+
option(LIBCLANG_BUILD_STATIC
"Build libclang as a static library (in addition to a shared one)" OFF)
DEPENDS clang-headers
LINK_LIBS
- clangARCMigrate
- clangAST
- clangBasic
- clangFrontend
- clangIndex
- clangLex
- clangSema
- clangTooling
+ ${LIBS}
LINK_COMPONENTS
BitReader