James Bigler | 1 Oct 01:42 2010
Picon

Stopping the VS build when configure fails

Is CMake supposed to stop the VS build when configure fails?

1>CMake Error in samples/traversal/CMakeLists.txt:
1>  Cannot find source file "traversal.c".  Tried extensions .c .C .c++ .cc
1>  .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx
1>-- Build files have been written to: C:/code/rtsdk/rtmain/build-64-vs9-c30
1>Project : error PRJ0019: A tool returned an error code from "Checking Build System"
1>Build log was saved at "file://c:\code\build-64-vs9-c30\ZERO_CHECK.dir\Release\BuildLog.htm"
1>ZERO_CHECK - 1 error(s), 0 warning(s)
2>------ Build started: Project: ggg, Configuration: Release x64 ------
3>------ Build started: Project: rrr, Configuration: Release x64 ------
2>Compiling...

I'm currently using VS 2008 64 bit with CMake 2.6.3.

_______________________________________________
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
James Bigler | 1 Oct 01:47 2010
Picon

Re: Stopping the VS build when configure fails

On Thu, Sep 30, 2010 at 5:42 PM, James Bigler <jamesbigler-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

I'm currently using VS 2008 64 bit with CMake 2.6.3.

This also happens with 2.8.3 RC1.

James
_______________________________________________
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
John Drescher | 1 Oct 02:25 2010
Picon

Re: Stopping the VS build when configure fails

On Thu, Sep 30, 2010 at 7:47 PM, James Bigler <jamesbigler@...> wrote:
> On Thu, Sep 30, 2010 at 5:42 PM, James Bigler <jamesbigler@...> wrote:
>>
>> I'm currently using VS 2008 64 bit with CMake 2.6.3.
>
> This also happens with 2.8.3 RC1.
>
That is good. I would be worried if it did not. The error means a file
(traversal.c) is missing in your source or at least not in the folder
that CMake is expecting.

John
_______________________________________________
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

John Drescher | 1 Oct 02:26 2010
Picon

Re: Stopping the VS build when configure fails

On Thu, Sep 30, 2010 at 7:42 PM, James Bigler <jamesbigler@...> wrote:
> Is CMake supposed to stop the VS build when configure fails?
>

Yes.

John
_______________________________________________
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

Karl Wallner | 1 Oct 02:49 2010
Picon

Inherited AdditionalIncludeDirectories wrong for VS 2010 IDE build

Hi All,

using cmake for a quite big project (with several sub-projects, some macros, find modules etc.) sometimes
.vcxproj 
contains output like this:
>  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
>     <ClCompile>
>       <AdditionalOptions> /Zm1000 /bigobj %(AdditionalOptions)</AdditionalOptions>
>       <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
>       <AdditionalIncludeDirectories>... LOTS OF INCLUDES ... /include</AdditionalIncludeDirectories>
>       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
The problem is the second AdditionalIncludeDirectories not containing the final "%(AdditionalIncludeDirectories)".
Inside VS (Properties -> Configuration Properties -> C/C++ -> Additional Include Directories) this results
in the checkbox for "Inherit from parent of project defaults" being unchecked and so the includes are not
used. If you would check this checkbox, everything would work - but is a dissatisfying solution.

I tried hard to reproduce this error in a smaller example, but failed. I couldn't reproduce it, but I could
fix it:
------------ SNIP ---------------------
diff -r -c \
cmake-2.8.2.orig/Source/cmVisualStudioGeneratorOptions.cxx cmake-2.8.2/Source/cmVisualStudioGeneratorOptions.cxx
*** cmake-2.8.2.orig/Source//cmVisualStudioGeneratorOptions.cxx 2010-06-28 17:15:59.000000000 +0200
--- cmake-2.8.2/Source//cmVisualStudioGeneratorOptions.cxx      2010-10-01 02:46:57.677851800 +0200
***************
*** 251,257 ****
           {
           fout << "<" << m->first << ">";
           }
!       fout  << m->second << "</" << m->first << ">\n";
         }
       }
     else
--- 251,261 ----
           {
           fout << "<" << m->first << ">";
           }
!         fout  << m->second;
!         if (m->first == "AdditionalIncludeDirectories") {
!               fout  << ";%(AdditionalIncludeDirectories)";
!         }
!         fout  << "</" << m->first << ">\n";
         }
       }
     else

------------ SNIP ---------------------

I guess this is a bad fix (ugly hack, wrong place). Maybe somebody is able to explain/guess what might be
wrong with my 
CMake-Files or to correctly fix this issue.

Regards,

Karl

_______________________________________________
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

Philip Lowman | 1 Oct 03:44 2010

Re: CMakeDetermineVSServicePack.cmake support for vs2010

On Thu, Sep 30, 2010 at 11:04 AM, <aaron.meadows <at> thomsonreuters.com> wrote:

Done.  Issue number 11279. [http://public.kitware.com/Bug/view.php?id=11279]

 

I also noted that the script could be improved by calling the compiler with the ‘/?’ switch and parsing it’s output instead of parsing the output from try_compile’ing a simple c file it writes.  That would make it quite a bit faster.


Aaron,

Thanks for the patch. I've pushed it to git next.
Regarding your idea to use the output of "cl /?" to determine the version number, I think it is a good one. If you have time to rewrite the module to do this instead and test it I would merge the changes for a future version of CMake.

Some potential issues.
1. "cl /?" appears to pause waiting for input, this would have to be mitigated somehow in a safe way or perhaps just "cl" could be executed as that appears to include the output.
2. "cl" or "cl /?" output would have to be verified on VS8 to ensure it outputs there as well (it appears to be there in VS9/Express)
3. You couldn't just run "cl", you would have to find out the CMake variable for the compiler and run that.

My time is really limited. If you're interested, please create a new ticket and submit a patch. It would save probably at least a second off of an initial configure.

--
Philip Lowman
_______________________________________________
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
Rolf Eike Beer | 1 Oct 08:21 2010
Picon

Re: Stopping the VS build when configure fails

Am Friday 01 October 2010 schrieb John Drescher:
> On Thu, Sep 30, 2010 at 7:47 PM, James Bigler <jamesbigler@...> wrote:
> > On Thu, Sep 30, 2010 at 5:42 PM, James Bigler
<jamesbigler@...> 
wrote:
> >> I'm currently using VS 2008 64 bit with CMake 2.6.3.
> > 
> > This also happens with 2.8.3 RC1.
> 
> That is good. I would be worried if it did not. The error means a file
> (traversal.c) is missing in your source or at least not in the folder
> that CMake is expecting.

As you can see from James' log CMake did in fact _not_ stop the build but 
continued building even if there was an error in generating. And: yes, I have 
seen MSVC builds e.g. running through "INSTALL" even if one of the projects 
before failed to build.

Eike
_______________________________________________
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
David Aldrich | 1 Oct 10:35 2010
Picon

Error finding boost libraries

Hi
 
The following command is not working for me:
 
find_package( Boost 1.40.0 COMPONENTS python REQUIRED )
 
I get error:
 
CMake Error at CMakeLists.txt:36 (find_package):
  Could not find module FindBoostLibs.cmake or a configuration file for
  package BoostLibs.
 
I am running CMake 2.8.2, which contains ‘FindBoost.cmake’ (NOT FindBoostLibs.cmake).
 
Is this a known problem?
Best regards
David
 
_______________________________________________
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
fatman | 1 Oct 10:50 2010
Picon

Re: CMake Digest, Vol 77, Issue 104


> Date: Wed, 29 Sep 2010 03:14:57 +0200
> From: Michael Hertling <mhertling@...>
> Subject: Re: [CMake] How to set compiler flags?
> To: cmake@...
> Message-ID: <4CA29311.1050909@...>
> Content-Type: text/plain; charset=ISO-8859-1
> 
> > [...] So I now use add_definitions instead:
> > 
> > add_definitions( "-Wall -m64 -O3" )
> > 
> > Is there a better way of doing this?
> 
> Don't do this at all, and adhere to the flags.
> 

Interesting - I've been doing this:

if(CMAKE_BUILD_TYPE EQUAL Debug)
   set(CMAKE_CXX_FLAGS -Wno-long-long -Wno-comment -Wwrite-strings
-std=c++0x -pedantic-errors -pedantic -Wall -W -g -gdwarf-2 -Weffc++
-Wmain -Wextra)
else(CMAKE_BUILD_TYPE EQUAL Debug)
   set(CMAKE_CXX_FLAGS -s etc)
endif(CMAKE_BUILD_TYPE EQUAL Debug)

because it never occurred to me to do it another way.

Is this wrong too?

Regards,
Adam J Richardson
_______________________________________________
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

Michael Wild | 1 Oct 11:05 2010
Picon

Re: How to set compiler flags?


On 1. Oct, 2010, at 10:50 , fatman@... wrote:

> 
>> Date: Wed, 29 Sep 2010 03:14:57 +0200
>> From: Michael Hertling <mhertling@...>
>> Subject: Re: [CMake] How to set compiler flags?
>> To: cmake@...
>> Message-ID: <4CA29311.1050909@...>
>> Content-Type: text/plain; charset=ISO-8859-1
>> 
>>> [...] So I now use add_definitions instead:
>>> 
>>> add_definitions( "-Wall -m64 -O3" )
>>> 
>>> Is there a better way of doing this?
>> 
>> Don't do this at all, and adhere to the flags.
>> 
> 
> Interesting - I've been doing this:
> 
> if(CMAKE_BUILD_TYPE EQUAL Debug)
>   set(CMAKE_CXX_FLAGS -Wno-long-long -Wno-comment -Wwrite-strings
> -std=c++0x -pedantic-errors -pedantic -Wall -W -g -gdwarf-2 -Weffc++
> -Wmain -Wextra)
> else(CMAKE_BUILD_TYPE EQUAL Debug)
>   set(CMAKE_CXX_FLAGS -s etc)
> endif(CMAKE_BUILD_TYPE EQUAL Debug)
> 
> because it never occurred to me to do it another way.
> 
> Is this wrong too?
> 
> Regards,
> Adam J Richardson

The problem with this is that the cache makes the promise to the user that he can change the flags and you break it.

Michael

--
There is always a well-known solution to every human problem -- neat, plausible, and wrong.
H. L. Mencken

_______________________________________________
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

Gmane