[CMAKE] Fortran Compiler different from ifort

2007-10-31 Thread Baptiste Derongs
Hello all, I am trying to compile some MPI Fortran programs, so the compiler is mpif90. So I took the cmake/Tests/Fortran example and just set CMAKE_Fortran_COMPILER. I tried to set it in CMakeLists.txt and directly in CMakeCache.txt. I can't make ADD_EXECUTABLE (or ADD_LIBRARY) working, it always

[CMake] disabling the cache

2007-10-31 Thread Jesper Eskilson
Hi people, Is there a way to disable the CMake cache, i.e. prevent CMake from generating or reading CMakeCache.txt? -- /Jesper ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] disabling the cache

2007-10-31 Thread Bill Hoffman
Jesper Eskilson wrote: Hi people, Is there a way to disable the CMake cache, i.e. prevent CMake from generating or reading CMakeCache.txt? No. But, it might help more if you gave an explanation of what you are trying to do? -Bill ___ CMake maili

[CMake] Detecting Mac OS X Version

2007-10-31 Thread Mike Jackson
Would someone have an example of detecting the specific version of OS X that cmake is running on? I would like add values based on OS X version. IF (OS_X_VERSION matches "10.5") .. ENDIF (OS_X_VERSION matches "10.5") or something to that effect.. Thanks -- Mike Jackson imikejackson &

[CMake] Detecting Mac OS X Version

2007-10-31 Thread Mike Jackson
Would someone have an example of detecting the specific version of OS X that cmake is running on? I would like add values based on OS X version. IF (OS_X_VERSION matches "10.5") .. ENDIF (OS_X_VERSION matches "10.5") or something to that effect.. Thanks -- Mike Jackson imikejackson &

[CMake] Passing a string through a macro, without escaping (\) woes!

2007-10-31 Thread Josef Karthauser
I've got a problem with backslashes in strings, and macros This works: SET(PATH "c:/test/path") FILE(TO_NATIVE_PATH ${PATH} CPATH) MESSAGE("Path: ${CPATH}") It displays "Path: c:\test\path" as expected (on windows) However this fails: MACRO(MYMESSAGE MSG)

Re: [CMake] Detecting Mac OS X Version

2007-10-31 Thread James Bigler
This is what one of our developers did: # -- Determine the version of OSX # -- 8 and less are OSX 10.0 - 10.4 # -- 9 is 10.5 (LEOPARD) IF (APPLE) EXEC_PROGRAM(uname ARGS -v OUTPUT_VARIABLE DARWIN_VERSION) STRING(REGEX MATCH "[0-9]+" DARWIN_VERSION ${DARWIN_VERSION}) MESSAGE(STATUS "DARWIN_

[CMake] CMake and create/install additional files

2007-10-31 Thread Stefan Achatz
Hello, I'm trying to automate the generation and installation of my gettext object files. This is what I came up with first: ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/de.mo COMMAND msgfmt --output-file=${CMAKE_CURRENT_BINARY_DIR}/de.mo ${CMAKE_CURRENT_SOURCE_DIR}/de.po DEPEND

[CMake] Re: Fortran Compiler different from ifort

2007-10-31 Thread Alin M Elena
Hi, Yap. there is one. In fact two. the dirty one is to do touch mpi.mod.proxy in the project dir. second one I suspect that you use an old version of cmake. The cvs version has that problem fixed, so update. Alin -- "...

Re: [CMake] CMake and create/install additional files

