[CMake] Can not find test to add properties to:

2012-12-14 Thread Witold E Wolski
I am trying to build a project on a 'custom' linux machine.

When running cmake (cmake version 2.6-patch 4)
thats the error I am getting.

 (set_tests_properties):
  set_tests_properties Can not find test to add properties to:

The relevant section in the CMakeLists.txt file looks like this:

ENABLE_TESTING()
add_test(NAME hdf5mstest
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMAND ${BinOut}/hdf5mstest )
set_tests_properties(hdf5mstest PROPERTIES ENVIRONMENT
"${LD_VARNAME}=${LD_PATH}")


Interestingly, on my machine with cmake version 2.8.7 I do not have such
errors.

Is it due to some cmake 2.8 syntax not valid in 2.6 ? If so how can I
adjust my CMakeLists.txt file to be compatible with 2.6?

regards
Witold



-- 
Witold Eryk Wolski

Triemlistrasse 155
8047 Zuerich
--

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] Can not find test to add properties to:

2012-12-14 Thread Witold E Wolski
Found a solution:
removing NAME from

add_test(NAME hdf5mstest

helps. No errors with  cmake  2.6
regards

On 14 December 2012 10:15, Witold E Wolski  wrote:

> I am trying to build a project on a 'custom' linux machine.
>
> When running cmake (cmake version 2.6-patch 4)
> thats the error I am getting.
>
>  (set_tests_properties):
>   set_tests_properties Can not find test to add properties to:
>
> The relevant section in the CMakeLists.txt file looks like this:
>
> ENABLE_TESTING()
> add_test(NAME hdf5mstest
> WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
> COMMAND ${BinOut}/hdf5mstest )
> set_tests_properties(hdf5mstest PROPERTIES ENVIRONMENT
> "${LD_VARNAME}=${LD_PATH}")
>
>
> Interestingly, on my machine with cmake version 2.8.7 I do not have such
> errors.
>
> Is it due to some cmake 2.8 syntax not valid in 2.6 ? If so how can I
> adjust my CMakeLists.txt file to be compatible with 2.6?
>
> regards
> Witold
>
>
>
> --
> Witold Eryk Wolski
>
> Triemlistrasse 155
> 8047 Zuerich
>



-- 
Witold Eryk Wolski

Triemlistrasse 155
8047 Zuerich
--

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 import platform-independent library with add_library()?

2012-12-14 Thread Reza Housseini
Hello Guys

I try to import a library and was now wondering if there's a
platform-independent way?
Here's my code:

  add_library(mylib SHARED IMPORTED)
  set_target_properties(mylib PROPERTIES
IMPORTED_LOCATION ${CPPLIB_DIR}/libmylib.so)

But now what about using this CMakeLists.txt file under Windows? Can't
I just specifie a path? When I do so I get the following error message
from the linker:

  /usr/bin/ld: cannot find ../../core/build: File format not recognized

So he is just linking the path instead of the library.

Thanks for your help!
Cheers Reza
--

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] How to import platform-independent library with add_library()?

2012-12-14 Thread Andreas Pakulat
Hi,

On Fri, Dec 14, 2012 at 11:16 AM, Reza Housseini  wrote:
> Hello Guys
>
> I try to import a library and was now wondering if there's a
> platform-independent way?

Not in the sense that CMake would handle this for you magically. At
least not when importing libraries that are not shipping with a
corresponding cmake file that sets this stuff up.

Andreas
--

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] How to import platform-independent library with add_library()?

2012-12-14 Thread Reza Housseini
On Fri, Dec 14, 2012 at 11:47 AM, Andreas Pakulat  wrote:
> Hi,
>
> On Fri, Dec 14, 2012 at 11:16 AM, Reza Housseini  
> wrote:
>> Hello Guys
>>
>> I try to import a library and was now wondering if there's a
>> platform-independent way?
>
> Not in the sense that CMake would handle this for you magically. At
> least not when importing libraries that are not shipping with a
> corresponding cmake file that sets this stuff up.
>
> Andreas

I found the solution, I had to use the find_library command and
specify the PATHS variable.

  find_library(MYLIB mylib
PATHS ${CPPLIB_DIR}
  )

Thank you anyway!
Regards
Reza
--

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] Can not find test to add properties to:

2012-12-14 Thread David Cole
NAME and COMMAND are keywords that were added at the same time in one of
the early CMake 2.8 versions...

