It doesn't *recommend* running cmake in-source. It is just that the
instructions are written that way. When generating VS solution files,
building in-source is not a problem. It is when generating makefiles, as
the generated makefiles will overwrite those provided with LLVM's
sources.
Ah, yes, you're right. Thanks!
cmake will generate makefiles if you wish. Just use this command:
cmake -G "NMake Makefiles"
but then you should use a different directory for the build.
*nods* Or just omitting the argument and taking the default settings
also works, provided you're in a different directory.
Suppossing that you have the LLVM source code in c:/llvm, do you have
c:/llvm/tools/clang/CMakeLists.txt
?
If that is not present, most likely your clang setup is wrong. The LLVM
cmake build test for the presence of the above file and, if found,
automatically builds clang. If the test fails, clang is ignored.
Ah, that was the problem, I had a directory called clang-2.7. Renamed
it to clang and the whole thing works fine, generating clang.exe that
runs on a small C program and produces x86 assembler output that looks
correct to eyeball inspection.
One small surprise/oddity:
C:\d\l\bin>dir cl*
Volume in drive C is OS
Volume Serial Number is 0422-C2D0
Directory of C:\d\l\bin
20/03/2010 21:11 30,767,616 clang++.exe
20/03/2010 21:11 30,767,616 clang.exe
20/03/2010 21:09 663 clang.exe.embed.manifest
20/03/2010 21:09 728 clang.exe.embed.manifest.res
20/03/2010 21:09 621 clang.exe.intermediate.manifest
20/03/2010 21:07 101 clang.exe.resource.txt
20/03/2010 21:11 81,173,048 clang.ilk
20/03/2010 21:11 137,416,704 clang.pdb
8 File(s) 280,127,097 bytes
0 Dir(s) 6,769,586,176 bytes free
C:\d\l\bin>fc/b clang.exe clang++.exe
Comparing files clang.exe and CLANG++.EXE
FC: no differences encountered
Is this intentional?