Re: [CMake] Nina Generator on Windows generates too long link cmd lines

2012-06-04 Thread Peter Kuemmel

 Original-Nachricht 
> Datum: Mon, 4 Jun 2012 08:19:55 +0200
> Von: Claus Klein 
> An: "Peter Kümmel" 
> CC: CMake@cmake.org
> Betreff: Re: [CMake] Nina Generator on Windows generates too long link cmd 
> lines

> Yes, at least the old Darwin ar does not support this option!
> 
> claus-kleins-macbook-pro:ninja clausklein$ /usr/bin/ar -h
> usage:  ar -d [-TLsv] archive file ...
>   ar -m [-TLsv] archive file ...
>   ar -m [-abiTLsv] position archive file ...
>   ar -p [-TLsv] archive [file ...]
>   ar -q [-cTLsv] archive file ...
>   ar -r [-cuTLsv] archive file ...
>   ar -r [-abciuTLsv] position archive file ...
>   ar -t [-TLsv] archive [file ...]
>   ar -x [-ouTLsv] archive [file ...]
> claus-kleins-macbook-pro:ninja clausklein$
> 
> I think, solaris and BSD will have the same version, but not sure.

OK. The easiest way to fix this is to check if the argument list is 
too long for the command line, then on Unix/Linux very seldom a 
response is needed (I assume ATM never a response file is used on Unix).
Or even simpler, lets disable response file support on non-Windows systems.

> 
> This future needs a runtime test, IMO

Yes! Let's test the future ;)

> 
> Claus
> 
> On 03.06.2012, at 22:55, Peter Kümmel wrote:
> 
> > On 03.06.2012 01:02, Claus Klein wrote:
> >> Hi Peter,
> >>
> >> after a quick test with our code, I found again the problem with unix
> >> ar utile for static libs. it does not support a linker response file!
> >
> > Are you sure? Here (Ubuntu) ar lists @ as option.
> >
> >>
> >> And is is not clear to me who sets this cache values:
> >> CMAKE_CXX_RESPONSE_FILE_LINK_FLAG:STRING=-Wl,@
> >> CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS:BOOL=TRUE
> >> CMAKE_C_RESPONSE_FILE_LINK_FLAG:STRING=-Wl,@
> >> CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS:BOOL=TRUE
> >
> > In the depths of the macro files interpreted at runtime.
> > You have to search for the strings in ...\CMake 2.8\share\cmake-2.8
> >
> >>
> >> I have found a problem if ninja is not at a std path installed. So  
> >> the
> >> rules.ninja files should use the absolute path to ninja executable.
> >>
> >> Here my final Version.
> >>
> >> Claus
> >>
> > --
> >
> > 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
> 
-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
--

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] How to install a single object file?

2012-06-04 Thread Martin Weber

Greetings,

I want to compile a single object file from C source and want to finally 
install it.

I know how to compile the source by adding it to a dummy ADD_EXECUTABLE.
But how do I get the object file's name for use in an INSTALL?

TIA,
 Martin

--
E-Mails sollten Text sein, Text und nur Text.
Wenn Gott gewollt hätte, dass E-Mails in HTML geschrieben würden,
endeten Gebete traditionell mit .
--

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] Nina Generator on Windows generates too long link cmd lines

2012-06-04 Thread Bill Hoffman
We are you using the linker support for response files?  I thought ninja 
was handling this with its own response files?



rspfile, rspfile_content
rule link
  command = link.exe /OUT$out [usual link flags here] @$out.rsp
  rspfile = $out.rsp
  rspfile_content = $in

Seems like command could be anything at all.

   command = foobar $out bunch of stuff  @$out.rsp

Also, perhaps we should move this to the cmake-developers list?  Are you 
both on that list?


-Bill
--

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] Using cmake to compile mixed C++ and Fortran code

2012-06-04 Thread Bill Hoffman

On 6/2/2012 8:26 AM, Shipeng Shu wrote:

Hi, I'm writing a C++ code but I want to also use some of the Fortran
code that has been previously tested.
And I'm new to cmake.

My CmakeList.txt looks like this:

PROJECT (IRR CXX Fortran)
ENABLE_LANGUAGE(Fortran)

