[PATCH] D26360: [CMake] Get libunwind building under LLVM/runtimes
Petr Hosek via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 8 15:12:35 PST 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL286308: [CMake] Get libunwind building under LLVM/runtimes (authored by phosek).
Changed prior to commit:
https://reviews.llvm.org/D26360?vs=77071&id=77274#toc
Repository:
rL LLVM
https://reviews.llvm.org/D26360
Files:
libunwind/trunk/CMakeLists.txt
libunwind/trunk/cmake/config-ix.cmake
Index: libunwind/trunk/cmake/config-ix.cmake
===================================================================
--- libunwind/trunk/cmake/config-ix.cmake
+++ libunwind/trunk/cmake/config-ix.cmake
@@ -38,6 +38,11 @@
check_cxx_compiler_flag(/EHs- LIBUNWIND_HAS_NO_EHS_FLAG)
check_cxx_compiler_flag(/EHa- LIBUNWIND_HAS_NO_EHA_FLAG)
check_cxx_compiler_flag(/GR- LIBUNWIND_HAS_NO_GR_FLAG)
+check_cxx_compiler_flag(-std=c++11 LIBUNWIND_HAS_STD_CXX11)
+
+if(LIBUNWIND_HAS_STD_CXX11)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+endif()
check_library_exists(c fopen "" LIBUNWIND_HAS_C_LIB)
check_library_exists(dl dladdr "" LIBUNWIND_HAS_DL_LIB)
Index: libunwind/trunk/CMakeLists.txt
===================================================================
--- libunwind/trunk/CMakeLists.txt
+++ libunwind/trunk/CMakeLists.txt
@@ -13,15 +13,17 @@
# Rely on llvm-config.
set(CONFIG_OUTPUT)
- find_program(LLVM_CONFIG "llvm-config")
+ if(NOT LLVM_CONFIG_PATH)
+ find_program(LLVM_CONFIG_PATH "llvm-config")
+ endif()
if (DEFINED LLVM_PATH)
set(LLVM_INCLUDE_DIR ${LLVM_INCLUDE_DIR} CACHE PATH "Path to llvm/include")
set(LLVM_PATH ${LLVM_PATH} CACHE PATH "Path to LLVM source tree")
set(LLVM_MAIN_SRC_DIR ${LLVM_PATH})
set(LLVM_CMAKE_PATH "${LLVM_PATH}/cmake/modules")
- elseif (LLVM_CONFIG)
- message(STATUS "Found LLVM_CONFIG as ${LLVM_CONFIG}")
- set(CONFIG_COMMAND ${LLVM_CONFIG} "--includedir" "--prefix" "--src-root")
+ elseif(LLVM_CONFIG_PATH)
+ message(STATUS "Found LLVM_CONFIG_PATH as ${LLVM_CONFIG_PATH}")
+ set(CONFIG_COMMAND ${LLVM_CONFIG_PATH} "--includedir" "--prefix" "--src-root")
execute_process(COMMAND ${CONFIG_COMMAND}
RESULT_VARIABLE HAD_ERROR
OUTPUT_VARIABLE CONFIG_OUTPUT)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26360.77274.patch
Type: text/x-patch
Size: 1859 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161108/b5d48fbe/attachment.bin>
More information about the llvm-commits
mailing list