From: Chris Bieneman Date: Tue, 6 Dec 2016 17:09:29 +0000 (+0000) Subject: [CMake] Fixing clang standalone build X-Git-Tag: llvmorg-4.0.0-rc1~2839 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ec758fad08fcbce80ffe8f2a5568d91199d97343;p=platform%2Fupstream%2Fllvm.git [CMake] Fixing clang standalone build I broke this in r288770. llvm-svn: 288829 --- diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt index 08008f9..f209338 100644 --- a/llvm/CMakeLists.txt +++ b/llvm/CMakeLists.txt @@ -803,8 +803,6 @@ endif() include(AddLLVM) include(TableGen) -set(LLVM_TABLEGEN_FLAGS -I ${LLVM_MAIN_INCLUDE_DIR}) - if( MINGW ) # People report that -O3 is unreliable on MinGW. The traditional # build also uses -O2 for that reason: diff --git a/llvm/cmake/modules/TableGen.cmake b/llvm/cmake/modules/TableGen.cmake index f966cf2..9682002 100644 --- a/llvm/cmake/modules/TableGen.cmake +++ b/llvm/cmake/modules/TableGen.cmake @@ -4,6 +4,10 @@ include(LLVMExternalProjectUtils) +if(LLVM_MAIN_INCLUDE_DIR) + set(LLVM_TABLEGEN_FLAGS -I ${LLVM_MAIN_INCLUDE_DIR}) +endif() + function(tablegen project ofn) # Validate calling context. if(NOT ${project}_TABLEGEN_EXE)