Hello,

I managed to find a workaround.

Instead of allowing CMAKE to work out the configuration and build of the  
external CMAKE project,
I just wrote a batch file (configure.bat) which would invoke "cmake" internally 
to generate the makefiles.
After that, I could use "cmake --build" command to build the external project.

With these workarounds, I was able to generate a 32-bit tool alongside 64-bit 
executables and 64-bit libraries.

Sigh of relief!! But CMAKE authors would want to look into this issue,

Thanks,
Best Regards,
Sarnath

-----Original Message-----
From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of 
Sarnath K - ERS, HCLTech
Sent: Friday, February 03, 2012 10:48 AM
To: John Drescher
Cc: cmake@cmake.org
Subject: Re: [CMake] CMAKE 2.8.5 - CMAKE_GENERATOR Bug?

Hello John,

I can +vely see this behavior with the latest 2.8.7 version as well.
I am using a windows 64-bit machine with Visual studio 2008 installed on it.

This is how I use Externa Project Add command:
"
    include(ExternalProject)
    ExternalProject_Add(
        gen
        CMAKE_GENERATOR "Visual Studio 9 2008"
        URL file://${CMAKE_SOURCE_DIR}/src/tools/gen
        INSTALL_COMMAND ""
    )
"

The CMakeLists.txt hosting this ExternalProject_Add is generated using "NMake 
Makefiles" - which uses the default 64-bit build configuration.
A verbose Makefile generation nails the issue.
The "gen" project is generated as <cmake "-G Visual Studio 9 2008"> which 
screws things up.

Can somebody please help me with this?

Thanks,
Best Regards,
Sarnath
-----Original Message-----
From: John Drescher [mailto:dresche...@gmail.com]
Sent: Thursday, February 02, 2012 11:12 PM
To: Sarnath K - ERS, HCLTech
Cc: cmake@cmake.org
Subject: Re: [CMake] CMAKE 2.8.5 - CMAKE_GENERATOR Bug?

On Thu, Feb 2, 2012 at 12:33 PM, Sarnath K - ERS, HCLTech
<k_sarn...@hcl.com> wrote:
> All,
>
>
>
> I was trying to use the external project add feature to add a 32-bit VC++
> project on a 64-bit parent build system.
>
> However, I ran into problems while compiling the 32-bit project.
>
> "devenv" used to complain "invalid solution configuration"
>
> I tried to explicitly set "CMAKE_BUILD_TYPE" using -D option as well as in
> the CMakeLists.txt.
> Nothing changed.
>
>
>
> However, when I enabled "CMAKE_VERBOSE_MAKEFILE", I found that "CMAKE" was
> "not" passing the -G option correctly.
>
> Instead of passing <cmake -G "Visual Studio 9 2008">, cmake was actually
> configuring the project as <cmake "-G Visual Studio 9 2008">
>
> (Note that -G is inside the double-quote)
>
>
>
> When I isolate the build-step and build it manually using the correct
> syntax, everything works flawlessly.
>
>
>
> Specifying the generator via "CMAKE_ARGS" helps me compile. But CMAKE still
> appends the faulty -G syntax and
>
> hence is not producing the intended results for me.
>
>
>
> If this is indeed a bug, can some one tell me:
>
> 1.    What is the temporary workaround for this?
>
> 2.    If at all fixed, how long will it take the build to come out?
>

I am not seeing this breakage. However you are 2 versions behind in cmake.

John

::DISCLAIMER::
-----------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended 
for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. 
Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the 
opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, 
distribution and / or publication of
this message without the prior written consent of the author of this e-mail is 
strictly prohibited. If you have
received this email in error please delete it and notify the sender 
immediately. Before opening any mail and
attachments please check them for viruses and defect.

-----------------------------------------------------------------------------------------------------------------------
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to