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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@153036 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1378397721
commit
87c61a61fe
@ -1,33 +1,33 @@
|
|||||||
# Get sources
|
# Get sources
|
||||||
file(GLOB sources ../src/*.cpp)
|
file(GLOB LIBCXX_SOURCES ../src/*.cpp)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
file(GLOB win32_sources ../src/support/win32/*.cpp)
|
file(GLOB LIBCXX_WIN32_SOURCES ../src/support/win32/*.cpp)
|
||||||
list(APPEND sources ${win32_sources})
|
list(APPEND LIBCXX_SOURCES ${LIBCXX_WIN32_SOURCES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Add all the headers to the project for IDEs.
|
# Add all the headers to the project for IDEs.
|
||||||
if (MSVC_IDE OR XCODE)
|
if (MSVC_IDE OR XCODE)
|
||||||
file(GLOB_RECURSE headers ../include/*)
|
file(GLOB_RECURSE LIBCXX_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/../include/*)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
file( GLOB win32_headers ../include/support/win32/*.h)
|
file( GLOB LIBCXX_WIN32_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/../include/support/win32/*.h)
|
||||||
list(APPEND headers ${win32_headers})
|
list(APPEND LIBCXX_HEADERS ${LIBCXX_WIN32_HEADERS})
|
||||||
endif()
|
endif()
|
||||||
# Force them all into the headers dir on MSVC, otherwise they end up at
|
# Force them all into the headers dir on MSVC, otherwise they end up at
|
||||||
# project scope because they don't have extensions.
|
# project scope because they don't have extensions.
|
||||||
if (MSVC_IDE)
|
if (MSVC_IDE)
|
||||||
source_group("Header Files" FILES ${headers})
|
source_group("Header Files" FILES ${LIBCXX_HEADERS})
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (LIBCXX_ENABLE_SHARED)
|
if (LIBCXX_ENABLE_SHARED)
|
||||||
add_library(cxx SHARED
|
add_library(cxx SHARED
|
||||||
${sources}
|
${LIBCXX_SOURCES}
|
||||||
${headers}
|
${LIBCXX_HEADERS}
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
add_library(cxx STATIC
|
add_library(cxx STATIC
|
||||||
${sources}
|
${LIBCXX_SOURCES}
|
||||||
${headers}
|
${LIBCXX_HEADERS}
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ if(PYTHONINTERP_FOUND)
|
|||||||
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
|
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
|
||||||
@ONLY)
|
@ONLY)
|
||||||
|
|
||||||
add_custom_target(check
|
add_custom_target(check-libcxx
|
||||||
COMMAND ${PYTHON_EXECUTABLE}
|
COMMAND ${PYTHON_EXECUTABLE}
|
||||||
${LIT_EXECUTABLE}
|
${LIT_EXECUTABLE}
|
||||||
${LIT_ARGS}
|
${LIT_ARGS}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user