WORKING_DIRECTORY was first added as an argument to add_test in CMake 2.8.3.

You should be able to run the latest version of CMake: just download it
from http://cmake.org/cmake/resources/software.html -- CMake 2.6.4 may be
sufficient for your needs, but it is quite old (from May, 2009) and there
have been many improvements to it since then.


Cheers,
David




On Fri, Dec 14, 2012 at 4:40 AM, Witold E Wolski  wrote:

> Found a solution:
> removing NAME from
>
> add_test(NAME hdf5mstest
>
> helps. No errors with  cmake  2.6
> regards
>
>
> On 14 December 2012 10:15, Witold E Wolski  wrote:
>
>> I am trying to build a project on a 'custom' linux machine.
>>
>> When running cmake (cmake version 2.6-patch 4)
>> thats the error I am getting.
>>
>>  (set_tests_properties):
>>   set_tests_properties Can not find test to add properties to:
>>
>> The relevant section in the CMakeLists.txt file looks like this:
>>
>> ENABLE_TESTING()
>> add_test(NAME hdf5mstest
>> WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
>> COMMAND ${BinOut}/hdf5mstest )
>> set_tests_properties(hdf5mstest PROPERTIES ENVIRONMENT
>> "${LD_VARNAME}=${LD_PATH}")
>>
>>
>> Interestingly, on my machine with cmake version 2.8.7 I do not have such
>> errors.
>>
>> Is it due to some cmake 2.8 syntax not valid in 2.6 ? If so how can I
>> adjust my CMakeLists.txt file to be compatible with 2.6?
>>
>> regards
>> Witold
>>
>>
>>
>> --
>> Witold Eryk Wolski
>>
>> Triemlistrasse 155
>> 8047 Zuerich
>>
>
>
>
> --
> Witold Eryk Wolski
>
> Triemlistrasse 155
> 8047 Zuerich
>
> --
>
> 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] Using an alternative version of a tool during the build of a project

2012-12-14 Thread Cosmere Infahm
Hello,

I have a project that depends on autoconf 2.68 or later. But the default
version of autoconf on my build distro is older. So I have private version
of autoconf 2.68 that I would like to build and use to build my project.

What is the recommended approach to forcing the use of the private version
of autoconf during the cmake build of my project?

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

Re: [CMake] Using an alternative version of a tool during the build of a project

2012-12-14 Thread Rolf Eike Beer

Am , schrieb Cosmere Infahm:

Hello,

I have a project that depends on autoconf 2.68 or later. But the 
default
version of autoconf on my build distro is older. So I have private 
version
of autoconf 2.68 that I would like to build and use to build my 
project.


What is the recommended approach to forcing the use of the private 
version

of autoconf during the cmake build of my project?


Have you tried just setting PATH?

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


[CMake] Xcode Archiving on iOS and OSX

2012-12-14 Thread Jamie Hales
Hi, 

I'm currently trying to change my existing multiple project setup (manually 
maintaining makefiles, vsproj and xcodeproj) for a single cmake solution. So 
far it's going well, I have the OSX and iOS targets up and running correctly 
when running directly on the device, but I'm having issues when archiving.

Basically whenever I try to archive I get linker errors for every separate 
static library I'm using (also compiled with cmake)


clang: error: no such file or directory: 
'/Users/aeonflame/Dropbox/Development/pixelballoon/astraeus/build/ios/pixelboost/engine/Release-iphoneos/libpixelboost_engine.a'


clang: error: no such file or directory: 
'/Users/aeonflame/Dropbox/Development/pixelballoon/astraeus/build/ios/pixelboost/libs/box2d/Box2D/Release-iphoneos/libBox2D.a'


clang: error: no such file or directory: 
'/Users/aeonflame/Dropbox/Development/pixelballoon/astraeus/build/ios/pixelboost/libs/freetype2/Release-iphoneos/libfreetype2.a'


clang: error: no such file or directory: 
'/Users/aeonflame/Dropbox/Development/pixelballoon/astraeus/build/ios/pixelboost/libs/librocket/Release-iphoneos/liblibrocket.a'


clang: error: no such file or directory: 
'/Users/aeonflame/Dropbox/Development/pixelballoon/astraeus/build/ios/pixelboost/libs/lua/Release-iphoneos/liblua.a'



These are included in the main project in the standard way -

target_link_libraries (pixelboost_engine Box2D freetype2 librocket lua)
target_link_libraries (astraeus pixelboost_engine)

