[cmake-developers] [CMake 0013358]: Error importing generated Eclipse project with LIBRARY_OUTPUT_PATH set to ${CMAKE_CURRENT_BINARY_DIR}

2012-06-28 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
http://www.cmake.org/Bug/view.php?id=13358 
== 
Reported By:muhkuh
Assigned To:
== 
Project:CMake
Issue ID:   13358
Category:   CMake
Reproducibility:always
Severity:   minor
Priority:   normal
Status: new
== 
Date Submitted: 2012-06-28 05:41 EDT
Last Modified:  2012-06-28 05:41 EDT
== 
Summary:Error importing generated Eclipse project with
LIBRARY_OUTPUT_PATH set to ${CMAKE_CURRENT_BINARY_DIR}
Description: 
Setting LIBRARY_OUTPUT_PATH to the current binary directory in a CMakeLists.txt
and using it with the Eclipse CDT4 - MinGW Makefiles generator creates an
Eclipse project that causes an error when being imported into an eclipse
workspace.



Steps to Reproduce: 
1. Create CMakeLists.txt containing these two lines:
SET (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
PROJECT ( Test )

2. Use the Eclipse CDT4 - MinGW Makefiles generator of cmake to create an
Eclipse project. It doesn't matter if an in source or out of source build is
done. For example CMakeLists.txt can reside in C:\TestProject\src and the
Eclipse project is created at C:\TestProject\build.

3. Import this project into an eclipse workspace.
An error message appears:
Error processing changed links in project description file.
Cannot create a link to C:\TestProject\build because it overlaps the locations
of the project that contains the linked resource.


Additional Information: 
After removing the line that sets LIBRARY_OUTPUT_PATH the generated project can
be imported without errors. 

Fortunately eclipse imports the generated project despite of the error message.
It's just quite annoying.
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2012-06-28 05:41 muhkuh New Issue
==

--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


[cmake-developers] [CMake 0013360]: Java add_jar() doesn't copy resources to build directory when make is run for the first time

2012-06-28 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
http://public.kitware.com/Bug/view.php?id=13360 
== 
Reported By:Marcin Wojdyr
Assigned To:
== 
Project:CMake
Issue ID:   13360
Category:   Modules
Reproducibility:always
Severity:   major
Priority:   normal
Status: new
== 
Date Submitted: 2012-06-28 07:16 EDT
Last Modified:  2012-06-28 07:16 EDT
== 
Summary:Java add_jar() doesn't copy resources to build
directory when make is run for the first time
Description: 
With this CMakeLists.txt:

cmake_minimum_required(VERSION 2.8.6)
find_package(Java)
include(UseJava)
project(foo Java)
add_jar(foo foo.java res1.txt)

the first time I run make it fails with message:

res1.txt : no such file or directory

but when I run make again it works:

[ 25%] Copying res1.txt to the build directory
[100%] Built target foo


Additional Information: 
Full session:

$ cmake .
CMake Warning at /usr/share/cmake/Modules/FindJava.cmake:120 (message):
  regex not supported: java version 1.7.0_03-icedtea

  OpenJDK Runtime Environment (fedora-2.2.1.fc17.8-x86_64)

  OpenJDK 64-Bit Server VM (build 23.0-b21, mixed mode).  Please report
Call Stack (most recent call first):
  CMakeLists.txt:2 (find_package)

-- Found Java: /bin/java (found version ..) 
-- Configuring done
-- Generating done
-- Build files have been written to: /run/mw/test/sub
$ make
Scanning dependencies of target foo
[ 25%] Building Java objects for foo.jar
[ 50%] Generating CMakeFiles/foo.dir/java_class_filelist
[ 75%] Creating Java archive foo.jar
res1.txt : no such file or directory
make[2]: *** [foo.jar] Error 1
make[1]: *** [CMakeFiles/foo.dir/all] Error 2
make: *** [all] Error 2
$ make
[ 25%] Copying res1.txt to the build directory
[100%] Built target foo
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2012-06-28 07:16 Marcin Wojdyr  New Issue
==

--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] trouble with running cpack --help during cmake step

