[cfe-commits] [libcxx] r153036 - in /libcxx/trunk: lib/CMakeLists.txt test/CMakeLists.txt

Howard Hinnant hhinnant at apple.com
Mon Mar 19 08:40:23 PDT 2012


Author: hhinnant
Date: Mon Mar 19 10:40:23 2012
New Revision: 153036

URL: http://llvm.org/viewvc/llvm-project?rev=153036&view=rev
Log:
Allow libc++ to be built with CMake from within the LLVM tree. The libc++ part is just some renaming as the variable  was already in use, conflicting with something else in the LLVM tree.  Contributed by Ruben Van Boxem.

Modified:
    libcxx/trunk/lib/CMakeLists.txt
    libcxx/trunk/test/CMakeLists.txt

Modified: libcxx/trunk/lib/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/lib/CMakeLists.txt?rev=153036&r1=153035&r2=153036&view=diff
==============================================================================
--- libcxx/trunk/lib/CMakeLists.txt (original)
+++ libcxx/trunk/lib/CMakeLists.txt Mon Mar 19 10:40:23 2012
@@ -1,33 +1,33 @@
 # Get sources
-file(GLOB sources ../src/*.cpp)
+file(GLOB LIBCXX_SOURCES ../src/*.cpp)
 if(WIN32)
-  file(GLOB win32_sources ../src/support/win32/*.cpp)
-  list(APPEND sources ${win32_sources})
+  file(GLOB LIBCXX_WIN32_SOURCES ../src/support/win32/*.cpp)
+  list(APPEND LIBCXX_SOURCES ${LIBCXX_WIN32_SOURCES})
 endif()
 
 # Add all the headers to the project for IDEs.
 if (MSVC_IDE OR XCODE)
-  file(GLOB_RECURSE headers ../include/*)
+  file(GLOB_RECURSE LIBCXX_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/../include/*)
   if(WIN32)
-    file( GLOB win32_headers ../include/support/win32/*.h)
-    list(APPEND headers ${win32_headers})
+    file( GLOB LIBCXX_WIN32_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/../include/support/win32/*.h)
+    list(APPEND LIBCXX_HEADERS ${LIBCXX_WIN32_HEADERS})
   endif()
   # Force them all into the headers dir on MSVC, otherwise they end up at
   # project scope because they don't have extensions.
   if (MSVC_IDE)
-    source_group("Header Files" FILES ${headers})
+    source_group("Header Files" FILES ${LIBCXX_HEADERS})
   endif()
 endif()
 
 if (LIBCXX_ENABLE_SHARED)
   add_library(cxx SHARED
-    ${sources}
-    ${headers}
+    ${LIBCXX_SOURCES}
+    ${LIBCXX_HEADERS}
     )
 else()
   add_library(cxx STATIC
-    ${sources}
-    ${headers}
+    ${LIBCXX_SOURCES}
+    ${LIBCXX_HEADERS}
     )
 endif()
 

Modified: libcxx/trunk/test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/CMakeLists.txt?rev=153036&r1=153035&r2=153036&view=diff
==============================================================================
--- libcxx/trunk/test/CMakeLists.txt (original)
+++ libcxx/trunk/test/CMakeLists.txt Mon Mar 19 10:40:23 2012
@@ -32,7 +32,7 @@
     ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
     @ONLY)
 
-  add_custom_target(check
+  add_custom_target(check-libcxx
     COMMAND ${PYTHON_EXECUTABLE}
             ${LIT_EXECUTABLE}
             ${LIT_ARGS}





More information about the cfe-commits mailing list