Re: [CMake] Initial C# support (was Re: Adding support for new languages to CMake)

2008-10-20 Thread Mathieu Malaterre
On Fri, Oct 17, 2008 at 7:00 PM, Alexander Neundorf
[EMAIL PROTECTED] wrote:
 On Friday 17 October 2008, Mathieu Malaterre wrote:
 ...
 Quick question, here is how one create executable in C#:

   SET(CMAKE_CSharp_LINK_EXECUTABLE
 CMAKE_CSharp_COMPILER FLAGS OBJECTS -out:TARGET.exe
 LINK_LIBRARIES)

 The problem here is that i need to prepend each added libary using
 /r , I could not figure out which flag dictate that (for now
 LINK_LIBRARIES expand to 'foo.dll', while I need '/r:foo.dll').

 Not sure, but did you set CMAKE_LINK_LIBRARY_FLAG ?

My current solution is to use:

CMAKE_LINK_LIBRARY_FILE_FLAG

However it always add a space, which is not ideal for my case (but
works for mono implementation).

2cts
-- 
Mathieu
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] link_libraries

2008-10-20 Thread Ioan Calin Borcoman
Hi,

I have a dir with a lot of small example apps that all link with the
same libs. The link_libraries is much more convenient in this case
than writing a target_link_libraries line for each example target.

Why is the link_libraries deprecated? Will it be removed in the future?

Thanx.

Ionutz
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] link_libraries

2008-10-20 Thread Hendrik Sattler
Ioan Calin Borcoman schrieb:
 Hi,
 
 I have a dir with a lot of small example apps that all link with the
 same libs. The link_libraries is much more convenient in this case
 than writing a target_link_libraries line for each example target.
 
 Why is the link_libraries deprecated? Will it be removed in the future?

In this case, you usually use a foreach anyway, don't you?

set (exampleapps
  ex1
  ex2
  ex3
)

foreach ( ex ${exampleapps} )
  add_executable( ${ex} ${ex}.c )
  target_link_libraries( ${ex} mylib)
endforeach ( ex )


Easy enough?

HS
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] install CMake on Win 64-bit

2008-10-20 Thread Stéphane CALANDE
Hi,



I'd like to know which file do I have to download in order to install CMake
on Windows 64-bit ?
I have searched on the Internet but I didn't find the file I need.

Thank you very much in advance,




Stéphane
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Adding non-file dependencies to a custom target

2008-10-20 Thread Giampiero Salvi

Giampiero Salvi wrote:

ADD_CUSTOM_TARGET(maintgt ALL
 DEPENDS ${EXECUTABLE_OUTPUT_PATH}/synface${CMAKE_EXECUTABLE_SUFFIX}


The last line should be:
DEPENDS ${EXECUTABLE_OUTPUT_PATH}/maintgt${CMAKE_EXECUTABLE_SUFFIX}

Giampiero

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Initial C# support (was Re: Adding support for new languages to CMake)

2008-10-20 Thread Mathieu Malaterre
Just FYI,

On Mon, Oct 20, 2008 at 11:30 AM, Mathieu Malaterre
[EMAIL PROTECTED] wrote:
 On Fri, Oct 17, 2008 at 7:00 PM, Alexander Neundorf
 [EMAIL PROTECTED] wrote:
 On Friday 17 October 2008, Mathieu Malaterre wrote:
 ...
 Quick question, here is how one create executable in C#:

   SET(CMAKE_CSharp_LINK_EXECUTABLE
 CMAKE_CSharp_COMPILER FLAGS OBJECTS -out:TARGET.exe
 LINK_LIBRARIES)

 The problem here is that i need to prepend each added libary using
 /r , I could not figure out which flag dictate that (for now
 LINK_LIBRARIES expand to 'foo.dll', while I need '/r:foo.dll').

 Not sure, but did you set CMAKE_LINK_LIBRARY_FLAG ?

 My current solution is to use:

 CMAKE_LINK_LIBRARY_FILE_FLAG

 However it always add a space, which is not ideal for my case (but
 works for mono implementation).


CMAKE_LINK_LIBRARY_FLAG is only used in :
cmComputeLinkInformation::AddUserItem.

Which is not used in:

ADD_LIBRARY(foo SHARED foo.c)
ADD_EXECUTABLE(bla bla.c)
TARGET_LINK_LIBRARIES(bla foo) # foo is a the name of a CMake target

2cts
-- 
Mathieu
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] install CMake on Win 64-bit

2008-10-20 Thread Stéphane CALANDE
I found :

Changes in CMake 2.6.1 RC 16

(...)

- Fix InstallRequiredSystemLibraries.cmake to work with win64

on https://lists.secondlife.com/pipermail/sldev/2008-August/011251.html;


but I still don't understand how to install CMake on Win 64-bit
Can you help me please ?



Thank you very much,



Stéphane.






