Re: [CMake] CMake can't find package on Windows
On Sat, May 09, 2009 at 10:23:44PM -0700, Tron Thomas wrote: What is involved in writing a patch? This article looks like a pretty good summary if you have a Linux-like environment available: http://www.linuxforums.org/applications/using_diff_and_patch.html tyler ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMake can't find package on Windows
What is involved in writing a patch? Tyler Roscoe wrote: On Fri, May 08, 2009 at 05:34:19PM -0700, Tron Thomas wrote: I looked at the FindDevIL.cmake file, and if I understand it correctly it might be wrong for Windows. On Linux, the main library is called libIL.so. On Windows, however, the corresponding import library is called DevIL.lib. The FindDevIL.cmake file seems to only consider IL and not DEVIL as the valid name for the library. I added DEVIL to the NAMES entry for the IL_LIBRARY's FIND_LIBRARY command and CMake successfully configured the project. I'm wondering if I should enter a bug against this module. I don't know anything about that find module, but filing a bug sounds appropriate to me. Even better is if you can write a patch that fixes the problem. tyler ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] How do I generate a preprocessed file?
Tyler Roscoe wrote: I don't know of a single place to gather all the flags CMake will pass to your compiler. I've chceked those variables, but they provide not a very useful part of the command line, for example CMAKE_CXX_FLAGS_RELEASE gives me only -O3 -DNDEBUG. get_target_properties() might also be of use. It is a very promising direction indeed, however after some hacking all I have from GET_TARGET_PROPERTY(_x ... COMPILE_FLAGS) is NOTFOUND :-/ But thank you Tyler for pointing me out the function. :-) Best regards Piotr Wyderski ___ 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] Where are object files located, and how do I change the default extension?
On Sunday 29 March 2009, Alexander Neundorf wrote: On Sunday 29 March 2009, Carlson Daniel wrote: Yes, perhaps I already had some cmake generated build tree on my disk when i tried this. I will try once again with a clean build tomorrow. Ok. About the path-file: Does this really change any behavior or does it just print a nicer output? I have never seen a patch file before.. For now it doesn't change the behaviour yet. But CMAKE_C_COMPILER_ID will be set to Diab then, so cmake can recognize the compiler independent from the actual name of the compiler executable. Using this name compiler-specific setting can be loaded from a file named Platform/operating_system_Diab_C.cmake (also for CXX). Did you get this working ? Alex ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMake RPM problems
2009/5/9 Alexander Neundorf a.neundorf-w...@gmx.net: On Thursday 07 May 2009, Eric Noulard wrote: ... 1) Add more CPACK_RPM_XXX specific var such like: CPACK_RPM_POST_INSTALL_SCRIPT_FILE CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE which may be used to specify the corresponding scripts that will be embedded in the generated spec file. Just a thought, do you think this could in some way with the INSTALL(SCRIPT/CODE ... ) command ? I guess quite often this already does what is required (at least in KDE it also does the update-icon-cache etc. stuff). But a problem would be that then cmake would be necessary when installing such a RPM :-/ Yes I did think about that too just as you did. In fact the notion of install-time script may be supported by various CPack generator (DEB, RPM , NSIS etc...). It would be a good thing to either: - launch INSTALL(SCRIPT/CODE ... ) with an extra cmake dependency (the dependency may be added by the generator if it knows that there exists some INSTALL(SCRIPT/CODE ... ) rules) - translate INSTALL(SCRIPT/CODE ... ) into it's own supported language. For example RPM uses bash and I'm pretty sure CMake scripts may be translated into shell scripts. That would be nicer (no extra dependency) but surely harder to implement. Another thing I did not look at is WHEN INSTALL(SCRIPT/CODE ... ) are launched? In RPM you can usually chose between pre-install scripts and post-install scripts (and their uninstall counterpart). Currently the INSTALL(SCRIPT/CODE ... ) script is too loose, moreover as far as I know there aren't any uninstall rules... So currently I think we can get INSTALL(SCRIPT/CODE ... ) to be embedded into RPM post-install rules, I do have to find where thoses scripts are generated though. There will be several remaining issues: 1) You usually don't want to run INSTALL(SCRIPT/CODE ... ) when building the RPM, however now since CPack basically do install with relocation they are. 2) There is no associated uninstall rules, which is just bad because you may leave dangling menu entry and/or icon. 3) You ger an extra cmake dependency ... Alex, Does KDE uses INSTALL(SCRIPT/CODE ... ) ? If yes how do packager do for handling that in DEB, RPM ... ? -- Erk ___ 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 RPM and rpm 4.6.x
2009/5/9 Alexander Neundorf a.neundorf-w...@gmx.net: On Friday 08 May 2009, Eric Noulard wrote: Hi All CPack RPM users, Problems have been reported when using CPack RPM generator with rpm/rpmbuild version greater or equal than 4.6.0. (Fedora Core 10 or greater, Mandriva 2009 and greater, etc...) I've submitted a simple patch borrowing solution from Dmitry Gerasimov: http://public.kitware.com/Bug/view.php?id=8967 The patch basically adds this command line argument, right ? --buildroot ${CPACK_RPM_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME} If you are confident enough that this is a good solution then I can commit this. I'm confident it's safe however... Can you try to find out whether this option is relatively new or whether it exists since ages ? I'll check this and gives you follow-up soon. -- Erk ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMake RPM problems
On Sunday 10 May 2009, Eric Noulard wrote: 2009/5/9 Alexander Neundorf a.neundorf-w...@gmx.net: On Thursday 07 May 2009, Eric Noulard wrote: ... 1) Add more CPACK_RPM_XXX specific var such like: CPACK_RPM_POST_INSTALL_SCRIPT_FILE CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE which may be used to specify the corresponding scripts that will be embedded in the generated spec file. Just a thought, do you think this could in some way with the INSTALL(SCRIPT/CODE ... ) command ? I guess quite often this already does what is required (at least in KDE it also does the update-icon-cache etc. stuff). But a problem would be that then cmake would be necessary when installing such a RPM :-/ Yes I did think about that too just as you did. In fact the notion of install-time script may be supported by various CPack generator (DEB, RPM , NSIS etc...). Yes. It would be a good thing to either: - launch INSTALL(SCRIPT/CODE ... ) with an extra cmake dependency (the dependency may be added by the generator if it knows that there exists some INSTALL(SCRIPT/CODE ... ) rules) - translate INSTALL(SCRIPT/CODE ... ) into it's own supported language. For example RPM uses bash and I'm pretty sure CMake scripts may be translated into shell scripts. That would be nicer (no extra dependency) but surely harder to implement. Yes. Another thing I did not look at is WHEN INSTALL(SCRIPT/CODE ... ) are launched? In RPM you can usually chose between pre-install scripts and post-install scripts (and their uninstall counterpart). Currently the INSTALL(SCRIPT/CODE ... ) script is too loose, moreover as far as I know there aren't any uninstall rules... So currently I think we can get INSTALL(SCRIPT/CODE ... ) to be embedded into RPM post-install rules, I do have to find where thoses scripts are generated though. There will be several remaining issues: 1) You usually don't want to run INSTALL(SCRIPT/CODE ... ) when building the RPM, however now since CPack basically do install with relocation they are. Hmm, yes, usually, but maybe sometimes you do want to run them... 2) There is no associated uninstall rules, which is just bad because you may leave dangling menu entry and/or icon. Hmm ? 3) You ger an extra cmake dependency ... Alex, Does KDE uses INSTALL(SCRIPT/CODE ... ) ? Yes. If yes how do packager do for handling that in DEB, RPM ... ? This is done completely independent. The official distribution packager build their packages themselves anyway. Alex ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CPack RPM and rpm 4.6.x
2009/5/10 Eric Noulard eric.noul...@gmail.com: 2009/5/9 Alexander Neundorf a.neundorf-w...@gmx.net: On Friday 08 May 2009, Eric Noulard wrote: Hi All CPack RPM users, Problems have been reported when using CPack RPM generator with rpm/rpmbuild version greater or equal than 4.6.0. (Fedora Core 10 or greater, Mandriva 2009 and greater, etc...) I've submitted a simple patch borrowing solution from Dmitry Gerasimov: http://public.kitware.com/Bug/view.php?id=8967 The patch basically adds this command line argument, right ? --buildroot ${CPACK_RPM_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME} If you are confident enough that this is a good solution then I can commit this. I'm confident it's safe however... Can you try to find out whether this option is relatively new or whether it exists since ages ? I'll check this and gives you follow-up soon. I've just checked. The option is there since at least (rpm 2.5.6 ~ year 1998). Should be safe to apply the patch. More detailed comment on the tracker: http://public.kitware.com/Bug/view.php?id=8967 -- Erk ___ 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] eclipse generator and sibling folders
2009/5/9 Alexander Neundorf a.neundorf-w...@gmx.net: On Friday 08 May 2009, Eric Noulard wrote: 2009/5/4 Miguel A. Figueroa-Villanueva migu...@ieee.org: ... It is no the nicest solution, but it works around the problem of the out-of-source builds with CVS sources. It is described here: http://www.cmake.org/Wiki/Eclipse_CDT4_Generator Yes that's right, that's just you have 2 project instead of one, but I know it's currently the best you can do. Hope that helps, I'll try to use it for a while and may be I will get used to the 2 projects things :-) Since the issues we have with Eclipse and out-of-source builds are not caused by CMake, but by Eclipse CDT having trouble with out-of-source builds... Maybe somebody could try to get active in the Eclipse community and try to get the things fixed in Eclipse CDT so it can do proper out-of-source builds ? As far as I remember the discussion on Eclipse ML, it is NOT a CDT limitation but an Eclipse Platform one. Eclipse Platform Team abstraction which is common to any eclipse project (including CDT ones) assumes that there is a one-to-one mapping between a project and a repository provider i.e. the Generated Eclipse project file should be IN the source controlled directory. http://dev.eclipse.org/mhonarc/lists/platform-cvs-dev/msg00462.html However, Yes you are right that should be the way to go. I did thought about it but I personnally thought the time to spent for achieving this to be relatively high. The metrics were mine though :-) - Not too much knowledge of Eclipse internals - Seem to be an Eclipse-Team design re-work which seems very constrained: http://dev.eclipse.org/mhonarc/lists/platform-cvs-dev/msg00463.html -- Erk ___ 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] eclipse generator and sibling folders
2009/5/8 Eric Noulard eric.noul...@gmail.com: Ah, no problem. I was just thinking that there might be a bug. BTW, did you try the ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT option? Yes it wokrs just fine. It is no the nicest solution, but it works around the problem of the out-of-source builds with CVS sources. It is described here: http://www.cmake.org/Wiki/Eclipse_CDT4_Generator Yes that's right, that's just you have 2 project instead of one, but I know it's currently the best you can do. Miguel, After some thought about 2 projects things with Eclipse CDT generator I would have a suggestion. When using ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT why do you generate 3 projects files. I.e. two in the build dir (.project a -- Erk ___ 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] eclipse generator and sibling folders
2009/5/10 Eric Noulard eric.noul...@gmail.com: 2009/5/8 Eric Noulard eric.noul...@gmail.com: Ah, no problem. I was just thinking that there might be a bug. BTW, did you try the ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT option? Yes it wokrs just fine. It is no the nicest solution, but it works around the problem of the out-of-source builds with CVS sources. It is described here: http://www.cmake.org/Wiki/Eclipse_CDT4_Generator Yes that's right, that's just you have 2 project instead of one, but I know it's currently the best you can do. Miguel, After some thought about 2 projects things with Eclipse CDT generator I would have a suggestion. When using ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT why do you generate 3 projects files. I.e. two in the build dir (.project a continued... two in the build dir: (for building debugging etc...) .project -- with link ressource to source .cproject one in the source dir: (for source control). .project Why don't you generate the .project and .cproject directly in the source tree? I know that's bad but in the short term this is fine (at least for me). You may generate the same file content but update: source_dir/.project: with the same content as the current build_dir/.project however the BuildLocation should refer to the build_dir source_dir/.cproject is the same a before but you update the BuildTargets with appropriate change dir (-C) option to make: buildArguments-C build_dir /buildArguments I did it by hand and it seems to work fine. It has the same drawback as the current ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT option i.e. putting files in the source dir, however you now have only one project to import with intuitive source control with Eclipse Team. Do I miss something? This should not change the behaviour of Eclipse CDT generator when ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT is not set. -- Erk ___ 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] Problems with execute_process under Windows
Hello I'm pulling my hair out on what should be straightforward. file(TO_NATIVE_PATH ${file} file_native) execute_process( COMMAND type \${file_native}\ RESULT_VARIABLE result OUTPUT_VARIABLE output ERROR_VARIABLE error ) message(result=${result}) message(output=${output}) message(error=${error}) I'm running this under Windows and it gave me this output: result=0 output= error=C:\Documents and Settings\tanguy_k\Desktop\phonon-vlc-mplayer\trunk\AUTHORS not found Of course the file exist and if i enter type C:\Documents and Settings\tanguy_k\Desktop\phonon-vlc-mplayer\trunk\AUTHORS inside a DOS command prompt everything works fine. It's like CMake does something to the filename that I don't understand Any idea why? Is there any way to show the real command that CMake tries to run? -- Tanguy Krotoff tkrot...@gmail.com +33 6 68 42 70 24 ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMake can't find package on Windows
On Sun, May 10, 2009 at 08:44:25AM -0700, Tron Thomas wrote: What is someone supposed to do after they create the patch? Include it with the bug you open about this issue. Here is a bug with an attached patch: http://www.cmake.org/Bug/view.php?id=8967 tyler ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] How do I generate a preprocessed file?
On Sun, May 10, 2009 at 12:00:11PM +0200, Piotr Wyderski wrote: I've chceked those variables, but they provide not a very useful part of the command line, for example CMAKE_CXX_FLAGS_RELEASE gives me only -O3 -DNDEBUG. It is a very promising direction indeed, however after some hacking all I have from GET_TARGET_PROPERTY(_x ... COMPILE_FLAGS) is NOTFOUND :-/ I haven't used get_target_property() to discover compile flags, so I don't know what's going on there. Thinking about this more, is there anything handed off to the compiler that affects the preprocessor other than definitions (-D flags)? You can get those via the property COMPILE_DEFINITIONS (or, if your CMakeLists looks like mine, you already have those in a ${foo_DEFINITIONS} variable). What other flags do you really need? tyler ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] How do I generate a preprocessed file?
Tyler Roscoe wrote: Thinking about this more, is there anything handed off to the compiler that affects the preprocessor other than definitions (-D flags)? Yes, a lot of them: include directories specification, optimization flags (they also work as -D directives, e.g. they define __SSE2__ or not), language error handling mode (e.g. --Wno-pmf-conversion) etc. In fact I need the entire command line with option -E attached at the end. I would be happy to grab it from any C++-dependent object file (as they all use the same set of options). What other flags do you really need? Well, pretty everything except -o. Perfect matching is of key importance, as the result of preprocessing is a form of environment for a dynamic code generator. I need precisely the same set of interface definitions as the hand-compiled objects use. I am also very surprised that this problem is so hard in CMake -- I thought there is a single variable specifying a template for a given target, e.g. *.cpp = *.o Best regards Piotr Wyderski ___ 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] Problems with execute_process under Windows
2009/5/10 Tanguy Krotoff tkrot...@gmail.com: Hello I'm pulling my hair out on what should be straightforward. file(TO_NATIVE_PATH ${file} file_native) execute_process( COMMAND type \${file_native}\ RESULT_VARIABLE result OUTPUT_VARIABLE output ERROR_VARIABLE error ) message(result=${result}) message(output=${output}) message(error=${error}) I'm running this under Windows and it gave me this output: result=0 output= error=C:\Documents and Settings\tanguy_k\Desktop\phonon-vlc-mplayer\trunk\AUTHORS not found Of course the file exist and if i enter type C:\Documents and Settings\tanguy_k\Desktop\phonon-vlc-mplayer\trunk\AUTHORS inside a DOS command prompt everything works fine. It's like CMake does something to the filename that I don't understand I do have weird behavior on Unix too, with filename with embbeded space in them. It looks like I must NOT TO_NATIVE_PATH for make it work? My unix example is attached. try: cmake -P buggy_execute.cmake Any idea why? Nope. Looks like there is trouble with escaped character. Does your file variable content comes from CMake file command of some sort? Is there any way to show the real command that CMake tries to run? Normally cmake --trace --debug-output should help but its seems that those commands do not exhibit enough cmake verbosity. -- Erk ___ 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] Problems with execute_process under Windows
2009/5/10 Eric Noulard eric.noul...@gmail.com: 2009/5/10 Tanguy Krotoff tkrot...@gmail.com: Hello I'm pulling my hair out on what should be straightforward. file(TO_NATIVE_PATH ${file} file_native) execute_process( COMMAND type \${file_native}\ RESULT_VARIABLE result OUTPUT_VARIABLE output ERROR_VARIABLE error ) message(result=${result}) message(output=${output}) message(error=${error}) I'm running this under Windows and it gave me this output: result=0 output= error=C:\Documents and Settings\tanguy_k\Desktop\phonon-vlc-mplayer\trunk\AUTHORS not found Of course the file exist and if i enter type C:\Documents and Settings\tanguy_k\Desktop\phonon-vlc-mplayer\trunk\AUTHORS inside a DOS command prompt everything works fine. It's like CMake does something to the filename that I don't understand I do have weird behavior on Unix too, with filename with embbeded space in them. It looks like I must NOT TO_NATIVE_PATH for make it work? My unix example is attached. try: cmake -P buggy_execute.cmake Any idea why? Nope. Looks like there is trouble with escaped character. On linux with CMake 2.6.4, execute_process seems to automatically escape character... (at least space or '\') strace-ing my previous example gives: execve(/usr/local/bin/dir, [dir, /home/eric/with\\ space\\ in\\ it.txt ) -- Erk ___ 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] Problems with execute_process under Windows
btw you forgot to attach your unix example :p On Sun, May 10, 2009 at 7:19 PM, Eric Noulard eric.noul...@gmail.com wrote: 2009/5/10 Eric Noulard eric.noul...@gmail.com: 2009/5/10 Tanguy Krotoff tkrot...@gmail.com: Hello I'm pulling my hair out on what should be straightforward. file(TO_NATIVE_PATH ${file} file_native) execute_process( COMMAND type \${file_native}\ RESULT_VARIABLE result OUTPUT_VARIABLE output ERROR_VARIABLE error ) message(result=${result}) message(output=${output}) message(error=${error}) I'm running this under Windows and it gave me this output: result=0 output= error=C:\Documents and Settings\tanguy_k\Desktop\phonon-vlc-mplayer\trunk\AUTHORS not found Of course the file exist and if i enter type C:\Documents and Settings\tanguy_k\Desktop\phonon-vlc-mplayer\trunk\AUTHORS inside a DOS command prompt everything works fine. It's like CMake does something to the filename that I don't understand I do have weird behavior on Unix too, with filename with embbeded space in them. It looks like I must NOT TO_NATIVE_PATH for make it work? My unix example is attached. try: cmake -P buggy_execute.cmake Any idea why? Nope. Looks like there is trouble with escaped character. On linux with CMake 2.6.4, execute_process seems to automatically escape character... (at least space or '\') strace-ing my previous example gives: execve(/usr/local/bin/dir, [dir, /home/eric/with\\ space\\ in\\ it.txt ) -- Erk -- Tanguy Krotoff tkrot...@gmail.com +33 6 68 42 70 24 ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] How do I generate a preprocessed file?
On Sun, May 10, 2009 at 06:38:28PM +0200, Piotr Wyderski wrote: Yes, a lot of them: include directories specification, optimization flags (they also work as -D directives, e.g. they define __SSE2__ or not), language error handling mode (e.g. --Wno-pmf-conversion) etc. In fact I need the entire command line with option -E attached at the end. I would be happy to grab it from any C++-dependent object file (as they all use the same set of options). Maybe you could make a fake library or executable that includes all your headers, and which has -E in the compiler flags? Not sure if this would work, since it appears there is no way to disable linking (I asked about this a couple weeks ago). I'm not sure what else to tell you. I guess you have to cobble all the compiler flags together from their different variables/properties. Maybe one of the smarter cmakers has an idea. tyler ___ 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] Problems with execute_process under Windows
2009/5/10 Tanguy Krotoff tkrot...@gmail.com: btw you forgot to attach your unix example :p I'm so used to the non-attached joined file :-) -- Erk file(GLOB filep /home/eric/with*) message(--${filep}--) # switch next 2 lines comment to make it work. file(TO_NATIVE_PATH ${filep} file_native) #set(file_native ${filep}) message(--${file_native}--) execute_process( COMMAND dir ${file_native} RESULT_VARIABLE result OUTPUT_VARIABLE output ERROR_VARIABLE error ) message(result=${result}) message(output=${output}) message(error=${error}) ___ 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] [PATCH] slightly modify cache variable behaviour, Was: Re: option() behavior
On Sun, May 10, 2009 at 5:08 PM, Alexander Neundorf a.neundorf-w...@gmx.net wrote: The attached patch (against current cvs HEAD) changes the behaviour of set( CACHE) and option() slightly. Until now it behaves like this: if a variable FOO is set to a value, and then set FOO to a value in the CACHE, and FOO was not yet in the cache, then afterwards the visible value of FOO is the one specified in the set( CACHE) command. Now assume the same, but FOO is already in the cache. In this case after the set() and the set(CACHE) the value in the cache won't have changed (which is good), but also the value from the cache will not be visible, but instead FOO will have the value from the set(), i.e. the value in the cache doesn't matter at all, even although the set(CACHE) was after the set(). You can test this with the following CMakeLists.txt: set(FOO foo) message(STATUS FOO 1: ${FOO}) set(FOO bar CACHE STRING fofofofof) message(STATUS FOO 2: ${FOO}) set(OPT abc) message(STATUS OPT 1: ${OPT}) option(OPT daf df df sdf ON) message(STATUS OPT 2: ${OPT}) Current cvs HEAD gives: $ cmake . -- FOO 1: foo -- FOO 2: bar -- OPT 1: abc -- OPT 2: ON $ cmake . -- FOO 1: foo -- FOO 2: foo -- OPT 1: abc -- OPT 2: abc With the patch you get: $ cmake . -- FOO 1: foo -- FOO 2: bar -- OPT 1: abc -- OPT 2: ON $ cmake . -- FOO 1: foo -- FOO 2: bar -- OPT 1: abc -- OPT 2: ON I would have expected CMake to behave like this: $ cmake . -- FOO 1: foo -- FOO 2: foo -- OPT 1: abc -- OPT 2: abc $ cmake . -- FOO 1: foo -- FOO 2: foo -- OPT 1: abc -- OPT 2: abc 1. In CMake right now is local overrides cache, unless a cache variable is being created during a particular configure 2. Alex's patch looks like cache overrides local once set(..CACHE) or option() is encountered 3. My expectation of what CMake should have done is based on local overrides cache, always Basically what it boils down to is do we: 1. Remove local variables only when set(.. CACHE) or option() is run the first time (while creating a cache var) 2. Remove local variables once set(..CACHE) or option() is encountered 3. Never remove local variables The patch for the 3rd behavior is below. Personally, I prefer it to the 2nd (which could be slightly confusing depending on when the user evaluates the variable) although either is preferable in my mind to the 1st (which changes behavior depending on how many times you configure the build!) Index: Source/cmMakefile.cxx === RCS file: /cvsroot/CMake/CMake/Source/cmMakefile.cxx,v retrieving revision 1.508 diff -u -b -B -u -r1.508 cmMakefile.cxx --- Source/cmMakefile.cxx24 Apr 2009 15:18:05 -1.508 +++ Source/cmMakefile.cxx11 May 2009 02:59:42 - @@ -1702,8 +1702,6 @@ } this-GetCacheManager()-AddCacheEntry(name, val, doc, type); - // if there was a definition then remove it - this-DefinitionStack.back().erase( DefinitionMap::key_type(name)); } @@ -1747,7 +1745,6 @@ val = it.GetValueAsBool(); } this-GetCacheManager()-AddCacheEntry(name, val, doc); - this-AddDefinition(name, val); } void cmMakefile::RemoveDefinition(const char* name) -- Philip Lowman ___ 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