[PATCH] D17961: fix cmake error when configuring libcxxabi

Sebastian Pop via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 8 08:18:00 PST 2016


sebpop created this revision.
sebpop added reviewers: mclow.lists, EricWF.
sebpop added a subscriber: llvm-commits.
sebpop set the repository for this revision to rL LLVM.

The problem occurs when configuring libcxxabi on x86_64 linux with:
$ cmake -DLLVM_PATH=$SRCTOP/llvm -DLIBCXXABI_LIBCXX_PATH=$SRCTOP/libcxx $SRCTOP/libcxxabi
[...]
CMake Error at llvm/cmake/modules/CheckCompilerVersion.cmake:31 (check_cxx_source_compiles):
  Unknown CMake command "check_cxx_source_compiles".
Call Stack (most recent call first):
  llvm/cmake/modules/HandleLLVMOptions.cmake:9 (include)
  CMakeLists.txt:61 (include)

The fix is to include the cmake file that defines check_cxx_source_compiles.

Repository:
  rL LLVM

http://reviews.llvm.org/D17961

Files:
  llvm/cmake/modules/CheckCompilerVersion.cmake

Index: llvm/cmake/modules/CheckCompilerVersion.cmake
===================================================================
--- llvm/cmake/modules/CheckCompilerVersion.cmake
+++ llvm/cmake/modules/CheckCompilerVersion.cmake
@@ -27,6 +27,7 @@
         set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
         set(OLD_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})
         set(CMAKE_REQUIRED_FLAGS "-std=c++0x")
+        INCLUDE(CheckCXXSourceCompiles)
         check_cxx_source_compiles("
 #include <atomic>
 std::atomic<float> x(0.0f);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17961.50044.patch
Type: text/x-patch
Size: 547 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160308/6f6a8e49/attachment.bin>


More information about the llvm-commits mailing list