From 09681051e62a443a8e19d7d51449964bd4c338d9 Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Fri, 29 May 2015 18:34:41 +0000 Subject: [PATCH] [CMake] Bug 23468 - LLVM_OPTIMIZED_TABLEGEN does not work with Visual Studio Summary: Multi-configuration builds put their binaries into ${CMAKE_BINARY_DIR}/Release/bin/. The table-gen cross-compilation support needs to take that into account. Reviewers: yaron.keren Reviewed By: yaron.keren Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10102 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238592 91177308-0d34-0410-b5e6-96231b3b80d8 --- cmake/modules/TableGen.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/modules/TableGen.cmake b/cmake/modules/TableGen.cmake index 97e272b04a5..85d720e91fd 100644 --- a/cmake/modules/TableGen.cmake +++ b/cmake/modules/TableGen.cmake @@ -94,7 +94,11 @@ macro(add_tablegen target project) if(LLVM_USE_HOST_TOOLS) if( ${${project}_TABLEGEN} STREQUAL "${target}" ) - set(${project}_TABLEGEN_EXE "${LLVM_NATIVE_BUILD}/bin/${target}") + if (NOT CMAKE_CONFIGURATION_TYPES) + set(${project}_TABLEGEN_EXE "${LLVM_NATIVE_BUILD}/bin/${target}") + else() + set(${project}_TABLEGEN_EXE "${LLVM_NATIVE_BUILD}/Release/bin/${target}") + endif() set(${project}_TABLEGEN_EXE ${${project}_TABLEGEN_EXE} PARENT_SCOPE) add_custom_command(OUTPUT ${${project}_TABLEGEN_EXE} -- 2.34.1