There's no issue when running directly, it's only when archiving.

I've been searching for about 2 days for a solution to this but can't find a 
solution yet. I've come across some vague references to setting the library 
install path, so I have tried setting various attributes -


Kind Regards,
Jamie Hales


--

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] Xcode Archiving on iOS and OSX

2012-12-14 Thread Jamie Hales
Apologies, I hit send before I was ready -

I tried setting various attributes -

set(CMAKE_XCODE_ATTRIBUTE_INSTALL_PATH "test")
set(LIB_INSTALL_DIR, ${CMAKE_INSTALL_PREFIX})
set(LIBRARY_OUTPUT_DIRECTORY, ${CMAKE_INSTALL_PREFIX})

But this doesn't seem to make any difference.

Is anyone aware of a proper solution to this issue, or a temporary workaround? 
I'm willing to try anything, as this is the only bottleneck I've found so far, 
but it's basically a showstopper if I can't get it to work.

Any suggestions, questions or solutions are highly welcome!

Many thanks. 

Kind Regards,
Jamie Hales


On Friday, 14 December 2012 at 12:20, Jamie Hales wrote:

> Hi, 
> 
> I'm currently trying to change my existing multiple project setup (manually 
> maintaining makefiles, vsproj and xcodeproj) for a single cmake solution. So 
> far it's going well, I have the OSX and iOS targets up and running correctly 
> when running directly on the device, but I'm having issues when archiving.
> 
> Basically whenever I try to archive I get linker errors for every separate 
> static library I'm using (also compiled with cmake)
> 
> 
> clang: error: no such file or directory: 
> '/Users/aeonflame/Dropbox/Development/pixelballoon/astraeus/build/ios/pixelboost/engine/Release-iphoneos/libpixelboost_engine.a'
> 
> 
> clang: error: no such file or directory: 
> '/Users/aeonflame/Dropbox/Development/pixelballoon/astraeus/build/ios/pixelboost/libs/box2d/Box2D/Release-iphoneos/libBox2D.a'
> 
> 
> clang: error: no such file or directory: 
> '/Users/aeonflame/Dropbox/Development/pixelballoon/astraeus/build/ios/pixelboost/libs/freetype2/Release-iphoneos/libfreetype2.a'
> 
> 
> clang: error: no such file or directory: 
> '/Users/aeonflame/Dropbox/Development/pixelballoon/astraeus/build/ios/pixelboost/libs/librocket/Release-iphoneos/liblibrocket.a'
> 
> 
> clang: error: no such file or directory: 
> '/Users/aeonflame/Dropbox/Development/pixelballoon/astraeus/build/ios/pixelboost/libs/lua/Release-iphoneos/liblua.a'
> 
> 
> 
> These are included in the main project in the standard way -
> 
> target_link_libraries (pixelboost_engine Box2D freetype2 librocket lua)
> target_link_libraries (astraeus pixelboost_engine)
> 
> There's no issue when running directly, it's only when archiving.
> 
> I've been searching for about 2 days for a solution to this but can't find a 
> solution yet. I've come across some vague references to setting the library 
> install path, so I have tried setting various attributes -
> 
> 
> Kind Regards,
> Jamie Hales
> 
> 

--

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 extract the directory path from find_library ?

2012-12-14 Thread Witold E Wolski
Hi,

I am using

FIND_LIBRARY(CPPUNIT_LIBRARY NAMES cppunit HINTS
${CPPUNIT_INCLUDE_DIR}/../lib)


to find library locations. But what I am needing is the directory
containing the lib and not the full path.
How do I get it?

cheers

-- 
Witold Eryk Wolski

Triemlistrasse 155
8047 Zuerich
--

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] How to extract the directory path from find_library ?

2012-12-14 Thread Rolf Eike Beer

Am , schrieb Witold E Wolski:

Hi,

I am using

FIND_LIBRARY(CPPUNIT_LIBRARY NAMES cppunit HINTS
${CPPUNIT_INCLUDE_DIR}/../lib)


to find library locations. But what I am needing is the directory
containing the lib and not the full path.
How do I get it?


cmake --help-command get_filename_component

And if you think about using that for linking: all you need is the full 
path. Just pass that to target_link_libraries. Don't even think about 
messing around with link_directories().


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


Re: [CMake] How to extract the directory path from find_library ?

2012-12-14 Thread Witold E Wolski
Hi Eike,

Thx for the good advice.

Witold