2007-10-31 Thread David Cole
Try this: ADD_CUSTOM_TARGET(BuildDeMo ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/de.mo" ) The custom target will build when "all" builds or when you build it specifically. The fact that it depends on the output of the custom command will cause the custom command to build whenever the target builds

Re: [CMake] Detecting Mac OS X Version

2007-10-31 Thread Benjamin Reed
On 10/31/07, James Bigler <[EMAIL PROTECTED]> wrote: > # -- Determine the version of OSX > # -- 8 and less are OSX 10.0 - 10.4 > # -- 9 is 10.5 (LEOPARD) > IF (APPLE) >EXEC_PROGRAM(uname ARGS -v OUTPUT_VARIABLE DARWIN_VERSION) you can also parse the output of /usr/bin/sw_vers, which will giv

RE: [CMake] disabling the cache

2007-10-31 Thread Torsten Martinsen
Jesper Eskilson <> wrote: > The first problem is that the Visual Studio generator fails to > properly rerun CMake when CMakeLists.txt. It reruns CMake, but the > modified projects files are not reloaded before continuing with the > build. Unfortunately, there is no way of forcing Visual Studio to

Re: [CMake] disabling the cache

2007-10-31 Thread Jesper Eskilson
Bill Hoffman wrote: > Jesper Eskilson wrote: >> Hi people, >> >> Is there a way to disable the CMake cache, i.e. prevent CMake from >> generating or reading CMakeCache.txt? >> > > No. > > But, it might help more if you gave an explanation of what you are > trying to do? The first problem is that

Re: [CMake] CMake and create/install additional files

2007-10-31 Thread Stefan Achatz
Ok, this works. But why do I give it a dependency, and why do I use make, when this target is dull generated everytime i call make? And why does my first attemt not work? ADD_CUSTOM_COMMAND should generate the file if it is needed somewhere, and 'INSTALL FILES' needs it. But thanks to you and M

Re: [CMake] disabling the cache

2007-10-31 Thread Bill Hoffman
Jesper Eskilson wrote: Bill Hoffman wrote: Jesper Eskilson wrote: Hi people, Is there a way to disable the CMake cache, i.e. prevent CMake from generating or reading CMakeCache.txt? No. But, it might help more if you gave an explanation of what you are trying to do? The first problem is t

Re: [CMake] disabling the cache

2007-10-31 Thread Andreas Pakulat
On Mittwoch, 31. Oktober 2007, Bill Hoffman wrote: > You should never have to "clear out the cache". Not quite right, what happens if I move one of the libraries to a different place? In that case I have to at least remove all entries that relate to that library from the cache. Not your everyday

Re: [CMake] disabling the cache

2007-10-31 Thread Jesper Eskilson
Bill Hoffman wrote: OK, so you want to disable the rerun of CMake, not the cache. That can be done with the CMAKE_SUPPRESS_REGENERATION variable. (set it to TRUE). Yes, I know how to use this variable. You should never have to "clear out the cache". If I make a change in CMakeLists.txt wh

Re: [CMake] disabling the cache

2007-10-31 Thread Bill Hoffman
Jesper Eskilson wrote: Bill Hoffman wrote: OK, so you want to disable the rerun of CMake, not the cache. That can be done with the CMAKE_SUPPRESS_REGENERATION variable. (set it to TRUE). Yes, I know how to use this variable. You should never have to "clear out the cache". If I make a ch

Re: [CMAKE] Fortran Compiler different from ifort

2007-10-31 Thread Marie-Christine Vallet
Baptiste Derongs wrote: Hello all, I am trying to compile some MPI Fortran programs, so the compiler is mpif90. So I took the cmake/Tests/Fortran example and just set CMAKE_Fortran_COMPILER. I tried to set it in CMakeLists.txt and directly in CMakeCache.txt. I can't make ADD_EXECUTABLE (or ADD_L

[CMake] Include path for a single file

2007-10-31 Thread James Bigler
I know you can add include paths for a single directory with INCLUDE_DIRECTORIES, but is it possible to set this for a single file with SET_SOURCE_FILES_PROPERTIES or by some other means? Thanks, James ___ CMake mailing list CMake@cmake.org http://www

RE: [CMake] Qt version of Cmake

2007-10-31 Thread Ken Martin
To echo what a couple folks have said, a cross platform GUI for cmake would be a nice addition. As it stands the GUI (as opposed to ccmake) is MFC based which is a bit ironic for a cross platform build system :) A solid GUI in Qt that had the same features as the MFC GUI would allow us to drop the

Re: [CMake] Detecting Mac OS X Version

2007-10-31 Thread Sean McBride
On 10/31/07 9:28 AM, Mike Jackson said: >Would someone have an example of detecting the specific version of OS >X that cmake is running on? I would like add values based on OS X >version. > >IF (OS_X_VERSION matches "10.5") > .. >ENDIF (OS_X_VERSION matches "10.5") > >or something to that ef

Re: [CMake] Detecting Mac OS X Version

2007-10-31 Thread James Bigler
Sean McBride wrote: On 10/31/07 9:28 AM, Mike Jackson said: Would someone have an example of detecting the specific version of OS X that cmake is running on? I would like add values based on OS X version. IF (OS_X_VERSION matches "10.5") .. ENDIF (OS_X_VERSION matches "10.5") or som

Re: [CMake] Detecting Mac OS X Version

2007-10-31 Thread Mike Jackson
On Oct 31, 2007, at 1:26 PM, James Bigler wrote: Sean McBride wrote: On 10/31/07 9:28 AM, Mike Jackson said: Would someone have an example of detecting the specific version of OS X that cmake is running on? I would like add values based on OS X version. IF (OS_X_VERSION matches "10.5"

[CMake] Linking OpenGL in Win32

2007-10-31 Thread pingu
I've been trying to get OpenGL linked to my project for a fair while now, and still not any closer to getting to done. FindOpenGL doesn't seem to work (or I could just be using it improperly) and nothing I do will allow me to use OpenGL. I'm absolutely sure I have it installed on my computer. I jus

Re: [CMake] Linking OpenGL in Win32

2007-10-31 Thread Brandon Van Every
On 10/31/07, pingu <[EMAIL PROTECTED]> wrote: > I've been trying to get OpenGL linked to my project for a fair while now, > and still not any closer to getting to done. FindOpenGL doesn't seem to work > (or I could just be using it improperly) and nothing I do will allow me to > use OpenGL. I'm abs

Re: [CMake] disabling the cache

2007-10-31 Thread Jesper Eskilson
Bill Hoffman wrote: For this case, you could have something like this: # if SOME_PROGRAM has a value but the program has been moved # or removed from the system, then clear the cache entry # so that find_program will try again. if(SOME_PROGRAM AND NOT EXISTS ${SOME_PROGRAM}) set(SOME_PROGRAM

[CMake] Re: CMake Digest, Vol 42, Issue 92

2007-10-31 Thread pingu
I've downloaded sample projects with OpenGL and those run fine. I can copy and paste that code into a new project and it won't compile, giving me linking errors. I've got the NVidia SDK and their sample programs run fine, so I'm certain OpenGL works on my PC. I'm using MCVS 2005 and my efforts are

Re: [CMake] disabling the cache

2007-10-31 Thread KSpam
On Wednesday 31 October 2007 13:37:04 Jesper Eskilson wrote: > Ouch. My cmake files are unreadable enough without an added 3 lines here > and there checking if the cache entry needs to be replaced or not. A custom macro or two could clean the files up quite nicely. > BTW: Are there any plans of f

Re: [CMake] disabling the cache

2007-10-31 Thread Andreas Pakulat
On Mittwoch, 31. Oktober 2007, Jesper Eskilson wrote: > BTW: Are there any plans of fixing the broken regeneration for Visual > Studio? Or at least documenting it as known problem? As it is now, > the project files are regenerated but not reloaded, and there is no > feedback that the new project fi

Re: [CMake] Linking OpenGL in Win32

2007-10-31 Thread Olivier Delannoy
GLFW 3.0 is under development and has migrate its built process to CMake. You can find a correct use of FindOPENGL and a concrete CMake built process which build OpenGL application. The build process is relatively small so you should be able to find your answer easily looking at the project source

[CMake] re: OpenGL woes

2007-10-31 Thread Brandon Van Every
On 10/31/07, pingu <[EMAIL PROTECTED]> wrote: > I've downloaded sample projects with OpenGL and those run fine. I can copy > and paste that code into a new project and it won't compile, giving me > linking errors. I've got the NVidia SDK and their sample programs run fine, > so I'm certain OpenGL w

[CMake] Re: Linking OpenGL in Win32

2007-10-31 Thread pingu
Disregard my last (poorly titled) email. I got it to work, and I was right about it being a stupid error on my part. Target_Link_Libraries (OPENGL_LIBRARIES) should have been: Target_Link_Libraries (${OPENGL_LIBRARIES}) Oops! On 10/31/07, pingu <[EMAIL PROTECTED]> wrote: > > I've downloaded s

Re: [CMake] Detecting Mac OS X Version

2007-10-31 Thread E. Wing
I'm wondering the same about this topic. I think Sean might be right about checking for the SDK target version instead of OS X version, though I could come up with a contrived example where knowing the actual OS X version could be important, such as a CMake bug/issue you need to work around that on

Re: [CMake] Detecting Mac OS X Version

2007-10-31 Thread Mike Jackson
Seans points are taken. Right now all I know is that if you are building on 10.5 then you need all this special linker crap due to the new linker in 10.5. I think I like the idea of parsing the "sw_vers" output better. Just need to implement it. -- Mike Jackson Senior Research Engineer In

Re: [CMake] Include path for a single file

2007-10-31 Thread James Bigler
Daniel wrote: James Bigler wrote: I know you can add include paths for a single directory with INCLUDE_DIRECTORIES, but is it possible to set this for a single file with SET_SOURCE_FILES_PROPERTIES or by some other means? Thanks, James You could try: SET_SOURCE_FILES_PROPERTIES(source_file

[CMake] Building linux kernel module with Cmake

2007-10-31 Thread Suhas Jain
Hi All, I am a newbie with cmake and am trying to build a Linux device driver with this utility. I have tried this utility with building applications. It works fine. But, I am not able to compile the kernel modules. I have a makefile for this driver which uses KBuild for compiling the driver