diff options
author | Eric Fiselier <eric@efcs.ca> | 2017-01-16 20:47:35 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2017-01-16 20:47:35 +0000 |
commit | bde2871b62190f3423a2acbfd334be93782a1889 (patch) | |
tree | 79e41c6cce427b9a5c4e4a406eb433a590653cfa /CMakeLists.txt | |
parent | 47a547e4383b86716cb3ba2ded0ccbf2e6952cd7 (diff) |
Improve CMake and LIT support for Windows
This patch contains multiple cleanups and fixes to better support building on
Windows.
* [Test] Fix handling of library runtime search paths by correctly adding them
to the PATH variable when running the tests.
* [Test] Don't explicitly force "--target=i686-pc-windows" when running the
test suite. Clang++ seems to deduce the correct target.
* [Test] Fix `.sh.cpp` tests on Windows by properly escaping flags used in
shell commands. Specifically windows style paths which included spaces
were causing these tests to fail.
* [CMake] Add "vcruntime" to the list of supported C++ ABI libraries in CMake, and
teach the test suite how to handle it. For now libc++ defaults to using
"vcruntime" on Windows except when libc++abi is in tree; That is probably
a bug and should be changed to always use vcruntime, at least for now.
* [Misc] Move the "c++-build" include directory to the libc++ binary dir
instead of the top level project dir and rename it "c++build". This is just
misc cleanup. Libc++ shouldn't be creating internal build files and directories
at the top-level projects root.
* [Misc] Build type_info's destructor when building for MSVC. This is a temporary
work around to prevent link errors until we have a proper type_info
implementation.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292157 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 8174e758d..dc7cc467c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -104,7 +104,7 @@ endif() # ABI Library options --------------------------------------------------------- set(LIBCXX_CXX_ABI "default" CACHE STRING "Specify C++ ABI library to use.") -set(CXXABIS none default libcxxabi libcxxrt libstdc++ libsupc++) +set(CXXABIS none default libcxxabi libcxxrt libstdc++ libsupc++ vcruntime) set_property(CACHE LIBCXX_CXX_ABI PROPERTY STRINGS ;${CXXABIS}) # FIXME: This is a temporary hack to force LLVM buildbots to store @@ -131,9 +131,9 @@ if (LIBCXX_CXX_ABI STREQUAL "default") set(LIBCXX_CXX_ABI_INCLUDE_PATHS "${LIBCXX_LIBCXXABI_INCLUDES_INTERNAL}") set(LIBCXX_CXX_ABI_INTREE 1) else() - if (WIN32 AND NOT MINGW) + if (LIBCXX_TARGETING_MSVC) # FIXME: Figure out how to configure the ABI library on Windows. - set(LIBCXX_CXX_ABI_LIBNAME "none") + set(LIBCXX_CXX_ABI_LIBNAME "vcruntime") else() set(LIBCXX_CXX_ABI_LIBNAME "default") endif() @@ -331,7 +331,9 @@ endif() set(LIBCXX_COMPILER ${CMAKE_CXX_COMPILER}) set(LIBCXX_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) set(LIBCXX_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) +set(LIBCXX_BINARY_INCLUDE_DIR "${LIBCXX_BINARY_DIR}/include/c++build") set(LIBCXX_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXX_LIBDIR_SUFFIX}) +file(MAKE_DIRECTORY "${LIBCXX_BINARY_INCLUDE_DIR}") set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBCXX_LIBRARY_DIR}) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIBCXX_LIBRARY_DIR}) |