2012-06-28 Thread Eric Noulard
2012/6/27 David Cole david.c...@kitware.com:
 On Tue, Jun 26, 2012 at 6:31 PM, David Cole david.c...@kitware.com wrote:
 On Tue, Jun 26, 2012 at 5:56 PM, Eric Noulard eric.noul...@gmail.com wrote:
 2012/6/26 Bill Hoffman bill.hoff...@kitware.com:
 So, this code here:

 2a34b579 Tests/CMakeLists.txt  (Eric NOULARD                  2012-03-30
 17:07:06 +0200  720)     # Analyze 'cpack --help' output for list of
 available generators:
 2a34b579 Tests/CMakeLists.txt  (Eric NOULARD                  2012-03-30
 17:07:06 +0200  721)     execute_process(COMMAND ${CMAKE_CPACK_COMMAND}
 --help


 The trouble is the cpack that is being tested is the one from the build
 tree.  If you have a very old CMake build tree, and you do a git pull and
 gets lots of new cmake code.  Then when you re-run cmake on the build tree,
 the cpack --help might crash.   I am not sure how this works on a fresh
 build tree either as cpack won't even exist.

 You are right this kind of tests may not be safely done at CMake time.
 I did that in order to avoid to replicate the code inside CPack factory
 (have a look at cmCPackDebGenerator::CanGenerate()
  and  cmCPackRPMGenerator::CanGenerate())
 which checks whether if a generator may be instantiated or not.
 This was done for conditionnally enabling RPM or DEB generator on MacOS
 see http://public.kitware.com/Bug/view.php?id=13064

 This is was mistake to do that in Tests/CMakeLists.txt.
 This should be harmless since it will probably only prevent RPM and DEB
 CPack tests to be run (ACTIVE_CPACK_GENERATORS will be empty)
 but this is a mistake.

 I shall implement proper CMake-time check in Tests/CMakeLists.txt.
 Unfortunately I may not be able to do that until sunday 1rst of July...

 Is this blocking 2.8.9 ?

 I'll try tomorrow night but I cannot ensure I'll have time to do it.

 Basically this would be something like:
 set(ACTIVE_CPACK_GENERATORS)
 then
 find_program(RPMBUILD_EXECUTABLE NAMES rpmbuild)
 if (RPMBUILD_EXECUTABLE)
   list(APPEND ACTIVE_CPACK_GENERATORS RPM)
 endif()

 find_program(DPKG_EXECUTABLE NAMES dpkg)
 if (DPKG_EXECUTABLE)
   list(APPEND ACTIVE_CPACK_GENERATORS DEB)
 endif()


 --
 Erk
 Le gouvernement représentatif n'est pas la démocratie --
 http://www.le-message.org
 --

 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


 It's not blocking 2.8.9 -- yet! -- but please get to it as soon as you
 can, and let us know when you've merged a fix to 'next'.

 Thanks,
 David



 A better alternative (I think) would be to run the same kind of code
 you are running now, but to do it at the correct time. i.e. -- execute
 the code that is currently running at cmake configure time via a
 script that gets invoked when the test is run.

This is true but it makes the CPack testing not so obvious.
Since the current code was used to create tests so we get a
chicken and eggs problem.

currently after (initial) configuration  I can do:
ctest -R RPM -N

and get the list of tests?
What filtering capability would I get if the test itself is generating subtest?

The issue here is that CMake is assumed to be there when CMake itself
is built ( because CMake can/must be boostrapped) whereas CPack may
not be there when it is built.

A possible solution would be to separate the definition of all the
CPack related tests
in order to define them when we know that CPack has been built.

 Then you *can* reliably
 use the built cpack to see what generators it says it supports, and
 use those as the list of generators to test.

In order to get this fix fast enough I did not implement this solution now,
I'll think more about.
The current fix (in next):
Merge topic 'DoNotInvokeCPackAtCMakeTime-forCMakeTests' into next

848f220 Do not run cpack at CMake time it is not available.

just checks for rpmbuild and dpkg availability.

-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org
--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [CMake] Supplying different debug flags during compile and link stages for libraries and executables

2012-06-28 Thread Petr Kmoch
Hi Brett,

as far as I know, compilation flags come from
CMAKE_lang_FLAGS_config, while linker flags come from
CMAKE_{SHARED|EXE}_LINKER_FLAGS[_config]. So you should be able to
override CMAKE_SHARED_LINKER_FLAGS_Debug (not sure with correct case
for configuration name) and remove -g from there.

Petr

On Wed, Jun 27, 2012 at 10:36 PM, Brett Delle Grazie
brett.dellegra...@gmail.com wrote:
 Hi,

 On AIX using the XLC compiler I've determined the debug flag (-g)
 should be used for all compile stages but should only be supplied to
 the final
 link stage of an executable (not a library target), otherwise
 duplicate symbol errors result.
 For reference see:
 http://www.ibm.com/developerworks/forums/thread.jspa?threadID=438591tstart=0

 Is there an easy way of supplying a different set of debug flags for
 the compile stage as opposed to the link stage?

 I could potentially override:
 CMAKE_C_FLAGS_DEBUG_INIT
 CMAKE_CXX_FLAGS_DEBUG_INIT

 but I can't really see where these are combined into the compile / link rules.

 Does anyone have any suggestions? Any guidance / help is appreciated.

 Thanks,

 --
 Best Regards,

 Brett Delle Grazie
 --

 Powered by www.kitware.com

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

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

 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake
--

Powered by www.kitware.com

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

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

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


Re: [CMake] CPack and NSIS failure

2012-06-28 Thread Eric Noulard
2012/6/27 David Demelier demelier.da...@gmail.com:

 Thanks for your help, it worked!

 Now, the last problem, I noticed that CPACK_PACKAGE_EXECUTABLES you
 can't set an icon, thus I used my own CreateShortCut and Delete with
 respectively CPACK_NSIS_CREATE_ICONS_EXTRA and
 CPACK_NSIS_DELETE_ICONS_EXTRA. The first one works, but not the
 second.

        set(CPACK_NSIS_CREATE_ICONS_EXTRA CreateShortCut                      
  
            '$SMPROGRAMS$STARTMENU_FOLDER${PROJECT_NAME}.lnk'          
  
            '$INSTDIRsd-tris.exe'                                          
  
            ''                                                                 
  
            '${ICONPATH}'
        )
        set(CPACK_NSIS_DELETE_ICONS_EXTRA Delete                              
  
            '$SMPROGRAMS$STARTMENU_FOLDER${PROJECT_NAME}.lnk'
        )

 When uninstalling, the window menu entry is still there and not
 removed at all. But the project.nsi has the line

 Delete                          \
            '$SMPROGRAMS\$STARTMENU_FOLDER\sd-tris.lnk'

 But this command is not executed by the Uninstall.exe.

Looks like an NSIS script error.
Would you be able to create a working project.nsi (starting wiht the
one generated by CPack)
and tell us what could make the generated one work?



-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org
--

Powered by www.kitware.com

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

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

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


Re: [CMake] Can we control component package name in 2.8.8?

2012-06-28 Thread hce

m.hergarden wrote
 
 The unspecified may come from an Install statement that does not have a 
 component specified.
 
 Micha
 

I actually double checked, there are only two install statements which all
have component specified.  Could it be the bug?

Thank you.

Jupiter


--
View this message in context: 
http://cmake.3232098.n2.nabble.com/Can-we-control-component-package-name-in-2-8-8-tp7580641p7580677.html
Sent from the CMake mailing list archive at Nabble.com.
--

Powered by www.kitware.com

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

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

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


Re: [CMake] Can we control component package name in 2.8.8?

2012-06-28 Thread Eric Noulard
2012/6/28 hce jupiter@gmail.com:

 m.hergarden wrote

 The unspecified may come from an Install statement that does not have a
 component specified.

 Micha


 I actually double checked, there are only two install statements which all
 have component specified.  Could it be the bug?

Yes it could but did you start over from a pristine build tree?

Could you try:
$ find . -name cmake_install.cmake  -exec grep -Hn Unspecified {}
\;vi ./Source/kwsys/cmake_install.cmake

and see if any cmake_install.cmake file is containing teh handling
of Unspecified ?

Whatever the result you can always specify the CPACK_COMPONENTS_ALL
yourself in the CMakeListst.txt (before including CPack)  and not let
CPack set it on his own:

So you can:
set(CPACK_COMPONENTS_ALL yourcomp1 yourcomp2)
...
include(CPack)

and CPack (when used in component mode) will only install the
specified components


-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org
--

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] VS2010: inconsistent build of DLL on different computers.

