[cfe-dev] ${LLVM_TABLEGEN_EXE} lacking ${CMAKE_EXECUTABLE_SUFFIX} on Windows

Nicolas Le Gland nicolas at legland.fr
Thu Sep 22 10:49:19 PDT 2011


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?

--
Nicolas Le Gland
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CMakeLists.txt.patch
Type: application/octet-stream
Size: 761 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110922/999c4dde/attachment.obj>
-------------- next part --------------



More information about the cfe-dev mailing list