SET(SRC_LIST demo.cpp global.cpp global_variables.cpp init_config.cpp
input.cpp irr.cpp output.cpp ./src_tools/rng.cpp global.h
global_variables.h init_config.h input.h irr.h ./src_tools/nr3.h
output.h ./src_tools/rng.h ./src_tools/vector3.h
./src_tools/tool_output.h ./src_tools/tools.cpp ./src_tools/tools.h
./src_tools/timer.h ./src_tools/timer.cpp ./src_tools/difconnector.h)
SET(SRC_FORTRAN_LIST ./src_tools/difquat.f ./src_tools/fourn.f)

SET(CMAKE_CXX_FLAGS "-O3 -ip")
ADD_EXECUTABLE(irr.x ${SRC_LIST} ${SRC_FORTRAN_LIST})

But the compiler gives me error information like these:


CMakeFiles/irr.x.dir/src_tools/difquat.o: In function `difquat_':
/home/spshu/9_new_KMC_code/12.irr/src_tools/difquat.f:(.text+0xc4):
undefined reference to `for_write_seq_lis'
/home/spshu/9_new_KMC_code/12.irr/src_tools/difquat.f:(.text+0xef):
undefined reference to `for_write_seq_lis_xmit'
/home/spshu/9_new_KMC_code/12.irr/src_tools/difquat.f:(.text+0x159):
undefined reference to `for_open'
/home/spshu/9_new_KMC_code/12.irr/src_tools/difquat.f:(.text+0x1cc):
undefined reference to `for_open'
/home/spshu/9_new_KMC_code/12.irr/src_tools/difquat.f:(.text+0x214):
undefined reference to `for_read_seq_lis'
/home/spshu/9_new_KMC_code/12.irr/src_tools/difquat.f:(.text+0x24e):
undefined reference to `for_close'
/home/spshu/9_new_KMC_code/12.irr/src_tools/difquat.f:(.text+0xb94):
undefined reference to `for_write_seq_fmt'
/home/spshu/9_new_KMC_code/12.irr/src_tools/difquat.f:(.text+0xbb9):
undefined reference to `for_write_seq_fmt_xmit'


It seems to me that I need some Fortran library, but I think Cmake
should have include them since I enabled Fortran. I'm confused about it.

Could you please tell me why I get all these things?

How should I modify the CmakeList.txt to get things work?




Looks like you are not linking all the libraries you are using or you 
left source code out of the project.  Where does this symbol come from: 
for_write_seq_fmt_xmit


-Bill
--

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] (missing: BZIP2_LIBRARIES) (found version "1.0.6")??

2012-06-04 Thread Dave Abrahams

on Sun Jun 03 2012, Peter Kümmel  
wrote:

> On 03.06.2012 02:05, Dave Abrahams wrote:
>>
>> /tmp/qb/build/CMakeFiles/CMakeCCompiler.cmake(50):  
>> SET(CMAKE_C_IMPLICIT_LINK_DIRECTORIES  )
>>
>
> Somehow the complete search patch is empty, it should look like this:
>
> CMakeFiles/CMakeCCompiler.cmake(50):
> SET(CMAKE_C_IMPLICIT_LINK_DIRECTORIES
> /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2;/usr/lib/x86_64-linux-gnu
> )
>
> Do you run a plain stock Ubuntu 12.04?

Yes.  But this is a known bug
http://public.kitware.com/Bug/view.php?id=12049 as I mentioned in an
earlier message, with a known workaround.  So, problem "solved."

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

--

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] CMAKE_SUPPRESS_REGENERATION in VS2010

2012-06-04 Thread Ben Medina
This works for me with CMake 2.8.8 and VS2010. I have this in my CMakeCache.txt:

CMAKE_SUPPRESS_REGENERATION:BOOL=ON

And the ZERO_CHECK target does not appear.

Which version of CMake are you using? I vaguely recall that this
feature was broken a few releases back.

- Ben

On Fri, Jun 1, 2012 at 8:31 AM, LaViolette, Alan
 wrote:
> I am porting our product over to use cmake vs2010 and am experiencing issues
> with the automatic regeneration (2010 does not seem to like its projects
> changing while open), so I would like to just turn it off.
>
>
>
> I have put the CMAKE_SUPPRESS_REGENERATION variable in and still get the
> ZERO_CHECK and the CMakeList.txt dependencies in the project files.  What do
> I need to get this to work.
>
>
>
> I am setting it from the command line so it is defined first thing
>
> "-DCMAKE_SUPPRESS_REGENERATION:BOOL=1"
>
>
>
> Thanks
>
>
>
> --
>
> Alan LaViolette
>
> Software Engineering Consultant
>
> OVERWATCH
>
> An Operating Unit of Textron Systems
>
> 21660 Ridgetop Circle, Suite 110
>
> Sterling, VA 20166
>
> Office: (703) 437-7651 x 2419
>
> Fax: (703) 437-0039
>
> alaviole...@overwatch.textron.com
>
> www.overwatch.com
>
>
>
> "WARNING: Documents that can be viewed, printed or retrieved from this
> E-Mail may contain technical data whose export is restricted by the Arms
> Export Control Act (Title 22, U.S.C., Sec 2751, et seq,) or the Export
> Administration Act of 1979, as amended, Title 50, U.S.C., App. 2401 et seq.
> and which may not be exported, released or disclosed to non-U.S. persons
> (i.e. persons who are not U.S. citizens or lawful permanent residents
> [“green card” holders]) inside or outside the United States, without first
> obtaining an export license.  Violations of these export laws are subject to
> severe civil, criminal and administrative penalties."
>
>
>
>
> --
>
> 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


Re: [CMake] (missing: BZIP2_LIBRARIES) (found version "1.0.6")??

2012-06-04 Thread Peter Kümmel

On 04.06.2012 18:37, Dave Abrahams wrote:


on Sun Jun 03 2012, Peter Kümmel  
wrote:


On 03.06.2012 02:05, Dave Abrahams wrote:


/tmp/qb/build/CMakeFiles/CMakeCCompiler.cmake(50):  
SET(CMAKE_C_IMPLICIT_LINK_DIRECTORIES  )



Somehow the complete search patch is empty, it should look like this:

CMakeFiles/CMakeCCompiler.cmake(50):
SET(CMAKE_C_IMPLICIT_LINK_DIRECTORIES
/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2;/usr/lib/x86_64-linux-gnu
)

Do you run a plain stock Ubuntu 12.04?


Yes.  But this is a known bug
http://public.kitware.com/Bug/view.php?id=12049 as I mentioned in an
earlier message, with a known workaround.  So, problem "solved."



OK, but I can't reproduce it on Ubuntu 12.04 64bit,
so I thought it must be something else-

Peter
--

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] Nina Generator on Windows generates too long link cmd lines

2012-06-04 Thread Peter Kümmel

On 04.06.2012 17:59, Bill Hoffman wrote:

We are you using the linker support for response files?  I thought ninja
was handling this with its own response files?


rspfile, rspfile_content
rule link
command = link.exe /OUT$out [usual link flags here] @$out.rsp
rspfile = $out.rsp
rspfile_content = $in

Seems like command could be anything at all.

 command = foobar $out bunch of stuff  @$out.rsp

Also, perhaps we should move this to the cmake-developers list?  Are you
both on that list?



I've answered on the the devel list.



-Bill
--

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


Re: [CMake] (missing: BZIP2_LIBRARIES) (found version "1.0.6")??

2012-06-04 Thread Dave Abrahams

on Mon Jun 04 2012, Peter Kümmel  
wrote:

> On 04.06.2012 18:37, Dave Abrahams wrote:
>>
>> on Sun Jun 03 2012, Peter 
>> Kümmel  wrote:
>>
>>> On 03.06.2012 02:05, Dave Abrahams wrote:

>
 /tmp/qb/build/CMakeFiles/CMakeCCompiler.cmake(50):  
 SET(CMAKE_C_IMPLICIT_LINK_DIRECTORIES  )

>>>
>>> Somehow the complete search patch is empty, it should look like this:
>>>
>>> CMakeFiles/CMakeCCompiler.cmake(50):
>>> SET(CMAKE_C_IMPLICIT_LINK_DIRECTORIES
>>> /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2;/usr/lib/x86_64-linux-gnu
>>> )
>>>
>>> Do you run a plain stock Ubuntu 12.04?
>>
>> Yes.  But this is a known bug
>> http://public.kitware.com/Bug/view.php?id=12049 as I mentioned in an
>> earlier message, with a known workaround.  So, problem "solved."
>>
>
> OK, but I can't reproduce it on Ubuntu 12.04 64bit,
> so I thought it must be something else-

Oh, now that's odd.  I wonder why it isn't working for me?

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

--

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] CMAKE_SUPPRESS_REGENERATION in VS2010

2012-06-04 Thread LaViolette, Alan
I have 2.8.8.  and I see the same line in my CMakeCache.txt.  



-Original Message-
From: Ben Medina [mailto:ben.med...@gmail.com] 
Sent: Monday, June 04, 2012 12:47 PM
To: LaViolette, Alan
Cc: cmake@cmake.org
Subject: Re: [CMake] CMAKE_SUPPRESS_REGENERATION in VS2010

This works for me with CMake 2.8.8 and VS2010. I have this in my CMakeCache.txt:

CMAKE_SUPPRESS_REGENERATION:BOOL=ON

And the ZERO_CHECK target does not appear.

Which version of CMake are you using? I vaguely recall that this
feature was broken a few releases back.

- Ben

On Fri, Jun 1, 2012 at 8:31 AM, LaViolette, Alan
 wrote:
> I am porting our product over to use cmake vs2010 and am experiencing issues
> with the automatic regeneration (2010 does not seem to like its projects
> changing while open), so I would like to just turn it off.
>
>
>
> I have put the CMAKE_SUPPRESS_REGENERATION variable in and still get the
> ZERO_CHECK and the CMakeList.txt dependencies in the project files.  What do
> I need to get this to work.
>
>
>
> I am setting it from the command line so it is defined first thing
>
> "-DCMAKE_SUPPRESS_REGENERATION:BOOL=1"
>
>
>
> Thanks
>
>
>
> --
>
> Alan LaViolette
>
> Software Engineering Consultant
>
> OVERWATCH
>
> An Operating Unit of Textron Systems
>
> 21660 Ridgetop Circle, Suite 110
>
> Sterling, VA 20166
>
> Office: (703) 437-7651 x 2419
>
> Fax: (703) 437-0039
>
> alaviole...@overwatch.textron.com
>
> www.overwatch.com
>
>
>
> "WARNING: Documents that can be viewed, printed or retrieved from this
> E-Mail may contain technical data whose export is restricted by the Arms
> Export Control Act (Title 22, U.S.C., Sec 2751, et seq,) or the Export
> Administration Act of 1979, as amended, Title 50, U.S.C., App. 2401 et seq.
> and which may not be exported, released or disclosed to non-U.S. persons
> (i.e. persons who are not U.S. citizens or lawful permanent residents
> ["green card" holders]) inside or outside the United States, without first
> obtaining an export license.  Violations of these export laws are subject to
> severe civil, criminal and administrative penalties."
>
>
>
>
> --
>
> 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


[CMake] build location when using Xcode generator

2012-06-04 Thread James Walker
Hi, I am new to CMake and trying to get started on the Smartbody project 
(http://smartbody.ict.usc.edu/).  The project was set up to use the Unix 
makefiles generator, but I switched it to Xcode because that's more 
familiar to me.  However, the executable is not going where it's 
supposed to.  In CMakeLists.txt, it says


install(

TARGETS ${EXEC_LIST}
RUNTIME DESTINATION core/smartbody/sbm/bin
)

but when I look in the Xcode build settings for the target, the path 
core/smartbody/sbm/bin is not present under Build Locations or 
Installation Directory or anywhere else.  Any suggestions?


(In case it matters: OS X 10.6.8, Xcode 3.2.6, CMake 2.8.8)
--
  James W. Walker, Innoventive Software LLC
  
--

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] build location when using Xcode generator

2012-06-04 Thread David Cole
On Mon, Jun 4, 2012 at 3:26 PM, James Walker wrote:

> Hi, I am new to CMake and trying to get started on the Smartbody project (
> http://smartbody.ict.usc.edu/**).  The project was set up to use the Unix
> makefiles generator, but I switched it to Xcode because that's more
> familiar to me.  However, the executable is not going where it's supposed
> to.  In CMakeLists.txt, it says
>
> install(
>
>TARGETS ${EXEC_LIST}
>RUNTIME DESTINATION core/smartbody/sbm/bin
> )
>
> but when I look in the Xcode build settings for the target, the path
> core/smartbody/sbm/bin is not present under Build Locations or Installation
> Directory or anywhere else.  Any suggestions?
>
> (In case it matters: OS X 10.6.8, Xcode 3.2.6, CMake 2.8.8)
> --
>  James W. Walker, Innoventive Software LLC
>  
> --
>
> 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
>


Your path should appear in the file "cmake_install.cmake" which is run as a
CMake -P script when you build the install target.

Do the files appear in the expected location after building the install
target?


HTH,
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

Re: [CMake] (missing: BZIP2_LIBRARIES) (found version "1.0.6")??

2012-06-04 Thread Peter Kümmel

On 04.06.2012 21:13, Dave Abrahams wrote:


OK, but I can't reproduce it on Ubuntu 12.04 64bit,
so I thought it must be something else-


Oh, now that's odd.  I wonder why it isn't working for me?



I've not tested on Ubuntu but LinuxMint 13, but I think that
should make no difference.

If you have the time, maybe it's better to start from scratch.
Attached the CMakeLists.txt which I've used.
It produces this output in an empty build folder
(after apt-get install libbz2-dev):

-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found BZip2: /usr/lib/x86_64-linux-gnu/libbz2.so
-- Looking for BZ2_bzCompressInit in /usr/lib/x86_64-linux-gnu/libbz2.so
-- Looking for BZ2_bzCompressInit in /usr/lib/x86_64-linux-gnu/libbz2.so - found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/synth/sandbox/cmake/test

If you don't have a this output I will also set up a Ubuntu 12.04 and see what 
happens.

Peter
cmake_minimum_required(VERSION 2.8)
Find_PACKAGE(BZip2 REQUIRED)

--

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] build location when using Xcode generator

2012-06-04 Thread James Walker

On 6/4/2012 12:35 PM, David Cole wrote:

On Mon, Jun 4, 2012 at 3:26 PM, James Walker mailto:jam...@frameforge3d.com>> wrote:


Hi, I am new to CMake and trying to get started on the Smartbody
project (http://smartbody.ict.usc.edu/ ).  The project was set up to
use the Unix makefiles generator, but I switched it to Xcode because
that's more familiar to me.  However, the executable is not going
where it's supposed to.  In CMakeLists.txt, it says

install(

TARGETS ${EXEC_LIST}
RUNTIME DESTINATION core/smartbody/sbm/bin
)

but when I look in the Xcode build settings for the target, the path
core/smartbody/sbm/bin is not present under Build Locations or
Installation Directory or anywhere else.  Any suggestions?

(In case it matters: OS X 10.6.8, Xcode 3.2.6, CMake 2.8.8)




Your path should appear in the file "cmake_install.cmake" which is run
as a CMake -P script when you build the install target.

Do the files appear in the expected location after building the install
target?



Aha, you're right.  I hadn't even noticed that there was an install 
target, I just expected the executable target to put the executable in 
the right place.  Thanks!



--
  James W. Walker, Innoventive Software LLC
  
--

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] choosing specific version of a library with find_package (i.e. choosing macports in /opt/local over system default in /usr)

2012-06-04 Thread Natalie Tasman
I'm writing a CMakeLists.txt file, and I'm having problems getting
find_package to choose libraries under /opt/local rather than
/usr/local.  Specifically, I've installed libarchive using macports
and CMake cannot find it.  When CMake configuration finds the the
library in /usr/lib (/usr/lib/libarchive.dylib) but no corresponding
header, it fails, and I would like to find a way to tell CMake to fall
back to /opt/local, where a version of the library as well as the
archive.h header is installed.

I'm new to CMake, and I've spent some time researching this question
on google, stackoverflow, and recent archives for this list.  It seems
like a situation that would come up often but I haven't found a
solution that works for me yet.  I have the most recent versions of
CMake (binary install) and macports on my system.  macports packages
are found under /opt/local.  I am glad to try to solve the problem and
contribute changes to CMake, but I'm guessing there is some easier
way.

Solutions tried I've so far: Based on other related posts, I've tried
things like declaring INCLUDE_DIRECTORIES(/opt/local/include) and
LINK_DIRECTORIES(/opt/local/lib), with BEFORE, SYSTEM, and BEFORE
SYSTEM, but /opt/local doesn't seem to be searched.  Also I've tried
set(CMAKE_LIBRARY_PATH /opt/local/lib ${CMAKE_LIBRARY_PATH}) and
set(CMAKE_INCLUDE_PATH /opt/local/include ${CMAKE_INCLUDE_PATH}), also
without results.  The find_package file for libarchive
(cmake-2.8/Modules/FindLibarchive.cmake) does not seem to make use of
HINT, nor hardcode /opt/local (as seen in the corresponding boost
file, for example.)



Thanks in advance,

Natalie
--

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