On 14 December 2012 14:32, Rolf Eike Beer  wrote:

> Am , schrieb Witold E Wolski:
>
>  Hi,
>>
>> I am using
>>
>> FIND_LIBRARY(CPPUNIT_LIBRARY NAMES cppunit HINTS
>> ${CPPUNIT_INCLUDE_DIR}/../lib)
>>
>>
>> to find library locations. But what I am needing is the directory
>> containing the lib and not the full path.
>> How do I get it?
>>
>
> cmake --help-command get_filename_component
>
> And if you think about using that for linking: all you need is the full
> path. Just pass that to target_link_libraries. Don't even think about
> messing around with link_directories().
>
> 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
>



-- 
Witold Eryk Wolski

Triemlistrasse 155
8047 Zuerich
--

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 an alternative version of a tool during the build of a project

2012-12-14 Thread Cosmere Infahm
Just wanted to know if there was a better way other than "fixing" the path
in the CMakeLists.txt for the project. For now this what I intend to try.

--

On Fri, Dec 14, 2012 at 1:03 PM, Rolf Eike Beer  wrote:

> Am , schrieb Cosmere Infahm:
>
>  Hello,
>>
>> I have a project that depends on autoconf 2.68 or later. But the default
>> version of autoconf on my build distro is older. So I have private version
>> of autoconf 2.68 that I would like to build and use to build my project.
>>
>> What is the recommended approach to forcing the use of the private version
>> of autoconf during the cmake build of my project?
>>
>
> Have you tried just setting PATH?
>
> 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
>
--

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] How to extract the directory path from find_library ?

2012-12-14 Thread Mateusz Loskot
On 14 December 2012 13:32, Rolf Eike Beer  wrote:
> Am , schrieb Witold E Wolski:
>>
>> Hi,
>>
>> I am using
>>
>> FIND_LIBRARY(CPPUNIT_LIBRARY NAMES cppunit HINTS
>> ${CPPUNIT_INCLUDE_DIR}/../lib)
>>
>>
>> to find library locations. But what I am needing is the directory
>> containing the lib and not the full path.
>> How do I get it?
>
>
> cmake --help-command get_filename_component
>
> And if you think about using that for linking: all you need is the full
> path. Just pass that to target_link_libraries. Don't even think about
> messing around with link_directories().

Indeed and this should be well explained in the documentation.
I've met countless cases and users who are confused [1] about
file path vs folder path returned from the find_library and related commands.

Many, if not most those new to CMake still think along the configuration
of Visual Studio project with separate properties for library folder
and library names.

[1] http://www.cmake.org/pipermail/cmake/2012-December/052909.html

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
--

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] Looking for a good FindHDF5.cmake module

2012-12-14 Thread Witold E Wolski
Hi,

I am looking for a FindHDF5.cmake module which I could ship with my project.

Thx
Witold

-- 
Witold Eryk Wolski

Triemlistrasse 155
8047 Zuerich
--

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] Looking for a good FindHDF5.cmake module

2012-12-14 Thread Trevor Clarke
https://opticks.svn.sourceforge.net/svnroot/opticks/branches/future/OPTICKS-1177/trunk/Code/application/cmake/Modules/FindHdf5.cmake

try that one. the overall license is lgpl 2.1 but I can push that one file
out as public domain since it's pretty straightforward


On Fri, Dec 14, 2012 at 10:01 AM, Witold E Wolski wrote:

> Hi,
>
> I am looking for a FindHDF5.cmake module which I could ship with my
> project.
>
> Thx
> Witold
>
> --
> Witold Eryk Wolski
>
> Triemlistrasse 155
> 8047 Zuerich
>
> --
>
> 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
>



-- 
Trevor R.H. Clarke
Computer Science House
Rochester Institute of Technology
ret...@csh.rit.edu
http://www.csh.rit.edu/~retrev/
--

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] system dependent unsaturated dependencies

2012-12-14 Thread Witold E Wolski
Hi,

Just run into a problem trying to build a project using cmake on a special
linux distribution:
My project depends on cppunit. I find the cppunit lib using find_library
and the project builds nicely on my machine.
However, on a different machine with a different linux distribution I run
into a problem of unsaturated dependenices of the cppunit lib.

/cluster/apps/cppunit/1.12.1/lib/libcppunit.so: undefined reference to
`dlsym'

doing some research on the web I figured out the I have to link against
libdl too.
How do I add this dependency transparently to the cmake file?

regards




-- 
Witold Eryk Wolski

Triemlistrasse 155
8047 Zuerich
--

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] Adding Platform files

2012-12-14 Thread Tim Gallagher
Hi,

I have a folder inside my code repository we use to store custom modules and 
that folder was added to the search path. Inside that folder I added one called 
Platform/ and put a custom platform file in there. But CMake says it can't find 
the platform file. 

Is it possible to add custom platforms without having to put them in the CMake 
install tree?

Thanks,

Tim
--

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] CMake and Photran

2012-12-14 Thread Dick Munroe

I'm using CMake to build a project with multiple sub-projects each
producing an executable and would love to be able to use Eclipse/Photran
on CentOS to be able to do some debugging in the production environment
we use rather than going to make/gdb directly as we currently do but
I've been completely unable to figure out how to get CMake CDT style
make files projects integrated into Eclipse/Photran.  I'm using the Juno
release of Eclipse and the Photran 8.x.

The overall directory structure is of the form:

build/
 code/for/
 code/cxx/
 code1/for/
 cmake/

Fortran/C++ code in the code* directories.  The cmake directory is the
build/source directory.

I'm using the Intel toolchain.  ifort version 13.0.2

I've pawed through the net and tried the examples and I kinda get things
working as far as accessing the source but can't get make to run to
build projects and can't figure out how to build individual sub-projects
if I only want to debug one thing or another.

Anybody with some experience out there that can give me some pointers or
should I think in terms of reorganizing my source/build directories?

Dick Munroe

--

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] CMake 2.8.10 + older GCC + -flto

2012-12-14 Thread Gregory Peele ARA/VHD
Hi all,

I recently upgraded to CMake 2.8.10.  I'm seeing failures in try/compile 
(notably in CHECK_INCLUDE_FILES called from FindThreads.cmake) where it is 
automatically applying -flto to the compile line even though my target compiler 
(GCC 4.1.3) most certainly doesn't support it and my own flags don't include 
it.  What changed?   Is there a way to suppress it?

Thanks,

Gregory Peele, Jr.
Staff Software Engineer
Virtual Heroes - Orlando
Applied Research Associates, Inc.
+1 (407) 823-9121 x 840013


--

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] Looking for a good FindHDF5.cmake module

2012-12-14 Thread Michael Jackson
I have one that I use in my projects as long as you don't need to find all the 
MPI versions.
___
Mike JacksonPrincipal Software Engineer
BlueQuartz SoftwareDayton, Ohio
mike.jack...@bluequartz.net  www.bluequartz.net

On Dec 14, 2012, at 10:03 AM, Trevor Clarke wrote:

> https://opticks.svn.sourceforge.net/svnroot/opticks/branches/future/OPTICKS-1177/trunk/Code/application/cmake/Modules/FindHdf5.cmake
> 
> try that one. the overall license is lgpl 2.1 but I can push that one file 
> out as public domain since it's pretty straightforward
> 
> 
> On Fri, Dec 14, 2012 at 10:01 AM, Witold E Wolski  wrote:
> Hi,
> 
> I am looking for a FindHDF5.cmake module which I could ship with my project.
> 
> Thx
> Witold
> 
> -- 
> Witold Eryk Wolski
> 
> Triemlistrasse 155
> 8047 Zuerich
> 
> --
> 
> 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
> 
> 
> 
> -- 
> Trevor R.H. Clarke
> Computer Science House
> Rochester Institute of Technology
> ret...@csh.rit.edu
> http://www.csh.rit.edu/~retrev/
> 
> --
> 
> 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] Can I create an iOS unit test target for XCode (OCUnit) with CMake?

2012-12-14 Thread Matt M .
I currently use CMake to create my an xcode project for iOS, for both my static 
libs and application target. Now I would like to create the unit test target 
from CMake as well, but haven't found any resources on whether CMake supports 
this or how to create the octest target.
Can I create this from CMake? If so, could you explain how?
Thanks,Aaron  --

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] How to import platform-independent library with add_library()?

2012-12-14 Thread Alexander Neundorf
On Friday 14 December 2012, Reza Housseini wrote:
> On Fri, Dec 14, 2012 at 11:47 AM, Andreas Pakulat  wrote:
> > Hi,
> > 
> > On Fri, Dec 14, 2012 at 11:16 AM, Reza Housseini  
wrote:
> >> Hello Guys
> >> 
> >> I try to import a library and was now wondering if there's a
> >> platform-independent way?
> > 
> > Not in the sense that CMake would handle this for you magically. At
> > least not when importing libraries that are not shipping with a
> > corresponding cmake file that sets this stuff up.
> > 
> > Andreas
> 
> I found the solution, I had to use the find_library command and
> specify the PATHS variable.
> 
>   find_library(MYLIB mylib
> PATHS ${CPPLIB_DIR}
>   )
> 

You could also use the ${CMAKE_STATIC_LIBRARY_PREFIX}, 
${CMAKE_STATIC_LIBRARY_SUFFIX}, ${CMAKE_SHARED_LIBRARY_PREFIX} and 
${CMAKE_SHARED_LIBRARY_SUFFIX} cmake variables to construct the filename:

set_target_properties(mylib PROPERTIES
IMPORTED_LOCATION 
${CPPLIB_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}mylib${CMAKE_SHARED_LIBRARY_SUFFIX})

Alex
--

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] Looking for a good FindHDF5.cmake module

2012-12-14 Thread Witold E Wolski
Hi Michael,

Can you point me to the file please? I do not need the MPI part. I do
develop on linux.

best
Witold




-- 
Witold Eryk Wolski

Triemlistrasse 155
8047 Zuerich
--

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 and Photran

2012-12-14 Thread Alexander Neundorf
On Friday 14 December 2012, Dick Munroe wrote:
> I'm using CMake to build a project with multiple sub-projects each
> producing an executable and would love to be able to use Eclipse/Photran
> on CentOS to be able to do some debugging in the production environment
> we use rather than going to make/gdb directly as we currently do but
> I've been completely unable to figure out how to get CMake CDT style
> make files projects integrated into Eclipse/Photran.  I'm using the Juno
> release of Eclipse and the Photran 8.x.
> 
> The overall directory structure is of the form:
> 
> build/
>   code/for/
>   code/cxx/
>   code1/for/
>   cmake/
> 
> Fortran/C++ code in the code* directories.  The cmake directory is the
> build/source directory.
> 
> I'm using the Intel toolchain.  ifort version 13.0.2
> 
> I've pawed through the net and tried the examples and I kinda get things
> working as far as accessing the source but can't get make to run to
> build projects and can't figure out how to build individual sub-projects
> if I only want to debug one thing or another.
> 
> Anybody with some experience out there that can give me some pointers or
> should I think in terms of reorganizing my source/build directories?

I haven't used Eclipse with Fortran, and the CMake Eclipse generator is 
completely unaware of Photran.
So this may be "simply" a missing feature.

Nevertheless, all targets should have been created, and you should be able to 
build individual targets e.g. using the Make targets-view.

Don't they appear there ?

Alex
--

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] system dependent unsaturated dependencies

2012-12-14 Thread Alexander Neundorf
On Friday 14 December 2012, Witold E Wolski wrote:
> Hi,
> 
> Just run into a problem trying to build a project using cmake on a special
> linux distribution:
> My project depends on cppunit. I find the cppunit lib using find_library
> and the project builds nicely on my machine.
> However, on a different machine with a different linux distribution I run
> into a problem of unsaturated dependenices of the cppunit lib.
> 
> /cluster/apps/cppunit/1.12.1/lib/libcppunit.so: undefined reference to
> `dlsym'
> 
> doing some research on the web I figured out the I have to link against
> libdl too.
> How do I add this dependency transparently to the cmake file?

You have to do this in your FindCPPUnit.cmake file, and add libdl.so to your 
CPPUNIT_LIBRARIES variable (which you probably have).

Alex
--

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] Question on ExternalProject_Add and different dependency directives

2012-12-14 Thread David Cole
On Fri, Dec 7, 2012 at 2:20 PM, Bill Katz  wrote:

> Hi,
>
> I love the ExternalProject_Add module and use it extensively in an
> open-source build system I'm developing for our apps:
>
> http://github.com/janelia-flyem/buildem
>
> The idea is to make a build environment from source, using cached
> tarballs, and allow different version dependency graphs as commits in a git
> repository of all build modules.  I don't use FindPackage because we want
> to know exactly how dependencies are built and modify parameters for some
> of them.  Also, just about everything above the language compiler level
> gets built into one build prefix directory.  The goal is to run at most two
> "cmake..; make..." commands and have the system completely download and
> build all necessary components from archived source.
>
>
Why not just one command? ;-)
  ( See item 2 of the 12-item Joel Test:
http://www.joelonsoftware.com/articles/fog43.html )


In looking through the CMake message boards, I think I understand that
> external projects aren't real targets but can still be used as
> dependencies.  As long as I use the DEPENDS in ExternalProject_Add(), the
> dependencies seem to work as expected.  However, I've run into an issue
> where I'm using add_dependencies(EP1) where EP1 is an external project and
> it's being rebuilt regardless of whether it was built already.
>

It's not that external projects aren't "real" targets. But they are custom
targets that have a chain of associated custom commands based on your
parameters to ExternalProject_Add.



>
> So I was hoping to get clarification on the different ways of specifying
> dependencies and what happens after those statements.
>
> DEPENDS in ExternalProject_Add lets you specify other external project
> targets.  The dependencies only get downloaded and built once.  Question:
> how does ExternalProject_Add determine when an external project needs to go
> through its stages again?  I read that git repo external projects are
> always pulled unless you explicitly use an empty UPDATE_COMMAND.
>
>
The dependencies are strictly time-stamp based. Each step has a stamp file
that it writes out after the step executes successfully. The step should
not rerun, unless a step that it depends on is re-run, or it is marked as
an ALWAYS re-run step... If it does, there's a bug somewhere.



> If two different CMakeLists.txt include the same cmake file with a fixed
> ExternalProject_Add's PREFIX directory, could there be some thrashing going
> on?
>
>
I suppose so, but I don't really understand the question. Could you give an
example? (Perhaps a link to a specific line of code in your github project?)



> add_dependencies(myexe EP1 EP2...) seems to work efficiently for most of
> my modules (i.e, doesn't try to download, configure, etc, if it's done so
> already), but for some more complicated ones, the external projects and its
> dependencies always get rebuilt.  I'm assuming there's something in my
> modules that forces rebuilding of an external project even if its built.
>  In the suspect CMakeLists.txt for external project EP1 that I own, I have
> a number of commands of the form:
>
> project(EP1)
>
> add_library(EP1 ${SOURCES})
> add_dependencies(EP1 ep3 ep4)
>
> add_custom_command(TARGET EP1
>  DEPENDS EP2 EP3
>  COMMAND dostuff)
>
> add_custom_command(OUTPUT some_constants.h ${more_autogen_include_files}
>   DEPENDS thrift_EP
>   COMMAND generate_includes)
>
> add_executable(foo foo.cpp)
> target_link_libraries(foo EP1 ${foolibs})
>
> set_source_files_properties(somestuff.cpp
>PROPERTIES OBJECT_DEPENDS ${generated_file_dir}/some_constants.h)
>
>
> I think there's either a deficiency in my understanding and/or one of the
> above is forcing rebuilds.  Any help would be appreciated in figuring out
> where I'm going wrong.
>
> Thanks,
> Bill
>
>
Be careful with your target names and add_dependencies. Be aware of this
bug: http://public.kitware.com/Bug/view.php?id=9188 -- also, I notice you
have both "ep3" and "EP3" -- those are different because the case is
different, but on Windows, if any files are based on target names, the
case-insensitive file system will have you trouncing files if both names
are actually used. Do you actually have such differences, or is that just a
typo in the email?

I always use the OUTPUT form of add_custom_command, and then hook up the
output to a DEPENDS clause of an add_custom_target. Then I specify
inter-target dependencies with add_dependencies. I have not yet had a
problem with this technique, which is used extensively in the
ExternalProject chain of custom commands.

I have not used the add_custom_command(TARGET signature very much. Tracing
what changes are causing build re-runs is not an easy task.


Hope this helps figure something out for you

David





> --
>
> Powered by www.kitware.com
>
> Visit other Kitwar

Re: [CMake] Why is XXX_INCLUDE_DIRS plural and should it be deep?

2012-12-14 Thread esatel

I see the advantages. I think I will do what you suggest for languages. 

As far as cascading, I see it both ways and I think I'll be more productive
if I abandon the idea that there is a best practice for this. It isn't THAT
hard to make it right either way. If you know your dependencies (e.g. HDF5)
didn't do it you can always patch it up at a higher level in FindNetCDF or
CMakeLists.txt. It is a surprising gap though since so much of how FindXXX
is written is standarized.



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/Why-is-XXX-INCLUDE-DIRS-plural-and-should-it-be-deep-tp7582623p7582659.html
Sent from the CMake mailing list archive at Nabble.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