2012-06-28 Thread Casper Madsen
Hi,

Using CMake and Visual Studio 2010exp to build DLLs for use in Wireshark we are 
seeing inconsistent results. On all our computers the build verdict is 
successful. Unfortunately it appears that the DLLs are broken when built on 
some computers - the DLLs can not be loaded.

 Tool setup 
CMake version: 2.8.7
Visual Studio Version: 2010 express,
Cygwin and Msys shells

I have compared the build output from a computer that builds working DLLs with 
the output from a build resulting in broken DLLs.

 The build output from the corrupt builds: 
Manifest:

  C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\mt.exe /nologo /verbose 
/out:csr_log_proto_ws_1_2_0.dir\Debug\csr_log_proto_ws_1_2_0.dll.embed.manifest
 /manifest 
csr_log_proto_ws_1_2_0.dir\Debug\csr_log_proto_ws_1_2_0.dll.intermediate.manifest

  All outputs are up-to-date.

LinkEmbedManifest:

  All outputs are up-to-date.
  csr_log_proto_ws_1_2_0.vcxproj - 
S:\p4\synergy\frw\main\output\vs10\plugin\Debug\csr_log_proto_ws_1_2_0.dll

FinalizeBuildStatus:

  Deleting file 
csr_log_proto_ws_1_2_0.dir\Debug\csr_log_proto_ws_1_2_0.unsuccessfulbuild.
  Touching 
csr_log_proto_ws_1_2_0.dir\Debug\csr_log_proto_ws_1_2_0.lastbuildstate.


 The build output from the functional builds: 
Manifest:

  C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\mt.exe /nologo /verbose 
/out:csr_log_proto_ws_1_2_0.dir\Debug\csr_log_proto_ws_1_2_0.dll.embed.manifest
 /manifest 
csr_log_proto_ws_1_2_0.dir\Debug\csr_log_proto_ws_1_2_0.dll.intermediate.manifest

  C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\rc.exe /nologo 
/focsr_log_proto_ws_1_2_0.dir\Debug\csr_log_proto_ws_1_2_0.dll.embed.manifest.res
 csr_log_proto_ws_1_2_0.dir\Debug\csr_log_proto_ws_1_2_0_manifest.rc

