[cfe-dev] Building Clang with Visual Studio 2010 Express

Manuel Klimek klimek at google.com
Fri Jun 8 15:48:15 PDT 2012


On Fri, Jun 8, 2012 at 8:36 PM, Krunal Rao <krunal.rao78 at gmail.com> wrote:

> On 17 May 2012 10:03, Manuel Klimek <klimek at google.com> wrote:
>
>> On Mon, May 14, 2012 at 7:51 PM, Krunal Rao <krunal.rao78 at gmail.com>
>> wrote:
>> > Hi,
>> >
>> > I some questions/observations on building Clang v 3.0 (and LLVM 3.0),
>> > unmodified website sources with Visual Studio 2010 Express.
>> >
>> > 1. I followed the instructions on:
>> > http://clang.llvm.org/get_started.html , installed the required
>> > software (cmake, python, gnuwin32), updated the PATH environmental
>> > variable and launched:
>> > C:\Users\XXX\prj\llvm-3.0\build>cmake -G "Visual Studio 10"
>> > -DCMAKE_INSTALL_PREFIX=C:\Users\XXX\prj\llvm-3.0\llvm-3.0.install
>> > ..\llvm-3.0.src
>> > (the result is reported at the end of the e-mail in case it helps).
>> > LVVM.sln is correctly generated.
>> > Opening it with Visual Studio 2010 Express results in a problem: some
>> > projects (Clang executables, Clang libraries, ...) are unavailable as
>> > "Solution Folders are unsupported in this version."
>> > I can still compile clang and ALL_BUILD fine, so it may be worth
>> > adding a notice on the getting started webpage.
>>
>> By the way, you can now switch off using solution folders in cmake
>> with -DLLVM_USE_FOLDERS=OFF
>>
>> Cheers,
>> /Manuel
>
>
> I just downloaded Clang 3.1 and it seems that this option is gone, is an
> alternative available to avoid the solution folders?
>

If I'm not mistaken, the patch landed after 3.1 was cut. You can simply
patch this in yourself:
--- llvm/trunk/CMakeLists.txt 2012/05/07 19:38:40 156319
+++ llvm/trunk/CMakeLists.txt 2012/05/09 15:10:54 156472
@@ -15,7 +15,10 @@

set(PACKAGE_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}svn")

-set_property(GLOBAL PROPERTY USE_FOLDERS ON)
+option(LLVM_USE_FOLDERS "Enable solution folders in Visual Studio. Disable
for Express versions." ON)
+if ( LLVM_USE_FOLDERS )
+ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
+endif()

include(VersionFromVCS)

Cheers,
/Manuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120609/f7b6565d/attachment.html>


More information about the cfe-dev mailing list