[PATCH] CMake: use llvm-config to find llvm-tblgen
Chandler Carruth
chandlerc at gmail.com
Fri Aug 23 02:05:54 PDT 2013
Looks good with one variable name fix.
================
Comment at: CMakeLists.txt:51
@@ -48,7 +50,3 @@
- if( EXISTS "${CLANG_PATH_TO_LLVM_BUILD}/bin/llvm-tblgen${CMAKE_EXECUTABLE_SUFFIX}" )
- set(LLVM_TABLEGEN_EXE "${PATH_TO_LLVM_BUILD}/bin/llvm-tblgen${CMAKE_EXECUTABLE_SUFFIX}")
- else()
- # FIXME: This is an utter hack.
- set(LLVM_TABLEGEN_EXE "${PATH_TO_LLVM_BUILD}/bin/Debug/llvm-tblgen${CMAKE_EXECUTABLE_SUFFIX}")
- endif()
+ exec_program("${PATH_TO_LLVM_CONFIG} --obj-root" OUTPUT_VARIABLE LLVM_TABLEGEN_EXE)
+ set(LLVM_TABLEGEN_EXE "${LLVM_TABLEGEN_EXE}/bin/llvm-tblgen${CMAKE_EXECUTABLE_SUFFIX}")
----------------
The output variable name doesn't make a lot of sense to me here... Why not LLVM_OBJ_ROOT or however it's spelled in this cmake area?
http://llvm-reviews.chandlerc.com/D1483
More information about the cfe-commits
mailing list