LinkEmbedManifest:

  C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\link.exe 
/ERRORREPORT:QUEUE 
/OUT:S:\p4\synergy\frw\main\output\vs10\plugin\Debug\csr_log_proto_ws_1_2_0.dll
 /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib 
shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib 
..\..\..\..\..\..\tools\wireshark\wireshark-win32-libs\glib\lib\glib-2.0.lib 
..\..\..\..\..\..\tools\wireshark\wireshark-1.2.0\epan\libwireshark.lib 
/MANIFEST 
/ManifestFile:csr_log_proto_ws_1_2_0.dir\Debug\csr_log_proto_ws_1_2_0.dll.intermediate.manifest
 /MANIFESTUAC:level='asInvoker' uiAccess='false' /DEBUG 
/PDB:S:\p4\synergy\frw\main\output\vs10\plugin\Debug\csr_log_proto_ws_1_2_0.pdb
 /SUBSYSTEM:CONSOLE /STACK:1000 /TLBID:1 /DYNAMICBASE /NXCOMPAT 
/IMPLIB:S:/p4/synergy/frw/main/output/vs10/lib/Debug/csr_log_proto_ws_1_2_0.lib
 /MACHINE:X86 /DLL 
csr_log_proto_ws_1_2_0.dir\Debug\csr_log_proto_ws_1_2_0.dll.embed.manifest.res

  csr_log_proto_ws_1_2_0.dir\Debug\packet-utils.obj
  csr_log_proto_ws_1_2_0.dir\Debug\csr_proto_plugin.obj
  csr_log_proto_ws_1_2_0.dir\Debug\packet-bccmd.obj
  csr_log_proto_ws_1_2_0.dir\Debug\packet-bcsp-slip.obj
  csr_log_proto_ws_1_2_0.dir\Debug\packet-bcsp.obj
  csr_log_proto_ws_1_2_0.dir\Debug\packet-hqcmd.obj  /machine:X86 /debug

 Creating library 
S:/p4/synergy/frw/main/output/vs10/lib/Debug/csr_log_proto_ws_1_2_0.lib and 
object S:/p4/synergy/frw/main/output/vs10/lib/Debug/csr_log_proto_ws_1_2_0.exp

  csr_log_proto_ws_1_2_0.vcxproj - 
S:\p4\synergy\frw\main\output\vs10\plugin\Debug\csr_log_proto_ws_1_2_0.dll

FinalizeBuildStatus:

  Deleting file 
csr_log_proto_ws_1_2_0.dir\Debug\csr_log_proto_ws_1_2_0.unsuccessfulbuild.

  Touching 
csr_log_proto_ws_1_2_0.dir\Debug\csr_log_proto_ws_1_2_0.lastbuildstate.


 Steps performed on both computers 

-  Checkout source from our source control server

-  Create a new (empty) output directory

-  Generate a build system (cmake -G Visual Studio 10 path to 
CMakeLists-file)

-  Build code (cmake -build .)

Considering that I am performing a completely clean build I am a bit puzzled 
that the corrupt builds reach the conclusion that some part of the build is 
up-to-date in the manifest and LinkEmbedManifest stages.
We have tried to force a no-parallel build by specifying maxcpucount=1 to VS, 
but the corrupt build still reach the conclusion that some parts are 
up-to-date and there for skips the resource compiler.

I see the same result building from command line and when building from the 
IDE. The corrupt computer can however produce working DLL's if the 
configuration is set to Release instead of Debug (currently debug is our 
default configuration)

Currently I have functional builds from two different computers and corrupt 
builds from 2 other computers. It should be noted that the two corrupt 
computers can produce functional DLLs with VS2008.

Am I doing something wrong? Is there something that I need to give special 
attention when building DLL's with the CMake + VS2010 combination? Is there a 
CMake option to force the environment to be completely clean during the build 
process?
Has anyone encountered similar issues? I 

Re: [CMake] Ninja fails, Make succeeds...

2012-06-28 Thread Mikael Lyngvig
I need the files to be copied at build time, not a compile time: They are
files I am editing and I need the build system to export the files to the
binary directory tree whenever they are changed.

I know it looks stupid and probably is as well :-)  The reason is that when
the project is being used by clients, I want them to include each file as
follows (something which I use myself):

#include Braceless/Frontend/Scanner.hpp

And the only way I could figure out to get it working was by naming the
build directory Braceless and then do that thing I'm doing.  The project
is organized like this:

   src/AST
   src/Driver
   src/Frontend
   ...

And I want to be able to write Braceless in front so that it works also
when the header files and libraries have been installed on a system.  In
the LLVM system, they solve this problem by storing the headers in another
location than the source files - something I deeply loathe as it makes it
very difficult to search for strings and even to edit a given source file
and its header at the same time.

I'll try out your comments, but I don't see any way of getting rid of that
../.. construct.  By the way, I am a CMake newbie so I just did what I
could do to make it work somehow.


Cheers,
Mikael

