From b5b10c25f72f983f5876c0091cc98be36a6a3f0a Mon Sep 17 00:00:00 2001 From: Oscar Fuentes Date: Thu, 5 Nov 2009 19:03:26 +0000 Subject: [PATCH] CMake: Detect dotty. Patch by Arnaud Allard de Grandmaison! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86153 91177308-0d34-0410-b5e6-96231b3b80d8 --- cmake/config-ix.cmake | 9 +++++++++ include/llvm/Config/config.h.cmake | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake index 9351f264b0e..d67eaf7b015 100755 --- a/cmake/config-ix.cmake +++ b/cmake/config-ix.cmake @@ -126,6 +126,15 @@ endif() check_type_exists(uint64_t "${headers}" HAVE_UINT64_T) check_type_exists(u_int64_t "${headers}" HAVE_U_INT64_T) +# available programs checks +find_program(DOTTY_EXECUTABLE dotty) +if(DOTTY_EXECUTABLE) + set(HAVE_DOTTY 1) + set(LLVM_PATH_DOTTY ${DOTTY_EXECUTABLE}) + mark_as_advanced(HAVE_DOTTY) + mark_as_advanced(LLVM_PATH_DOTTY) +endif() + # Define LLVM_MULTITHREADED if gcc atomic builtins exists. include(CheckAtomic) diff --git a/include/llvm/Config/config.h.cmake b/include/llvm/Config/config.h.cmake index fa5d316ef07..4a80c3ad71e 100644 --- a/include/llvm/Config/config.h.cmake +++ b/include/llvm/Config/config.h.cmake @@ -80,7 +80,7 @@ #undef HAVE_DOT /* Define if the dotty program is available */ -#undef HAVE_DOTTY +#cmakedefine HAVE_DOTTY ${HAVE_DOTTY} /* Define if you have the _dyld_func_lookup function. */ #undef HAVE_DYLD @@ -471,7 +471,7 @@ #undef LLVM_PATH_DOT /* Define to path to dotty program if found or 'echo dotty' otherwise */ -#undef LLVM_PATH_DOTTY +#cmakedefine LLVM_PATH_DOTTY "${LLVM_PATH_DOTTY}" /* Define to path to Graphviz program if found or 'echo Graphviz' otherwise */ #undef LLVM_PATH_GRAPHVIZ