${LLVM_TABLEGEN_EXE} lacking ${CMAKE_EXECUTABLE_SUFFIX} on Windows

Hello.

I've successfully built LLVM and Clang on Windows by checking out Clang as "llvm\tools\clang":
- With Visual C++ 2008 Express using NMake Makefiles.
- With Visual C++ 2008 Professional using SLN workspace and VCPROJ project.

I've equally been able to build LLVM and Clang from two separated directories lying side by side:
- With Visual C++ 2008 Professional using SLN workspace and VCPROJ project.

However, I've been unable to build them side by side using Visual C++ 2008 Express and NMake Makefiles:

mkdir build
mkdir build\clang
mkdir build\llvm
mkdir source
svn co http://llvm.org/svn/llvm-project/llvm/trunk/ source\llvm
cd build\llvm
cmake -G "NMake Makefiles" ..\..\source\llvm
nmake
cd ..\..
svn co http://llvm.org/svn/llvm-project/cfe/trunk/ source\clang
cd build\clang
cmake -D CLANG_PATH_TO_LLVM_SOURCE=../../source/llvm -D CLANG_PATH_TO_LLVM_BUILD=../llvm -G "NMake Makefiles" ..\..\source\clang
nmake

That ended up with a fatal error, NMake looking for some "build\llvm\bin\tblgen" it doesn't know how to make, instead of using the generated "build\llvm\bin\tblgen.exe".

I was able to complete my build by adding some ${CMAKE_EXECUTABLE_SUFFIX} to ${LLVM_TABLEGEN_EXE} in "source\clang\CMakeLists.txt" like the attached patch demonstrates.

How does this sound?

CMakeLists.txt.patch (761 Bytes)

Nicolas, applied in r140360, thanks!

...Takumi aka chapuni