2012/6/27 Rolf Eike Beer e...@sf-mail.de

  Sigh, now I sent you the code from the wrong directory, but the code for
  the Backend component is virtually identical.  I don't know how to use
  functions with CMake, so I simply made a verbatim copy of the below code
  in
  each subfolder and edited it to match the subfolder.  So the Backend
  project looks like this:
 
  project(Backend)
 
  set(PublicHeaders
  Backend.hpp
  Context.hpp
  )
  set(PublishedHeaders )
  foreach(Header IN LISTS PublicHeaders)
  get_filename_component(HeaderFilename ${Header} NAME)
  set(Source ${CMAKE_CURRENT_SOURCE_DIR}/${Header})
  set(Output ${CMAKE_CURRENT_BINARY_DIR}/${HeaderFilename})
  list(APPEND PublishedHeaders ${Output})
  add_custom_command(
  OUTPUT ${Output}
  COMMAND ${CMAKE_COMMAND} -E copy_if_different ${Source}
  ${Output}
  MAIN_DEPENDENCY ${Source}
  COMMENT Publishing ${HeaderFilename}
  VERBATIM
  )

 Why don't you simply use configure_file(... COPYONLY) here?

  endforeach()
  add_custom_target(
  publish_backend_headers
  ALL
  DEPENDS ${PublishedHeaders}
  SOURCES ${PublicHeaders}
  )
  include_directories(${CMAKE_BINARY_DIR}/../)

 This is almost certainly wrong. Guess my build dir is /tmp/foo, why on
 earth do you want to include /tmp? I could understand if it would be
 ${CMAKE_CURRENT_BINARY_DIR}/.. if you are in a subdirectory, but otherwise
 this is likely completely bogus.

  include_directories($ENV{LLVM}/include)
 
  add_definitions(-D__STDC_CONSTANT_MACROS)
  add_definitions(-D__STDC_LIMIT_MACROS)
 
  add_library(Backend
  Backend.cpp
  )
 
  add_dependencies(Backend publish_backend_headers)

 I think you can avoid the whole add_custom_target/add_library by just
 writing

 add_library(Backend Backend.cpp ${PublishedHeaders})

 (Untested. May only reliably work if you use configure_file. ymmv).

 Eike
 --

 Powered by www.kitware.com

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

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

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

--

Powered by www.kitware.com

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

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

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

[CMake] Latest Xcode install (4.3.x) and CMake error

2012-06-28 Thread Michael Jackson
I have the latest Xcode installed on a new Mac Laptop and I am trying to 
configure my project with CMake and generate Xcode projects but I am getting 
the following error:

CMake Error at /Applications/CMake 
2.8-8.app/Contents/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 
(MESSAGE):
 The C compiler /usr/bin/gcc is not able to compile a simple test program.

 It fails with the following output:

  Change Dir: 
/Users/svenkata/Desktop/Work/Tomography/TomoSoftware/HAADFSTEM/C-Code/eimtomo_Mike/Build/CMakeFiles/CMakeTmp



 Run Build Command:/Applications/CMake\ 2.8-8.app/Contents/bin/cmakexbuild
 -project CMAKE_TRY_COMPILE.xcodeproj build -target
 cmTryCompileExec2510098932 -configuration Debug

 Error: No developer directory found at /Developer.  Run
 /usr/bin/xcode-select to update the developer directory path.





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


-- Configuring incomplete, errors occurred!


Is there anything special with this setup that I should know about?

Thanks
___
Mike JacksonPrincipal Software Engineer
BlueQuartz SoftwareDayton, Ohio
mike.jack...@bluequartz.net  www.bluequartz.net

--

Powered by www.kitware.com

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

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

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


Re: [CMake] Latest Xcode install (4.3.x) and CMake error

2012-06-28 Thread Sean McBride
On Thu, 28 Jun 2012 09:16:31 -0400, Michael Jackson said:

 Error: No developer directory found at /Developer.  Run
 /usr/bin/xcode-select to update the developer directory path.

Hey Mike!

Maybe your xcode-select is still pointing to /Developer?  Try rerunning 
xcode-select to point it to /Applications/Xcode.app (or where ever).  It has a 
pretty good man page too BTW.

-- 

Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com 
Mac Software Developer  Montréal, Québec, Canada


--

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] Supplying different debug flags during compile and link stages for libraries and executables

2012-06-28 Thread Brett Delle Grazie
Hi Petr,

Thanks very much ... I saw something extremely similar in the VS
/STACK:1000 and managed to work it out from there.
I've been playing around with it today and have managed to get somewhere.

Thanks again,

Brett

On 28 June 2012 08:06, Petr Kmoch petr.km...@gmail.com wrote:
 Hi Brett,

 as far as I know, compilation flags come from
 CMAKE_lang_FLAGS_config, while linker flags come from
 CMAKE_{SHARED|EXE}_LINKER_FLAGS[_config]. So you should be able to
 override CMAKE_SHARED_LINKER_FLAGS_Debug (not sure with correct case
 for configuration name) and remove -g from there.

 Petr

 On Wed, Jun 27, 2012 at 10:36 PM, Brett Delle Grazie
 brett.dellegra...@gmail.com wrote:
 Hi,

 On AIX using the XLC compiler I've determined the debug flag (-g)
 should be used for all compile stages but should only be supplied to
 the final
 link stage of an executable (not a library target), otherwise
 duplicate symbol errors result.
 For reference see:
 http://www.ibm.com/developerworks/forums/thread.jspa?threadID=438591tstart=0

 Is there an easy way of supplying a different set of debug flags for
 the compile stage as opposed to the link stage?

 I could potentially override:
 CMAKE_C_FLAGS_DEBUG_INIT
 CMAKE_CXX_FLAGS_DEBUG_INIT

 but I can't really see where these are combined into the compile / link 
 rules.

 Does anyone have any suggestions? Any guidance / help is appreciated.

 Thanks,

 --
 Best Regards,

 Brett Delle Grazie
 --

 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



-- 
Best Regards,

Brett Delle Grazie
--

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] LINK_LIBRARIES not spilled to response file

2012-06-28 Thread Zaheer Chothia
Hello,

I encountered an issue while building a CMake project where one target is linked
against a large number of libraries.  Unlike object files, libraries are not
placed into a response file, which can lead to build commands which exceed the
length limits on Windows.  For reference, I am using the CMake 2.8.9-rc1 and
Ninja generator with Microsoft compilers.

Following this mail is a testcase generator [1] to demonstrate this issue
(sample project attached for convenience).  The build fails with this error (for
readibility I replaced a long sequence of libraries with ...):

FAILED: cmd.exe /c cd.  C:\Program Files
(x86)\CMake\bin\cmake.exe -E vs_link_exe
C:\PROGRA~2\MICROS~3.0\VC\bin\cl.exe  /nologo @hello.exe.rsp  /DWIN32
/D_WINDOWS /W3 /Zm1000 /D_DEBUG /MDd /Zi  /Ob0 /Od /RTC1 /Fehello.exe
/Fdhello.pdb -link /implib:hello.lib /version:0.0  /STACK:1000
/machine:X86  /debug /INCREMENTAL /subsystem:console
src\abcdefghijklmnopqrstuvwxyz0123456789\library1.lib
src\abcdefghijklmnopqrstuvwxyz0123456789\library2.lib ...
kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib
oleaut32.lib uuid.lib comdlg32.lib advapi32.lib  cd.
The command line is too long.

ninja: build stopped: subcommand failed.

Although this example may seem artificial, with the use case I refer to (i)
libraries are are specified by absolute paths so they are indeed reasonably long
and (ii) since there are third-party libraries involved I would not be able to
simply combine source files into one large library as is possible here.  I
should also mention that this issue does not affect the Visual Studio
generators, however it is present with the following: Ninja, MinGW
Makefiles, NMake Makefiles, MSYS Makefiles.  For Ninja I suspect that the
indirection via cmd.exe imposes a maximum command length of 8192 KB, whereas for
the others this will likely be 32 KB (CreateProcess).

I would be quite content if this is fixed for the Ninja generator.  A simple fix
would be to adapt the build rules by moving $LINK_LIBRARIES from 'command' to
'rspfile_content':

--- rules.ninja.bak 2012-06-28 15:23:35 +0100
+++ rules.ninja 2012-06-28 15:38:09 +0100
@@ -40,10 +40,10 @@
 # Rule for linking C executable.

 rule C_EXECUTABLE_LINKER_RSPFILE
-  command = cmd.exe /c $PRE_LINK  C:\Program Files
(x86)\CMake\bin\cmake.exe -E vs_link_exe
C:\PROGRA~2\MICROS~3.0\VC\bin\cl.exe  /nologo @$out.rsp  $FLAGS
/Fe$out /Fd$TARGET_PDB -link /implib:$TARGET_IMPLIB /version:0.0
$LINK_FLAGS $LINK_LIBRARIES  $POST_BUILD
+  command = cmd.exe /c $PRE_LINK  C:\Program Files
(x86)\CMake\bin\cmake.exe -E vs_link_exe
C:\PROGRA~2\MICROS~3.0\VC\bin\cl.exe  /nologo @$out.rsp  $FLAGS
/Fe$out /Fd$TARGET_PDB -link /implib:$TARGET_IMPLIB /version:0.0
$LINK_FLAGS  $POST_BUILD
   description = Linking C executable $out
   rspfile = $out.rsp
-  rspfile_content = $in
+  rspfile_content = $in $LINK_LIBRARIES

Best,

--Zaheer

 [1]: BEGIN: testcase.sh ---
#!/bin/bash -e

NUM_LIBRARIES=500
# Use a long path to quickly exhaust the command-line length limit.
SRC_DIR=src/abcdefghijklmnopqrstuvwxyz0123456789

# Root directory: application and CMakeLists.txt
echo int main() { return 0; }  hello.c

