diff options
| author | Greg Bedwell <greg_bedwell@sn.scee.net> | 2017-11-13 12:40:05 +0000 |
|---|---|---|
| committer | Greg Bedwell <greg_bedwell@sn.scee.net> | 2017-11-13 12:40:05 +0000 |
| commit | 99e183cd5a01b4d282f5932948ef78d98441b1da (patch) | |
| tree | 465c2e2facbb58cad43b9c1fc41bfcefb2a8eec6 | |
| parent | 842aa90192cc83eff5b72898f1a33f0b0b0a07a5 (diff) | |
| download | bcm5719-llvm-99e183cd5a01b4d282f5932948ef78d98441b1da.tar.gz bcm5719-llvm-99e183cd5a01b4d282f5932948ef78d98441b1da.zip | |
Move the setting of LLVM_BUILD_MODE to a macro so that we can re-use it in compiler-rt
Differential Revision: https://reviews.llvm.org/D38470
llvm-svn: 318034
| -rw-r--r-- | llvm/cmake/modules/AddLLVM.cmake | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake index 62e264e5ef3..25c24419d86 100644 --- a/llvm/cmake/modules/AddLLVM.cmake +++ b/llvm/cmake/modules/AddLLVM.cmake @@ -1124,6 +1124,15 @@ function(llvm_canonicalize_cmake_booleans) endforeach() endfunction(llvm_canonicalize_cmake_booleans) +macro(set_llvm_build_mode) + # Configuration-time: See Unit/lit.site.cfg.in + if (CMAKE_CFG_INTDIR STREQUAL ".") + set(LLVM_BUILD_MODE ".") + else () + set(LLVM_BUILD_MODE "%(build_mode)s") + endif () +endmacro() + # This function provides an automatic way to 'configure'-like generate a file # based on a set of common and custom variables, specifically targeting the # variables needed for the 'lit.site.cfg' files. This function bundles the @@ -1147,12 +1156,7 @@ function(configure_lit_site_cfg site_in site_out) set(SHLIBEXT "${LTDL_SHLIB_EXT}") - # Configuration-time: See Unit/lit.site.cfg.in - if (CMAKE_CFG_INTDIR STREQUAL ".") - set(LLVM_BUILD_MODE ".") - else () - set(LLVM_BUILD_MODE "%(build_mode)s") - endif () + set_llvm_build_mode() # They below might not be the build tree but provided binary tree. set(LLVM_SOURCE_DIR ${LLVM_MAIN_SRC_DIR}) |