2008/10/20 Stéphane CALANDE [EMAIL PROTECTED]

 Hi,



 I'd like to know which file do I have to download in order to install CMake
 on Windows 64-bit ?
 I have searched on the Internet but I didn't find the file I need.

 Thank you very much in advance,




 Stéphane

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] install CMake on Win 64-bit

2008-10-20 Thread Hendrik Sattler
Stéphane CALANDE schrieb:
 but I still don't understand how to install CMake on Win 64-bit
 Can you help me please ?

Download the source and compile it? I don't have Win64 but AFAIK, Visual
Studio Express also works there and can be used to compile cmake.

HS
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] install CMake on Win 64-bit

2008-10-20 Thread Bill Hoffman

Hendrik Sattler wrote:

Stéphane CALANDE schrieb:

but I still don't understand how to install CMake on Win 64-bit
Can you help me please ?


Download the source and compile it? I don't have Win64 but AFAIK, Visual
Studio Express also works there and can be used to compile cmake.



There is no need.  You can run the 32 bit CMake for visual studio, and 
have it generate 64 bit compiles.   CMake really does not need to 
address large amounts of memory...


-Bill
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] install CMake on Win 64-bit

2008-10-20 Thread Stéphane CALANDE
Thank you for your quick responses.

I haven't used Visual Studio yet.

Bill, do you mean I can download
cmake-2.6.2-win32-x86.exehttp://www.cmake.org/files/v2.6/cmake-2.6.2-win32-x86.exe
from http://www.cmake.org/cmake/resources/software.html; and that I can use
this executable to install CMake ? Or did I misunderstand ?

Excuse me for these questions but it's the first time I have to use a win
64-bit pc


Thank you very much,



Stéphane





2008/10/20 Bill Hoffman [EMAIL PROTECTED]

 Hendrik Sattler wrote:

 Stéphane CALANDE schrieb:

 but I still don't understand how to install CMake on Win 64-bit
 Can you help me please ?


 Download the source and compile it? I don't have Win64 but AFAIK, Visual
 Studio Express also works there and can be used to compile cmake.


 There is no need.  You can run the 32 bit CMake for visual studio, and have
 it generate 64 bit compiles.   CMake really does not need to address large
 amounts of memory...

 -Bill

 ___
 CMake mailing list
 CMake@cmake.org
 http://www.cmake.org/mailman/listinfo/cmake

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] mixed java/c project.

2008-10-20 Thread George Neill
Mathieu,

On Mon, Oct 20, 2008 at 4:06 AM, Mathieu Malaterre
[EMAIL PROTECTED] wrote:
 On Sat, Oct 18, 2008 at 7:48 PM, George Neill [EMAIL PROTECTED] wrote:
 Hi All,

 On Sat, Oct 18, 2008 at 2:01 AM, George Neill [EMAIL PROTECTED] wrote:
 Hi all,

  I am trying to convert a project to cmake which has mixed java and c
 compilations.  Here's the project layout,

  project/
 - src/c
 - src/java

 I get the java project to build fine if I use the top level
 CMakeLists.txt file, but if I use add_subdirectory(src/java) in the
 top level CMakeLists.txt and create a CMakeLists.txt file in src/java
 it appears to break (below is the error)

 The -d option of the javac command line appears to be coming out wrong
 ... CMakeFiles/luajava.dir/org/keplerproject/luajava should actually
 be src/java/CMakeFiles/luajava.dir/org/keplerproject/luajava

 I took a look in Modules/CMakeJavaInformation.cmake and here's what I found,

 # compile a Java file into an object file
 IF(NOT CMAKE_Java_COMPILE_OBJECT)
  SET(CMAKE_Java_COMPILE_OBJECT
CMAKE_Java_COMPILER   FLAGS SOURCE -d OBJECT_DIR)
 ENDIF(NOT CMAKE_Java_COMPILE_OBJECT)

 OBJECT_DIR seems to be the wrong place,  any ideas on the best way to fix 
 this?

 Well, it looks like this isn't a new issue.  (
 http://www.mail-archive.com/cmake@cmake.org/msg02564.html )

 I was able to get by it by doing this,

 SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
 SET(CMAKE_USER_MAKE_RULES_OVERRIDE override)

 my override.cmake contains,

 # compile a Java file into an object file
 IF(NOT CMAKE_Java_COMPILE_OBJECT)
  SET(CMAKE_Java_COMPILE_OBJECT
CMAKE_Java_COMPILER   FLAGS SOURCE -d
 CMAKE_CURRENT_BINARY_DIR/OBJECT_DIR)
 ENDIF(NOT CMAKE_Java_COMPILE_OBJECT)

 Is this acceptable, or should I be doing something else?

 IMHO I think it is. Please open a bug report, otherwise it might get
 lost -again?-

I will.  I have made a couple of changes since I last posted.  I found
out my change, while it did make everything compile fine ... messed up
the .jar file creation.  So here's what I ended up with,

bash-3.00$ cat override.cmake
# compile a Java file into an object file
FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/.class)

SET(CMAKE_Java_COMPILE_OBJECT
  CMAKE_Java_COMPILER FLAGS SOURCE -d CMAKE_CURRENT_BINARY_DIR/.class
)

# this is a place holder if java needed flags for javac they would go here.
SET(CMAKE_Java_CREATE_STATIC_LIBRARY
  CMAKE_Java_ARCHIVE -cf TARGET -C CMAKE_CURRENT_BINARY_DIR/.class .
)

Thanks,
George.
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] install CMake on Win 64-bit

2008-10-20 Thread Bill Hoffman

Stéphane CALANDE wrote:

Thank you for your quick responses.

I haven't used Visual Studio yet.

Bill, do you mean I can download cmake-2.6.2-win32-x86.exe 
http://www.cmake.org/files/v2.6/cmake-2.6.2-win32-x86.exe from 
http://www.cmake.org/cmake/resources/software.html; and that I can use 
this executable to install CMake ? Or did I misunderstand ?


Excuse me for these questions but it's the first time I have to use a 
win 64-bit pc




Yes, you can use that download to install cmake on a 64 bit windows 
machine. 64 bit windows machines can run 32 bit stuff with no problem.


-Bill
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] mixed java/c project.

2008-10-20 Thread Mathieu Malaterre
On Sat, Oct 18, 2008 at 7:48 PM, George Neill [EMAIL PROTECTED] wrote:
 Hi All,

 On Sat, Oct 18, 2008 at 2:01 AM, George Neill [EMAIL PROTECTED] wrote:
 Hi all,

  I am trying to convert a project to cmake which has mixed java and c
 compilations.  Here's the project layout,

  project/
 - src/c
 - src/java

 I get the java project to build fine if I use the top level
 CMakeLists.txt file, but if I use add_subdirectory(src/java) in the
 top level CMakeLists.txt and create a CMakeLists.txt file in src/java
 it appears to break (below is the error)

 The -d option of the javac command line appears to be coming out wrong
 ... CMakeFiles/luajava.dir/org/keplerproject/luajava should actually
 be src/java/CMakeFiles/luajava.dir/org/keplerproject/luajava

 I took a look in Modules/CMakeJavaInformation.cmake and here's what I found,

 # compile a Java file into an object file
 IF(NOT CMAKE_Java_COMPILE_OBJECT)
  SET(CMAKE_Java_COMPILE_OBJECT
CMAKE_Java_COMPILER   FLAGS SOURCE -d OBJECT_DIR)
 ENDIF(NOT CMAKE_Java_COMPILE_OBJECT)

 OBJECT_DIR seems to be the wrong place,  any ideas on the best way to fix 
 this?

 Well, it looks like this isn't a new issue.  (
 http://www.mail-archive.com/cmake@cmake.org/msg02564.html )

 I was able to get by it by doing this,

 SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
 SET(CMAKE_USER_MAKE_RULES_OVERRIDE override)

 my override.cmake contains,

 # compile a Java file into an object file
 IF(NOT CMAKE_Java_COMPILE_OBJECT)
  SET(CMAKE_Java_COMPILE_OBJECT
CMAKE_Java_COMPILER   FLAGS SOURCE -d
 CMAKE_CURRENT_BINARY_DIR/OBJECT_DIR)
 ENDIF(NOT CMAKE_Java_COMPILE_OBJECT)

 Is this acceptable, or should I be doing something else?

IMHO I think it is. Please open a bug report, otherwise it might get
lost -again?-

http://cmake.org/Bug

Thanks,
-- 
Mathieu
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Visual Studio: Add file to project without compiling it

2008-10-20 Thread Matthias Riechmann

Hello,

I'd like to make CMake including a file in way so that it is visible in 
a generated visual studio project and can be edited in this way, but is 
not processed by the compiler.


The reason I need this is as followed: I have some CORBA IDL files that 
I'd like to process using a custom macro calling add_custom_command to 
run the idl compiler. So far it works quite well, the file is processed 
on build, but since I don't specify the IDL file as a source file in the 
add_executable command it doesn't appear in visual studio. When adding 
it to the source files Microsoft's MIDL compiler tries to work on this 
file as well, which is not what I intended to do.


So, is it in any way possible to just show a custom file in Visual Studio?


Matthias



--
Dipl.-Inform. Matthias Riechmann
Institut für Prozessrechentechnik, Automation und Robotik
Medizin-Gruppe
Universität Karlsruhe (TH)
Gebäude 40.28, Zimmer 103
Engler-Bunte-Ring 8
76131 Karlsruhe

Fon: +49 (721) 608-4049
Fax: +49 (721) 608-7141

Web: http://wwwipr.ira.uka.de/~richmann
begin:vcard
fn:Matthias Riechmann
n:Riechmann;Matthias
org;quoted-printable;quoted-printable:Universit=C3=A4t Karlsruhe (TH);Institut f=C3=BCr Prozessrechentechnik, Automation und Robotik
adr;quoted-printable:Geb=C3=A4ude 40.28, Zimmer 103;;Engler-Bunte-Ring 8;Karlsruhe;;76131;Germany
email;internet:[EMAIL PROTECTED]
tel;work:+49 (721) 608-4049
tel;fax:+49 (721) 608-4049
tel;cell:+49 (721) 608-7141
x-mozilla-html:FALSE
url:Web: http://wwwipr.ira.uka.de/~richmann
version:2.1
end:vcard



smime.p7s
Description: S/MIME Cryptographic Signature
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] CPack NSIS installer requires CPACK_PACKAGE_EXECUTABLES entry?

2008-10-20 Thread David Cole
Thanks for the bug reports. I've assigned them to myself. Further comments
will appear as notes directly in the issues themselves.
Thanks,
David


On Sun, Oct 19, 2008 at 3:17 AM, Sam Baker [EMAIL PROTECTED]wrote:

  I created a new issue for the bug:
 http://public.kitware.com/Bug/view.php?id=7828

 And a feature request for the new CPACK_PACKAGE_EXECUTABLES behavior:
 http://public.kitware.com/Bug/view.php?id=7829



 I don't see a way to edit the issues and assign them to David.



 Thanks,

 Sam


  --

 *From:* David Cole [mailto:[EMAIL PROTECTED]
 *Sent:* Friday, October 17, 2008 4:10 PM
 *To:* Sam Baker
 *Cc:* cmake@cmake.org
 *Subject:* Re: [CMake] CPack NSIS installer requires
 CPACK_PACKAGE_EXECUTABLES entry?



 On Thu, Oct 16, 2008 at 4:25 PM, Sam Baker [EMAIL PROTECTED]
 wrote:

 Is this the expected behavior or am I missing something?

 Neither. It appears to be a bug... We'll have to keep supporting the bin
 folder for backwards compatibility, but I think it would be a great feature
 request to use CPACK_PACKAGE_EXECUTABLES without requiring a bin folder.



 And the CPACK_NSIS_MENU_LINKS should work regardless of use
 of CPACK_PACKAGE_EXECUTABLES.



 Would you be willing to submit a bug and a feature request to the bug
 tracker on these two issues? If you have time, great, do it and assign them
 to me. Otherwise, I will try to put these into the bug tracker and/or fix
 them in the CMake code base.



 Thanks for the report,

 David Cole






 Big Fish Games, Inc. * A New Game Every Day!™http://www.bigfishgames.com
 * http://www.bigfishgames.com


___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Random BAD_COMMAND error when running CTest

2008-10-20 Thread David Cole
Another common source of apparently random results is uninitialized
variables. I don't think it is in ctest itself, as this is the first we've
heard of something like this on this mailing list (although anything's
possible...)
Have you run your test code through valgrind to see if it catches any
uninitialized data access?


David


On Fri, Oct 17, 2008 at 11:37 PM, Ian Mackenzie
[EMAIL PROTECTED]wrote:

 On Fri, Oct 17, 2008 at 10:09 PM, Alan W. Irwin
 [EMAIL PROTECTED] wrote:
  One potential source of randomness is failing or iffy hardware.
 
  Have you kept track of such things as systematic changes in system
  temperature under the same load conditions? I must clean out the dust
 from
  one of my boxes every 6 months or I see dramatically increasing
 temperatures
  (like 10 C) under heavy system load.  The other box has much better air
 flow
  design so the the problem isn't as critical there.
 
  Have you tried running memtest?
 
  What happens if you try running your ctests on an entirely different
  machine?

 Thanks for the suggestions!  I don't think system temperature has much
 to do with it, though - I did a bunch more tests keeping track of
 temperature at the same time (acpi -t  ctest) and there didn't seem
 to be a correlation between temperature and errors...both cores were
 pretty steady around 56-57 C.  I also just ran memtest, which reported
 no errors.

 I don't have a convenient way of testing on another machine right now;
 while I suspect the problem is somehow dependent on my machine and
 might very well not show up on another, the errors also seemed to
 start cropping up as soon as I upgraded to 2.6.2, so I think it's
 somehow related to CMake. It might just be a packaging thing with my
 distribution, but I tried with the binary version of CMake available
 on the CMake web site as well and I get the same sort of errors (even
 after wiping the build directory clean and rebuilding everything with
 the binary version of CMake and then testing with the binary version
 of CTest).

 -Ian
 ___
 CMake mailing list
 CMake@cmake.org
 http://www.cmake.org/mailman/listinfo/cmake

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

[CMake] Adding non-file dependencies to a custom target

2008-10-20 Thread Giampiero Salvi

Hi,
I have a large project that includes a number of sub targets (subtgt1 
subtgt2...) each generating both linked libraries and tcl files (each 
sub target generates several files). The project also includes a main 
custom target maintgt that wraps the libs+tcl files into one executable 
using a custom command. The problem is I did not find a good way to make 
the maintgt dependent on the the sub targets (listing all generated 
files into the custom command's DEPENDS field would be really tedious).


Here is how the main target looks like:

ADD_CUSTOM_COMMAND(
 OUTPUT ${EXECUTABLE_OUTPUT_PATH}/maintgt${CMAKE_EXECUTABLE_SUFFIX}
 COMMAND ${TCL_TCLSH} ${PROJECT_SOURCE_DIR}/wrap.tcl ${SDX_EXECUTABLE} 
${TCLKIT_RUNTIME} ${TCLKITSH_RUNTIME} 
${EXECUTABLE_OUTPUT_PATH}/maintgt${CMAKE_EXECUTABLE_SUFFIX}

 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
ADD_CUSTOM_TARGET(maintgt ALL
 DEPENDS ${EXECUTABLE_OUTPUT_PATH}/synface${CMAKE_EXECUTABLE_SUFFIX}
)
ADD_DEPENDENCIES(maintgt subtgt1 subtgt2 subtgt3...)

This doesn't work: rebuilding the sub targets does not trigger 
rebuilding the main target.


I also tried to use DEPENDS in the custom command, but I read on the 
list that that is only for file dependencies.


The question is: is there a way to specify high level dependencies in a 
custom target? What am I doing wrong?


It might help to know that the sub targets are built in subdirectories 
(I read on the list somewhere that this might make a difference).


Thank you very much!
Giampiero

I'm using CMake 2.6-patch 0 on Ubuntu and Mingw
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] mixed java/c project.

2008-10-20 Thread George Neill
Mathieu,

On Mon, Oct 20, 2008 at 4:06 AM, Mathieu Malaterre
[EMAIL PROTECTED] wrote:
 On Sat, Oct 18, 2008 at 7:48 PM, George Neill [EMAIL PROTECTED] wrote:
 Hi All,

 On Sat, Oct 18, 2008 at 2:01 AM, George Neill [EMAIL PROTECTED] wrote:
 Hi all,

  I am trying to convert a project to cmake which has mixed java and c
 compilations.  Here's the project layout,

  project/
 - src/c
 - src/java

 I get the java project to build fine if I use the top level
 CMakeLists.txt file, but if I use add_subdirectory(src/java) in the
 top level CMakeLists.txt and create a CMakeLists.txt file in src/java
 it appears to break (below is the error)

 The -d option of the javac command line appears to be coming out wrong
 ... CMakeFiles/luajava.dir/org/keplerproject/luajava should actually
 be src/java/CMakeFiles/luajava.dir/org/keplerproject/luajava

 I took a look in Modules/CMakeJavaInformation.cmake and here's what I found,

 # compile a Java file into an object file
 IF(NOT CMAKE_Java_COMPILE_OBJECT)
  SET(CMAKE_Java_COMPILE_OBJECT
CMAKE_Java_COMPILER   FLAGS SOURCE -d OBJECT_DIR)
 ENDIF(NOT CMAKE_Java_COMPILE_OBJECT)

 OBJECT_DIR seems to be the wrong place,  any ideas on the best way to fix 
 this?

 Well, it looks like this isn't a new issue.  (
 http://www.mail-archive.com/cmake@cmake.org/msg02564.html )

 I was able to get by it by doing this,

 SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
 SET(CMAKE_USER_MAKE_RULES_OVERRIDE override)

 my override.cmake contains,

 # compile a Java file into an object file
 IF(NOT CMAKE_Java_COMPILE_OBJECT)
  SET(CMAKE_Java_COMPILE_OBJECT
CMAKE_Java_COMPILER   FLAGS SOURCE -d
 CMAKE_CURRENT_BINARY_DIR/OBJECT_DIR)
 ENDIF(NOT CMAKE_Java_COMPILE_OBJECT)

 Is this acceptable, or should I be doing something else?

 IMHO I think it is. Please open a bug report, otherwise it might get
 lost -again?-

 http://cmake.org/Bug

Done!,

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

Thanks,
George.
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CMAKE_INSTALL_PREFIX not working in Visual Studio

2008-10-20 Thread David Cole
How are you configuring? With a CMake GUI or a command line tool?

If with a gui, set the CMAKE_INSTALL_PREFIX in the gui.
If with a command line tool, pass -DCMAKE_INSTALL_PREFIX:STRING=/blah on the
command line.

To workaround this entirely, invent your own CMake variable that CMake knows
nothing about, and then use SET with CACHE, INTERNAL *and* FORCE to set
CMAKE_INSTALL_PREFIX to your variable's value.


HTH,
David


On Sun, Oct 19, 2008 at 2:55 AM, Sam Baker [EMAIL PROTECTED]wrote:

  In my project file I have near the top of the file, the line:



 set(CMAKE_INSTALL_PREFIX ${APP_INSTALL_DIR}/MyApp)



 Which I thought would force all install destinations to be relative to that
 directory. Later in the same CMakeLists.txt file, I have some install
 commands:



 INSTALL(TARGETS MyApp

 RUNTIME DESTINATION .

 LIBRARY DESTINATION .

 ARCHIVE DESTINATION .)



 INSTALL(FILES ${MYAPP_ROOT_DIR}/plugins.cfg
 ${MYAPP_ROOT_DIR}/plugins_debug.cfg DESTINATION .)

 INSTALL(DIRECTORY ${MYAPP_ROOT_DIR}/assets DESTINATION .)

 # Add Microsoft runtime

 set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)

 INCLUDE(InstallRequiredSystemLibraries)

 INSTALL(PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION .)



 However when I build the install project in Visual Studio, everything is
 installed to C:/Program Files/MyApp/



 Is this a bug or is there something else I need to do to override the
 default install location?



 As a test I tried adding message(${CMAKE_INSTALL_PREFIX}) through my
 CMakeLists.txt before and after the install command and the message prints
 out the correct directory, but the Visual Studio project is still installing
 to the wrong directory.



 One thing that might affect this is that I use out of source
 add_subdirectory() commands after setting CMAKE_INSTALL_PREFIX and those
 themselves install targets using DESTINATION .

 Those should also be going to the parent's CMAKE_INSTALL_PREFIX dir. Is it
 possible that they are affecting a global version of CMAKE_INSTALL_PREFIX by
 not setting it explicitly themselves?



 If this is a bug, let me know and I'll report it.



 Thanks,
 Sam




 Big Fish Games, Inc. * A New Game Every Day!™http://www.bigfishgames.com
 * http://www.bigfishgames.com


 ___
 CMake mailing list
 CMake@cmake.org
 http://www.cmake.org/mailman/listinfo/cmake

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Simple CPack example is needed...

2008-10-20 Thread Eric Noulard
2008/10/20 Dick Munroe [EMAIL PROTECTED]:
 And once I keep CPack.make from clobbering CPACK_INSTALL_CMAKE_PROJECTS I
 get kits built as well.

 Here's something simple you can try to see the problem:

 project(foo)

  ...

   set(
 CPACK_INSTALL_CMAKE_PROJECTS
 ${CMAKE_HOME_DIRECTORY};ESPlanner-Web;WEB;/tmp/ESPlanner-install
 )

  message(x: ${CPACK_INSTALL_CMAKE_PROJECTS})

  include(CPack)

  message(x: ${CPACK_INSTALL_CMAKE_PROJECTS})

 When you configure your Makefiles (this particular build is for Darwin,
 running make) you'll see that after the include, the value for
 CPACK_INSTALL_CMAKE_PROJECTS is now null (I'm not building any source
 releases) because it's been overwritten by the contents of the
 CPACK_SOURCE_INSTALL_CMAKE_PROJECTS variable.  After the overwriting of
 CPACK_INSTALL_CMAKE_PROJECTS, there is a call to configure_file which is
 where I think that the bogus value of CPACK_INSTALL_CMAKE_PROJECTS gets
 written, resulting in the error.

 When you run the package command for the make file one (or at least I) get
 the error described below, in effect, CPack appears to have no data
 available from CPACK_INSTALL_CMAKE_PROJECTS set prior to the include of
 CPack.  If you make the change to CPack.cmake, described below, you get the
 correct behavior (or at least you get kits built which is what this is all
 about after all).  I'm just describing observed behavior with the shipped
 2.6.2 product on Darwin (10.5.4+) not stating what other folks do or don't
 see.  As near as I can tell from the sparse CPack documentation all I should
 have to do is set CPACK_INSTALL_CMAKE_PROJECTS, which I do, run make
 package, which I do, and get kits, which I don't.

OK Dick,
If I use your example (setting CPACK_INSTALL_CMAKE_PROJECTS before
include CPack)
  I'm able reproduce the described behavior, I must admit I did never set
CPACK_INSTALL_CMAKE_PROJECTS myself.

You are right the behavior is weird, but I think it shouldn't lead to an error.

When you set CPACK_INSTALL_CMAKE_PROJECTS before including(CPack)
the value is used for generating the  CPackConfig.cmake file (the one
used for BINARY packages)
generated at line CPack.cmake:199

configure_file(${cpack_input_file} ${CPACK_OUTPUT_CONFIG_FILE}
@ONLY IMMEDIATE)

[and in fact the generated file CONTAINS the value you set]

Now at line CPack.cmake 209:
SET(CPACK_INSTALL_CMAKE_PROJECTS ${CPACK_SOURCE_INSTALL_CMAKE_PROJECTS})

the variable is reset with the value of
CPACK_SOURCE_INSTALL_CMAKE_PROJECTS (note the SOURCE)
because at lines CPack.cmake 218 configure_file(${cpack_source_input_file}
  219
${CPACK_SOURCE_OUTPUT_CONFIG_FILE} @ONLY IMMEDIATE)

you generate the CPackSourceConfig.cmake (the one used for SOURCE packages)

So YES the variables is reset by INCLUDE(CPack) but this is not a bug,
just a weird feature because
Source package and Binary package CPack config files shares the
CPACK_INSTALL_CMAKE_PROJECTS.

If you want to specify CPACK_INSTALL_CMAKE_PROJECTS you need to specify BOTH

CPACK_INSTALL_CMAKE_PROJECTS
and
CPACK_SOURCE_INSTALL_CMAKE_PROJECTS
yourself.

However I don't even know what would be the meaning of
CPACK_SOURCE_INSTALL_CMAKE_PROJECTS
for a SOURCE package since there is NO INSTALL for a SOURCE package???

 I initially tried just including CPack and running make package, but got the
 same error (there is no data in CPACK_INSTALL_CMAKE_PROJECTS).

In this case on a Linux + TGZ/ZIP/RPM/DEB CPack  package generator
I do not have ANY error when running

make package
or
make package_source  (not available for RPM or DEB though)

I would say that this looks like a PackageMaker/OS X specific bug.
May be you should file a bug report
may be affer  trying the attached project which works well for me.


-- 
Erk


foo-0.1.1-Source.tar.gz
Description: GNU Zip compressed data
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Visual Studio: Add file to project without compiling it

2008-10-20 Thread Eric Noulard
2008/10/20 Matthias Riechmann [EMAIL PROTECTED]:
 Hello,

 I'd like to make CMake including a file in way so that it is visible in a
 generated visual studio project and can be edited in this way, but is not
 processed by the compiler.

Yes I think this issue is coming out more and more.
I've just filed a feature request for this:

http://public.kitware.com/Bug/view.php?id=7835


 The reason I need this is as followed: I have some CORBA IDL files that I'd
 like to process using a custom macro calling add_custom_command to run the
 idl compiler. So far it works quite well, the file is processed on build,
 but since I don't specify the IDL file as a source file in the
 add_executable command it doesn't appear in visual studio. When adding it to
 the source files Microsoft's MIDL compiler tries to work on this file as
 well, which is not what I intended to do.

Did you try to add it as a source and then specify that it is HEADER_FILE_ONLY
with

set_source_files_properties(yourfile.idl PROPERTIES HEADER_FILE_ONLY TRUE)


 So, is it in any way possible to just show a custom file in Visual Studio?

I don't think so, thus the feature request.
Do not hesitate to add comment to it if you find it useful.


-- 
Erk
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Setting install_name on Mac OSX 10.5

2008-10-20 Thread Gerrick Bivins
Hello all,
I¹m trying to use swig (SWIG_ADD_MODULE, SWIG_LINK_LIBRARIES) to generate
java bindings for a library (contains a couple of sub libraries, similar to
VTK¹s setup). I haven¹t been able to load the generated shared libraries.
There were a couple of issues:
1. My jvm won¹t load shared libraries unless they are named
³lib{libName}.dylib². Default creates {libName}.so. I was able to modify the
properties of my of my targets to change the prefix to ³lib² and the suffix
to ³.dylib² and the libs began to load but
2. My jvm won¹t load the generated shared libraries because the install_name
is set to ³../../lib{libName}.dylib. If I manually change them to simply be
lib{libName}.dylib, the shared libs load.

I looked at this link:
http://www.cmake.org/pipermail/cmake/2006-October/011530.html

 And tried setting the ³INSTALL_NAME_DIR² property to ³², but this didn¹t
work.
Any suggestions? I¹m trying to simply create the shared libraries, not
bundles or  frameworks.
I¹m using cmake 2.6.2 on Mac OSX 10.5.
Gerrick


___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Setting install_name on Mac OSX 10.5

2008-10-20 Thread Michael Jackson
I can suggest all sorts of ways to set the install_name of the  
libraries BUT I would rather figure out _why_ the swig generated  
libraries are getting the ../../lib prefix in the first place.


I don't have any experience with swig so I can only guess at this  
point. Does swig have its own settings for Install_name on OS X?


Also, which libraries are not correct:
  The c/c++ libraries?
  The generated jni libraries?

All? Both?

_
Mike Jackson  [EMAIL PROTECTED]
BlueQuartz Softwarewww.bluequartz.net
Principal Software Engineer  Dayton, Ohio

On Oct 20, 2008, at 5:43 PM, Gerrick Bivins wrote:


Hello all,
I’m trying to use swig (SWIG_ADD_MODULE, SWIG_LINK_LIBRARIES) to  
generate java bindings for a library (contains a couple of sub  
libraries, similar to VTK’s setup). I haven’t been able to load the  
generated shared libraries.

There were a couple of issues:
	• My jvm won’t load shared libraries unless they are named  
“lib{libName}.dylib”. Default creates {libName}.so. I was able to  
modify the properties of my of my targets to change the prefix to  
“lib” and the suffix to “.dylib” and the libs began to load but
	• My jvm won’t load the generated shared libraries because the  
install_name  is set to “../../lib{libName}.dylib. If I manually  
change them to simply be lib{libName}.dylib, the shared libs load.


I looked at this link:
http://www.cmake.org/pipermail/cmake/2006-October/011530.html

 And tried setting the “INSTALL_NAME_DIR” property to “”, but this  
didn’t work.
Any suggestions? I’m trying to simply create the shared libraries,  
not bundles or  frameworks.

I’m using cmake 2.6.2 on Mac OSX 10.5.
Gerrick

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Setting install_name on Mac OSX 10.5

2008-10-20 Thread Gerrick Bivins
Hi Mike,
The generated jni libraries have no prefix and the .so suffix.
I can only find two macros defined for swig but that could be just be my
ignorance:

SWIG_ADD_MODULE(name language interfacefile)  == generate a module named
name for language language given the swig interface file interfacefile)

SWIG_LINK_LIBRARIES( name linklib1 linklib2...) == link the module name
to linklib1,linklib2...etc

I was told in previous post that the .so suffix didn't matter, but with java
it seems to matter.

Gerrick

On 10/20/08 5:12 PM, Michael Jackson [EMAIL PROTECTED] wrote:

 I can suggest all sorts of ways to set the install_name of the
 libraries BUT I would rather figure out _why_ the swig generated
 libraries are getting the ../../lib prefix in the first place.
 
 I don't have any experience with swig so I can only guess at this
 point. Does swig have its own settings for Install_name on OS X?
 
 Also, which libraries are not correct:
The c/c++ libraries?
The generated jni libraries?
 
 All? Both?
 
 _
 Mike Jackson  [EMAIL PROTECTED]
 BlueQuartz Softwarewww.bluequartz.net
 Principal Software Engineer  Dayton, Ohio
 
 On Oct 20, 2008, at 5:43 PM, Gerrick Bivins wrote:
 
 Hello all,
 I¹m trying to use swig (SWIG_ADD_MODULE, SWIG_LINK_LIBRARIES) to
 generate java bindings for a library (contains a couple of sub
 libraries, similar to VTK¹s setup). I haven¹t been able to load the
 generated shared libraries.
 There were a couple of issues:
 € My jvm won¹t load shared libraries unless they are named
 ³lib{libName}.dylib². Default creates {libName}.so. I was able to
 modify the properties of my of my targets to change the prefix to
 ³lib² and the suffix to ³.dylib² and the libs began to load but
 € My jvm won¹t load the generated shared libraries because the
 install_name  is set to ³../../lib{libName}.dylib. If I manually
 change them to simply be lib{libName}.dylib, the shared libs load.
 
 I looked at this link:
 http://www.cmake.org/pipermail/cmake/2006-October/011530.html
 
  And tried setting the ³INSTALL_NAME_DIR² property to ³², but this
 didn¹t work.
 Any suggestions? I¹m trying to simply create the shared libraries,
 not bundles or  frameworks.
 I¹m using cmake 2.6.2 on Mac OSX 10.5.
 Gerrick
 
 ___
 CMake mailing list
 CMake@cmake.org
 http://www.cmake.org/mailman/listinfo/cmake
 
 ___
 CMake mailing list
 CMake@cmake.org
 http://www.cmake.org/mailman/listinfo/cmake

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Mac OS X frameworks

2008-10-20 Thread Tron Thomas
I tried posting this question earlier, and I never saw it.  It could be 
that I posted before I was fully added to the mailing list.
Anyway, I've been trying to look into what it would take to build a Mac 
OS X framework using CMake to configure the build system, and it is 
unclear to me how well this is supported.

What is the state of using CMake for building frameworks?

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] makefile environment variables

2008-10-20 Thread Daniel Stonier
Is there any means of getting cmake to insert an environment variable
into the makefiles it generates?

I know you can do the following:

SET(ENV{PATH} /opt/eldk/usr/bin/ccache:/opt/eldk/usr/bin:$ENV{PATH})
SET(ENV{CROSS_COMPILE} ppc_4xxFP-)

and this is sometimes useful for getting cmake to do things without
having to externally configure your environment, but it doesn't carry
on to the makefile. So you still need to rely on an externally
configured variable. What would be nice is if cmake additionally
inserted those variables into the makefiles so that when you came to
build, your environment was prepared.
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake