[CMake] Conditional install() rules based on CPack generator

2019-06-05 Thread Mathieu Malaterre
Hi there,

I am trying to use NuGet generator for GDCM project. Typically my
install rules are as follow:

add_library(foo SHARED foo.c)
install(TARGETS foo
  EXPORT ${MY_TARGETS_NAME}
  RUNTIME DESTINATION ${MY_INSTALL_BIN_DIR} COMPONENT Applications
  LIBRARY DESTINATION ${MY_INSTALL_LIB_DIR} COMPONENT Libraries
  INCLUDES DESTINATION ${MY_INSTALL_INCLUDE_DIR}
  ARCHIVE DESTINATION ${MY_INSTALL_LIB_DIR} COMPONENT DebugDevel
)

where:

MY_INSTALL_BIN_DIR='bin'
MY_INSTALL_LIB_DIR='lib'
MY_INSTALL_INCLUDE_DIR='include'

this works quite nicely for basic 'make install', as well as binary
zip or NSIS installer.
However this directory layout does not seems to be compatible with
Windows RIDs[*]. For example my native *.dll files would need to be
moved from the 'bin' directory to something like 'lib/win7-x64'.

How can I handle conditional install() rules based on CPack generator
(NuGet in my case) ?

Thanks,

[*] https://docs.microsoft.com/en-us/dotnet/core/rid-catalog

-- 
Mathieu
-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

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


Re: [CMake] Make add_custom_target depends on cmake macro/function

2015-02-23 Thread Mathieu Malaterre
On Mon, Feb 23, 2015 at 1:37 PM, Mathieu Malaterre
 wrote:
> Hi there,
>
> I am trying to setup a rule which always execute, however it needs to
> depends on a cmake macro. Here is an equivalent code:
>
> [...]
> cmake_minimum_required(VERSION 3.0)
> string(TIMESTAMP curdate UTC)
> add_custom_target(
>   dummy ALL
>   COMMAND echo "${curdate}"
>   )
> [...]
>
> Is there any simple way to have the `dummy` rule re-execute the above
> cmake TIMESTAMP macro ?

Nevermind, that was easy:


cmake_minimum_required(VERSION 3.0)
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/dummy.cmake
"string(TIMESTAMP curdate UTC)
execute_process(COMMAND echo \"\${curdate}\")"
)
add_custom_target(
  dummy ALL
  COMMAND cmake -P ${CMAKE_CURRENT_BINARY_DIR}/dummy.cmake
  )

Sorry for the noise,
-- 
Mathieu
-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[CMake] Make add_custom_target depends on cmake macro/function

2015-02-23 Thread Mathieu Malaterre
Hi there,

I am trying to setup a rule which always execute, however it needs to
depends on a cmake macro. Here is an equivalent code:

[...]
cmake_minimum_required(VERSION 3.0)
string(TIMESTAMP curdate UTC)
add_custom_target(
  dummy ALL
  COMMAND echo "${curdate}"
  )
[...]

Is there any simple way to have the `dummy` rule re-execute the above
cmake TIMESTAMP macro ?

Thanks much,
-- 
Mathieu
-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] C#/.NET

2012-05-09 Thread Mathieu Malaterre
Hi,

On Wed, May 9, 2012 at 11:19 AM, Pau Garcia i Quiles
 wrote:
> Is anyone using CMake for C#/.NET projects? We are looking to moving
> from Visual Studio solutions/projects to a proper build system and
> CMake would be my preferred choice.

Here is my two cents. Until CMake actually do support C#, I do not
believe this is worth the effort to use cmake. There are only two C#
implementations and both of them do support *.sln/csproj files.

You can have a look at two projects mummy [1] & gdcm [2] they both
uses C# and you will see the amount of detail needed to keep track of
dependencies and get things right. So if you project is only using C#,
I would suggest to go with the default VS tools. If your project is
using cmake anyway, be ready for some low level cmake programming [3].

2cts


[1] http://www.kitware.com/products/avdownload.php
[2] http://gdcm.sourceforge.net/
[3] http://public.kitware.com/Bug/view.php?id=7918

-- 
Mathieu
--

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] Removing SONAME from .so.* (Re: binary contains an unresolvable reference to symbol sym)

2012-04-13 Thread Mathieu Malaterre
Dear all,

I have been going over the cmake code. I can clearly see the
IMPORTED_NO_SONAME property for IMPORTED libraries. However I still
could not find how to skip the explicit setting of -Wl,-soname on
either add_library( SHARED ) or add_library( MODULE ). My system is
debian/linux.

Instead does anyone knows of a platform specific tools to remove
SONAME from .so.* files ? Much like the chrpath would do for RPATH.

Thanks very much !

On Thu, Apr 12, 2012 at 2:03 PM, Mathieu Malaterre
 wrote:
> Dear all,
>
>  I am trying to solve one remaining issue with one of my package in
> debian [1]. The report says basically "binary  contains an
> unresolvable reference to symbol sym". According to the documentation
> [2]:
>
>              The indicated symbol has not been found in the libraries  linked
>              with the binary. The binary is most likely a plugin and the sym-
>              bol is probably provided by the program that loads this  plugin.
>              In  theory a plugin doesn't have any SONAME but this binary does
>              have one and as such it could not be clearly identified as such.
>              However  the  fact  that  the  binary  is stored in a non-public
>              directory is a strong indication that's it's not a normal shared
>              library.  If  the binary is really a plugin, then disregard this
>              warning. But there's always the possibility  that  it's  a  real
>              library  and  that  programs linking to it are using an RPATH so
>              that the dynamic loader finds it. In that case, the  library  is
>              broken and needs to be fixed.
>
> The solution seems pretty straightforward: remove the -soname command
> line switch when generating the python module. Looking at:
> Modules/CMakeCInformation.cmake I can see:
>
> ...
> IF(NOT CMAKE_C_CREATE_SHARED_MODULE)
>  SET(CMAKE_C_CREATE_SHARED_MODULE ${CMAKE_C_CREATE_SHARED_LIBRARY})
> ENDIF(NOT CMAKE_C_CREATE_SHARED_MODULE)
> ...
>
>  So basically /module/ and /shared/ behave exactly the same on *nix
> platform, correct ? If so how is someone supposed to remove the
> explicit setting of CMAKE_SHARED_LIBRARY_SONAME_C_FLAG in such case ?
>
> For example on my system I can see:
>
> $ readelf -d /usr/lib/pyshared/python2.7/_gdcmswig.so | grep SONAME
>  0x000e (SONAME)             Library soname: [_gdcmswig.so]
>
> While in another package (using python distutils/setup.py):
>
> $ readelf -d /usr/lib/python2.7/dist-packages/libtiff/tif_lzw.so  | grep 
> SONAME
> -> no output
>
>
>
> Thanks much in advance,
>
> [1] https://buildd.debian.org/~brlink/packages/g/gdcm.html
> [2] http://man.he.net/man1/dpkg-shlibdeps
> --
> Mathieu



-- 
Mathieu
--

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] binary contains an unresolvable reference to symbol sym

2012-04-12 Thread Mathieu Malaterre
Dear all,

  I am trying to solve one remaining issue with one of my package in
debian [1]. The report says basically "binary  contains an
unresolvable reference to symbol sym". According to the documentation
[2]:

  The indicated symbol has not been found in the libraries  linked
  with the binary. The binary is most likely a plugin and the sym-
  bol is probably provided by the program that loads this  plugin.
  In  theory a plugin doesn't have any SONAME but this binary does
  have one and as such it could not be clearly identified as such.
  However  the  fact  that  the  binary  is stored in a non-public
  directory is a strong indication that's it's not a normal shared
  library.  If  the binary is really a plugin, then disregard this
  warning. But there's always the possibility  that  it's  a  real
  library  and  that  programs linking to it are using an RPATH so
  that the dynamic loader finds it. In that case, the  library  is
  broken and needs to be fixed.

The solution seems pretty straightforward: remove the -soname command
line switch when generating the python module. Looking at:
Modules/CMakeCInformation.cmake I can see:

...
IF(NOT CMAKE_C_CREATE_SHARED_MODULE)
  SET(CMAKE_C_CREATE_SHARED_MODULE ${CMAKE_C_CREATE_SHARED_LIBRARY})
ENDIF(NOT CMAKE_C_CREATE_SHARED_MODULE)
...

  So basically /module/ and /shared/ behave exactly the same on *nix
platform, correct ? If so how is someone supposed to remove the
explicit setting of CMAKE_SHARED_LIBRARY_SONAME_C_FLAG in such case ?

For example on my system I can see:

$ readelf -d /usr/lib/pyshared/python2.7/_gdcmswig.so | grep SONAME
 0x000e (SONAME) Library soname: [_gdcmswig.so]

While in another package (using python distutils/setup.py):

$ readelf -d /usr/lib/python2.7/dist-packages/libtiff/tif_lzw.so  | grep SONAME
-> no output



Thanks much in advance,

[1] https://buildd.debian.org/~brlink/packages/g/gdcm.html
[2] http://man.he.net/man1/dpkg-shlibdeps
-- 
Mathieu
--

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] Q: cmExportFileGenerator::GenerateImportedFileCheckLoop

2012-03-13 Thread Mathieu Malaterre
On Mon, Mar 12, 2012 at 9:33 PM, Alexander Neundorf
 wrote:
> On Monday 12 March 2012, Mathieu Malaterre wrote:
>> Hi there,
>>
>>   CMake 2.8.7 recently added a new behavior when reading export files:
>>
>> http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a2be068c
>>
>>   I perfectly understand the goal here, I think this is a great user
>> functionality. However this breaks the old behavior of cmake being
>> tolerant with missing files. This is particularly difficult to handle
>> for large package such as VTK. Currently in debian we split the VTK
>> package into sub-packages:
>>  * C++ dev,
>>  * Qt dev,
>>  * TCL,
>>  * Java and
>>  * Python bindings.
>>   Since there is a single export file, we are now forced to install
>> all those sub-packages while in the past we could bypass any cmake
>> internals checks and only install -say- C++-dev package.
>
> Here's my opinion on this: I understand the issue, but basically this is the
> purpose of the patch, to make an exports file fail if the files it describes
> are not actually present.
> I mean, if the debian packages did that, then the installed exports files were
> basically broken, since they created imported targets referencing non-existant
> files, so you would get link errors at build time.

My question was not about whether not this patch was a good thing, no
doubt about it.

My question was about making it a default and breaking an old behavior
with no possible evasion. CMake 2.8.7 is a minor release compare to
2.8.6.

> I think the proper way to make this work is to split the exports-file into
> multiple files.

This is another question: does cmake export file support
non-monolithic configuration. I believe it does not. When generating
the export file, cmake will loop over all exported targets and list
any missing one. It is not capable of recursing into sub-exported file
IMHO.

Regards,
-- 
Mathieu
--

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] Q: cmExportFileGenerator::GenerateImportedFileCheckLoop

2012-03-11 Thread Mathieu Malaterre
Hi there,

  CMake 2.8.7 recently added a new behavior when reading export files:

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a2be068c

  I perfectly understand the goal here, I think this is a great user
functionality. However this breaks the old behavior of cmake being
tolerant with missing files. This is particularly difficult to handle
for large package such as VTK. Currently in debian we split the VTK
package into sub-packages:
 * C++ dev,
 * Qt dev,
 * TCL,
 * Java and
 * Python bindings.
  Since there is a single export file, we are now forced to install
all those sub-packages while in the past we could bypass any cmake
internals checks and only install -say- C++-dev package.

  Would it make sense to conditionally remove this automatic check ?
Something like:

diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index c4f5dfb..6eaf4d5 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -384,7 +384,7 @@
cmExportFileGenerator::GenerateImportedFileCheckLoop(std::ostream& os)
   os << "# Loop over all imported files and verify that they actually exist\n"
 "FOREACH(target ${_IMPORT_CHECK_TARGETS} )\n"
 "  FOREACH(file ${_IMPORT_CHECK_FILES_FOR_${target}} )\n"
-"IF(NOT EXISTS \"${file}\" )\n"
+"IF(NOT CMAKE_SKIP_IMPORT_CHECK_FILES AND NOT EXISTS
\"${file}\" )\n"
 "  MESSAGE(FATAL_ERROR \"The imported target \\\"${target}\\\""
 " references the file\n"
 "   \\\"${file}\\\"\n"

Thanks for comments,

-- 
Mathieu
--

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] relocation R_MIPS_HI16 against `a local symbol' can not be used when making a shared object; recompile with -fPIC

2012-02-01 Thread Mathieu Malaterre
Hi all,

 I am trying to fix the following issue with building volview on mips:

https://buildd.debian.org/status/fetch.php?pkg=volview&arch=mipsel&ver=3.4-1&stamp=1327908956

Quote:
...
cd 
/build/buildd-volview_3.4-1-mipsel-QA92w9/volview-3.4/obj-mipsel-linux-gnu/VolViewLibraries/KWCommonPro
&& /usr/bin/cmake -E cmake_link_script
CMakeFiles/KWCommonPro.dir/link.txt --verbose=1
/usr/bin/c++  -fPIC   -Wno-deprecated   -ftemplate-depth-50 -Wall
-Wno-deprecated -O2 -g  -shared -Wl,-soname,libKWCommonPro.so -o
../../bin/libKWCommonPro.so
CMakeFiles/KWCommonPro.dir/vtkAnalyzeReader.o
<...>
/usr/lib/libvtkHybrid.so.5.8.0 ../../bin/libKWCommon.so
/usr/lib/libvtkWidgets.so.5.8.0 ../../bin/libctnlib.a
/usr/lib/libvtkHybrid.so.5.8.0 /usr/lib/libvtkParallel.so.5.8.0
/usr/lib/libvtkVolumeRendering.so.5.8.0
/usr/lib/libvtkRendering.so.5.8.0 /usr/lib/libvtkGraphics.so.5.8.0
/usr/lib/libvtkImaging.so.5.8.0 /usr/lib/libvtkIO.so.5.8.0
/usr/lib/libvtkFiltering.so.5.8.0 /usr/lib/libvtkCommon.so.5.8.0
/usr/lib/libvtksys.so.5.8.0 -ldl -lm
/usr/bin/ld: ../../bin/libctnlib.a(condition.o): relocation
R_MIPS_HI16 against `a local symbol' can not be used when making a
shared object; recompile with -fPIC
../../bin/libctnlib.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
...

Obviously there is a very simple workaround (adding -fPIC during the
compilation of ctnlib). However I am wondering if this is not a larger
issue, such as for example cmake not setting proper static compilation
flags on mipsel

Comments appreciated,
-- 
Mathieu
--

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] cpack: Bundle vs DragNDrop vs OSXX11 vs PackageMaker

2012-01-11 Thread Mathieu Malaterre
[Happy New Year 2012 !]

Hi all,

  I am trying to release openjpeg 1.5. To distribute binary package of
this software on MacOSX, I am starring at the cpack documentation.
  I am not a MacOSX user, so could someone please point me to the
documentation for the differences in between the
Bundle/DragNDrop/OSXX11 & PackageMaker generators ?
  openjpeg simply ships command line tools, so all I would need is
something simple where the executable can find the dylib from a
relative path. Right now, I have for the DragNDrop generator:

$ otool -L 
"_CPack_Packages/Darwin/DragNDrop/OPENJPEG-1.5.0-Darwin/ALL_IN_ONE/bin/j2k_dump"
_CPack_Packages/Darwin/DragNDrop/OPENJPEG-1.5.0-Darwin/ALL_IN_ONE/bin/j2k_dump:
libopenjpeg.1.dylib (compatibility version 1.0.0, current version 1.5.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0,
current version 88.3.9)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0,
current version 1.0.0)

while libopenjpeg.1.dylib is in ../lib relative to j2k_dump

thanks much,
-- 
Mathieu
--

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] install( TARGETS module ...)

2011-07-01 Thread Mathieu Malaterre
Dear all,

  I am trying to change the default behavior of cmake which installs
MODULE to the LIBRARY destination. For example:

...
add_library(test MODULE test.c)
install(TARGETS test
  RUNTIME DESTINATION bin
  LIBRARY DESTINATION lib
  ARCHIVE DESTINATION lib/static
  )
...

  Will install test.dll to lib, while a SHARED target would have been
installed to bin. Is there an easy work around ? I cannot change
MODULE to SHARED in add_library().
  I would also like to keep installation to lib, in case of UNIX
system (basically I want the SHARED behavior for install() but with
MODULE).

Thanks for suggestion,
-- 
Mathieu
___
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] if+or: Unknown arguments specified

2011-06-10 Thread Mathieu Malaterre
On Fri, Jun 10, 2011 at 9:50 AM, Michael Wild  wrote:
> On 06/10/2011 09:23 AM, Mathieu Malaterre wrote:
>> Hi all,
>>
>>   I am trying to write a simple if ( or ) expression but this leads to
>> the following error message:
>> ...
>> CMake Warning (dev) at CMakeLists.txt:10 (if):
>>   given arguments:
>>
>>     "var" "STREQUAL" "foo" "or" "var" "STREQUAL" "bla"
>>
>>   Unknown arguments specified
>> ...
>>
>> Here is a simple test to reproduce:
>>
>> project(test)
>>
>> set(var "foo")
>> if(var STREQUAL "foo")
>>   message("FOO")
>> endif()
>> if(var STREQUAL "bla")
>>   message("BLA")
>> endif()
>> if(var STREQUAL "foo" or var STREQUAL "bla")
>>   message("FOO or BLA")
>> endif()
>>
>> How should I do the test with the OR expression ?
>>
>> Thanks,
>
> Use all-caps OR.
>

Thanks ! I was relying too much on my vim syntax highlighting


-- 
Mathieu
___
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] if+or: Unknown arguments specified

2011-06-10 Thread Mathieu Malaterre
Hi all,

  I am trying to write a simple if ( or ) expression but this leads to
the following error message:
...
CMake Warning (dev) at CMakeLists.txt:10 (if):
  given arguments:

"var" "STREQUAL" "foo" "or" "var" "STREQUAL" "bla"

  Unknown arguments specified
...

Here is a simple test to reproduce:

project(test)

set(var "foo")
if(var STREQUAL "foo")
  message("FOO")
endif()
if(var STREQUAL "bla")
  message("BLA")
endif()
if(var STREQUAL "foo" or var STREQUAL "bla")
  message("FOO or BLA")
endif()

How should I do the test with the OR expression ?

Thanks,
-- 
Mathieu
___
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] cmd.exe does not expand wildcards

2011-06-08 Thread Mathieu Malaterre
Hi there,

  Slightly off topic, but how do people cope with cmd.exe not
expanding wildcards (*) ?

  I would like to do something like:

cmd> cmake -E tar cvfz test.tgz *.log

Thanks
-- 
Mathieu
___
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] MSVC10_REDIST_DIR-NOTFOUND/x86/Microsoft.VC100.CRT/msvcr100.dll

2011-05-02 Thread Mathieu Malaterre
Thanks for the info. I never saw this warning when using 2005/2008
express edition... so I simply assumed something was wrong.

-M

On Mon, May 2, 2011 at 4:51 PM, David Cole  wrote:
> Ah, well. Why didn't you say you were using the Express edition of MSVC 10?
>
> There are no redistributable installation files included in the Express
> editions anymore, if I understand correctly.
>
> In CMake, we do this, to avoid this warning (put code like this before
> including InstallRequiredSystemLibraries):
>
>     # By default, do not warn when built on machines using only VS Express:
>     IF(NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
>   SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
>     ENDIF()
>
> Alternatively... you could enable installation of these files when one of
> your own CMake options is ON...
>
> Or, use one of the commercially available non-Express editions of VS 2010.
>
>
> HTH,
> David
>
>
> On Mon, May 2, 2011 at 10:44 AM, Mathieu Malaterre
>  wrote:
>>
>> Hi Dave,
>>
>>  Thanks for your input.
>>
>> Using: cmake-2.8.4.20110426-g6bb0a-win32-x86.exe
>>
>> Here is what I get:
>>
>> ...
>> CMake Warning at C:/Program Files/CMake
>> 2.8/share/cmake-2.8/Modules/InstallRequiredSystemLibraries.cmake:322
>> (MESSAGE):
>>  system runtime library file does not exist:
>>  'MSVC10_REDIST_DIR-NOTFOUND/x86/Microsoft.VC100.CRT/msvcp100.dll'
>> Call Stack (most recent call first):
>>  CMakeLists.txt:562 (INCLUDE)
>>
>>
>> CMake Warning at C:/Program Files/CMake
>> 2.8/share/cmake-2.8/Modules/InstallRequiredSystemLibraries.cmake:322
>> (MESSAGE):
>>  system runtime library file does not exist:
>>  'MSVC10_REDIST_DIR-NOTFOUND/x86/Microsoft.VC100.CRT/msvcr100.dll'
>> Call Stack (most recent call first):
>>  CMakeLists.txt:562 (INCLUDE)
>> ...
>>
>> This is a Visual Studio Express C++ 2010 (English) installation.
>>
>>
>> Thanks
>>
>> On Mon, May 2, 2011 at 4:30 PM, David Cole  wrote:
>> > Does the same thing happen with a nightly build of CMake? (downloaded
>> > from
>> > Kitware, or based on 'master' or 'next'...?)
>> >
>> > Try with a recent nightly build and see if you get the same thing,
>> > please.
>> > http://cmake.org/files/dev/?C=M;O=D
>> >
>> >
>> > Thanks,
>> > David
>> >
>> >
>> > On Mon, May 2, 2011 at 10:21 AM, Mathieu Malaterre
>> >  wrote:
>> >>
>> >> Dear all,
>> >>
>> >>  I keep getting this error during cmake configuration time:
>> >>
>> >> ...
>> >> CMake Warning at C:/Program Files/CMake
>> >> 2.8/share/cmake-2.8/Modules/InstallRequiredSystemLibraries.cmake:314
>> >> (MESSAGE):
>> >>  system runtime library file does not exist:
>> >>  'MSVC10_REDIST_DIR-NOTFOUND/x86/Microsoft.VC100.CRT/msvcp100.dll'
>> >> Call Stack (most recent call first):
>> >>  CMakeLists.txt:562 (INCLUDE)
>> >>
>> >>
>> >> CMake Warning at C:/Program Files/CMake
>> >> 2.8/share/cmake-2.8/Modules/InstallRequiredSystemLibraries.cmake:314
>> >> (MESSAGE):
>> >>  system runtime library file does not exist:
>> >>  'MSVC10_REDIST_DIR-NOTFOUND/x86/Microsoft.VC100.CRT/msvcr100.dll'
>> >> Call Stack (most recent call first):
>> >>  CMakeLists.txt:562 (INCLUDE)
>> >> ...
>> >>
>> >>  This is a cmake 2.8.4 installation on a Vista x86 , with patch
>> >> 971a735ba2b4d9e4ac846722fdf280dbd0feb0d4 applied locally.
>> >>
>> >> Has anyone else seen this before ?
>> >>
>> >> Thanks for help/fix.
>> >> --
>> >> Mathieu
>> >> ___
>> >> 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
>> >
>> >
>>
>>
>>
>> --
>> Mathieu
>
>



-- 
Mathieu
___
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] MSVC10_REDIST_DIR-NOTFOUND/x86/Microsoft.VC100.CRT/msvcr100.dll

2011-05-02 Thread Mathieu Malaterre
Hi Dave,

  Thanks for your input.

Using: cmake-2.8.4.20110426-g6bb0a-win32-x86.exe

Here is what I get:

...
CMake Warning at C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/InstallRequiredSystemLibraries.cmake:322
(MESSAGE):
  system runtime library file does not exist:
  'MSVC10_REDIST_DIR-NOTFOUND/x86/Microsoft.VC100.CRT/msvcp100.dll'
Call Stack (most recent call first):
  CMakeLists.txt:562 (INCLUDE)


CMake Warning at C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/InstallRequiredSystemLibraries.cmake:322
(MESSAGE):
  system runtime library file does not exist:
  'MSVC10_REDIST_DIR-NOTFOUND/x86/Microsoft.VC100.CRT/msvcr100.dll'
Call Stack (most recent call first):
  CMakeLists.txt:562 (INCLUDE)
...

This is a Visual Studio Express C++ 2010 (English) installation.


Thanks

On Mon, May 2, 2011 at 4:30 PM, David Cole  wrote:
> Does the same thing happen with a nightly build of CMake? (downloaded from
> Kitware, or based on 'master' or 'next'...?)
>
> Try with a recent nightly build and see if you get the same thing, please.
> http://cmake.org/files/dev/?C=M;O=D
>
>
> Thanks,
> David
>
>
> On Mon, May 2, 2011 at 10:21 AM, Mathieu Malaterre
>  wrote:
>>
>> Dear all,
>>
>>  I keep getting this error during cmake configuration time:
>>
>> ...
>> CMake Warning at C:/Program Files/CMake
>> 2.8/share/cmake-2.8/Modules/InstallRequiredSystemLibraries.cmake:314
>> (MESSAGE):
>>  system runtime library file does not exist:
>>  'MSVC10_REDIST_DIR-NOTFOUND/x86/Microsoft.VC100.CRT/msvcp100.dll'
>> Call Stack (most recent call first):
>>  CMakeLists.txt:562 (INCLUDE)
>>
>>
>> CMake Warning at C:/Program Files/CMake
>> 2.8/share/cmake-2.8/Modules/InstallRequiredSystemLibraries.cmake:314
>> (MESSAGE):
>>  system runtime library file does not exist:
>>  'MSVC10_REDIST_DIR-NOTFOUND/x86/Microsoft.VC100.CRT/msvcr100.dll'
>> Call Stack (most recent call first):
>>  CMakeLists.txt:562 (INCLUDE)
>> ...
>>
>>  This is a cmake 2.8.4 installation on a Vista x86 , with patch
>> 971a735ba2b4d9e4ac846722fdf280dbd0feb0d4 applied locally.
>>
>> Has anyone else seen this before ?
>>
>> Thanks for help/fix.
>> --
>> Mathieu
>> ___
>> 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
>
>



-- 
Mathieu
___
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] MSVC10_REDIST_DIR-NOTFOUND/x86/Microsoft.VC100.CRT/msvcr100.dll

2011-05-02 Thread Mathieu Malaterre
Dear all,

  I keep getting this error during cmake configuration time:

...
CMake Warning at C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/InstallRequiredSystemLibraries.cmake:314
(MESSAGE):
  system runtime library file does not exist:
  'MSVC10_REDIST_DIR-NOTFOUND/x86/Microsoft.VC100.CRT/msvcp100.dll'
Call Stack (most recent call first):
  CMakeLists.txt:562 (INCLUDE)


CMake Warning at C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/InstallRequiredSystemLibraries.cmake:314
(MESSAGE):
  system runtime library file does not exist:
  'MSVC10_REDIST_DIR-NOTFOUND/x86/Microsoft.VC100.CRT/msvcr100.dll'
Call Stack (most recent call first):
  CMakeLists.txt:562 (INCLUDE)
...

  This is a cmake 2.8.4 installation on a Vista x86 , with patch
971a735ba2b4d9e4ac846722fdf280dbd0feb0d4 applied locally.

Has anyone else seen this before ?

Thanks for help/fix.
-- 
Mathieu
___
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] INSTALL(EXPORT) does not honor LINK_INTERFACE_LIBRARIES?

2011-03-28 Thread Mathieu Malaterre
You still need to install that lib even if it is not used by 3rd party
application, it is used inernally by your own application.


INSTALL(TARGETS publiclib privatelib...)

2cts

On Mon, Mar 28, 2011 at 2:51 PM, Rolf Eike Beer  wrote:
> I try to do an INSTALL(EXPORT) to allow others to link against one of my
> libraries. That libraries is linked against some other internal libraries
> the target's don't need to link to as everything in them is purely
> internal.
>
> I tried something like that:
>
> ADD_LIBRARY(publiclib SHARED    ${publiclib_SOURCES})
>
> TARGET_LINK_LIBRARIES(publiclib privatelib)
>
> SET_TARGET_PROPERTIES(publiclib PROPERTIES LINK_INTERFACE_LIBRARIES "")
>
> INSTALL(TARGETS publiclib
>                        EXPORT publiclib_export
>                        RUNTIME DESTINATION bin
>                        LIBRARY DESTINATION lib
>                        ARCHIVE DESTINATION lib)
>
> INSTALL(EXPORT publiclib_export DESTINATION cmake/modules)
>
> This results in:
>
> Make Error: INSTALL(EXPORT "publiclib_export" ...) includes target
> "publiclib" which requires target "privatelib" that is not in the export
> set.
>
> Ehm, no, it doesn't? Is this intentional (why?), is there a workaround or
> should I file a bug report?
>
> 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
>



-- 
Mathieu
___
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] CPack: CPACK_COMPONENT_GROUP in cmake 2.8.3 / Windows binary zip

2011-02-08 Thread Mathieu Malaterre
Hi Eric,

  Thanks a bunch for your tremendous work !
  Quick question would this means that the warning will also go away:

"CPack warning: both CPACK_COMPONENTS_ALL and CPACK_MONOLITHIC_INSTALL
have been set."

  AFAIK  CPACK_COMPONENTS_ALL is required to be set to list all
different components, but I still need  CPACK_MONOLITHIC_INSTALL for
backward compatibility.

Thanks again for your work !

On Tue, Feb 8, 2011 at 6:50 PM, Eric Noulard  wrote:
> 2011/2/8 Mathieu Malaterre :
>> All,
>>
>>  I am trying to generate binary zip of my project using CPack 3.8.3
>> and looks like now it generates two zip files where each file has the
>> name of the group. Did anyone noticed this change ? How do I revert it
>> back to the old behavior all groups in the same binary zip file ?
>
> My fault.
>
> This is a backward compatibility breakage which is fixed in
> current 2.8.4 rc.
>
> see:
> http://public.kitware.com/Bug/view.php?id=11452
>
> and updated component packaging documentation:
> http://www.cmake.org/Wiki/CMake:Component_Install_With_CPack#Controlling_packaging_of_component-aware_generators
>
> --
> Erk
> Membre de l'April - « promouvoir et défendre le logiciel libre » -
> http://www.april.org
>



-- 
Mathieu
___
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] CPack: CPACK_COMPONENT_GROUP in cmake 2.8.3 / Windows binary zip

2011-02-08 Thread Mathieu Malaterre
Answering myself: set(CPACK_MONOLITHIC_INSTALL 1)

2cts

On Tue, Feb 8, 2011 at 5:37 PM, Mathieu Malaterre
 wrote:
> All,
>
>  I am trying to generate binary zip of my project using CPack 3.8.3
> and looks like now it generates two zip files where each file has the
> name of the group. Did anyone noticed this change ? How do I revert it
> back to the old behavior all groups in the same binary zip file ?
>
> Thanks,
> --
> Mathieu
>



-- 
Mathieu
___
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] CPack: CPACK_COMPONENT_GROUP in cmake 2.8.3 / Windows binary zip

2011-02-08 Thread Mathieu Malaterre
All,

  I am trying to generate binary zip of my project using CPack 3.8.3
and looks like now it generates two zip files where each file has the
name of the group. Did anyone noticed this change ? How do I revert it
back to the old behavior all groups in the same binary zip file ?

Thanks,
-- 
Mathieu
___
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] get_target_property( LOCATION) and CMAKE_DEBUG_POSTFIX (aka: Installing PDB files)

2011-02-08 Thread Mathieu Malaterre
On Tue, Feb 8, 2011 at 4:36 AM, Michael Hertling  wrote:
>>   Is there another API to retrieve the path to a dll file generated by
>> cmake from its target name ?
>
> Have you already tried the LOCATION_ target property?
>                                   ^

Fantastic ! Exactly what I was missing.

Thanks.
-- 
Mathieu
___
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] get_target_property( LOCATION) and CMAKE_DEBUG_POSTFIX (aka: Installing PDB files)

2011-02-07 Thread Mathieu Malaterre
Dear all,

  I am trying to retrieve the full path of a dll to be able to compute
the full path of the associated pdb file. I thought I could simply use
the get_target_property( LOCATION) API, however it fails to return the
actual name of the TARGET, for instance the value of
CMAKE_DEBUG_POSTFIX it not taken into account (using cmake 2.8.3).

  Is there another API to retrieve the path to a dll file generated by
cmake from its target name ?

Thanks
-- 
Mathieu
___
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] Get the list of all TARGETS?

2011-01-18 Thread Mathieu Malaterre
On Tue, Jan 18, 2011 at 3:18 PM, Eric Noulard  wrote:
> 2011/1/18 Clifford Yapp :
>> Sounds like this issue:
>>
>> http://www.cmake.org/pipermail/cmake/2010-September/039388.html
>>
>> I can confirm the wrapper function approach works, using it in BRL-CAD.
>
> Right,
>
> I think a little bit more about it but I think it would be a interesting 
> feature
> and I may try a patch (with feature request) for that.
>
> If anyone here has a firm NO-GO argument for requesting this feature
> please tell me before I try.

I believe this is the issue I reported here:

http://cmake.org/Bug/view.php?id=9822

See also my hack:

http://cmake.org/Bug/view.php?id=9822#c18317

HTH
-- 
Mathieu
___
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] Non-blocking execute_process ?

2010-11-04 Thread Mathieu Malaterre
Hi there,

  For my test suite, I need to spawn a process, but I do not want to
wait for it to complete (it will be actually listening during the test
execution). AFAIK execute_process will wait until TIMEOUT expires. Is
there another non-blocking function I could use in between
ctest_configure() and ctest_test() ?

Thanks,
-- 
Mathieu
___
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] Getting a list of all targets?

2010-09-06 Thread Mathieu Malaterre
On Mon, Sep 6, 2010 at 12:51 AM, Clifford Yapp  wrote:
> Is there any way within a CMakeLists.txt file to get a list of all the
> currently defined targets?  I'm interested in this for two primary
> reasons, and if anyone can point me to other solutions for these that
> would be great, but I'm sort of stumped.

I used the following hack (different purpose in my case),  item
0018317 should give you all shared libs exported by the project:

http://cmake.org/Bug/view.php?id=9822#bugnotes

hth
-- 
Mathieu
___
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] findpackage.cmake vs packageconfig.cmake

2010-08-11 Thread Mathieu Malaterre
On Tue, Aug 10, 2010 at 7:47 PM, Alexander Neundorf
 wrote:
> On Tuesday 10 August 2010, Mathieu Malaterre wrote:
>> Hi there,
>>
>>   I am trying to find a solution to find the openjpeg package.
>>
>>   In the 1.x version, openjpeg uses a makefile based build system. In
>> this case I need to write a custom findopenjpeg.cmake file to discover
>> all required path.
>>
>>   However in the current 2.x version, openjpeg now uses cmake as build
>> system. In this case I need to search for the installed
>> openjpeg-config.cmake.
>>
>>   I did not find a solution to cope with both situations. As soon as I
>> provide a findopenjpeg.cmake in the cmake_module_path, I cannot search
>> for openjpeg-config.cmake anymore.
>>
>> Any hints or suggestion greatly appreciated,
>
> I'd suggest to use a findopenjpeg.cmake, which first does a
> find_package(openjpeg QUIET NO_MODULE)
> and if that fails, continues to search with the "traditional"
> find_library/find_path/etc. calls.
>
> This way you can also print custom success/failure messages if
> the -config.cmake file is not found, or test for additional features even
> if -config.cmake is found.

Neat, I did not relalize there was a NO_MODULE option.

Warning: for anyone trying this solution do NOT use :
find_package(OpenJPEG 1.0 REQUIRED) and expect it to work.
Instead, it is required to use find_package(OpenJPEG REQUIRED) .. I am
not sure if I should report that as a bug or not.

Thanks !
-- 
Mathieu
___
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] findpackage.cmake vs packageconfig.cmake

2010-08-10 Thread Mathieu Malaterre
Hi there,

  I am trying to find a solution to find the openjpeg package.

  In the 1.x version, openjpeg uses a makefile based build system. In
this case I need to write a custom findopenjpeg.cmake file to discover
all required path.

  However in the current 2.x version, openjpeg now uses cmake as build
system. In this case I need to search for the installed
openjpeg-config.cmake.

  I did not find a solution to cope with both situations. As soon as I
provide a findopenjpeg.cmake in the cmake_module_path, I cannot search
for openjpeg-config.cmake anymore.

Any hints or suggestion greatly appreciated,
-- 
Mathieu
___
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] Building ITK with VTK 5.6

2010-07-22 Thread Mathieu Malaterre
Hi there,

  I am trying to build ITK from a toplevel directory, my application
is setup simply like this:

$ cat CMakeLists.txt
project(MySuperApp)
find_package(VTK REQUIRED)
message("${VTK_VERSION}")
add_subdirectory(ITK) # contains the ITK source

Since cmake 2.8 find_package now sets VTK_VERSION which is used
internally in ITK to determine if MetaIO is being build from VTK or
ITK.
Could someone please:
- confirm VTK_VERSION now appears as 5.6.0 since the update to cmake
2.8 / vtk 5.6
- could someone please suggest the correct way to detect if metaio if
build from ITK or not.

Thanks a lot !
___
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] Propagating variable to toplevel parent

2010-07-09 Thread Mathieu Malaterre
On Wed, Jul 7, 2010 at 3:06 PM, Michael Wild  wrote:
> project(bla NONE)
>
> set_property(GLOBAL PROPERTY v "13")
> add_subdirectory(foo)
> get_property(v GLOBAL PROPERTY v)
> message("final v: ${v}")
>
>
> For properties you must always use getters and setters, they are never 
> directly mapped to variables.

Cool ! Work like a charm.

Thanks
-- 
Mathieu
___
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] Propagating variable to toplevel parent

2010-07-07 Thread Mathieu Malaterre
On Wed, Jul 7, 2010 at 1:07 PM, Bo Thorsen  wrote:
> Den 07-07-2010 12:34, Mathieu Malaterre skrev:
>>
>> Hi there,
>>
>>   I am wondering if I am missing anything here. How would one
>> propagate a variable across subdirectories in cmake ? I thought that a
>> simple CACHE variable would do the trick, but using cmake 2.8.1 I had
>> to do the following trick
>>
>> list(APPEND v "42")
>> # make sure to actually update the CACHE variable:
>> set(v ${v} CACHE INTERNAL "toto")
>>
>> My goal is that at the end of the toplevel cmakelists.txt file, cmake
>> would have collected a list of installation path.
>
> http://www.cmake.org/pipermail/cmake/2010-May/036743.html
>

Unless I am missing -again- something, this does not work across directories:

https://gdcm.svn.sourceforge.net/svnroot/gdcm/Sandbox/CMakeBug/14


Thanks
-- 
Mathieu
___
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] Propagating variable to toplevel parent

2010-07-07 Thread Mathieu Malaterre
Hi there,

  I am wondering if I am missing anything here. How would one
propagate a variable across subdirectories in cmake ? I thought that a
simple CACHE variable would do the trick, but using cmake 2.8.1 I had
to do the following trick

list(APPEND v "42")
# make sure to actually update the CACHE variable:
set(v ${v} CACHE INTERNAL "toto")

My goal is that at the end of the toplevel cmakelists.txt file, cmake
would have collected a list of installation path.

Thanks for comments,
-- 
Mathieu

ref:
https://gdcm.svn.sourceforge.net/svnroot/gdcm/Sandbox/CMakeBug/13/
___
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] CTEST_BUILD_COMMAND conflicts with CTEST_BUILD_TARGET (was Re: 0009835: ctest --help-property CTEST_BUILD_TARGET)

2010-06-16 Thread Mathieu Malaterre
I finally got everything working with cmake 2.8.1, there is just one
glitch, one cannot set CTEST_BUILD_COMMAND for CTEST_BUILD_TARGET to
work.

I added a bug report here:
http://cmake.org/Bug/view.php?id=10838

I simply had to comment out my setting:

#SET (CTEST_BUILD_COMMAND "make -i")

HTH

On Tue, Jun 15, 2010 at 2:19 AM, David Cole  wrote:
> Never mind. I just read the subject line
>
> You mean this one, right?
> http://public.kitware.com/Bug/view.php?id=9835
>
>
> On Mon, Jun 14, 2010 at 8:17 PM, David Cole  wrote:
>> What bug are you referring to?
>>
>>
>> On Mon, Jun 14, 2010 at 12:58 PM,   wrote:
>>> Hi there,
>>>
>>>  I reported a bug a couple of month back, which apparently was fixed with
>>> "Closing this since the new TARGET option for CTEST_BUILD is well
>>> documented."
>>>
>>>  I am looking at the git web interface of ctest_build:
>>> http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/CTest/cmCTestBuildCommand.h;h=228067e44c0bc5ef98cf6b21e2a47e3ba93d29ba;hb=HEAD
>>>
>>>  I cannot find mention of neither CTEST_BUILD + TARGET nor
>>> CTEST_BUILD_TARGET.
>>>
>>>  Could someone please point me to the documentation that is reference in the
>>> bug report ?
>>>
>>> Thanks !
>>> --
>>> Mathieu
>>>
>>>
>>> ___
>>> 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
>>>
>>
>



-- 
Mathieu
___
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] 0009835: ctest --help-property CTEST_BUILD_TARGET

2010-06-14 Thread mathieu . malaterre

Hi there,

 I reported a bug a couple of month back, which apparently was fixed with "Closing 
this since the new TARGET option for CTEST_BUILD is well documented."

 I am looking at the git web interface of ctest_build: 


http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/CTest/cmCTestBuildCommand.h;h=228067e44c0bc5ef98cf6b21e2a47e3ba93d29ba;hb=HEAD

 I cannot find mention of neither CTEST_BUILD + TARGET nor CTEST_BUILD_TARGET.

 Could someone please point me to the documentation that is reference in the 
bug report ?

Thanks !
--
Mathieu



signature.asc
Description: OpenPGP digital signature
___
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] Modified FindDCMTK

2010-06-11 Thread Mathieu Malaterre
Thomas,

I made two changes to your proposed cmake file:

- include(FindPackageHandleStandardArgs)
- use a foreach to simplify the finding of executables

If this is ok with you I can update it on CMake/Modules

Ref:
http://gdcm.svn.sf.net/viewvc/gdcm/trunk/CMake/FindDCMTK.cmake?view=markup

Thanks,

On Fri, Jun 11, 2010 at 11:07 AM, Thomas Sondergaard
 wrote:
> Ryan Pavlik wrote:
>>
>> On 06/10/2010 03:28 PM, Thomas Sondergaard wrote:
>>>
>>> The FindDCMTK.cmake module in the git master branch doesn't find all the
>>> dcmtk libraries. I've attached a modified version of FindDCMTK that finds
>>> all the dcmtk libraries. It is also about 25% smaller as some duplicated
>>> code has been unified using FOREACH.
>>>
>>> I hope you will consider including it in the CMake distribution.
>>>
>>> Regards,
>>>
>>> Thomas Sondergaard
>>
>> I ran it through my cleanup tool and made two manual fixes: using
>> list(APPEND where appropriate, and using the plural INCLUDE_DIRS.  It could
>> be further improved by using the find_package_handle_standard_args macro.
>>
>> I've attached my update of your file.
>>
>> Ryan
>>
>
> Thanks for the update and suggestions. I've attached a new version and a
> diff between your version and my new version.
>
> Thomas
>
> # - find DCMTK libraries and applications
> #
>
> #  DCMTK_INCLUDE_DIRS   - Directories to include to use DCMTK
> #  DCMTK_LIBRARIES     - Files to link against to use DCMTK
> #  DCMTK_FOUND         - If false, don't try to use DCMTK
> #  DCMTK_DIR           - (optional) Source directory for DCMTK
> #
> # DCMTK_DIR can be used to make it simpler to find the various include
> # directories and compiled libraries if you've just compiled it in the
> # source tree. Just set it to the root of the tree where you extracted
> # the source (default to /usr/include/dcmtk/)
>
> #=
> # Copyright 2004-2009 Kitware, Inc.
> # Copyright 2009 Mathieu Malaterre 
> # Copyright 2010 Thomas Sondergaard 
> #
> # Distributed under the OSI-approved BSD License (the "License");
> # see accompanying file Copyright.txt for details.
> #
> # This software is distributed WITHOUT ANY WARRANTY; without even the
> # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> # See the License for more information.
> #=
> # (To distributed this file outside of CMake, substitute the full
> #  License text for the above reference.)
>
> #
> # Written for VXL by Amitha Perera.
> # Upgraded for GDCM by Mathieu Malaterre.
> # Modified for EasyViz by Thomas Sondergaard.
> #
>
> if(NOT DCMTK_FOUND AND NOT DCMTK_DIR)
>        set(DCMTK_DIR
>                "/usr/include/dcmtk/"
>                CACHE
>                PATH
>                "Root of DCMTK source tree (optional).")
>        mark_as_advanced(DCMTK_DIR)
> endif()
>
>
> foreach(lib
>        dcmdata
>        dcmimage
>        dcmimgle
>        dcmjpeg
>        dcmnet
>        dcmpstat
>        dcmqrdb
>        dcmsign
>        dcmsr
>        dcmtls
>        ijg12
>        ijg16
>        ijg8
>        ofstd)
>
>        find_library(DCMTK_${lib}_LIBRARY
>                ${lib}
>                ${DCMTK_DIR}/${lib}/libsrc
>                ${DCMTK_DIR}/${lib}/libsrc/Release
>                ${DCMTK_DIR}/${lib}/libsrc/Debug
>                ${DCMTK_DIR}/${lib}/Release
>                ${DCMTK_DIR}/${lib}/Debug
>                ${DCMTK_DIR}/lib)
>
>        mark_as_advanced(DCMTK_${lib}_LIBRARY)
>
>        if(DCMTK_${lib}_LIBRARY)
>                list(APPEND DCMTK_LIBRARIES ${DCMTK_${lib}_LIBRARY})
>        endif()
>
> endforeach()
>
>
> set(DCMTK_config_TEST_HEADER osconfig.h)
> set(DCMTK_dcmdata_TEST_HEADER dctypes.h)
> set(DCMTK_dcmimage_TEST_HEADER dicoimg.h)
> set(DCMTK_dcmimgle_TEST_HEADER dcmimage.h)
> set(DCMTK_dcmjpeg_TEST_HEADER djdecode.h)
> set(DCMTK_dcmnet_TEST_HEADER assoc.h)
> set(DCMTK_dcmpstat_TEST_HEADER dcmpstat.h)
> set(DCMTK_dcmqrdb_TEST_HEADER dcmqrdba.h)
> set(DCMTK_dcmsign_TEST_HEADER sicert.h)
> set(DCMTK_dcmsr_TEST_HEADER dsrtree.h)
> set(DCMTK_dcmtls_TEST_HEADER tlslayer.h)
> set(DCMTK_ofstd_TEST_HEADER ofstdinc.h)
>
> foreach(dir
>        config
>        dcmdata
>        dcmimage
>        dcmimgle
>        dcmjpeg
>        dcmnet
>        dcmpstat
>        dcmqrdb
>        dcmsign
>        dcmsr
>        dcmtls
>

Re: [CMake] CTest / UTF-8

2010-06-01 Thread Mathieu Malaterre
For later reference, this was indeed the trick, simply updating from
2.8.0 to 2.8.1 solved my issue.

Thanks Dave !

On Mon, May 31, 2010 at 7:26 PM, Mathieu Malaterre
 wrote:
> $ ctest --version
> ctest version 2.8.0
>
> I guess I need to update :)
>
> Thanks
>
> On Mon, May 31, 2010 at 7:23 PM, David Cole  wrote:
>> ctest 2.8.1 and later should already be generating proper UTF-8... what
>> version of ctest are you using?
>>
>> On Mon, May 31, 2010 at 9:32 AM, Mathieu Malaterre
>>  wrote:
>>>
>>> Hi there,
>>>
>>>  Does anyone know how I can tell ctest to use UTF-8 to generate the
>>> XML files used for uploading results to CDAsh ?
>>>
>>> I have on one hand:
>>>
>>>
>>> Testing/Temporary/LastBuild_20100531-0918.log:/home/mathieu/Projects/CoSMo/trunk/Code/IO/csmModelModificationsLoader.cxx:386:
>>> warning: conversion to ‘Csm::IdentityType’ from ‘int’ may change the
>>> sign of the result
>>>
>>> but:
>>>
>>> Testing/20100531-0918/Build.xml:
>>>  /.../trunk/Code/IO/csmModelModificationsLoader.cxx:386:
>>> warning: conversion to
>>> ‘Csm::IdentityType’ from
>>> ‘int’ may change the sign of the
>>> result
>>>
>>> knowing that:
>>>
>>>
>>> $ head -1 Testing/20100531-0918/Build.xml
>>> 
>>>
>>> and
>>>
>>> $ echo $LANG
>>> en_US.UTF-8
>>>
>>>
>>> Thanks !
>>> --
>>> Mathieu
>>> ___
>>> 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
>>
>>
>
>
>
> --
> Mathieu
>



-- 
Mathieu
___
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] CTest / UTF-8

2010-05-31 Thread Mathieu Malaterre
$ ctest --version
ctest version 2.8.0

I guess I need to update :)

Thanks

On Mon, May 31, 2010 at 7:23 PM, David Cole  wrote:
> ctest 2.8.1 and later should already be generating proper UTF-8... what
> version of ctest are you using?
>
> On Mon, May 31, 2010 at 9:32 AM, Mathieu Malaterre
>  wrote:
>>
>> Hi there,
>>
>>  Does anyone know how I can tell ctest to use UTF-8 to generate the
>> XML files used for uploading results to CDAsh ?
>>
>> I have on one hand:
>>
>>
>> Testing/Temporary/LastBuild_20100531-0918.log:/home/mathieu/Projects/CoSMo/trunk/Code/IO/csmModelModificationsLoader.cxx:386:
>> warning: conversion to ‘Csm::IdentityType’ from ‘int’ may change the
>> sign of the result
>>
>> but:
>>
>> Testing/20100531-0918/Build.xml:
>>  /.../trunk/Code/IO/csmModelModificationsLoader.cxx:386:
>> warning: conversion to
>> ‘Csm::IdentityType’ from
>> ‘int’ may change the sign of the
>> result
>>
>> knowing that:
>>
>>
>> $ head -1 Testing/20100531-0918/Build.xml
>> 
>>
>> and
>>
>> $ echo $LANG
>> en_US.UTF-8
>>
>>
>> Thanks !
>> --
>> Mathieu
>> ___
>> 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
>
>



-- 
Mathieu
___
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] CTest / UTF-8

2010-05-31 Thread Mathieu Malaterre
Hi there,

  Does anyone know how I can tell ctest to use UTF-8 to generate the
XML files used for uploading results to CDAsh ?

I have on one hand:

Testing/Temporary/LastBuild_20100531-0918.log:/home/mathieu/Projects/CoSMo/trunk/Code/IO/csmModelModificationsLoader.cxx:386:
warning: conversion to ‘Csm::IdentityType’ from ‘int’ may change the
sign of the result

but:

Testing/20100531-0918/Build.xml:
/.../trunk/Code/IO/csmModelModificationsLoader.cxx:386:
warning: conversion to
‘Csm::IdentityType’ from
‘int’ may change the sign of the
result

knowing that:


$ head -1 Testing/20100531-0918/Build.xml


and

$ echo $LANG
en_US.UTF-8


Thanks !
-- 
Mathieu
___
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] Regression in FindJNI.cmake on ia64?

2010-05-28 Thread Mathieu Malaterre
On Fri, May 28, 2010 at 3:55 PM, Denis Barbier  wrote:
> On 2010/5/28 Brad King wrote:
>> Denis Barbier wrote:
>>> Hello cmake maintainers,
>>>
>>> vtk 5.4.2-7 FTBFS on ia64
>>>    
>>> https://buildd.debian.org/fetch.cgi?pkg=vtk;ver=5.4.2-7;arch=ia64;stamp=1275000467
>>>
>>> In this version, local FindJNI.cmake had been dropped and replaced by
>>> a dependency on cmake >= 2.8.1-3
>>>
>>> Configuration did not find Java libraries:
>>>   -- Java version 1.6.0.18 configured successfully!
>>>   -- Found Java: /usr/lib/jvm/default-java/bin/java
>>>   -- Could NOT find JNI  (missing:  JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY)
>>>
>>> I see nothing wrong in cmake, which is why I do not file a bug report
>>> yet, but are you aware of problems on ia64 with cmake 2.8.1-4?
>>
>> This change appears to be related:
>>
>>  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b5bc1d9f
>>  http://www.cmake.org/Bug/view.php?id=9611
>
> AFAICT these patches have been applied in Debian since they have been
> committed into your CVS repository, and no bug has been reported, so
> you do not have to worry too much ;)
> Something goes wrong, but I am not even sure it is related to cmake
> (it may be a Java problem too, or a broken autobuilder), I was asking
> just in case Modestas or others had been experiencing similar
> problems.
>
>> To what does CMAKE_SYSTEM_PROCESSOR get set?
>
> I will try to have access to an ia64 box tonight, but
>   
> https://buildd.debian.org/fetch.cgi?pkg=gdcm&arch=ia64&ver=2.0.14-9&stamp=1273082198&file=log&as=raw
> contains a successful check:
>  -- Java version 1.6.0.18 configured successfully!
>  -- Found Java: /usr/lib/jvm/default-java/bin/java
>  -- Found JNI: /usr/lib/jvm/default-java/jre/lib/ia64/libjawt.so
> so it looks like CMAKE_SYSTEM_PROCESSOR should be set to ia64.

Hi Denis,

  Thanks for taking care of this.

  Since this is working nicely in GDCM (kudos to Modestas), I would
say something *else* is being doing in VTK. Did you check debian/rules
or debian/CMakeCache.txt does not store some precomputed value for
CMAKE:JAVA_* variables ?

Thanks,
-- 
Mathieu

___
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] Building for 2 platforms with 4 compilers

2010-04-30 Thread Mathieu Malaterre



On Fri, Apr 30, 2010 at 11:16 AM, Kārlis Repsons  wrote:

Good day in here,
I was trying to figure out how should CMake be used to automate building, which
can happen on two or more platforms with some 4 compilers to be used in total,
and should store the results in file tree like $platform/$compiler or
$platform/$compilerEnvironment. Could you please suggest me how should it be
done? Some example?


I use one ctest script per compiler+platform. Eg:

Using gcc-snapshot:

http://public.kitware.com/cgi-bin/viewcvs.cgi/zorglub_gdcm2_gcc_snap.cmake?root=DashboardScripts&view=markup

Using gcc-4.3:
http://public.kitware.com/cgi-bin/viewcvs.cgi/zorglub_gdcm2_gcc43.cmake?root=DashboardScripts&view=markup

Using ctest scripting makes sure your test script is portable and is 
specifically tailored to calling cmake.


HTH
--
Mathieu



signature.asc
Description: OpenPGP digital signature
___
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] Use CMake to create C# project

2010-04-28 Thread Mathieu Malaterre
On Wed, Apr 28, 2010 at 8:38 AM, Andreas Roth
 wrote:
> done. So far i've found the following projects which have tried this way:
> - http://gdcm.svn.sourceforge.net/viewvc/gdcm/Sandbox/CMakeCSharp/

I'll talk about my experience in GDCM.

> Are there more? What are the limitations of these solutions? Are there any
> limitation using the add_custom_commands approach compared to the native
> language approach?

You do not get automatic (top-level) target dependencies :( Even  at
file level this is nasty because you cannot work across directories.
This should be working nicely if you are able to define everything in
a single directory (ideally).

HTH
-- 
Mathieu
___
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] Questions on CMAKE_CONFIGURATION_TYPES

2010-03-25 Thread Mathieu Malaterre
On Thu, Mar 25, 2010 at 12:51 PM, Michael Schildt
 wrote:
>>
>> On Wed, Mar 24, 2010 at 2:10 PM, John Drescher > > wrote:
>> >/ On Wed, Mar 24, 2010 at 1:42 PM, Michael Schildt
>> />/ > > wrote:
>> />>/ Hello,
>> />>/
>> />>/ I use GDCM libaries in one project. Unfurtunally, i couldn't find a
>> findGDCM
>> />>/ module and i'm not experienced enough to write one. I have seen that
>> GDCM is
>> />>/ used in ITK, so there must be a module like this. GDCM is using cmake
>> too,
>> />>/ so inclusion should be easy. But i have problems to link the correkt
>> library
>> />>/ version depending on the configuration type.
>> />>/
>> />>/ IF(WIN32)
>> />>/  INCLUDE_DIRECTORIES(C:/Programme/GDCM\ 2.0/include/gdcm-2.0)
>> />>/  IF(CMAKE_BUILD_TYPE MATCHES "Debug")
>> />>/   LINK_DIRECTORIES("C:/Program Files/GDCM/bin/Debug")
>> />>/  ELSE(CMAKE_BUILD_TYPE MATCHES "Debug")
>> />>/   LINK_DIRECTORIES("C:/Program Files/GDCM/bin/Release")
>> />>/  ENDIF(CMAKE_BUILD_TYPE MATCHES "Debug")
>> />>/  SET(GDCM_LIBRARIES gdcmcharls.lib gdcmCommon.lib gdcmDICT.lib
>> gdcmDSED.lib
>> />>/ gdcmexpat.lib gdcmgetopt.lib gdcmIOD.lib gdcmjpeg8.lib gdcmjpeg12.lib
>> />>/ gdcmjpeg16.lib gdcmMSFF.lib gdcmopenjpeg.lib gdcmzlib.lib)
>> />>/ ELSE(WIN32)
>> />>/   # Linux
>> />>/   INCLUDE_DIRECTORIES(/usr/include/gdcm-2.0)
>> />>/   SET(GDCM_LIBRARIES gdcmCommon gdcmDICT gdcmDSED gdcmIOD gdcmjpeg8
>> />>/ gdcmjpeg12 gdcmjpeg16 gdcmMSFF)
>> />>/ ENDIF(WIN32)
>> />>/
>> />>/ He always includes the Relase Directory. What is a solution for this
>> issue?
>> />>/
>> />/
>> />/ Build GDCM from source and it will have the necessary finders. Do not
>> />/ INSTALL. Then the usual in your CMakeLists.txt file. Here is an
>> />/ example.
>> />/
>> />/ CMakeLists.txt
>> />/ cmake_minimum_required(VERSION 2.6)
>> />/
>> />/        PROJECT(GDCMImageViewer)
>> />/
>> />/        FIND_PACKAGE(VTK REQUIRED)
>> />/        INCLUDE(${VTK_USE_FILE})
>> />/
>> />/        FIND_PACKAGE(GDCM REQUIRED)
>> />/        INCLUDE(${GDCM_USE_FILE})
>> />/
>> />/        INCLUDE_DIRECTORIES(
>> />/         ${GDCM_SOURCE_DIR}/Utilities/VTK
>> />/        )
>> />/
>> />/        IF(WIN32 AND NOT CYGWIN)
>> />/                ADD_SUBDIRECTORY(getopt)
>> />/                INCLUDE_DIRECTORIES(getopt)
>> />/        ENDIF(WIN32 AND NOT CYGWIN)
>> />/
>> />/        ADD_EXECUTABLE(GDCMImageViewer gdcmviewer.cxx)
>> />/        TARGET_LINK_LIBRARIES(GDCMImageViewer vtkHybrid vtkInfovis
>> vtkWidgets
>> />/ vtkgdcm getopt)
>> />/
>> />/
>> /
>> BTW when cmake-gui complains it can not find GDCM point it to the
>> place where you built gdcm. Also make sure you build all
>> configurations of GDCM that you want in the same build tree. That is
>> why I said do not install. Since install will try to put the binaries
>> in the same folder and since they are named the same it will cause
>> problems.
>>
>>
>> John
>>
>
> Hi,
>
> thanks for the useful hints, cmake finds the package now. But unfurtunally,
> it does not link the library and therefore i get a lot of unresolved
> dependency from gdcm. i replaced my stuff with
>
> FIND_PACKAGE(GDCM REQUIRED)
> INCLUDE(${GDCM_USE_FILE})
>
> and tested the typical variables
>
> MESSAGE(STATUS "Cmake GDCM: using GDCM includes at: ${GDCM_INCLUDE_DIR}")
> MESSAGE(STATUS "Cmake GDCM: using GDCM libraries: ${GDCM_LIBRARIES}")
> MESSAGE(STATUS "Cmake GDCM: using GDCM libraries: ${GDCM_LIBRARY}")
>
> but the are all empty? How can i find out, what is defined by GDCM?

`cmake --help-module` parses system installed Find*.cmake file,
however it does not parse *Config.cmake file. You have to look into
GDCMConfig.cmake and such to understand.

Anyway, there is no generic "GDCM_LIBRARIES", you have to specify
explicitely the name of the desired lib:

add_executable(dummy dummy.cxx)
target_link_libraries(dummy gdcmMSFF)

Cheers
-- 
Mathieu
___
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 finds the wrong Python interpreter on Windows

2010-02-26 Thread Mathieu Malaterre
On Fri, Feb 26, 2010 at 9:17 AM, Hendrik Sattler
 wrote:
> Zitat von Bill Hoffman :
>
>> Noel O'Boyle wrote:
>>
>>>
>>> Done. I've attached the result (off list). In summary it seems to be
>>> searching for python2.6.exe first, instead of python.exe.
>>>
>>
>> OK, so that is the problem
>>
>> It looks for names in this order:
>>
>> NAMES python2.6 python2.5 python2.4 python2.3 python2.2 python2.1
>> python2.0 python1.6 python1.5 python
>>
>>
>> It will prefer python2.6 over python in the PATH, and it has no way of
>> knowing or caring if one is cygwin or not.  I don't think there is much
>> we can do about this.
>>
>> I should have noticed this:
>> C:/Python26/python.exe
>> C:/Cygwin/bin/python2.5.exe
>>
>>
>> I suppose one fix could be to to have the windows one prefer python
>> over any of the named version ones...
>
> Or find both independently and compare their versions. OTOH, the problem was
> the library/executable mismatch, so it doesn't matter which is found as long
> as the library matches the executable.

+1
There is an old bug report for cmake for this. PythonLibs should be
derived from a python -c"..." (see bug #2257)

Cheers
-- 
Mathieu
___
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] [vtkusers] cmake language syntax highlighting added to wiki

2010-02-23 Thread Mathieu Malaterre
Could someone please point me to the configuration file for this mode
? I need to create a cmake syntax highlighting mode for docbook.

Thanks

On Wed, Jan 6, 2010 at 11:21 PM, David Doria  wrote:
> FYI anyone writing wiki pages -
>
> On the Kitware wiki's, you can now use:
>
> 
> ... cmake code here ...
> 
>
> (versus the old  or manual syntax highlighting )
>
> This looks much nicer than plain text, and is must less painful than
> manual syntax highlighting.  I know many of the Paraview wiki pages
> (http://www.cmake.org/Wiki/Plugin_HowTo#Writing_Plugins) use manual
> syntax highlighting - should I update them to use lang="cmake"?
>
> A comparison with plain text is here (for a few days - before I remove
> the old text-only version):
> http://www.vtk.org/Wiki/Distance_between_two_points
>
> Thanks,
>
> David D.
> ___
> 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 VTK FAQ at: 
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



-- 
Mathieu
___
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] add_custom_command vs add_subdirectory

2010-02-19 Thread Mathieu Malaterre
add_dependencies() seems to be working with add_subdirectory()

sorry for the noise
-Mathieu

On Fri, Feb 19, 2010 at 3:46 PM, Mathieu Malaterre
 wrote:
> Hi,
>
>  I am trying to find a solution with add_custom_command that can only
> depends on file generated within the same directory as where it is
> defined. What would I need to change here to make this small example
> work:
>
> $ cat CMakeLists.txt
> project(d12)
> cmake_minimum_required(VERSION 2.8)
>
> add_custom_command(
>  OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/bla.txt
>  COMMAND touch ${CMAKE_CURRENT_BINARY_DIR}/bla.txt
>  DEPENDS ${d12_BINARY_DIR}/sub/foo.txt
>  )
> add_custom_target(bla ALL
>  DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/bla.txt
>  )
> add_subdirectory(sub)
>
> and
>
> $ cat sub/CMakeLists.txt
> add_custom_command(
>  OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/foo.txt
>  COMMAND touch ${CMAKE_CURRENT_BINARY_DIR}/foo.txt
>  )
>
>
> Ref:
> svn co https://gdcm.svn.sourceforge.net/svnroot/gdcm/Sandbox/CMakeBug/12
>
> Thanks for suggestions,
> --
> Mathieu
>



-- 
Mathieu
___
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] add_custom_command vs add_subdirectory

2010-02-19 Thread Mathieu Malaterre
Hi,

  I am trying to find a solution with add_custom_command that can only
depends on file generated within the same directory as where it is
defined. What would I need to change here to make this small example
work:

$ cat CMakeLists.txt
project(d12)
cmake_minimum_required(VERSION 2.8)

add_custom_command(
  OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/bla.txt
  COMMAND touch ${CMAKE_CURRENT_BINARY_DIR}/bla.txt
  DEPENDS ${d12_BINARY_DIR}/sub/foo.txt
  )
add_custom_target(bla ALL
  DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/bla.txt
  )
add_subdirectory(sub)

and

$ cat sub/CMakeLists.txt
add_custom_command(
  OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/foo.txt
  COMMAND touch ${CMAKE_CURRENT_BINARY_DIR}/foo.txt
  )


Ref:
svn co https://gdcm.svn.sourceforge.net/svnroot/gdcm/Sandbox/CMakeBug/12

Thanks for suggestions,
-- 
Mathieu
___
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] InstallRequiredSystemLibraries.cmake and cpack -G NSIS

2009-12-08 Thread Mathieu Malaterre
On Tue, Dec 8, 2009 at 3:03 PM, Mathieu Malaterre
 wrote:
> Hi there,
>
>  I am currently experiencing a weird issue. The NSIS installer does
> not install the M$ redist dll as I would expect
> InstallRequiredSystemLibraries.cmake should be doing. The cpack -G ZIP
> is ok, I can see the M$ dll in the /bin directory. But for some reason
> the NSIS does not seems to install them.
>
>  Is there a way to list the file being shipped inside the NSIS installer ?
>
> System:
> - WinXP 32bits
> - CMake 2.8
> - GDCM trunk
> - VS 2008 Express

Quick question, what does the following do:

  INSTALL_PROGRAMS(/bin ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS})

When CPack component are being used ? It is attached to an empty cpack
component ?

Thanks
-- 
Mathieu
___
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] InstallRequiredSystemLibraries.cmake and cpack -G NSIS

2009-12-08 Thread Mathieu Malaterre
Hi there,

  I am currently experiencing a weird issue. The NSIS installer does
not install the M$ redist dll as I would expect
InstallRequiredSystemLibraries.cmake should be doing. The cpack -G ZIP
is ok, I can see the M$ dll in the /bin directory. But for some reason
the NSIS does not seems to install them.

  Is there a way to list the file being shipped inside the NSIS installer ?

System:
- WinXP 32bits
- CMake 2.8
- GDCM trunk
- VS 2008 Express

Thanks,
-- 
Mathieu
___
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] 32 bits compilation on x64 platform - how to find system libraries

2009-12-07 Thread Mathieu Malaterre
On Mon, Dec 7, 2009 at 11:43 AM, Marcel Loose  wrote:
> Hi Olivier,
>
> I think you need to set the global property FIND_LIBRARY_USE_LIB64_PATHS
> to OFF.
>
> BTW, I disagree with Mathieu that building 32-bit libraries/executables
> on a 64-bit system is cross-compilation. These binaries can be run
> without a problem on the host system. So, IMHO, you don't need a
> toolchain file. The only thing you have to do is instruct gcc/g++ to
> generate 32-bit objects/binaries, using the -m32 option, and tell CMake
> to look in lib instead of lib64 by setting the aforementioned property.


There is two things from the top of my head:
1. ia64 which is not x86 compatible
2. You still need a libz/libpng/libjpeg compiled as 32bits on your
amd64 system...

I think the project needs to be self contained (convenient libs)
otherwise to get it compiled using the -m32 trick

2cts
-- 
Mathieu
___
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] 32 bits compilation on x64 platform - how to find system libraries

2009-12-04 Thread Mathieu Malaterre
On Fri, Dec 4, 2009 at 4:39 PM, Olivier Pierard
 wrote:
> Dear all,
>
> In order to perform 32 bits compilation on 64 bits platform, how can I
> tell that all find_libraries for which no path is specified to look in
> /usr/lib instead of /usr/lib64 ?  Is there a configuration variable for
> cmake platform or a default searching directories variable ?
>

This is called CMAKE_FIND_ROOT_PATH

See for example:

http://gdcm.svn.sf.net/viewvc/gdcm/trunk/CMake/Toolchain-gcc-m32.cmake?view=markup

You man need to read:
http://www.cmake.org/Wiki/CMake_Cross_Compiling

Cheers
-- 
Mathieu
___
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 support for Csharp?

2009-11-25 Thread Mathieu Malaterre
Joseph,

  You can have a look at what I am doing in GDCM. I can build the C++
library and wrap the interface using SWIG in C#.

Ref:
http://gdcm.sourceforge.net/

  What you really want to look at are the CMake files here:

http://gdcm.svn.sf.net/viewvc/gdcm/trunk/CMake/

  or the bug report:

http://cmake.org/Bug/view.php?id=7918

  I used custom command, but this is still painfull to use to create
the dependencies properly (for parallel make).

HTH

On Tue, Nov 24, 2009 at 7:06 PM, David Cole  wrote:
> There has not been anything done in CMake itself related to C# development.
> I'm biased against putting in "partial support" for it without full blown
> generated *.csproj files that support resources, .NET strong name
> signatures, and everything, so it's a significant chunk of dev work.
> However, CMake is very good at building things via custom commands, and the
> C# compiler is pretty easy to get working with CMake custom commands.
>
> If you need something in the very short term, I'd recommend using custom
> commands. If you have a longer time frame and funding to make it happen,
> please contact me off-list for possible contractual arrangement to add C#
> support to CMake according to your schedule and funding ability.
>
> HTH,
> David Cole
> Kitware, Inc.
>
> On Tue, Nov 24, 2009 at 12:35 PM, Sarbak, Joseph 
> wrote:
>>
>>
>> Hello,  any advice would be greatly appreciated.
>>
>> This question appears to have asked in the past.  Has there been any new
>> development in support for csharp?
>>
>> I have a project that is a mix of C, C++, and Csharp, and I would like to
>> manage all builds from one tool: cmake.
>>
>> Your answers would be much appreciated.
>>
>> Thank you.
>>
>> Joe Sarbak
>>
>>
>>
>> 
>>
>> This E-Mail (including any attachments) may contain privileged or
>> confidential information.  It is intended only for the addressee(s)
>> indicated above.
>>
>> The sender does not waive any of its rights, privileges or other
>> protections respecting this information.
>>
>> Any distribution, copying or other use of this E-Mail or the information
>> it contains, by other than an intended recipient, is not sanctioned and is
>> prohibited.
>>
>> If you received this E-Mail in error, please delete it and advise the
>> sender (by return E-Mail or otherwise) immediately.
>>
>> This E-Mail (including any attachments) has been scanned for viruses.
>>
>> It is believed to be free of any virus or other defect that might affect
>> any computer system into which it is received and opened.
>>
>> However, it is the responsibility of the recipient to ensure that it is
>> virus free.
>>
>> The sender accepts no responsibility for any loss or damage arising in any
>> way from its use.
>>
>> E-Mail received by or sent from RBC Capital Markets is subject to review
>> by Supervisory personnel.
>>
>> Such communications are retained and may be produced to regulatory
>> authorities or others with legal rights to the information.
>>
>> IRS CIRCULAR 230 NOTICE:  TO COMPLY WITH U.S. TREASURY REGULATIONS, WE
>> ADVISE YOU THAT ANY U.S. FEDERAL TAX ADVISE INCLUDED IN THIS COMMUNICATION
>> IS NOT INTENDED OR WRITTEN TO BE USED, AND CANNOT BE USED, TO AVOID ANY U.S.
>> FEDERAL TAX PENALTIES OR TO PROMOTE, MARKET, OR RECOMMEND TO ANOTHER PARTY
>> ANY TRANSACTION OR MATTER.
>>
>> ___
>> 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
>



-- 
Mathieu
___
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 / UNC and long path

2009-11-24 Thread Mathieu Malaterre
On Tue, Nov 24, 2009 at 4:22 PM, Tyler Roscoe  wrote:
> On Tue, Nov 24, 2009 at 04:15:18PM +0100, Mathieu Malaterre wrote:
>>   Does anyone knows how to create a directory on Win32 system ? I tried:
>>
>> http://gdcm.svn.sourceforge.net/svnroot/gdcm/Sandbox/CMakeBug/11/CMakeLists.txt
>>
>>   But it fails on my WinXP 32bits system.
>
> Use execute_process() or a custom_command with 'cmake -E
> make_directory'.
>
> However if you're running into a limitation of 32-bit xp or whatever
> filesystem you're using, CMake isn't going to be able to help you.

I have not tried, but just from a CMake design point of view I /would/
think that cmake -E make_directory is identical to calling
file(MAKE_DIRECTORY ...).
I think they share the same code base.

Did you try on your system and one is working but not the other ?

Thanks,
-- 
Mathieu
___
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 / UNC and long path

2009-11-24 Thread Mathieu Malaterre
Hi there,

  Does anyone knows how to create a directory on Win32 system ? I tried:

http://gdcm.svn.sourceforge.net/svnroot/gdcm/Sandbox/CMakeBug/11/CMakeLists.txt

  But it fails on my WinXP 32bits system.

Suggestion *very* welcome

Thanks,
-- 
Mathieu
___
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] (cmake2.8) FindOpenSSl and win32/MinGW

2009-11-19 Thread Mathieu Malaterre
I merged it into CMake/CVS. Thanks.

 $ cvs ci -m"Fix FindOpenSSL on mingw. This has been reported to be
working by ctrlaltca libero.it on cmake mailing list."
Modules/FindOpenSSL.cmake
Committer: Mathieu Malaterre 
/cvsroot/CMake/CMake/Modules/FindOpenSSL.cmake,v  <--  Modules/FindOpenSSL.cmake
new revision: 1.6; previous revision: 1.5

On Wed, Nov 18, 2009 at 4:36 PM, ctrlaltca  wrote:
> Mathieu Malaterre wrote:
>>
>> On Tue, Nov 17, 2009 at 6:54 PM, ctrlaltca  wrote:
>>>
>>> Mathieu Malaterre wrote:
>>>>
>>>> On Tue, Nov 17, 2009 at 5:10 PM, ctrlaltca  wrote:
>>>>>
>>>>> I've tried to move a project (www.kvirc.net) from from cmake 2.6.4 to
>>>>> 2.8
>>>>> and i'm having a issue with FindOpenSSL. My os is winXP and my
>>>>> compilation
>>>>> environment is MinGW (with gcc 4.4.0)
>>>>> FindOpenSSL was working fine for me in cmake 2.6.4, but it's not
>>>>> working
>>>>> anymore in cmake 2.8 (OPENSSL_FOUND always false).
>>>>> I've checked differences, and it seems that my problem is related to
>>>>> this
>>>>> bugfix: http://www.cmake.org/Bug/view.php?id=8971
>>>>> Since no "crypto" lib exists under windows/mingw32, so no library is
>>>>> found
>>>>> for OPENSSL_CRYPTO_LIBRARIES and OPENSSL_FOUND is set to false.
>>>>>
>>>>> Am i missing something? is this s regression? Thank you
>>>>
>>>> How did you install OpenSSL on your system ?
>>>>
>>>> Thanks
>>>
>>> I installed the "Win32 OpenSSL v0.9.8l" package from here:
>>> http://www.slproweb.com/products/Win32OpenSSL.html
>>> and then added these values to environmental variables:
>>> CMAKE_INCLUDE_PATH      C:\openssl\include
>>> CMAKE_LIBRARY_PATH      C:\openssl\lib\mingw
>>>
>>>
>>>
>>
>> I see :) You have a strong definition of "not working":
>> The previously non-working mingw findopenssl, which did not report
>> failure, is now reporting failure...
>>
>> I have updated it in my pet project and will let know when I merge it
>> into CMake/CVS:
>> http://gdcm.svn.sf.net/viewvc/gdcm/trunk/CMake/FindOpenSSL.cmake?view=log
>>
>> Thanks for report !
>
> I confirm that the new version works fine. Thank you for the quick fix!
>



-- 
Mathieu
___
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] (cmake2.8) FindOpenSSl and win32/MinGW

2009-11-18 Thread Mathieu Malaterre
On Tue, Nov 17, 2009 at 6:54 PM, ctrlaltca  wrote:
> Mathieu Malaterre wrote:
>>
>> On Tue, Nov 17, 2009 at 5:10 PM, ctrlaltca  wrote:
>>>
>>> I've tried to move a project (www.kvirc.net) from from cmake 2.6.4 to 2.8
>>> and i'm having a issue with FindOpenSSL. My os is winXP and my
>>> compilation
>>> environment is MinGW (with gcc 4.4.0)
>>> FindOpenSSL was working fine for me in cmake 2.6.4, but it's not working
>>> anymore in cmake 2.8 (OPENSSL_FOUND always false).
>>> I've checked differences, and it seems that my problem is related to this
>>> bugfix: http://www.cmake.org/Bug/view.php?id=8971
>>> Since no "crypto" lib exists under windows/mingw32, so no library is
>>> found
>>> for OPENSSL_CRYPTO_LIBRARIES and OPENSSL_FOUND is set to false.
>>>
>>> Am i missing something? is this s regression? Thank you
>>
>> How did you install OpenSSL on your system ?
>>
>> Thanks
>
> I installed the "Win32 OpenSSL v0.9.8l" package from here:
> http://www.slproweb.com/products/Win32OpenSSL.html
> and then added these values to environmental variables:
> CMAKE_INCLUDE_PATH      C:\openssl\include
> CMAKE_LIBRARY_PATH      C:\openssl\lib\mingw
>
>
>

I see :) You have a strong definition of "not working":
The previously non-working mingw findopenssl, which did not report
failure, is now reporting failure...

I have updated it in my pet project and will let know when I merge it
into CMake/CVS:
http://gdcm.svn.sf.net/viewvc/gdcm/trunk/CMake/FindOpenSSL.cmake?view=log

Thanks for report !
-- 
Mathieu
___
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] (cmake2.8) FindOpenSSl and win32/MinGW

2009-11-17 Thread Mathieu Malaterre
On Tue, Nov 17, 2009 at 5:10 PM, ctrlaltca  wrote:
> I've tried to move a project (www.kvirc.net) from from cmake 2.6.4 to 2.8
> and i'm having a issue with FindOpenSSL. My os is winXP and my compilation
> environment is MinGW (with gcc 4.4.0)
> FindOpenSSL was working fine for me in cmake 2.6.4, but it's not working
> anymore in cmake 2.8 (OPENSSL_FOUND always false).
> I've checked differences, and it seems that my problem is related to this
> bugfix: http://www.cmake.org/Bug/view.php?id=8971
> Since no "crypto" lib exists under windows/mingw32, so no library is found
> for OPENSSL_CRYPTO_LIBRARIES and OPENSSL_FOUND is set to false.
>
> Am i missing something? is this s regression? Thank you

How did you install OpenSSL on your system ?

Thanks
-- 
Mathieu
___
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] Documentation for find_package( COMPONENTS )

2009-11-17 Thread Mathieu Malaterre
Hi there,

  The documentation is pretty clear on how to generate and fill in
cmake variable to declare that package VERSION x.y was properly found:

...
   The version file checks whether it satisfies the requested version and
   sets these variables:

 PACKAGE_VERSION= full provided version string
 PACKAGE_VERSION_EXACT  = true if version is exact match
 PACKAGE_VERSION_COMPATIBLE = true if version is compatible
 PACKAGE_VERSION_UNSUITABLE = true if unsuitable as any version
...

  What I did not find out is the documentation for components. Let say
I am the author of package BLA, which has two COMPONENTS: FOO and BAR.
When my package is configured+build+installed with only component FOO,
I'd like a call to

 find_package(BLA COMPONENTS BAR REQUIRED)

to fail. Which CMake variables should I fill in for that in my BLAConfig.cmake ?

Thanks,
-- 
Mathieu
___
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] FindBoost: FIND_PACKAGE ( Boost COMPONENTS filesystem )

2009-11-04 Thread Mathieu Malaterre
On Wed, Nov 4, 2009 at 7:50 PM, Philip Lowman  wrote:
> Personally, I think FindBoost is complex enough without having to  also keep
> track of boost's internal dependencies as well.  Maybe things would be
> better if the boost people published this info with every release.

I understand your point. Thanks for maintaining this module.

> If you'd like to check in support for the feature and volunteer to maintain
> it, however, that's fine by me.  It would make so much more sense to do
> within Boost itself,  though.

Yup, using cmake this would be trivial:

ADD_LIBRARY(filesystem ${filesystem_SRCS})
SET_TARGET_PROPERTIES(filesystem LINK_INTERFACE_LIBRARIES "system")

If only those people could ditch, this bjam based build system and
start using the cmake one...

-- 
Mathieu
___
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] find_package is fantastic

2009-11-04 Thread Mathieu Malaterre
On Wed, Nov 4, 2009 at 7:30 PM, Brad King  wrote:
> FYI, you don't actually need the HINTS option either.
> Just set CMAKE_PREFIX_PATH in your environment to point
> at the installation prefix (or even the build tree).
>
> You can also set the env var MyPacakage_DIR and it will be used
> automatically.  I've just committed documentation and testing
> for this old but previously un-advertised feature.

This is even simplier !

Speaking of missing documentation, there may be a general confusion
due to some case-insensive cmake module. When one look at
FindLibXml2.cmake, which sets LIBXML2_LIBRARIES / LIBXML2_INCLUDE_DIR,
people may think that
setting MyPackage_DIR is equivalent to setting MYPACKAGE_DIR. This is
not the case and for example:

  find_package(CaSeSeNsItiVe)

will actually look for CaSeSeNsItiVeConfig.cmake and one has to set
CaSeSeNsItiVe_DIR.

2cts
-- 
Mathieu
___
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] simple ctest

2009-11-04 Thread Mathieu Malaterre
On Wed, Nov 4, 2009 at 4:52 PM,   wrote:
> I changed over to learn the windows batch a bit and I created a short script 
> to do the work, for some things I planed to integrate into ctest.
>
> The rest works like a charm (configuring, building, reporting, packaging etc)
>
> I am not sure about the status of ctest scripting - is it widely use?

I gave up one time and used shell script.
Now I am stuck with this shell script and being forced to install
cygwin just to be able to execute this shell script, while if I had
taken the time it could be writen using ctest and be portable. You'll
have the same problem when you'll start doing stuff on *nix platform
and your batch file will be duplicated in some kind of shell script.

2cts
-- 
Mathieu
___
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] FindBoost: FIND_PACKAGE ( Boost COMPONENTS filesystem )

2009-11-04 Thread Mathieu Malaterre
Philip,

  I guess I was not very clear in my previous email. But here is my
proposed change:

@@ -322,8 +322,14 @@
   if(Boost_VERSION AND Boost_FIND_COMPONENTS)
  math(EXPR _boost_maj "${Boost_VERSION} / 10")
  math(EXPR _boost_min "${Boost_VERSION} / 100 % 1000")
- if(${_boost_maj}.${_boost_min} VERSION_LESS 1.35)
-   list(REMOVE_ITEM Boost_FIND_COMPONENTS system)
+ if(${_boost_maj}.${_boost_min} VERSION_GREATER 1.34)
+   # when use asked for filesystem or wave, automatically add
+   # system to the list of components
+   list(FIND Boost_FIND_COMPONENTS filesystem v1)
+   list(FIND Boost_FIND_COMPONENTS wave v2)
+   if(v1 OR v2)
+ list(APPEND Boost_FIND_COMPONENTS system)
+   endif(v1 OR v2)
  endif()
   endif()


Therefore calling

FIND_PACKAGE ( Boost COMPONENTS filesystem REQUIRED)

will work on boost 1.34 and boost > 1.34

Comments ?

On Tue, Nov 3, 2009 at 3:20 PM, Mathieu Malaterre
 wrote:
> The way I see it to address is that 'system' is an internal details
> (AFAIK). It should be automatically pulled in for filesystem and wave
> (for boost > 1.34), instead of the contrary (removing system when
> using boost 1.34).
> So this means I will be breaking the interface...
>
> Comments anyone ?
>
> On Tue, Nov 3, 2009 at 3:14 PM, Philip Lowman  wrote:
>> This was addressed on the mailing list and I thought had been resolved based
>> on user feedback.
>>
>> The code which is supposed to fix this is on line 326 of FindBoost as
>> checked into CVS.  A patch would be appreciated if the code doesn't work for
>> you.
>>
>> See also bug 8734
>>
>> On Nov 3, 2009 5:05 AM, "Mathieu Malaterre" 
>> wrote:
>>
>> Hi Philip,
>>
>>  That's where I stop understanding. I cannot state this:
>>
>> FIND_PACKAGE ( Boost COMPONENTS filesystem REQUIRED) # ideal
>>
>>  If I follow your suggestion I need to express an internal
>> dependencie at user level:
>>
>> FIND_PACKAGE ( Boost COMPONENTS filesystem system REQUIRED)
>>
>>  which fails for Boost 1.34 with:
>>
>> ...
>> CMake Error at Cmake/FindBoost.cmake:894 (message):
>>  Unable to find the requested Boost libraries.
>>
>>  Boost version: 1.34.1
>>
>>  Boost include path: /usr/include
>>
>>  The following Boost libraries could not be found:
>>
>>          boost_system
>>
>>  Some (but not all) of the required Boost libraries were found.  You may
>>  need to install these additional Boost libraries.  Alternatively, set
>>  Boost_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
>>  to the location of Boost.
>> Call Stack (most recent call first):
>>  CMakeLists.txt:33 (FIND_PACKAGE)
>> ...
>>
>> Thanks
>>
>> On Mon, Nov 2, 2009 at 6:24 PM, Philip Lowman  wrote: > Add
>> system to the list of ...
>>
>> --
>> Mathieu
>>
>
>
>
> --
> Mathieu
>



-- 
Mathieu
___
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] find_package is fantastic

2009-11-04 Thread Mathieu Malaterre
Just wanted to say : great job on the find_package interface !

This is extremely convenient to use for package using cmake as build package.
All I had to do is configure a *Config.cmake and a
*ConfigVersion.cmake file. And then from the outside I can simply
find_package(MyPackage HINTS $ENV{MyPackage_ROOT})

-> No need to write a FindMyPackage.cmake
-> *Congif.cmake files are auto-magically found
-> Version is automatically taken into account.
-> I can easily configure/build, thanks to a simple env var.

Thank you !
-- 
Mathieu
___
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] Trouble understanding --build-and-test

2009-11-04 Thread Mathieu Malaterre
In fact that was easy, simply calling ctest as  --test-command did the trick.

Sorry for the noise

On Wed, Nov 4, 2009 at 12:50 PM, Mathieu Malaterre
 wrote:
> Hi there,
>
>  I am struggling to understand how to use ctest  --build-and-test. I
> have reproduce the issue with a minimal cmakelists.txt file at:
>
> http://gdcm.svn.sf.net/viewvc/gdcm/Sandbox/CMakeBug/10/CMakeLists.txt?view=markup
>
> which all it does is simply configure a cmakelists.txt file for the
> --build-and-test step. The building step is working fine, no problem.
> However I do not understand how to execute the test as listed in the
> configured cmakelists.txt, which :
>
> http://gdcm.svn.sf.net/viewvc/gdcm/Sandbox/CMakeBug/10/BlaCMakeLists.txt.in?view=markup
>
>  What is the pupose of --test-command ? How should I specify 'execute
> the make test target' within the --build-and-test command ?
>
> Thanks,
> --
> Mathieu
>



-- 
Mathieu
___
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] Trouble understanding --build-and-test

2009-11-04 Thread Mathieu Malaterre
Hi there,

  I am struggling to understand how to use ctest  --build-and-test. I
have reproduce the issue with a minimal cmakelists.txt file at:

http://gdcm.svn.sf.net/viewvc/gdcm/Sandbox/CMakeBug/10/CMakeLists.txt?view=markup

which all it does is simply configure a cmakelists.txt file for the
--build-and-test step. The building step is working fine, no problem.
However I do not understand how to execute the test as listed in the
configured cmakelists.txt, which :

http://gdcm.svn.sf.net/viewvc/gdcm/Sandbox/CMakeBug/10/BlaCMakeLists.txt.in?view=markup

  What is the pupose of --test-command ? How should I specify 'execute
the make test target' within the --build-and-test command ?

Thanks,
-- 
Mathieu
___
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] Executing a CMake Custom Target from CTest

2009-11-04 Thread Mathieu Malaterre
On Tue, Nov 3, 2009 at 6:20 PM, Bill Hoffman  wrote:
> Mathieu Malaterre wrote:
>>
>> Hi there,
>>
>>  I'd like to know if this is possible to execute a cmake custom
>> target from my nightly ctest script.
>> Eg. In cmake
>>
>> ...
>>  ADD_CUSTOM_COMMAND(
>>    OUTPUT bla.txt
>>    COMMAND echo "bla" > bla.txt
>>    VERBATIM
>>    )
>>  ADD_CUSTOM_TARGET(BLA DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/bla.txt)

This is really cool !

Thanks
-- 
Mathieu
___
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] FindBoost: FIND_PACKAGE ( Boost COMPONENTS filesystem )

2009-11-03 Thread Mathieu Malaterre
The way I see it to address is that 'system' is an internal details
(AFAIK). It should be automatically pulled in for filesystem and wave
(for boost > 1.34), instead of the contrary (removing system when
using boost 1.34).
So this means I will be breaking the interface...

Comments anyone ?

On Tue, Nov 3, 2009 at 3:14 PM, Philip Lowman  wrote:
> This was addressed on the mailing list and I thought had been resolved based
> on user feedback.
>
> The code which is supposed to fix this is on line 326 of FindBoost as
> checked into CVS.  A patch would be appreciated if the code doesn't work for
> you.
>
> See also bug 8734
>
> On Nov 3, 2009 5:05 AM, "Mathieu Malaterre" 
> wrote:
>
> Hi Philip,
>
>  That's where I stop understanding. I cannot state this:
>
> FIND_PACKAGE ( Boost COMPONENTS filesystem REQUIRED) # ideal
>
>  If I follow your suggestion I need to express an internal
> dependencie at user level:
>
> FIND_PACKAGE ( Boost COMPONENTS filesystem system REQUIRED)
>
>  which fails for Boost 1.34 with:
>
> ...
> CMake Error at Cmake/FindBoost.cmake:894 (message):
>  Unable to find the requested Boost libraries.
>
>  Boost version: 1.34.1
>
>  Boost include path: /usr/include
>
>  The following Boost libraries could not be found:
>
>          boost_system
>
>  Some (but not all) of the required Boost libraries were found.  You may
>  need to install these additional Boost libraries.  Alternatively, set
>  Boost_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
>  to the location of Boost.
> Call Stack (most recent call first):
>  CMakeLists.txt:33 (FIND_PACKAGE)
> ...
>
> Thanks
>
> On Mon, Nov 2, 2009 at 6:24 PM, Philip Lowman  wrote: > Add
> system to the list of ...
>
> --
> Mathieu
>



-- 
Mathieu
___
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] Executing a CMake Custom Target from CTest

2009-11-03 Thread Mathieu Malaterre
Hi there,

  I'd like to know if this is possible to execute a cmake custom
target from my nightly ctest script.
Eg. In cmake

...
  ADD_CUSTOM_COMMAND(
OUTPUT bla.txt
COMMAND echo "bla" > bla.txt
VERBATIM
)
  ADD_CUSTOM_TARGET(BLA DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/bla.txt)
...

  For now I am copy/pasting this as an execute_process:

...
CTEST_START(Nightly)
CTEST_UPDATE(SOURCE "${CTEST_SOURCE_DIRECTORY}" RETURN_VALUE res)
CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
# duplicated code:
EXECUTE_PROCESS(COMMAND echo "bla" > bla.txt
  OUTPUT_FILE bla.txt
  RESULT_VARIABLE RES)
CTEST_SUBMIT(RETURN_VALUE res)
...

Thanks for suggestion,
-- 
Mathieu
___
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] FindBoost: FIND_PACKAGE ( Boost COMPONENTS filesystem )

2009-11-03 Thread Mathieu Malaterre
Hi Philip,

  That's where I stop understanding. I cannot state this:

FIND_PACKAGE ( Boost COMPONENTS filesystem REQUIRED) # ideal

  If I follow your suggestion I need to express an internal
dependencie at user level:

FIND_PACKAGE ( Boost COMPONENTS filesystem system REQUIRED)

  which fails for Boost 1.34 with:

...
CMake Error at Cmake/FindBoost.cmake:894 (message):
  Unable to find the requested Boost libraries.

  Boost version: 1.34.1

  Boost include path: /usr/include

  The following Boost libraries could not be found:

  boost_system

  Some (but not all) of the required Boost libraries were found.  You may
  need to install these additional Boost libraries.  Alternatively, set
  Boost_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
  to the location of Boost.
Call Stack (most recent call first):
  CMakeLists.txt:33 (FIND_PACKAGE)
...

Thanks

On Mon, Nov 2, 2009 at 6:24 PM, Philip Lowman  wrote:
> Add system to the list of components.  FindBoost should silently omit it on
> older versions of boost w/o a system library.  At least I think.
>
> Sorry for brief messages, typing on mobile :)
>
> On Nov 2, 2009 11:30 AM, "Mathieu Malaterre" 
> wrote:
>
> I can reproduce with CMake / CVS.
>
> FIND_PACKAGE ( Boost COMPONENTS filesystem )
>
> ADD_LIBRARY( bla SHARED bla_use_filesystem.cxx)
> TARGET_LINK_LIBRARIES( bla ${Boost_LIBRARIES}   )
>
> ->
>
> CMakeFiles/Csm.dir/Common/csmPathSet.cc.o: In function
> `__static_initialization_and_destruction_0':
> /usr/include/boost/system/error_code.hpp:205: undefined reference to
> `boost::system::get_system_category()'
> /usr/include/boost/system/error_code.hpp:206: undefined reference to
> `boost::system::get_generic_category()'
> /usr/include/boost/system/error_code.hpp:211: undefined reference to
> `boost::system::get_generic_category()'
> /usr/include/boost/system/error_code.hpp:212: undefined reference to
> `boost::system::get_generic_category()'
> /usr/include/boost/system/error_code.hpp:213: undefined reference to
> `boost::system::get_system_category()'
> CMakeFiles/Csm.dir/IO/csmGraphLoader.cc.o: In function
> `__static_initialization_and_destruction_0':
> /usr/include/boost/system/error_code.hpp:205: undefined reference to
> `boost::system::get_system_category()'
> /usr/include/boost/system/error_code.hpp:206: undefined reference to
> `boost::system::get_generic_category()'
> /usr/include/boost/system/error_code.hpp:211: undefined reference to
> `boost::system::get_generic_category()'
> /usr/include/boost/system/error_code.hpp:212: undefined reference to
> `boost::system::get_generic_category()'
> /usr/include/boost/system/error_code.hpp:213: undefined reference to
> `boost::system::get_system_category()'
> CMakeFiles/Csm.dir/IO/csmChessBoardLoader.cc.o: In function
> `__static_initialization_and_destruction_0':
> /usr/include/boost/system/error_code.hpp:205: undefined reference to
> `boost::system::get_system_category()'
> /usr/include/boost/system/error_code.hpp:206: undefined reference to
> `boost::system::get_generic_category()'
> /usr/include/boost/system/error_code.hpp:211: undefined reference to
> `boost::system::get_generic_category()'
> /usr/include/boost/system/error_code.hpp:212: undefined reference to
> `boost::system::get_generic_category()'
> /usr/include/boost/system/error_code.hpp:213: undefined reference to
> `boost::system::get_system_category()'
> CMakeFiles/Csm.dir/IO/csmModelLoader.cc.o: In function
> `__static_initialization_and_destruction_0':
> /usr/include/boost/system/error_code.hpp:205: undefined reference to
> `boost::system::get_system_category()'
> /usr/include/boost/system/error_code.hpp:206: undefined reference to
> `boost::system::get_generic_category()'
> /usr/include/boost/system/error_code.hpp:211: undefined reference to
> `boost::system::get_generic_category()'
> /usr/include/boost/system/error_code.hpp:212: undefined reference to
> `boost::system::get_generic_category()'
> /usr/include/boost/system/error_code.hpp:213: undefined reference to
> `boost::system::get_system_category()'
>
>
> What should have I been writing instead ?
>
> Thanks !
>
> On Mon, Nov 2, 2009 at 4:41 PM, Philip Lowman  wrote: >
> Which FindBoost are you u...
>
> --
> Mathieu
>



-- 
Mathieu
___
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] Bug in 2.8 branch (Head branch also)

2009-11-03 Thread Mathieu Malaterre
You are using a /very/ ancient CVS HEAD ;)

It was fixed yesterday

On Tue, Nov 3, 2009 at 2:09 AM, Steven Wilson
 wrote:
> Consider the following:
>
> foo.cpp
>
> #include 
>
> int main()
> {
>     std::cout << "foo" << std::endl;
>     return 0;
> }
>
>
> CMakeLists.txt
>
> cmake_minimum_required(VERSION 2.6.4)
>
> add_executable(foo foo.cpp)
>
> set(BUILD_FOO ON PARENT_SCOPE)
>
>
> With CMake built from the CMake-2-8 branch and also the head  branch of the
> CVS tree, the set(BUILD_FOO ON PARENT_SCOPE) crashes CMake on snow-leopard.
>
> Thanks,
>
> Steve
>
> ___
> 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
>



-- 
Mathieu
___
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] FindJava.cmake update

2009-11-02 Thread Mathieu Malaterre
On Mon, Nov 2, 2009 at 5:07 PM, Hendrik Sattler  wrote:
> Zitat von Mathieu Malaterre :
>
>> Hendrik,
>>
>> On Mon, Nov 2, 2009 at 3:19 PM, Hendrik Sattler  
>> wrote:
>>>
>>> Zitat von Mathieu Malaterre :
>>>
>>>> I updated the FindJava.cmake. It now implements the VERSION* stuff,
>>>> and I fixed the naming convention as per the readme.txt. I tested on
>>>> linux/gcj, linux/sun-java and linux/openjdk-6
>>>
>>> Why are you using NO_DEFAULT_PATH and but listing /usr/bin and
>>> /usr/local/bin? This is wrong and breaks "/usr/local/bin before
>>> /usr/bin".
>>> Just drop those from the list and also your NO_DEFAULT_PATH. If you want
>>> your list first, use HINTS instead of PATHS.
>>
>> Fixed. Thanks !
>
> Thanks, too.
>
> However, it can still be improved. The current (partial) list is:
>  /usr/lib/java/bin
>  /usr/share/java/bin
>  /usr/local/java/bin
>  /usr/local/java/share/bin
>  /usr/java/j2sdk1.4.2_04
>  /usr/lib/j2sdk1.4-sun/bin
>  /usr/java/j2sdk1.4.2_09/bin
>  /usr/lib/j2sdk1.5-sun/bin
>  /opt/sun-jdk-1.5.0.04/bin
>
> I am still not sure that the path list is good.

This is mostly for backward compat. policy only IMHO. I do not think
*anyone* is actually relying on those.

> Newer version should come
> first to possibly match the version criteria. OTOH, if there is a version
> request for EXACT 1.4, finding version 1.5 is wrong when 1.4 is also
> installed (remember: more than one can be installed at the same time). Same
> applies for the registry entries. The list should be assembled according to
> the version requested. There's no point in looking for other versions than
> the requested one(s).
> The odd paths like /usr/java/j2sdk1.4.2_04 (actually the whole list above)
> should just go away: why only list those specific versions and locations? If
> java is installed there, it is likely to either have symlinks to the normal
> bin locations or to be in PATH or JAVA_HOME.

I do agree for the HKEY* stuff, but deducing version information from
path is very hazardous. Eg on my system, kaffe/java 1.4 is at:
/usr/lib/kaffe/. While Java 1.6 is either
/usr/lib/jvm/java-6-sun-1.6.0.12/ or /usr/lib/jvm/java-6-openjdk/
(easy to read for human, much harder for a machine).

> I also think that caching $ENV{CLASSPATH} should be part of the module. This
> can be done like this:
> if ( NOT Java_CLASSPATH )
>  set ( Java_CLASSPATH $ENV{CLASSPATH} CACHE STRING "java classpath" )
> endif ( NOT Java_CLASSPATH )
> if ( NOT CMAKE_SYSTEM_NAME STREQUAL "Windows" )
>  # Non-Windows classpath may use : instead of ;
>  # so make this a cmake list here by always using ;
>  string ( REPLACE ":" ";" Java_CLASSPATH "${Java_CLASSPATH}" )
> endif ( NOT CMAKE_SYSTEM_NAME STREQUAL "Windows" )
> mark_as_advanced ( Java_CLASSPATH )
>
> This makes it easier to call java with:
> set(foo_CP "${Java_CLASSPATH})
> list(APPEND foo_CP /location/to/foo.jar)
> add_custom_command (
>  OUTPUT ${foo}
>  COMMAND "${Java_JAVA_EXECUTABLE}" -cp "${foo_CP}" ${foo_main_class}
>  DEPENDS "${bar}"
>  VERBATIM
> )

I have to leave now, please open a bug report+assign it to me thanks !

-- 
Mathieu
___
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] FindBoost: FIND_PACKAGE ( Boost COMPONENTS filesystem )

2009-11-02 Thread Mathieu Malaterre
I can reproduce with CMake / CVS.


FIND_PACKAGE ( Boost COMPONENTS filesystem )
ADD_LIBRARY( bla SHARED bla_use_filesystem.cxx)
TARGET_LINK_LIBRARIES( bla ${Boost_LIBRARIES}   )

->

CMakeFiles/Csm.dir/Common/csmPathSet.cc.o: In function
`__static_initialization_and_destruction_0':
/usr/include/boost/system/error_code.hpp:205: undefined reference to
`boost::system::get_system_category()'
/usr/include/boost/system/error_code.hpp:206: undefined reference to
`boost::system::get_generic_category()'
/usr/include/boost/system/error_code.hpp:211: undefined reference to
`boost::system::get_generic_category()'
/usr/include/boost/system/error_code.hpp:212: undefined reference to
`boost::system::get_generic_category()'
/usr/include/boost/system/error_code.hpp:213: undefined reference to
`boost::system::get_system_category()'
CMakeFiles/Csm.dir/IO/csmGraphLoader.cc.o: In function
`__static_initialization_and_destruction_0':
/usr/include/boost/system/error_code.hpp:205: undefined reference to
`boost::system::get_system_category()'
/usr/include/boost/system/error_code.hpp:206: undefined reference to
`boost::system::get_generic_category()'
/usr/include/boost/system/error_code.hpp:211: undefined reference to
`boost::system::get_generic_category()'
/usr/include/boost/system/error_code.hpp:212: undefined reference to
`boost::system::get_generic_category()'
/usr/include/boost/system/error_code.hpp:213: undefined reference to
`boost::system::get_system_category()'
CMakeFiles/Csm.dir/IO/csmChessBoardLoader.cc.o: In function
`__static_initialization_and_destruction_0':
/usr/include/boost/system/error_code.hpp:205: undefined reference to
`boost::system::get_system_category()'
/usr/include/boost/system/error_code.hpp:206: undefined reference to
`boost::system::get_generic_category()'
/usr/include/boost/system/error_code.hpp:211: undefined reference to
`boost::system::get_generic_category()'
/usr/include/boost/system/error_code.hpp:212: undefined reference to
`boost::system::get_generic_category()'
/usr/include/boost/system/error_code.hpp:213: undefined reference to
`boost::system::get_system_category()'
CMakeFiles/Csm.dir/IO/csmModelLoader.cc.o: In function
`__static_initialization_and_destruction_0':
/usr/include/boost/system/error_code.hpp:205: undefined reference to
`boost::system::get_system_category()'
/usr/include/boost/system/error_code.hpp:206: undefined reference to
`boost::system::get_generic_category()'
/usr/include/boost/system/error_code.hpp:211: undefined reference to
`boost::system::get_generic_category()'
/usr/include/boost/system/error_code.hpp:212: undefined reference to
`boost::system::get_generic_category()'
/usr/include/boost/system/error_code.hpp:213: undefined reference to
`boost::system::get_system_category()'