cat  EOF  CMakeLists.txt
cmake_minimum_required(VERSION 2.8)

project(Hello)

add_subdirectory($SRC_DIR)

add_executable(hello hello.c)
target_link_libraries(hello
EOF

for ((i = 1; i = $NUM_LIBRARIES; i++)); do
echo library$i  CMakeLists.txt
done

echo )  CMakeLists.txt

# Libraries: sources and CMakeLists.txt
mkdir -p $SRC_DIR
[[ -f $SRC_DIR/CMakeLists.txt ]]  rm $SRC_DIR/CMakeLists.txt
for ((i = 1; i = $NUM_LIBRARIES; i++)); do
echo int function$i() { return $i; }  $SRC_DIR/function$i.c
echo add_library(library$i function$i.c)  $SRC_DIR/CMakeLists.txt
done

echo Testcase has been setup: now build with CMake and Ninja generator.
 [1]: END: testcase.sh ---


cmake_testcase_many_libraries_rspfile.tar.bz2
Description: BZip2 compressed data
--

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] Latest Xcode install (4.3.x) and CMake error

2012-06-28 Thread Michael Jackson
Thanks. I'll give that a try.

___
Mike JacksonPrincipal Software Engineer
BlueQuartz SoftwareDayton, Ohio
mike.jack...@bluequartz.net  www.bluequartz.net

On Jun 28, 2012, at 9:30 AM, Sean McBride wrote:

 On Thu, 28 Jun 2012 09:16:31 -0400, Michael Jackson said:
 
 Error: No developer directory found at /Developer.  Run
 /usr/bin/xcode-select to update the developer directory path.
 
 Hey Mike!
 
 Maybe your xcode-select is still pointing to /Developer?  Try rerunning 
 xcode-select to point it to /Applications/Xcode.app (or where ever).  It has 
 a pretty good man page too BTW.
 
 --
 
 Sean McBride, B. Eng s...@rogue-research.com
 Rogue Researchwww.rogue-research.com
 Mac Software Developer  Montréal, Québec, Canada
 
 

--

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] Supplying different debug flags during compile and link stages for libraries and executables

2012-06-28 Thread Brett Delle Grazie
Hi Petr, et. al.

It looks like I spoke too soon.
I cannot see any way to separate the debug compile flag (-g) so that
it does not appear on the linker lines for static and shared
libraries.

The creation rules for static / shared libraries all include
LANGUAGE_COMPILE_FLAGS which inevitably includes the debug flags.

On AIX, the '-g' debug flag should only be supplied to executable
targets otherwise duplicate symbol errors result.

I'll take a look at the sources and see if anything can be done there
otherwise I might have to raise a defect.

If anyone has any alternative suggestions please let me know.

Kind regards,

Brett

On 28 June 2012 14:31, Brett Delle Grazie brett.dellegra...@gmail.com wrote:
 Hi Petr,

 Thanks very much ... I saw something extremely similar in the VS
 /STACK:1000 and managed to work it out from there.
 I've been playing around with it today and have managed to get somewhere.

 Thanks again,

 Brett

 On 28 June 2012 08:06, Petr Kmoch petr.km...@gmail.com wrote:
 Hi Brett,

 as far as I know, compilation flags come from
 CMAKE_lang_FLAGS_config, while linker flags come from
 CMAKE_{SHARED|EXE}_LINKER_FLAGS[_config]. So you should be able to
 override CMAKE_SHARED_LINKER_FLAGS_Debug (not sure with correct case
 for configuration name) and remove -g from there.

 Petr

 On Wed, Jun 27, 2012 at 10:36 PM, Brett Delle Grazie
 brett.dellegra...@gmail.com wrote:
 Hi,

 On AIX using the XLC compiler I've determined the debug flag (-g)
 should be used for all compile stages but should only be supplied to
 the final
 link stage of an executable (not a library target), otherwise
 duplicate symbol errors result.
 For reference see:
 http://www.ibm.com/developerworks/forums/thread.jspa?threadID=438591tstart=0

 Is there an easy way of supplying a different set of debug flags for
 the compile stage as opposed to the link stage?

 I could potentially override:
 CMAKE_C_FLAGS_DEBUG_INIT
 CMAKE_CXX_FLAGS_DEBUG_INIT

 but I can't really see where these are combined into the compile / link 
 rules.

 Does anyone have any suggestions? Any guidance / help is appreciated.

 Thanks,

 --
 Best Regards,

 Brett Delle Grazie
 --

 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



 --
 Best Regards,

 Brett Delle Grazie



-- 
Best Regards,

Brett Delle Grazie
--

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] FindSubversion

2012-06-28 Thread Rolf Eike Beer
Totte Karlsson wrote:
 Hi,
 I am doing development on windows. I also have cygwin installed, to do
 things from the commandline once in a while. I also use TortoiseSVN.
 
 When trying to use
 SUBVERSION_WC_INFO(${PROJECT_SOURCE_DIR} info)
 
 In a cmake file, I get the following error:
 
   Command c:/cygwin/bin/svn.exe info
C:/roadrunnerwork/source/trunk/Wrappers failed with output:
 
svn: E155007:
'/cygdrive/c/rrBuilds/xe/rr/C:/roadrunnerwork/source/trunk/Wrappers' is
 not a working copy
 
 So it seems it found the cygwin svn comman line client. The path:
 '/cygdrive/c/rrBuilds/xe/rr/C:/roadrunnerwork/source/trunk/Wrappers'
 
 is composed of the path where I execute the make command and the source
 folder, for which I want the svn info..
 
 How to recover from this?

In your build directory run:

cmake -D  Subversion_SVN_EXECUTABLE=c:/some/thing/svn.exe .

Eike
-- 


signature.asc
Description: This is a digitally signed message part.
--

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] FindSubversion

2012-06-28 Thread Totte Karlsson


 In your build directory run:

 cmake -D  Subversion_SVN_EXECUTABLE=c:/some/thing/svn.exe .


Well, I want clients of this library to be able to compile it without too many 
tricks. I assume your command changes the path in the cache to a different svn 
client. Is that right?


I found that uninstalling the cygwin svn client, makes things work (cmake then 
finds the tortoise command line client). So I'll just tell my clients that they 
have to uninstall their cygwin svn client if they want to compile this code.


Having two svn command line clients may seem odd anyway..?

Perhaps, having the user setting up svn (giving the path to) in the UI would 
make most sense, since the findcommand fails in this case? Not sure how to do 
that however...


Thanks,
-totte
--

Powered by www.kitware.com

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

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

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


[CMake] how to do this: svn info?

2012-06-28 Thread Totte Karlsson

Hi,

I'm trying to get some svn information into a build of a C library.

The cmake currently looks like this (gathered from various posts)

INCLUDE(FindSubversion)
IF(SUBVERSION_FOUND)
Subversion_WC_INFO(${PROJECT_SOURCE_DIR} rr)
Subversion_WC_LOG(${PROJECT_SOURCE_DIR} rr)

SET(infoFile rr_svn_info)

FILE(WRITE ${infoFile}.txt
#ifndef ${infoFile}H
#define ${infoFile}H
const int SVN_VERSION =  ${rr_WC_REVISION};\n
const char* SVN_LAST_COMMIT_AUTHOR =\${rr_WC_LAST_CHANGED_AUTHOR}\;\n
const char* SVN_LASTLOG =\${rr_LAST_CHANGED_LOG}\;\n
#endif
)

EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy_if_different 
${infoFile}.txt ${infoFile}.h)

ENDIF(SUBVERSION_FOUND)


Currently I have two problems:
When generating the header, the svn_lastlog expands to something like

const char* SVN_LASTLOG = 


r505 | tottek | 2012-06-28 14:11:49 -0700 (Thu, 28 Jun 2012) | 20 lines

New release
. etc..

The above will not compile, because a string spanning multiple lines in C must 
have a continuation character at the end of each line, e.g.


const char* SVN_LASTLOG =\ 
\

r505 | tottek | 2012-06-28 14:11:49 -0700 (Thu, 28 Jun 2012) | 20 lines\
 etc...

How would one solve that in CMake?

The second problem is the execute process command
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy_if_different 
${infoFile}.txt ${infoFile}.h)


which do create the txt file, but fails to copy it to the .h file. Just getting 
an error saying

Error copying file (if different) from the txt file to the h file

Any tips?

-totte

--
.
Totte Karlsson, Ph.D.
Dune Scientific, LLC
425-296 1980 (office)
425-780 9648 (cell)
www.dunescientific.com
.


--

Powered by www.kitware.com

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

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

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


[Cmake-commits] CMake branch, master, updated. v2.8.8-419-g7ecbf9d

2012-06-28 Thread Kitware Robot
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project CMake.

The branch, master has been updated
   via  7ecbf9daacaa9d26476984b957bc7e6f4d6b030d (commit)
  from  3cb7eefd55cada0e334bbe4adf3b2ca4b3dfd70d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7ecbf9daacaa9d26476984b957bc7e6f4d6b030d
commit 7ecbf9daacaa9d26476984b957bc7e6f4d6b030d
Author: Kitware Robot kwro...@kitware.com
AuthorDate: Fri Jun 29 00:01:05 2012 -0400
Commit: Kitware Robot kwro...@kitware.com
CommitDate: Fri Jun 29 00:01:05 2012 -0400

CMake Nightly Date Stamp

diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 09fb8b6..ddda331 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -2,5 +2,5 @@
 SET(CMake_VERSION_MAJOR 2)
 SET(CMake_VERSION_MINOR 8)
 SET(CMake_VERSION_PATCH 8)
-SET(CMake_VERSION_TWEAK 20120628)
+SET(CMake_VERSION_TWEAK 20120629)
 #SET(CMake_VERSION_RC 1)

---

Summary of changes:
 Source/CMakeVersion.cmake |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits