Re: [CMake] Problems with coverage on OS X Server

2012-03-25 Thread P. Martin
Check your SDK version if you are on Lion or Mt. Lion.
On 10.8, Mt. Lion, you should be using XCode-4.4.
For Lion 10.7.3, this is what I have as of March 25, 2012:

$ xcodebuild -version
Xcode 4.3.2
Build version 4E2002

gcov (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.9.00)
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) 
(LLVM build 2336.9.00)
Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn)

If you build llvm from llvm.org head, you will get llvm-cov,
$ /usr/local/bin/llvm-cov --version
LLVM (http://llvm.org/):
  LLVM version 3.1svn
  Optimized build with assertions.
  Built Mar 23 2012 (21:05:05).
  Default target: x86_64-apple-darwin11.3.0
  Host CPU: corei7


To compile dlrdave-SmallAndFast using clang for coverage:

export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
export CFLAGS='-O0 --coverage'
export CXXFLAGS='-O0 --coverage'
mkdir build
cd build
cmake -DCMAKE_VERBOSE_MAKEFILE=ON ..
make
./echoargs
gcov -o CMakeFiles/echoargs.dir/echoargs.c.gcda ../echoargs.c
llvm-cov -gcda=CMakeFiles/echoargs.dir/echoargs.c.gcda 
-gcno=CMakeFiles/echoargs.dir/echoargs.c.gcno 


I probably got this all wrong, but there it is.  Some notes:
  It didn't like my -march=native for a cflag with clang.
  I couldn't try compile the simple test with clang HEAD --coverage,
due to missing symbols for x86_64, which is annoying:
error log =  https://gist.github.com/2198932
  It didn't work with llvm-gcc-4.2.1 (2336.9) even if I added a
 target_link_library(echoargs /usr/lib/libprofile_rt.a)

I guess there's a bug in that version of llvm-gcc, but ttwagos. I'm a n00b.
--

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


Re: [CMake] Triggers for isysroot

2012-03-12 Thread P. Martin
On Mar 11, 2012, Michael Wild them...@gmail.com wrote: 
 
 I think it depends on what you set it to. If it's the default SDK, it
 doesn't get included. It could also be that the
 CMAKE_OSX_DEPLOYMENT_TARGET variable plays into this.
 
 Sadly, my Mac died quiet some time ago, so I can't check right now...
 
 Michael


Thank you for the reply.  I'm off to wipe and reinstall because there
have been three xcodes and three os versions in as many months.
I have to get a baseline.

But on this topic, I'm hypothesizing that there are well defined cases,
when compiling for one architecture, that the sysroot path will get added.

I think the sysroot path is attached somehow to -arch x86_64, but I'm
just not up to reading the source today.  I was hoping this would be an
easy answer.  The failure I'm trying to simplify to a reproducible case
has only two CXX_FLAGS out of twenty that I can't locate their origin.

  -arch x86_64 -isysroot /some/path/to/an/sdk

In the failing software, there is no CMAKE_OSX_DEPLOYMENT_TARGET
specified to be used or set in the command, but I will look harder in case
I missed it.  Thanks for your suggestion.
--

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


Re: [CMake] Triggers for isysroot

2012-03-11 Thread P. Martin

On Mar 11, 2012, Michael Wild them...@gmail.com wrote: 
 On 03/11/2012 07:46 AM, P. Martin wrote:
  In CMake 2.8.7 on Lion, is there anything that would trigger -isysroot
  to appear in flags.make for a cxx program when there is no code by the
  devs to specifically add a -isysroot?  Thanks.
 
 
 Yes, the CMAKE_OSX_SYSROOT in the cache does that.
 
 Michael


I made a hello world program in c++, building in a CMake project.
That variable gets defined during cmake.  It does not trigger the
inclusion of -isysroot /some/path/to/an/sdk in flags.make.
Thank you for your reply.
--

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


[CMake] Triggers for isysroot

2012-03-10 Thread P. Martin
In CMake 2.8.7 on Lion, is there anything that would trigger -isysroot
to appear in flags.make for a cxx program when there is no code by the
devs to specifically add a -isysroot?  Thanks.
--

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