What should have I been writing instead ?

Thanks !


On Mon, Nov 2, 2009 at 4:41 PM, Philip Lowman  wrote:
> Which FindBoost are you using?  I'm pretty sure I fixed this issue a while
> ago.
>
> On Nov 2, 2009 9:46 AM, "Mathieu Malaterre" 
> wrote:
>
> Hi there,
>
>  I am wondering if I am missing something. I'd like to write:
>
> FIND_PACKAGE ( Boost COMPONENTS filesystem )
>
>  However using a recent boost (1.40), it gives a linker error. So I
> need to write something like:
>
> FIND_PACKAGE ( Boost COMPONENTS filesystem system )
>
>  but then it breaks compatibility with boost 1.34 (default package on
> one of my ubuntu machine). What is the synthetic way for writing this
> ? I am linking to filesystem, I do not want to explicitely search for
> an implementation detail.
>
> Thanks,
> --
> Mathieu
> ___
> 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
>



-- 
Mathieu
___
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] FindBoost: FIND_PACKAGE ( Boost COMPONENTS filesystem )

2009-11-02 Thread Mathieu Malaterre
Hi there,

  I am wondering if I am missing something. I'd like to write:

FIND_PACKAGE ( Boost COMPONENTS filesystem )

  However using a recent boost (1.40), it gives a linker error. So I
need to write something like:

FIND_PACKAGE ( Boost COMPONENTS filesystem system )

  but then it breaks compatibility with boost 1.34 (default package on
one of my ubuntu machine). What is the synthetic way for writing this
? I am linking to filesystem, I do not want to explicitely search for
an implementation detail.

Thanks,
-- 
Mathieu
___
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] FindJava.cmake update

2009-11-02 Thread Mathieu Malaterre
Hendrik,

On Mon, Nov 2, 2009 at 3:19 PM, Hendrik Sattler  wrote:
> Zitat von Mathieu Malaterre :
>
>> I updated the FindJava.cmake. It now implements the VERSION* stuff,
>> and I fixed the naming convention as per the readme.txt. I tested on
>> linux/gcj, linux/sun-java and linux/openjdk-6
>
> Why are you using NO_DEFAULT_PATH and but listing /usr/bin and
> /usr/local/bin? This is wrong and breaks "/usr/local/bin before /usr/bin".
> Just drop those from the list and also your NO_DEFAULT_PATH. If you want
> your list first, use HINTS instead of PATHS.

Fixed. Thanks !

$ cvs ci -m"BUG: To be able to use ENV and at the same time allow
/usr/loca/bin to override /usr/bin, apply patch suggested by Hendrik
Sattler (thanks)"
Committer: Mathieu Malaterre 
/cvsroot/CMake/CMake/Modules/FindJava.cmake,v  <--  FindJava.cmake
new revision: 1.22; previous revision: 1.21


> Additionally, you may want to mark the found values as advanced (like it was
> before).

Fixed also.

Thanks again,
-- 
Mathieu
___
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] FindJava.cmake update

2009-11-02 Thread Mathieu Malaterre
'lo,

On Mon, Nov 2, 2009 at 2:35 PM, Romain CHANU  wrote:
> Hello,
>
> Regarding the FindJava.cmake, I have a couple of improvements to suggest:
>
> 1) I have noticed that there is no JAVA_FOUND variable in the current
> version (and your version).

I have not tested it, but it seems to me that
FindPackageHandleStandardArgs.cmake is the one handling the setting of
this variable IMHO.

> 2) a JAVA_PATH (or another name) could also return the path where the Java
> executables are located.

$ cat Modules/readme.txt
...
XXX_EXECUTABLE  Where to find the XXX tool.
XXX_YYY_EXECUTABLE  Where to find the YYY tool that comes with XXX.
...

I decided to go for: Java_JAVA_EXECUTABLE / Java_JAVAC_EXECUTABLE/
Java_JAR_EXECUTABLE. It make it easier to write in a foreach loop. I
could leave them as such and add a Java_EXECUTABLE.

Comments ?
-- 
Mathieu
___
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] FindJava.cmake update

2009-10-30 Thread Mathieu Malaterre
I updated the FindJava.cmake. It now implements the VERSION* stuff,
and I fixed the naming convention as per the readme.txt. I tested on
linux/gcj, linux/sun-java and linux/openjdk-6

Cheers
-- 
Mathieu
___
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] Bug#553151: CMake 2.8.0 RC 4 ready for testing!

2009-10-29 Thread Mathieu Malaterre
On Thu, Oct 29, 2009 at 7:51 PM, Alexander Neundorf
 wrote:
> On Thursday 29 October 2009, Mathieu Malaterre wrote:
>> On Thu, Oct 29, 2009 at 7:16 PM, Alexander Neundorf
>>
>>  wrote:
>> > On Thursday 29 October 2009, Mathieu Malaterre wrote:
>> > ...
>> >
>> >> Done:
>> >> http://cmake.org/Bug/view.php?id=9793
>> >>
>> >> Bug report include the test I used. Unfortunately find_package caches
>> >> results, so one need to manually remove cmakecache.txt file before
>> >> re-running this.
>> >
>> > You can also use cmake-gui to delete the respective variables (or do it
>> > manually in CMakeCache.txt), no need to start completely from scratch.
>>
>> I wanted to do that in a for loop, but could not find a way to do it
>> programmatically. This would greatly ease the writing of regression
>> testing. Or else I am missing something to clear anything that has
>> been cached by find_package.
>
> Did you try cmake -U ?
>
> From the help:
> Options
>  -C           = Pre-load a script to populate the cache.
>  -D :=     = Create a cmake cache entry.
>  -U           = Remove matching entries from CMake cache.

Of course that was easy... When you know the actual implementation you
can just remove the specific cached value:

+
+  # when you know the implementation:
+  unset(JAVA_INCLUDE_PATH CACHE)
+  unset(JAVA_INCLUDE_PATH2 CACHE)
+  unset(JAVA_AWT_INCLUDE_PATH CACHE)

At least I can run my loop now, but this will break next time internal
implementation is changed.

Thx
-- 
Mathieu
___
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] Bug#553151: CMake 2.8.0 RC 4 ready for testing!

2009-10-29 Thread Mathieu Malaterre
On Thu, Oct 29, 2009 at 7:16 PM, Alexander Neundorf
 wrote:
> On Thursday 29 October 2009, Mathieu Malaterre wrote:
> ...
>> Done:
>> http://cmake.org/Bug/view.php?id=9793
>>
>> Bug report include the test I used. Unfortunately find_package caches
>> results, so one need to manually remove cmakecache.txt file before
>> re-running this.
>
> You can also use cmake-gui to delete the respective variables (or do it
> manually in CMakeCache.txt), no need to start completely from scratch.

I wanted to do that in a for loop, but could not find a way to do it
programmatically. This would greatly ease the writing of regression
testing. Or else I am missing something to clear anything that has
been cached by find_package.

thanks for support,
-- 
Mathieu
___
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] Bug#553151: CMake 2.8.0 RC 4 ready for testing!

2009-10-29 Thread Mathieu Malaterre
On Thu, Oct 29, 2009 at 4:44 PM, Bill Hoffman  wrote:
> Modestas Vainius wrote:
>>
>> Hello,
>>
>> On ketvirtadienis 29 Spalis 2009 14:50:14 Mathieu Malaterre wrote:
>>>
>>> On Thu, Oct 29, 2009 at 1:35 PM, Bill Hoffman 
>>
>> wrote:
>>>>
>>>> Mathieu Malaterre wrote:
>>>>>
>>>>> # ok we found jni.h, now derive other location from it:
>>>>>  get_filename_component(jni_path ${JAVA_INCLUDE_PATH} PATH)
>>>>>
>>>>> FIND_PATH(JAVA_INCLUDE_PATH2 jni_md.h
>>>>>  ${jni_path}
>>>>>  ${jni_path}/win32
>>>>>  ${jni_path}/linux
>>>>>  ${jni_path}/freebsd
>>>>> )
>>>>>
>>>>> FIND_PATH(JAVA_AWT_INCLUDE_PATH jawt.h
>>>>>  ${jni_path}
>>>>> )
>>>>
>>>> This looks reasonable.  Is there a case where this will not work?
>>>
>>> I would be tempted to say that this is safe in all cases. Any comments
>>> Modestas  ?
>>
>> Looks fine and logical for me as well.
>>
> Mathiueu can you create a patch for this and make sure it works for you, and
> then attach it to the bug?

Done:
http://cmake.org/Bug/view.php?id=9793

Bug report include the test I used. Unfortunately find_package caches
results, so one need to manually remove cmakecache.txt file before
re-running this.

Cheers
-- 
Mathieu
___
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 2.8.0 RC 4 ready for testing!

2009-10-29 Thread Mathieu Malaterre
On Thu, Oct 29, 2009 at 1:35 PM, Bill Hoffman  wrote:
> Mathieu Malaterre wrote:
>
>> # ok we found jni.h, now derive other location from it:
>>  get_filename_component(jni_path ${JAVA_INCLUDE_PATH} PATH)
>>
>> FIND_PATH(JAVA_INCLUDE_PATH2 jni_md.h
>>  ${jni_path}
>>  ${jni_path}/win32
>>  ${jni_path}/linux
>>  ${jni_path}/freebsd
>> )
>>
>> FIND_PATH(JAVA_AWT_INCLUDE_PATH jawt.h
>>  ${jni_path}
>> )
>
> This looks reasonable.  Is there a case where this will not work?

I would be tempted to say that this is safe in all cases. Any comments
Modestas  ?

Thanks,
-- 
Mathieu
___
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 2.8.0 RC 4 ready for testing!

2009-10-29 Thread Mathieu Malaterre
On Thu, Oct 29, 2009 at 11:46 AM, Modestas Vainius  wrote:
> Ok. If you had thought about this more, you would have realized that it would

Yeah, well, I don't like regression, esp. on rc4.

> not be "my code" you would have to fix. You patched library directories, but

I have no clue who did what. I thought you were the only person after
me working on FindJNI.cmake. Please apologize if that portion was not
part of your actual patch.

> that's includes which are wrong! In addition, I added a openjdk-6 directory to
> the include search (to be on par with library directories) thinking I made a
> favour for everyone, but here we go, it exposed another "problem".

from everyone: "Thank you modestats !"

>> If you are not going to fix your code, please revert to official cmake
>> 2.6.4/FindJNI.cmake. VTK on debian is using my patch(*) and is working
>> ok so far.
>
> First of all, this is a huge mess with all those JVMs and their directory

ok.

> naming schemes around. You see this issue because gcj-4.4-jdk does not provide
> /usr/lib/jvm/java-1.5.0-gcj-4.4/include/jni_md.h compat symlink to
> /usr/lib/jvm/java-1.5.0-gcj-4.4/include/linux/jni_md.h (provided by java-gcj-
> compat-dev for gcj 4.3) which openjdk-6 does. Since

the lib are also very messy.

> ${JAVA_AWT_INCLUDE_DIRECTORIES} is first searched for JAVA_INCLUDE_PATH2 too,
> openjdk-6 stuff is found first. So it is a messy scheme of gcj or yet another
> bug in FindJNI (depends how you look at it) to blame.
>
> IMHO, the most logical fix would be:
>
> diff --git a/Modules/FindJNI.cmake b/Modules/FindJNI.cmake
> index 8c9523a..6c8ff85 100644
> --- a/Modules/FindJNI.cmake
> +++ b/Modules/FindJNI.cmake
> @@ -192,7 +192,7 @@ FIND_PATH(JAVA_INCLUDE_PATH jni.h
>  )
>
>  FIND_PATH(JAVA_INCLUDE_PATH2 jni_md.h
> -  ${JAVA_AWT_INCLUDE_DIRECTORIES}
> +  ${JAVA_INCLUDE_PATH}
>   ${JAVA_INCLUDE_PATH}/win32
>   ${JAVA_INCLUDE_PATH}/linux
>   ${JAVA_INCLUDE_PATH}/freebsd

Sorry but -again- I do not like your proposed fix. jni_md.h and jawt.h
should be found within the same subdirectory as jni.h (by contract).
So something like (not tested):

<...>
FIND_PATH(JAVA_INCLUDE_PATH jni.h
  ${JAVA_AWT_INCLUDE_DIRECTORIES}
)

# ok we found jni.h, now derive other location from it:
 get_filename_component(jni_path ${JAVA_INCLUDE_PATH} PATH)

FIND_PATH(JAVA_INCLUDE_PATH2 jni_md.h
  ${jni_path}
  ${jni_path}/win32
  ${jni_path}/linux
  ${jni_path}/freebsd
)

FIND_PATH(JAVA_AWT_INCLUDE_PATH jawt.h
  ${jni_path}
)
<...>

> But I don't really know if it breaks on older JVMs or other platforms. In
> addition, I don't really know why it was done the way it was done. Ah, that's
> not my code that I'm fixing (rings the bell, Mathieu?).

again, sorry, I really thought you were the only person working on
FindJNI.cmake after my change.

> P.S. Mathieu, typically finger pointing does not lead you anywhere in open
> source. All help is appreciated if you want your problem solved faster.

Still cmake 2.6.4/debian has the same problem. You cannot blame me for
integrating that into debian. Please revert, it make
debian/cmake/2.6.4-3 unusable for me.

Thank you,
-- 
Mathieu
___
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 2.8.0 RC 4 ready for testing!

2009-10-29 Thread Mathieu Malaterre
On Thu, Oct 29, 2009 at 10:20 AM, Modestas Vainius  wrote:
> Hello,
>
> On ketvirtadienis 29 Spalis 2009 10:29:15 Mathieu Malaterre wrote:
>> FindJNI.cmake stopped working for me at some point (during transition
>> of *official* cmake 2.6.4 -> *official* cmake 2.8rc4), this means it
>> affect your patched cmake 2.6.4 on debian.
>>
>> if you want to reproduce on debian:
>>
>> $ apt-get install gcj-4.4-jdk openjdk-6-jdk
>> $ cat CMakeLists.txt
>> FIND_PACKAGE(JNI REQUIRED)
>> $ cmake .
>> $ grep JAVA_INCLUD *
>> CMakeCache.txt:JAVA_INCLUDE_PATH:PATH=/usr/lib/jvm/java-1.5.0-gcj-4.4/inclu
>> de
>>  CMakeCache.txt:JAVA_INCLUDE_PATH2:PATH=/usr/lib/jvm/java-6-openjdk/include
>>
>> This is now producing a mixture of gcj and openjdk, which is not a
>> desired behavior.
>> Thanks for fixing this. If you need more info please let me know.
>
> I'm so tired of this java mess... Apparently, you have a particular interest
> in this jvm stuff, why do not you just post a patch?

I did ! But you decided my patch was not as good (*), so you decided
to write yours. I am not going to fix your code.

If you are not going to fix your code, please revert to official cmake
2.6.4/FindJNI.cmake. VTK on debian is using my patch(*) and is working
ok so far.

Thank you,
-- 
Mathieu
(*)
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=544674
___
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 2.8.0 RC 4 ready for testing!

2009-10-29 Thread Mathieu Malaterre
Modestas,

FindJNI.cmake stopped working for me at some point (during transition
of *official* cmake 2.6.4 -> *official* cmake 2.8rc4), this means it
affect your patched cmake 2.6.4 on debian.

if you want to reproduce on debian:

$ apt-get install gcj-4.4-jdk openjdk-6-jdk
$ cat CMakeLists.txt
FIND_PACKAGE(JNI REQUIRED)
$ cmake .
$ grep JAVA_INCLUD *
CMakeCache.txt:JAVA_INCLUDE_PATH:PATH=/usr/lib/jvm/java-1.5.0-gcj-4.4/include
CMakeCache.txt:JAVA_INCLUDE_PATH2:PATH=/usr/lib/jvm/java-6-openjdk/include

This is now producing a mixture of gcj and openjdk, which is not a
desired behavior.
Thanks for fixing this. If you need more info please let me know.

-Mathieu

For reference (I do not think this matters):

$ sudo update-alternatives --display javac
javac - status is auto.
 link currently points to /usr/lib/jvm/java-6-openjdk/bin/javac
/usr/lib/jvm/java-6-sun/bin/javac - priority 63
 slave javac.1.gz: /usr/lib/jvm/java-6-sun/man/man1/javac.1.gz
/usr/lib/jvm/java-6-openjdk/bin/javac - priority 1061
 slave javac.1.gz: /usr/lib/jvm/java-6-openjdk/man/man1/javac.1.gz
/usr/bin/ecj - priority 143
 slave javac.1.gz: /usr/share/man/man1/ecj.1.gz
/usr/bin/gcj-wrapper-4.3 - priority 43
/usr/lib/jvm/java-gcj/bin/javac - priority 1043
 slave javac.1.gz: /usr/lib/jvm/java-gcj/man/man1/javac.1.gz
/usr/bin/gcj-wrapper-4.4 - priority 1044
Current `best' version is /usr/lib/jvm/java-6-openjdk/bin/javac.


$ apt-cache policy gcj-4.4-jdk openjdk-6-jdk
gcj-4.4-jdk:
  Installed: 4.4.1-4
  Candidate: 4.4.1-6
  Version table:
 4.4.1-6 0
200 http://ftp.fr.debian.org testing/main Packages
100 http://ftp.fr.debian.org unstable/main Packages
 *** 4.4.1-4 0
100 /var/lib/dpkg/status
openjdk-6-jdk:
  Installed: 6b11-9.1+lenny2
  Candidate: 6b11-9.1+lenny2
  Version table:
 6b16-1.6.1-2 0
100 http://ftp.fr.debian.org unstable/main Packages
 6b16-4 0
200 http://ftp.fr.debian.org testing/main Packages
 *** 6b11-9.1+lenny2 0
500 http://security.debian.org lenny/updates/main Packages
100 /var/lib/dpkg/status
 6b11-9.1 0
500 http://ftp.fr.debian.org lenny/main Packages


On Wed, Oct 28, 2009 at 7:18 PM, Bill Hoffman  wrote:
> CMake 2.8.0 RC 4 is now ready for people to try.
> You can find the source and binaries here: http://www.cmake.org/files/v2.8/.
>
> Here are the changes for the 2.8.0 branch so far:
> Changes in CMake 2.8.0 RC 4
> - Fix try_compile when file cannot be found
> - Add new module to test manifest installation issues on windows.
> - Add more test coverage
> - Improvements in finding MPI on windows. ENH: reorganized searching mpi for
> mpi components (include,lib,bin) using a single set of search paths instead
> of seperately mainted lists of paths for each.
> - Look for nvcc in the 32 bit bin directory before the 64 bin directory.
> - BUG: hardcord some values so output matches cmVS10CLFlagTable.h (addresses
> bug #9753)
> - Avoid Intel linker crash in BuildDepends test
> - Fix Intel Fortran SHARED libraries on Linux
> - Fix working dir issue for ctest
> - Fix if() command and CMP0012 OLD/NEW behavior
> - Allow for /D to change install directory on the command line for NSIS
> - Move SetErrorMode around calls to generate and configure instead of
> setting it for the whole application for cmake-gui on windows.  Allows for
> bad installs of windows shell programs to not break file completion.
> - Fix Intel and MinGW Fortran DLL import libraries
> - Fix Xcode dylib version default
> - Fix the showing of non-cpp files in the IDE for VS 10
> - Fix optionally-valued booleans in VS 10 flag table
> - Detect and set Unicode character set in VS 10
> - Add support for the g95 Fortran compiler
> - Test all target types in Fortran
> - Add Xcode file association for Fortran
> - Fix VS 10 flag table for precompiled headers
> - Fix VS 10 .sln files for Windows Explorer
> - Fix Microsoft.Cpp.$(Platform).user.props in VS10b2
> - Fix up file(DOWNLOAD ) a bit, better error checking and uses of long not
> double for timeout as curl needs, bug# 9748
> - Add a VS 10 Win64 generator
> - Fix for bug#9686 convert java_home to a cmake path before using.
> - fix for bug# 9751, add check for MSVC10
> - Fix for bugs #9756, #9690 and #9755, header files were not included, and
> link_directories we incorrect
> - Add a module to test an install tree to verify that the MS CRT version is
> correct (cmake -P CMakeVerifyManifest.cmake)
> - Fix seg fault for empty ENV{} call bug #9747
> - Better fix for finding the MSBuild that matches the VS 10 install.
> - make testing the CodeBlocks and Eclipse generators easier by not requiring
> the CMAKE_EDIT_COMMAND variable
> - Do not link library dependencies in VS solutions
> - Ctest was broken for subdirs.  Restored working directory state for tests
> so that their executables could be found.
> - Fixes version detection using osg/Version on Mac OSX when OSG is installed
> as a framework
> - Avoid C++ linker language in VS Fortran project
> -

Re: [CMake] install(DIRECTORY . DESTINATION include/proj FILES_MATCHINGPATTERN "*.h")

2009-10-28 Thread Mathieu Malaterre
On Wed, Oct 28, 2009 at 4:41 PM, Tyler Roscoe  wrote:
> This is a bad practice because then CMake has no way to know if there
> are new header files and can't regenerate/install correctly. Ok maybe a
> new header coming in will happen to trigger a rerun of CMake because the
> header happens to belong to one of your built libraries or executables,
> but I think this solution is more dangerous than just excluding .svn
> explicitly.

+1

Indeed I did not realize that.

Thanks,
-- 
Mathieu
___
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] install(DIRECTORY . DESTINATION include/proj FILES_MATCHINGPATTERN "*.h")

2009-10-28 Thread Mathieu Malaterre
On Wed, Oct 28, 2009 at 4:14 PM, Steve Huston  wrote:
> Hi Mathieu,
>
>>   Quick question. What is the command to install a set of *.h files
> ?
>>
>> I tried:
>>
>> install(DIRECTORY . DESTINATION include/proj FILES_MATCHING
>> PATTERN "*.h")
>
> Right.
>
>> but it is installing the '.svn' subdir as part of the installation.
>
> Try adding:
>
>         PATTERN ".svn" EXCLUDE
>
> -Steve

indeed the proper solution that worked for me (cmake 2.6.4) was:

install(DIRECTORY . DESTINATION ${COSMO_INSTALL_INCLUDE_DIR}
FILES_MATCHING PATTERN "*.h"
   PATTERN ".svn" EXCLUDE
  )

I do not understand why I need to explicitely state

  PATTERN ".svn" EXCLUDE

(what if tomorrow I switch to CVS, git, or mercurial), so I reverted
to good ol' :

file(GLOB header_files "*.h" "*.txx")
install(FILES ${header_files}
  DESTINATION include/proj COMPONENT Headers
  )

Cheers
-- 
Mathieu
___
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] Packaging and Exporting: Generating the UsePROJECT.cmake file ?

2009-10-28 Thread Mathieu Malaterre
Hum, let's try again. I'd like to know if there is an API to query
properties of 'mylib-targets' as in:

add_library(mylib SHARED mylib.c mylib.h)
add_library(mylib2 SHARED mylib.c mylib.h)
install(TARGETS mylib mylib2 DESTINATION lib/myproj EXPORT mylib-targets)
install(EXPORT mylib-targets DESTINATION lib/myproj)

get_???_property(my_targets mylib-targets TARGETS)

I'd like to list all TARGETS associated with mylib-targets. This will
greatly ease generating a UseProject.cmake file.

Thanks

On Fri, Oct 23, 2009 at 4:28 PM, Mathieu Malaterre
 wrote:
> Hi there,
>
>  I am still working on Packaging and Exporting:
> http://www.cmake.org/Wiki/CMake_2.6_Notes#Packaging_and_Exporting
>
>  I'd like to know if there is a neat function to loop over all
> libraries that are imported (typically for a Use*.cmake file).
>
> Eg.
>
> add_library(mylib SHARED mylib.c mylib.h)
> add_library(mylib2 SHARED mylib.c mylib.h)
> install(TARGETS mylib mylib2 DESTINATION lib/myproj EXPORT mylib-targets)
> install(EXPORT mylib-targets DESTINATION lib/myproj)
>
> Creates a mylib-targets.cmake:
> ...
> ADD_LIBRARY(mylib SHARED IMPORTED)
> ADD_LIBRARY(mylib2 SHARED IMPORTED)
> ...
>
>
> is there a way to retrieve those imported libraries in a variable
> called -say- "mylib_LIBRARIES", or do I have to construct this
> variable myself ?
>
> Thanks !
> --
> Mathieu
>



-- 
Mathieu
___
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] install(DIRECTORY . DESTINATION include/proj FILES_MATCHING PATTERN "*.h")

2009-10-28 Thread Mathieu Malaterre
Hi there,

  Quick question. What is the command to install a set of *.h files ?

I tried:

install(DIRECTORY . DESTINATION include/proj FILES_MATCHING PATTERN "*.h")

but it is installing the '.svn' subdir as part of the installation.

Thanks,
-- 
Mathieu
___
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] Packaging and Exporting: Generating the UsePROJECT.cmake file ?

2009-10-23 Thread Mathieu Malaterre
Hi there,

  I am still working on Packaging and Exporting:
http://www.cmake.org/Wiki/CMake_2.6_Notes#Packaging_and_Exporting

  I'd like to know if there is a neat function to loop over all
libraries that are imported (typically for a Use*.cmake file).

Eg.

add_library(mylib SHARED mylib.c mylib.h)
add_library(mylib2 SHARED mylib.c mylib.h)
install(TARGETS mylib mylib2 DESTINATION lib/myproj EXPORT mylib-targets)
install(EXPORT mylib-targets DESTINATION lib/myproj)

Creates a mylib-targets.cmake:
...
ADD_LIBRARY(mylib SHARED IMPORTED)
ADD_LIBRARY(mylib2 SHARED IMPORTED)
...


is there a way to retrieve those imported libraries in a variable
called -say- "mylib_LIBRARIES", or do I have to construct this
variable myself ?

Thanks !
-- 
Mathieu
___
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] Global property for LINK_INTERFACE_LIBRARIES (was Re: set_property(TARGET bla PROPERTY LINK_INTERFACE_LIBRARIES ""))

2009-10-23 Thread Mathieu Malaterre
Sorry for the noise, but I'd would like a confirmation. Is there a way
for me (as global property) to say: I always want an empty interface
for all my shared lib. I'd like avoiding repeating

add_library(bla SHARED ${bla_SRCS})
target_link_libraries(bla foo) # foo is shared
set_property(TARGET bla PROPERTY LINK_INTERFACE_LIBRARIES "") # cumbersome

Thanks again.

On Wed, Jul 29, 2009 at 6:33 PM, Mathieu Malaterre
 wrote:
> Hi there,
>
>  Just a quick question, let say I am working on a very large project
> with multiple libraries, is there a way to say that the default
> property of for all generated shared library is "" (empty string) ?
>
> Thanks
> --
> Mathieu
>



-- 
Mathieu
___
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] install(FILES mylib-config.cmake DESTINATION lib/myproj)

2009-10-23 Thread Mathieu Malaterre
On Tue, Oct 20, 2009 at 9:32 AM, Mathieu Malaterre
 wrote:
> On Mon, Oct 19, 2009 at 9:51 PM, Brad King  wrote:
>> Mathieu Malaterre wrote:
>>>
>>> Hi there,
>>>
>>>  I am trying some new functionalities in CMake, in particular:
>>>
>>> http://www.cmake.org/Wiki/CMake_2.6_Notes#Packaging_and_Exporting
>>>
>>>  However using cmake 2.8, I get an error:
>>>
>>> CMake Error at cmake_install.cmake:64 (FILE):
>>>  file INSTALL cannot find
>>>
>>>  "/home/mathieu/Perso/gdcm/Sandbox/CMakeBug/5/project1/myproj-config.cmake".
>>>
>>>
>>> It looks like the file is now named "myproj-noconfig.cmake"
>>
>> The file "myproj-noconfig.cmake" is internal to the
>>
>>  install(EXPORT myproj DESTINATION lib/myproj)
>>
>> command and is managed by CMake.  It would be called
>>
>>  myproj-debug.cmake
>>
>> if you set CMAKE_BUILD_TYPE to Debug.
>>
>> The wiki example you reference has the line
>>
>>  install(FILES mylib-config.cmake DESTINATION lib/myproj)
>>
>> followed by this text:
>>
>>  "where mylib-config.cmake contains something like"
>>
>> and then some sample code.  It is up to you to create the file.
>
> Thanks Brad ! I was confused with the -noconfig appended when
> CMAKE_BUILD_TYPE is set to nothing and the secret -config required for
> find_package(BLA) to lookup a file named BLA-config.cmake. In summary,
> the 'config' refers to find_package API, while 'noconfig' refers to
> CMAKE_BUILD_TYPE API.

FYI, I fixed what appeared as a typo on the wiki:

http://www.cmake.org/Wiki/index.php?title=CMake_2.6_Notes&diff=17052&oldid=14926

Cheers
-- 
Mathieu
___
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] install(FILES mylib-config.cmake DESTINATION lib/myproj)

2009-10-20 Thread Mathieu Malaterre
On Mon, Oct 19, 2009 at 9:51 PM, Brad King  wrote:
> Mathieu Malaterre wrote:
>>
>> Hi there,
>>
>>  I am trying some new functionalities in CMake, in particular:
>>
>> http://www.cmake.org/Wiki/CMake_2.6_Notes#Packaging_and_Exporting
>>
>>  However using cmake 2.8, I get an error:
>>
>> CMake Error at cmake_install.cmake:64 (FILE):
>>  file INSTALL cannot find
>>
>>  "/home/mathieu/Perso/gdcm/Sandbox/CMakeBug/5/project1/myproj-config.cmake".
>>
>>
>> It looks like the file is now named "myproj-noconfig.cmake"
>
> The file "myproj-noconfig.cmake" is internal to the
>
>  install(EXPORT myproj DESTINATION lib/myproj)
>
> command and is managed by CMake.  It would be called
>
>  myproj-debug.cmake
>
> if you set CMAKE_BUILD_TYPE to Debug.
>
> The wiki example you reference has the line
>
>  install(FILES mylib-config.cmake DESTINATION lib/myproj)
>
> followed by this text:
>
>  "where mylib-config.cmake contains something like"
>
> and then some sample code.  It is up to you to create the file.

Thanks Brad ! I was confused with the -noconfig appended when
CMAKE_BUILD_TYPE is set to nothing and the secret -config required for
find_package(BLA) to lookup a file named BLA-config.cmake. In summary,
the 'config' refers to find_package API, while 'noconfig' refers to
CMAKE_BUILD_TYPE API.

Cheers
-- 
Mathieu
___
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] Post install scripts for debian

2009-10-19 Thread Mathieu Malaterre
On Fri, Oct 16, 2009 at 8:15 PM, Eric Noulard  wrote:
> 2009/10/16 as :
>> Hello:
>>
>> We are using CMake to create inhouse deb packages for our project. We
>> need to run a script after installing the package: postinst script
>> which is possible in Debian. I don't know how to enable this from
>> CMake - do I set some flags? Do I just put the file in a particular
>> location? I'm not able to find much help on the web.
>
> Normally information about CPack generator may be found on the Wiki
>  http://www.cmake.org/Wiki/CMake:CPackPackageGenerators
>

Actually it is located here:
http://www.itk.org/Wiki/CMake:CPackConfiguration#Debian_settings

2cts
-- 
Mathieu
___
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] install(FILES mylib-config.cmake DESTINATION lib/myproj)

2009-10-16 Thread Mathieu Malaterre
Hi there,

  I am trying some new functionalities in CMake, in particular:

http://www.cmake.org/Wiki/CMake_2.6_Notes#Packaging_and_Exporting

  However using cmake 2.8, I get an error:

CMake Error at cmake_install.cmake:64 (FILE):
  file INSTALL cannot find
  "/home/mathieu/Perso/gdcm/Sandbox/CMakeBug/5/project1/myproj-config.cmake".


It looks like the file is now named "myproj-noconfig.cmake"

Coud someone confirms that ? Here is my code (*)

Thanks,
-- 
Mathieu


(*)
project(project1)
find_package(PNG REQUIRED)
add_library(lib1 SHARED lib1.cxx)
target_link_libraries(lib1 ${PNG_LIBRARIES})
install(TARGETS lib1 EXPORT myproj DESTINATION lib)
install(EXPORT myproj DESTINATION lib/myproj)
install(FILES myproj-config.cmake DESTINATION lib/myproj)
___
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 2.8.0 RC 3 ready for testing!

2009-10-12 Thread Mathieu Malaterre
One minor comment: CMAKE_OVERRIDE_COMPILER_MISMATCH was never
documented, and is now gone :) Everything is working happily without
the need to set this flag anymore. Thanks !

On Sat, Oct 10, 2009 at 3:13 AM, Bill Hoffman  wrote:
> CMake 2.8.0 RC 3 is now ready for people to try.
> You can find the source and binaries here: http://www.cmake.org/files/v2.8/.
>
> Here are the changes for the 2.8.0 branch so far:
>
> Changes in CMake 2.8.0 RC 3
> - CTest Added OS Platform (cpu architecture) detection support to windows
> system
> - Several minor FindBoost changes to address posts on mailing list
> - Resolve #9685: Fix include dir to be correct path for gnutils
> - Fix color check for dependency scanning
> - Remove CMP00015 for now as it breaks more things than it fixes
> - Reduce duration of ctest_sleep arguments. Add SmallAndFast project.
> Replace kwsys with SmallAndFast to make CTestTest faster. (I will keep an
> eye on coverage results after this commit and make sure we still have
> equivalent ctest coverage.)
> - Do not use -fPIC to link executables
> - Split Borland compiler information files
> - Trimmed off the newline from sw_vers output on mac, it could cause xml
> parsing errors if left in
> - Check for openssl-linked option with Qt 4.4+ before making ssl a
> dependency.
> - Make Complex test of CMakeLib more optional
> - Modernize FindVTK module
> - Fix find_package() when _DIR is wrong
> - Do not collapse path of NOTFOUND values
> - More robust implicit link line detection regex
> - fix Xcode 30 generator
> - Use the correct CMake (the freshly built one) to drive the
> CMakeWizardTest.
> - Support more special characters in file(STRINGS)
> - Log implicit link line detection regex
> - speedup C dependency scanning even more
> - Avoid non-root copies of root-only targets
> - Added better OS information for Mac OS X
> - Use work-around from bug 4772 for C++ and Fortran
> - FortranCInterface: Mangling for Intel on Windows
> - cmake-gui don't allow consecutive generates without a configure.
> - Fix Preprocess test for Intel on Windows
> - Teach intel compiler on windows to place .lib files and .pdb files.
> - CPack: Fix bash-isms in launch script
> - BUG: #0009648 Change "The following tests FAILED" message to print on
> stdout rather than stderr
> - Avoid (Unix|Windows)Paths.cmake multiple include
> - When getting include dirs for moc, also watch for framework includes and
> use -F instead of -I.
> - Find locally installed software first
> - Add '#!/bin/sh' to cygwin-package.sh
> - Fix permsissions of installed SquishRunTestCase.sh
> - Fix module docs to be manpage (groff) friendly
> - Support GNU/kFreeBSD
> - Remove old Encoding field from CMake.desktop
> - FindQt3: Prefer (moc|uic)-qt3 names over (moc|uic)
> - Match width of ctest "Start xx: " line to line up with the end test line
> - Remove old license from FindPkgConfig.cmake module
> - Test target link information invalidation
> - Invalidate target link info when necessary
> - Use new style header generation and get rid of OBJECT_DEPENDS in tutorial
> - Fix issue #8649 - move the location of CPACK_NSIS_EXTRA_INSTALL_COMMANDS
> so that it is not excluded from execution when 'Do not create shortcuts' is
> checked.
> - add the additional features for the dbus macros from KDE's FindQt4.cmake
> fc9f7a5 Fix warnings in CMake source code.
> - Correct some typos in error messages in the string command. Add a test
> that covers more of the code implemented in cmStringCommand.cxx, especially
> the error handlers.
> - Create INTERPROCEDURAL_OPTIMIZATION build feature
> - Document CMAKE_CURRENT_LIST_FILE more precisely
> - Fix the documentation to say what it really does. Bug #9638
> - document how the minimum version can be specified
> - Fix warnings in CMake source code. Suppress rampant warnings emanating
> from Qt files.
> - Add documentation for Cocoa flag and move Motif under X11 flag.
>
> Changes in CMake 2.8.0 RC 2
> - Fix FindQt4 so that QtHelp depends on QtNetwork
> - Add missing copyright notice to CMake.cmake module
> - Add alternative _UTILITY targets to all VS solutions
> - FindGTest.cmake some bugfixes, also added public function for closer
> integration btwn GoogleTest & CTest, contributed by Dan Blezek.
> - Eliminate ExternalProject's use of CMAKE_CFG_INTDIR subdir for
> Makefile generators. It was causing problems with parallel make -j
> invocations. Keep it for multi-configuration build systems so that Debug
> and Release stamp files remain separate.
> - Fix for bug #9611, some more paths for OpenJDK.
> - Fix get_filename_component() registry view with wow64
> - Fix warnings in CMake source code.
> - Fix module definition file reference for VS6 NMake
> - Fix for bug #9611 do not hard code archs for search paths of java,
> look at the machine type.
> - Fix bug#9619 add a link to module maintainers page in readme.txt for
> Modules
> - Add cmake-help-command function to emacs-mode
> - Add initial XL C compiler flags for safer builds
> - Spli

[CMake] CMake SWIG module

2009-10-03 Thread Mathieu Malaterre
Hi,

  I'd like to become the new maintainer of the swig module in cmake. I
have not heard back from Tristan Carel.
  I have updated my name on : http://www.cmake.org/Wiki/CMake:Module_Maintainers

Thank you,
-- 
Mathieu
___
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] xlC / HAVE_GETHOSTBYNAME_R_6 (Was Re: CMake 2.8.0 RC 1 ready for testing!)

2009-10-01 Thread Mathieu Malaterre
On Thu, Oct 1, 2009 at 5:36 PM, Brad King  wrote:
<...>
> Mathieu, what distro is this?

Linux OpenSuse 10.2 ppc64

>   Does the FIND_LIBRARY_USE_LIB64_PATHS
> global property get enabled in CMake projects on it?

Looking at CMake/Modules/Platform/Linux.cmake, I would be tempted to
say FIND_LIBRARY_USE_LIB64_PATHS=TRUE, since I do not have no
/etc/debian* file on my system.
But since no other tests fails I would think discovery of 64bits libs
is working (I am guessing at least a test would fails). This looks
like just an issue in the findqt module.

However I do not understand what I need to do to fix
Modules/FindQt3.cmake, simply reorder the path ?

Thanks,
-- 
Mathieu
___
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] xlC / HAVE_GETHOSTBYNAME_R_6 (Was Re: CMake 2.8.0 RC 1 ready for testing!)

2009-10-01 Thread Mathieu Malaterre
On Thu, Oct 1, 2009 at 2:31 PM, Brad King  wrote:
>> A couple of warnings that's all:
>> http://www.cdash.org/CDash/viewBuildError.php?type=1&buildid=439244
>
> Warnings in system headers are always a pain.  Can you please
> investigate options to turn them off?

I am thinking that I do not have the proper default flag on this
64bits machine (think of the lseek vs lseek64).

>> However, there are still two issues remaining with xlC -q64 (64bits
>> compilation) :
>> http://www.cdash.org/CDash/viewTest.php?onlyfailed&buildid=439310
>>
>> I do not understand what I need to adjust to get the path right, for 
>> instance:
>>
>>> file /usr/lib/qt3/lib/libqt-mt.so.3.3.7
>> /usr/lib/qt3/lib/libqt-mt.so.3.3.7: ELF 32-bit MSB shared object,
>> PowerPC or cisco 4500, version 1 (SYSV), stripped
>>> file /usr/lib/qt3/lib64/libqt-mt.so.3.3.7
>> /usr/lib/qt3/lib64/libqt-mt.so.3.3.7: ELF 64-bit MSB shared object,
>> cisco 7500, version 1 (SYSV), stripped
>
> Are the binaries built with RPATH?

I do not think so:

> readelf -d /usr/lib/qt3/lib/libqt-mt.so.3.3.7

Dynamic section at offset 0x832e88 contains 41 entries:
  TagType Name/Value
 0x0001 (NEEDED) Shared library: [libpng12.so.0]
 0x0001 (NEEDED) Shared library: [libz.so.1]
 0x0001 (NEEDED) Shared library: [libXrender.so.1]
 0x0001 (NEEDED) Shared library: [libXrandr.so.2]
 0x0001 (NEEDED) Shared library: [libXcursor.so.1]
 0x0001 (NEEDED) Shared library: [libXinerama.so.1]
 0x0001 (NEEDED) Shared library: [libXft.so.2]
 0x0001 (NEEDED) Shared library: [libfreetype.so.6]
 0x0001 (NEEDED) Shared library: [libfontconfig.so.1]
 0x0001 (NEEDED) Shared library: [libXext.so.6]
 0x0001 (NEEDED) Shared library: [libX11.so.6]
 0x0001 (NEEDED) Shared library: [libSM.so.6]
 0x0001 (NEEDED) Shared library: [libICE.so.6]
 0x0001 (NEEDED) Shared library: [libdl.so.2]
 0x0001 (NEEDED) Shared library: [libpthread.so.0]
 0x0001 (NEEDED) Shared library: [libstdc++.so.6]
 0x0001 (NEEDED) Shared library: [libm.so.6]
 0x0001 (NEEDED) Shared library: [libgcc_s.so.1]
 0x0001 (NEEDED) Shared library: [libc.so.6]
 0x000e (SONAME) Library soname: [libqt-mt.so.3]
 0x000c (INIT)   0x1cda3c
 0x000d (FINI)   0x732010
 0x0004 (HASH)   0xd4
 0x0005 (STRTAB) 0x73c70
 0x0006 (SYMTAB) 0x24050
 0x000a (STRSZ)  676072 (bytes)
 0x000b (SYMENT) 16 (bytes)
 0x0003 (PLTGOT) 0x843000
 0x0002 (PLTRELSZ)   97236 (bytes)
 0x0014 (PLTREL) RELA
 0x0017 (JMPREL) 0x1b5e68
 0x7000 (PPC_GOT)0x842ff4
 0x0007 (RELA)   0x122ebc
 0x0008 (RELASZ) 699264 (bytes)
 0x0009 (RELAENT)12 (bytes)
 0x6ffe (VERNEED)0x122cdc
 0x6fff (VERNEEDNUM) 7
 0x6ff0 (VERSYM) 0x118d58
 0x6cbdd031 (SUSE_DIRECT)0x7eb300
 0x6ff9 (RELACOUNT)  17560
 0x (NULL)   0x0

and
> readelf -d /usr/lib/qt3/lib64/libqt-mt.so.3.3.7

Dynamic section at offset 0xa54d30 contains 41 entries:
  TagType Name/Value
 0x0001 (NEEDED) Shared library: [libpng12.so.0]
 0x0001 (NEEDED) Shared library: [libz.so.1]
 0x0001 (NEEDED) Shared library: [libXrender.so.1]
 0x0001 (NEEDED) Shared library: [libXrandr.so.2]
 0x0001 (NEEDED) Shared library: [libXcursor.so.1]
 0x0001 (NEEDED) Shared library: [libXinerama.so.1]
 0x0001 (NEEDED) Shared library: [libXft.so.2]
 0x0001 (NEEDED) Shared library: [libfreetype.so.6]
 0x0001 (NEEDED) Shared library: [libfontconfig.so.1]
 0x0001 (NEEDED) Shared library: [libXext.so.6]
 0x0001 (NEEDED) Shared library: [libX11.so.6]
 0x0001 (NEEDED) Shared library: [libSM.so.6]
 0x0001 (NEEDED) Shared library: [libICE.so.6]
 0x0001 (NEEDED) Shared library: [libdl.so.2]
 0x0001 (NEEDED) Shared library: [libpthread.so.0]
 0x0001 (NEEDED) Shared library: [libstdc++

Re: [CMake] xlC / HAVE_GETHOSTBYNAME_R_6 (Was Re: CMake 2.8.0 RC 1 ready for testing!)

2009-10-01 Thread Mathieu Malaterre
On Wed, Sep 30, 2009 at 3:39 PM, Brad King  wrote:
> Mathieu Malaterre wrote:
>>> /opt/ibmcmp/vacpp/9.0/bin/cc   -DHAVE_GETHOSTBYNAME_R_5   -o 
>>> CMakeFiles/cmTryCompileExec.dir/CurlTests.c.o   -c 
>>> "/home/mmalater/Dashboards/My 
>>> Tests/CMakeXLC/Utilities/cmcurl/CMake/CurlTests.c"
>> "/home/mmalater/Dashboards/My
>> Tests/CMakeXLC/Utilities/cmcurl/CMake/CurlTests.c", line 247.16:
>> 1506-098 (E) Missing argument(s).
>>> echo $?
>> 0
> [snip]
>> This seems quite a common things to always add -qhalt=e in all
>> configure script I found. Looking at what curl does with this compiler
>> this leads to the following local changes for me:
>
> I've factored the XL compiler flags out of AIX.cmake into per-compiler
> files, and also added the flags you propose.  See commits below.
>
> -Brad
>
>
> Split XL compiler information files
> /cvsroot/CMake/CMake/Modules/Compiler/XL-C.cmake,v  <--  
> Modules/Compiler/XL-C.cmake
> new revision: 1.2; previous revision: 1.1
> /cvsroot/CMake/CMake/Modules/Compiler/XL-CXX.cmake,v  <--  
> Modules/Compiler/XL-CXX.cmake
> new revision: 1.2; previous revision: 1.1
> /cvsroot/CMake/CMake/Modules/Compiler/XL-Fortran.cmake,v  <--  
> Modules/Compiler/XL-Fortran.cmake
> new revision: 1.2; previous revision: 1.1
> /cvsroot/CMake/CMake/Modules/Platform/AIX-VisualAge-C.cmake,v  <--  
> Modules/Platform/AIX-VisualAge-C.cmake
> initial revision: 1.1
> /cvsroot/CMake/CMake/Modules/Platform/AIX-VisualAge-CXX.cmake,v  <--  
> Modules/Platform/AIX-VisualAge-CXX.cmake
> initial revision: 1.1
> /cvsroot/CMake/CMake/Modules/Platform/AIX-XL-C.cmake,v  <--  
> Modules/Platform/AIX-XL-C.cmake
> initial revision: 1.1
> /cvsroot/CMake/CMake/Modules/Platform/AIX-XL-CXX.cmake,v  <--  
> Modules/Platform/AIX-XL-CXX.cmake
> initial revision: 1.1
> /cvsroot/CMake/CMake/Modules/Platform/AIX-XL-Fortran.cmake,v  <--  
> Modules/Platform/AIX-XL-Fortran.cmake
> initial revision: 1.1
> /cvsroot/CMake/CMake/Modules/Platform/AIX.cmake,v  <--  
> Modules/Platform/AIX.cmake
> new revision: 1.22; previous revision: 1.21
> /cvsroot/CMake/CMake/Modules/Platform/Darwin-VisualAge-C.cmake,v  <--  
> Modules/Platform/Darwin-VisualAge-C.cmake
> initial revision: 1.1
> /cvsroot/CMake/CMake/Modules/Platform/Darwin-VisualAge-CXX.cmake,v  <--  
> Modules/Platform/Darwin-VisualAge-CXX.cmake
> initial revision: 1.1
> /cvsroot/CMake/CMake/Modules/Platform/Darwin-XL-C.cmake,v  <--  
> Modules/Platform/Darwin-XL-C.cmake
> initial revision: 1.1
> /cvsroot/CMake/CMake/Modules/Platform/Darwin-XL-CXX.cmake,v  <--  
> Modules/Platform/Darwin-XL-CXX.cmake
> initial revision: 1.1
> /cvsroot/CMake/CMake/Modules/Platform/Darwin-xlc.cmake,v  <--  
> Modules/Platform/Darwin-xlc.cmake
> new revision: delete; previous revision: 1.3
>
> Add initial XL C compiler flags for safer builds
> /cvsroot/CMake/CMake/Modules/Compiler/XL-C.cmake,v  <--  
> Modules/Compiler/XL-C.cmake
> new revision: 1.3; previous revision: 1.2
>

The 32bits xlC is now perfectly clean, congrats !

http://www.cdash.org/CDash/viewTest.php?onlyfailed&buildid=439244

A couple of warnings that's all:
http://www.cdash.org/CDash/viewBuildError.php?type=1&buildid=439244


However, there are still two issues remaining with xlC -q64 (64bits
compilation) :
http://www.cdash.org/CDash/viewTest.php?onlyfailed&buildid=439310

I do not understand what I need to adjust to get the path right, for instance:

> file /usr/lib/qt3/lib/libqt-mt.so.3.3.7
/usr/lib/qt3/lib/libqt-mt.so.3.3.7: ELF 32-bit MSB shared object,
PowerPC or cisco 4500, version 1 (SYSV), stripped
> file /usr/lib/qt3/lib64/libqt-mt.so.3.3.7
/usr/lib/qt3/lib64/libqt-mt.so.3.3.7: ELF 64-bit MSB shared object,
cisco 7500, version 1 (SYSV), stripped

Thanks again !

-- 
Mathieu
___
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] xlC / HAVE_GETHOSTBYNAME_R_6 (Was Re: CMake 2.8.0 RC 1 ready for testing!)

2009-09-30 Thread Mathieu Malaterre
On Tue, Sep 29, 2009 at 11:34 PM, Brad King  wrote:
> Mathieu Malaterre wrote:
>> On Fri, Sep 25, 2009 at 10:07 PM, Bill Hoffman  
>> wrote:
>>> I am happy to announce that CMake 2.8.0 has entered the beta stage! You
>>> can find the source and binaries here: http://www.cmake.org/files/v2.8/.
>>>
>>
>> There is still one compilation issue with xlC on Linux:
>>
>> http://www.cdash.org/CDash/viewBuildError.php?buildid=437487
>>
>> For some reason HAVE_GETHOSTBYNAME_R_5 is being defined, while it
>> should be HAVE_GETHOSTBYNAME_R_6
>
> Check CMakeFiles/CMakeOutput.log (or wherever cmcurl puts its
> try-compile logs) to see why the test for R_5 passed.

Funny thing:

$ cat CMakeFiles/CMakeOutput.log
...
Performing Curl Test HAVE_GETHOSTBYNAME_R_5 passed with the following output:
Change Dir: /home/mmalater/Dashboards/My Tests/CMake-xlC-9.0/CMakeFiles/CMakeTmp

Run Build Command:/usr/bin/gmake "cmTryCompileExec/fast"
gmake -f CMakeFiles/cmTryCompileExec.dir/build.make
CMakeFiles/cmTryCompileExec.dir/build
gmake[1]: Entering directory `/home/mmalater/Dashboards/My
Tests/CMake-xlC-9.0/CMakeFiles/CMakeTmp'
"/home/mmalater/Dashboards/My Tests/CMake-xlC-9.0/Bootstrap.cmk/cmake"
-E cmake_progress_report "/home/mmalater/Dashboards/My
Tests/CMake-xlC-9.0/CMakeFiles/CMakeTmp/CMakeFiles" 1
Building C object CMakeFiles/cmTryCompileExec.dir/CurlTests.c.o
/opt/ibmcmp/vacpp/9.0/bin/cc   -DHAVE_GETHOSTBYNAME_R_5   -o
CMakeFiles/cmTryCompileExec.dir/CurlTests.c.o   -c
"/home/mmalater/Dashboards/My
Tests/CMakeXLC/Utilities/cmcurl/CMake/CurlTests.c"
"/home/mmalater/Dashboards/My
Tests/CMakeXLC/Utilities/cmcurl/CMake/CurlTests.c", line 247.16:
1506-098 (E) Missing argument(s).
Linking C executable cmTryCompileExec
"/home/mmalater/Dashboards/My Tests/CMake-xlC-9.0/Bootstrap.cmk/cmake"
-E cmake_link_script CMakeFiles/cmTryCompileExec.dir/link.txt
--verbose=1
/opt/ibmcmp/vacpp/9.0/bin/cc  -DHAVE_GETHOSTBYNAME_R_5
CMakeFiles/cmTryCompileExec.dir/CurlTests.c.o  -o cmTryCompileExec
-ldl -lidn
gmake[1]: Leaving directory `/home/mmalater/Dashboards/My
Tests/CMake-xlC-9.0/CMakeFiles/CMakeTmp'

Performing Curl Test HAVE_GETHOSTBYNAME_R_6 passed with the following output:
Change Dir: /home/mmalater/Dashboards/My Tests/CMake-xlC-9.0/CMakeFiles/CMakeTmp

Run Build Command:/usr/bin/gmake "cmTryCompileExec/fast"
gmake -f CMakeFiles/cmTryCompileExec.dir/build.make
CMakeFiles/cmTryCompileExec.dir/build
gmake[1]: Entering directory `/home/mmalater/Dashboards/My
Tests/CMake-xlC-9.0/CMakeFiles/CMakeTmp'
"/home/mmalater/Dashboards/My Tests/CMake-xlC-9.0/Bootstrap.cmk/cmake"
-E cmake_progress_report "/home/mmalater/Dashboards/My
Tests/CMake-xlC-9.0/CMakeFiles/CMakeTmp/CMakeFiles" 1
Building C object CMakeFiles/cmTryCompileExec.dir/CurlTests.c.o
/opt/ibmcmp/vacpp/9.0/bin/cc   -DHAVE_GETHOSTBYNAME_R_6   -o
CMakeFiles/cmTryCompileExec.dir/CurlTests.c.o   -c
"/home/mmalater/Dashboards/My
Tests/CMakeXLC/Utilities/cmcurl/CMake/CurlTests.c"
Linking C executable cmTryCompileExec
"/home/mmalater/Dashboards/My Tests/CMake-xlC-9.0/Bootstrap.cmk/cmake"
-E cmake_link_script CMakeFiles/cmTryCompileExec.dir/link.txt
--verbose=1
/opt/ibmcmp/vacpp/9.0/bin/cc  -DHAVE_GETHOSTBYNAME_R_6
CMakeFiles/cmTryCompileExec.dir/CurlTests.c.o  -o cmTryCompileExec
-ldl -lidn
gmake[1]: Leaving directory `/home/mmalater/Dashboards/My
Tests/CMake-xlC-9.0/CMakeFiles/CMakeTmp'
...

Indeed:

> /opt/ibmcmp/vacpp/9.0/bin/cc   -DHAVE_GETHOSTBYNAME_R_5   -o 
> CMakeFiles/cmTryCompileExec.dir/CurlTests.c.o   -c 
> "/home/mmalater/Dashboards/My 
> Tests/CMakeXLC/Utilities/cmcurl/CMake/CurlTests.c"
"/home/mmalater/Dashboards/My
Tests/CMakeXLC/Utilities/cmcurl/CMake/CurlTests.c", line 247.16:
1506-098 (E) Missing argument(s).
> echo $?
0


And I found the answer here:

http://www.ethereal.com/lists/ethereal-dev/199911/msg00038.html
...
Yes, it is.  There is a flag -qhalt=e which will cause the compiler
to stop after all warnings marked with (E).
...


This seems quite a common things to always add -qhalt=e in all
configure script I found. Looking at what curl does with this compiler
this leads to the following local changes for me:

> cvs di
Index: Modules/Platform/Linux-XL-C.cmake
===
RCS file: /cvsroot/CMake/CMake/Modules/Platform/Linux-XL-C.cmake,v
retrieving revision 1.2
diff -u -r1.2 Linux-XL-C.cmake
--- Modules/Platform/Linux-XL-C.cmake   29 Sep 2009 17:56:57 -  1.2
+++ Modules/Platform/Linux-XL-C.cmake   30 Sep 2009 08:33:49 -
@@ -1,3 +1,23 @@
 SET(CMAKE_SHARED_LIBRARY_C_FLAGS "")
 SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
 SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-qmkshrobj")
+
+#  IBM_C)
+##
+#dn

Re: [CMake] CMake 2.8.0 RC 1 ready for testing!

2009-09-29 Thread Mathieu Malaterre
On Fri, Sep 25, 2009 at 10:07 PM, Bill Hoffman  wrote:
> I am happy to announce that CMake 2.8.0 has entered the beta stage! You
> can find the source and binaries here: http://www.cmake.org/files/v2.8/.
>

There is still one compilation issue with xlC on Linux:

http://www.cdash.org/CDash/viewBuildError.php?buildid=437487

For some reason HAVE_GETHOSTBYNAME_R_5 is being defined, while it
should be HAVE_GETHOSTBYNAME_R_6

> cd CMake-xlC-9.0/
> grep HAVE_GETHOSTBYNAME_R *
CMakeCache.txt:HAVE_GETHOSTBYNAME_R:INTERNAL=1
CMakeCache.txt:HAVE_GETHOSTBYNAME_R_3:INTERNAL=
CMakeCache.txt:HAVE_GETHOSTBYNAME_R_3_REENTRANT:INTERNAL=
CMakeCache.txt:HAVE_GETHOSTBYNAME_R_5:INTERNAL=1
CMakeCache.txt:HAVE_GETHOSTBYNAME_R_5_REENTRANT:INTERNAL=1
CMakeCache.txt:HAVE_GETHOSTBYNAME_R_6:INTERNAL=1
CMakeCache.txt:HAVE_GETHOSTBYNAME_R_6_REENTRANT:INTERNAL=1

Thanks,
-- 
Mathieu
___
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] LINK : fatal error LNK1104: cannot open file 'msvcprt.lib'

2009-09-28 Thread Mathieu Malaterre
On Mon, Sep 28, 2009 at 4:02 PM, Bill Hoffman  wrote:
> Mathieu Malaterre wrote:
>>
>> Hi there,
>>
>>  I do not understand how regular expression are parsed to detect
>> error. When I look at page:
>> http://www.cdash.org/CDash/viewConfigure.php?buildid=437117
>>
>>  Clearly the error is hard to indentify. However if I open the
>> CMakeError.log file:
>>
>> Determining if this is a free VC compiler failed with the following
>> output:
>> CMakeTestForFreeVC.cxx
>> LINK : fatal error LNK1104: cannot open file 'msvcprt.lib'
>>
>> Determining if the C compiler works failed with the following output:
>>
>>
>> Determining if this is a free VC compiler failed with the following
>> output:
>> CMakeTestForFreeVC.cxx
>> LINK : fatal error LNK1104: cannot open file 'msvcprt.lib'
>>
>> Determining if the C compiler works failed with the following output:
>> Change Dir: C:/users/mathieu/My
>> Documents/Perso/gdcm/debug-wine/CMakeFiles/CMakeTmp
>>
>> Run Build Command:nmake /NOLOGO  "cmTryCompileExec\fast"
>>        nmake -f CMakeFiles\cmTryCompileExec.dir\build.make /nologo -L
>>          CMakeFiles\cmTryCompileExec.dir\build
>>
>>        "C:\Program Files\CMake 2.6\bin\cmake.exe" -E cmake_progress_report
>> "C:\users\mathieu\My
>> Documents\Perso\gdcm\debug-wine\CMakeFiles\CMakeTmp\CMakeFiles" 1
>>
>> File not found
>>
>>
>> NMAKE : fatal error U1077: '"C:\Program Files\CMake
>> 2.6\bin\cmake.exe"' : return code '0x2331'
>>
>> Stop.
>>
>> NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Platform SDK
>> for Windows Server 2003 R2\Bin\nmake.exe"' : return code '0x2'
>>
>> Stop.
>>
>>
>>
>>  Why is the line
>>
>> LINK : fatal error LNK1104: cannot open file 'msvcprt.lib'
>>
>> discarded ?
>>
>> Thanks,
>
> Not sure...  What do you get when you just run CMake on the project from the
> command line?  Does it have the error?

No, output has also been preprocessed.

cmake ../trunk -G"NMake Makefiles"
-- The C compiler identification is MSVC
-- The CXX compiler identification is MSVC
-- Check for CL compiler version
-- Check for CL compiler version - 1310
-- Check if this is a free VC compiler
-- Check if this is a free VC compiler - yes
-- Check CL platform
-- Check CL platform - 32 bit
-- Using FREE VC TOOLS, NO DEBUG available
-- Check for working C compiler: C:/Program Files/Microsoft Visual C++
Toolkit 2003/bin/cl.exe
-- Check for working C compiler: C:/Program Files/Microsoft Visual C++
Toolkit 2003/bin/cl.exe -- broken
CMake Error at C:/Program Files/CMake
2.6/share/cmake-2.6/Modules/CMakeTestCCompiler.cmake:32 (MESSAGE):
  The C compiler "C:/Program Files/Microsoft Visual C++ Toolkit
  2003/bin/cl.exe" is not able to compile a simple test program.

  It fails with the following output:

   Change Dir: C:/users/mathieu/gdcm/debug-wine/CMakeFiles/CMakeTmp



  Run Build Command:nmake /NOLOGO "cmTryCompileExec\fast"

nmake -f CMakeFiles\cmTryCompileExec.dir\build.make /nologo -L
  CMakeFiles\cmTryCompileExec.dir\build

"C:\Program Files\CMake 2.6\bin\cmake.exe" -E cmake_progress_report
  C:\users\mathieu\gdcm\debug-wine\CMakeFiles\CMakeTmp\CMakeFiles 1

  File not found



  NMAKE : fatal error U1077: '"C:\Program Files\CMake 2.6\bin\cmake.exe"' :
  return code '0x2331'

  Stop.

  NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Platform SDK for
  Windows Server 2003 R2\Bin\nmake.exe"' : return code '0x2'

  Stop.





  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:1 (PROJECT)


-- Configuring incomplete, errors occurred!


Thanks
-- 
Mathieu
___
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


  1   2   3   4   5   >