From 8459d93b1855c58f18357ab600e77a4b3ace4e13 Mon Sep 17 00:00:00 2001 From: Daniil Fukalov Date: Mon, 28 Nov 2016 17:12:09 +0000 Subject: [PATCH] [CMAKE] fix LLVM_OPTIMIZED_TABLEGEN for Visual Studio At the moment optimized tablegen is generated by LLVM_USE_HOST_TOOLS variable that is not set for Visual Sudio since LLVM_ENABLE_ASSERTIONS depends on CMAKE_BUILD_TYPE value that is not equal to "DEBUG" in case of Visual Studio soltion generation. Modified to do not depend on LLVM_ENABLE_ASSERTIONS value in VS and Xcode cases Reviewers: beanz Subscribers: RKSimon, llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D27135 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288042 91177308-0d34-0410-b5e6-96231b3b80d8 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f0cb41705d..d90baefeb9e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -531,7 +531,7 @@ endif() option(LLVM_BUILD_LLVM_DYLIB "Build libllvm dynamic library" ${LLVM_BUILD_LLVM_DYLIB_default}) option(LLVM_OPTIMIZED_TABLEGEN "Force TableGen to be built with optimization" OFF) -if(CMAKE_CROSSCOMPILING OR (LLVM_OPTIMIZED_TABLEGEN AND LLVM_ENABLE_ASSERTIONS)) +if(CMAKE_CROSSCOMPILING OR (LLVM_OPTIMIZED_TABLEGEN AND (LLVM_ENABLE_ASSERTIONS OR CMAKE_CONFIGURATION_TYPES))) set(LLVM_USE_HOST_TOOLS ON) endif() -- 2.50.1