Fixes VS support for llvmc mcc16 llvmc example.
[oota-llvm.git] / tools / CMakeLists.txt
index 64323ac6296fa00f34bb1415dd24c7af30948abb..8851a0b377b47982e2d9013fae4505b076f9ff56 100644 (file)
@@ -51,8 +51,18 @@ if( NOT WIN32 )
   add_subdirectory(lto)
 endif()
 
+if( LLVM_ENABLE_PIC )
+  # TODO: support other systems:
+  if( CMAKE_SYSTEM_NAME STREQUAL "Linux" )
+    add_subdirectory(gold)
+  endif()
+endif()
+
 if( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/clang/CMakeLists.txt )
-  add_subdirectory( ${CMAKE_CURRENT_SOURCE_DIR}/clang )
+  option(LLVM_BUILD_CLANG "Whether to build Clang as part of LLVM" ON)
+  if (${LLVM_BUILD_CLANG})
+    add_subdirectory( ${CMAKE_CURRENT_SOURCE_DIR}/clang )
+  endif()
 endif( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/clang/CMakeLists.txt )
 
 set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} PARENT_SCOPE)