Disable libc++ building by default with CMake with MSVC -- some bots
[oota-llvm.git] / projects / CMakeLists.txt
1 # Discover the projects that use CMake in the subdirectories.
2 # Note that explicit cmake invocation is required every time a new project is
3 # added or removed.
4 file(GLOB entries *)
5 foreach(entry ${entries})
6   if(IS_DIRECTORY ${entry} AND EXISTS ${entry}/CMakeLists.txt)
7     if((NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/compiler-rt) AND
8        (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/libcxx))
9       add_subdirectory(${entry})
10     endif()
11   endif()
12 endforeach(entry)
13
14 # Also add in libc++ and compiler-rt trees if present (and we have
15 # a sufficiently recent version of CMake where required).
16 if(${LLVM_BUILD_RUNTIME})
17   # MSVC isn't quite working with libc++ yet, disable it until issues are
18   # fixed.
19   if(NOT MSVC)
20     add_llvm_external_project(libcxx)
21   endif()
22   if(${CMAKE_VERSION} VERSION_GREATER 2.8.7)
23     add_llvm_external_project(compiler-rt)
24   else()
25     message(WARNING "Can't build compiler-rt, CMake 2.8.8 required!")
26   endif()
27 endif()