Re: [CMake] Overriding CMAKE_C_FLAGS on a per-directory basis
Hello, Am Freitag, 8. Januar 2010 schrieb Marcel Loose: If you've set the flags -foo -bar using add_definitions(), instead of manipulating CMAKE_C_FLAGS directly, you can use set_directory_properties(PROPERTIES COMPILE_DEFINITIONS -baz) Currently I manually set CMAKE_Fortran_FLAGS_DEBUG where DEBUG is set inside CMAKE_BUILD_TYPE Does this add_definitions()-technique keep track of the build type? thx C.M. ___ 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] File permissions issue
Johannes Felten wrote: I took a look at the CMake 2.8.0 sourcecode and tracked it down to Source/kwsys/ProcessUNIX.c in function kwsysProcessSetupOutputPipeFile I believe. I wonder why CMake sets the permissions explicitly to 644 here. Is this a bug or done intentionally? Nice find; it's a bug. Please open an issue tracker entry: http://www.cmake.org/Bug and send me the issue number. If you have a patch please attach it to the issue. Thanks, -Brad ___ 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] Generating for Xbox 360 and PS3
Hi, I have searched a lot for a way to use cmake in a xbox360 environment, but have not found any answers. I want to use cmake to generate the .vcproj environment for developing on the xbox 360 and on PS3. On PS3 it seems quite easy because you only need to define the VSI integration pre-processor defines and linker configuration. But... On Xbox 360 it is another issue, primarily because of the additional platform. Is anyone on the list familiar with a cmake xbox 360 setup? Do you use a customized version of the visual studio generator to support the additional platform ? Thank you for any help you can provide, David. ___ 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 to make dependency scanner ignore some paths?
On Mon, Jan 11, 2010 at 11:53 PM, Alexander Neundorf a.neundorf-w...@gmx.net wrote: On Monday 11 January 2010, Pavel Shevaev wrote: On Sat, Dec 26, 2009 at 2:20 PM, Pavel Shevaev pacha.shev...@gmail.com wrote: Guys, what is the best way to to make the dependency scanner ignore some paths? how long does it take if you don't set include_regular_expression() ? It's almost to 3 times slower. Minimal build time(when nothing is actually built, only dependency checks are done) is 8 sec. with include_regular_expression vs 23 sec. without one. 2.8.0 is a bit faster than previous versions. Did you try that ? Yep, I'm already using it. I haven't noticed any great speedup though... Is it possible to turn on some debug info showing which paths matched include regular expression and which didn't? This include_regular_expression thing is a real black box :D -- Best regards, Pavel ___ 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 to make dependency scanner ignore some paths?
On Tuesday 12 January 2010, Pavel Shevaev wrote: On Mon, Jan 11, 2010 at 11:53 PM, Alexander Neundorf a.neundorf-w...@gmx.net wrote: On Monday 11 January 2010, Pavel Shevaev wrote: On Sat, Dec 26, 2009 at 2:20 PM, Pavel Shevaev pacha.shev...@gmail.com wrote: Guys, what is the best way to to make the dependency scanner ignore some paths? how long does it take if you don't set include_regular_expression() ? It's almost to 3 times slower. Minimal build time(when nothing is actually built, only dependency checks are done) is 8 sec. with include_regular_expression vs 23 sec. without one. 2.8.0 is a bit faster than previous versions. Did you try that ? Yep, I'm already using it. I haven't noticed any great speedup though... Is it possible to turn on some debug info showing which paths matched include regular expression and which didn't? This The code is in Source/cmDependsC.cxx. I think it's already quite optimized, but feel free to have a look at it :-) 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
[CMake] configure_file without continuous re-build
We have a large-ish system. Deep within an included utility class, I have this code: CONFIGURE_FILE(${DCMTK_SOURCE_DIR}/osconfig.h.in ${DCMTK_BINARY_DIR}/include/dcmtk/config/osconfig.h) However, every time I touch a CMake file, ³osconfig.h² is regenerated, causing nearly the entire library to re-build because of dependancies. Is this a good/proper/recommended way to guard against regeneration of the file? # NB: you would need to delete the configured osconfig.h to re-generate. if ( NOT EXISTS ${DCMTK_BINARY_DIR}/include/dcmtk/config/osconfig.h) message ( STATUS Reconfigure ) CONFIGURE_FILE(${DCMTK_SOURCE_DIR}/osconfig.h.in ${DCMTK_BINARY_DIR}/include/dcmtk/config/osconfig.h) endif() Or is there some little known, little documented CMake feature that I don¹t know about? Thanks, -dan -- Daniel Blezek, PhD Medical Imaging Informatics Innovation Center P 127 or (77) 8 8886 T 507 538 8886 E blezek.dan...@mayo.edu Mayo Clinic 200 First St. S.W. Harwick SL-44 Rochester, MN 55905 mayoclinic.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] configure_file without continuous re-build
On Tue, Jan 12, 2010 at 02:09:36PM -0600, Daniel Blezek wrote: CONFIGURE_FILE(${DCMTK_SOURCE_DIR}/osconfig.h.in ${DCMTK_BINARY_DIR}/include/dcmtk/config/osconfig.h) However, every time I touch a CMake file, ³osconfig.h² is regenerated, causing nearly the entire library to re-build because of dependancies. Is this a good/proper/recommended way to guard against regeneration of the file? You could configure_file() to a temporary location, then 'cmake -E copy_if_different' from the temp location to the real location. This way, the real osconfig.h is only updated (and the dependent parts of the build are re-compiled) if something has changed. 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] configure_file without continuous re-build
you shouldn't have to do that. There are multitudes of projects that do exactly what you are doing and don't have continuous rebuilds. Now, having said that I am _assuming_ that osconfig.h.in is NOT being changed, generated, updated or in any way changed? osconfig.h.in being changed would cause configure_file() to re-run which will regenerate the osconfig.h file. Early in the HDF5/CMake port we were doing exactly that which caused HDF5 to be rebuilt just about completely because the H5conf.h file was always being generated at cmake time. _ Mike Jackson mike.jack...@bluequartz.net BlueQuartz Softwarewww.bluequartz.net Principal Software Engineer Dayton, Ohio On Jan 12, 2010, at 3:51 PM, Tyler Roscoe wrote: On Tue, Jan 12, 2010 at 02:09:36PM -0600, Daniel Blezek wrote: CONFIGURE_FILE(${DCMTK_SOURCE_DIR}/osconfig.h.in ${DCMTK_BINARY_DIR}/include/dcmtk/config/osconfig.h) However, every time I touch a CMake file, ³osconfig.h² is regenerated, causing nearly the entire library to re-build because of dependancies. Is this a good/proper/recommended way to guard against regeneration of the file? You could configure_file() to a temporary location, then 'cmake -E copy_if_different' from the temp location to the real location. This way, the real osconfig.h is only updated (and the dependent parts of the build are re-compiled) if something has changed. 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 ___ 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] error while stage install of crosscompiled binaries
Alexander Neundorf schrieb: ... So indeed a relative CMAKE_INSTALL_PREFIX is interpreted relative to the build dir. Do you think this should be handled differently ? Then c:/usr would have to be translated at some point to /c:/usr if cross compiling on some UNIX. Would this make sense ? Alex _ Hi Alex, No, I think it is good as it is, but it is important to document this feature while crosscompiling! For me it was unexpected. The build error was caused by another reason (DESTINATION or SOURCE was also absolute) as I explained in my other response. In this case, the error was good. The device prefix is also not a good idea in zip archives which should be extracted on Windows. I wrote this In case you crosscompile on an UNIX build host for a window target system(i.e. minGW): .. Attention:: If a windows drive letter is given with CMAKE_INSTALL_PREFIX, the files are installed under builddir/C:/usr/... when you do 'make install' only! So create a zip archive from usr (without C:/) and it works on Windows XP, nice ;-) For me the only open question is what happens in this case on windows? But I work not on Windows if I have a choice. Claus ___ 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] using cmake on windows - query on existing targets
I noticed that it generates the following output: -- Check if this is a free VC compiler - yes I do not think I am using a free VC compiler, something is wrong here. Is it possible to use nmake with Visual Studio 2008 compiler using cmake 2.8? I just tested this on my build box and similar errors that you had about not finding the compiler. Then I ran cmake-gui from the Visual Studio 2008 Command Prompt and all was well. John ___ 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] configure_file without continuous re-build
Daniel Blezek wrote: Hi Mike, Sorry, I guess I wasn't quite clear. The re-builds occur when I touch any CMakeLists.txt file in the entire project. Since we're under active development, new source files are being added fairly frequently. I didn't want re-builds to trigger each time a developer adds a new class. I believe that configure_file() is re-run whenever CMake does a Generate, not only when the .in file is modified. On a normal build this isn't an issue, but is a problem for us. Putting the NOT EXISTS guard seems to solve the problem, but is a little ugly. configure_file will only write the file if it changes. You must be changing the file each time cmake is run, which is bad -Bill ___ 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] configure_file without continuous re-build
Hmmm, I'll dig a little deeper to see what's hapening. Thanks, -dan On 1/12/10 4:25 PM, Bill Hoffman bill.hoff...@kitware.com wrote: Daniel Blezek wrote: Hi Mike, Sorry, I guess I wasn't quite clear. The re-builds occur when I touch any CMakeLists.txt file in the entire project. Since we're under active development, new source files are being added fairly frequently. I didn't want re-builds to trigger each time a developer adds a new class. I believe that configure_file() is re-run whenever CMake does a Generate, not only when the .in file is modified. On a normal build this isn't an issue, but is a problem for us. Putting the NOT EXISTS guard seems to solve the problem, but is a little ugly. configure_file will only write the file if it changes. You must be changing the file each time cmake is run, which is bad -Bill -- Daniel Blezek, PhD Medical Imaging Informatics Innovation Center P 127 or (77) 8 8886 T 507 538 8886 E blezek.dan...@mayo.edu Mayo Clinic 200 First St. S.W. Harwick SL-44 Rochester, MN 55905 mayoclinic.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] intercomponent link dependencies?
Pheeew.. So I've now been trying to include one *single* library from an external project (liba.a) into my own project, writing FindA.cmake. Somehow I still fail to apply the dependencies correctly. What I do is [...] ADD_LIBRARY(A STATIC IMPORTED) SET_TARGET_PROPERTIES( A PROPERTIES IMPORTED_LOCATION ${A_LIBRARY} %set above LINK_INTERFACE_LIBRARIES ${A_LINK_INTERFACE_LIBRARIES} % set above to something like /usr/lib/liblapack.a;/usr/lib/blas.a; ) [...] [Setting TARGET_LINK_LIBRARIES(A LINK_INTERFACE_LIBRARIES ${A_LINK_INTERFACE_LIBRARIES} ) did *not* work for me.] Now, in the main CMakeLists.txt I say Find( A REQUIRED ), and I was naivly expecting that upon TARGET_LINK_LIBRARIES ( main.out A ) *all* the dependent libraries would be pulled in too. This is not the case. :/ What am I missing? Cheers, Nico On Fri, Jan 8, 2010 at 11:00 AM, Nico Schlömer nico.schloe...@gmail.com wrote: Hi, I am guessing that you're putting the detection for every library that your app can/must use into one find module, when you actually probably should have a directory in your source tree added to your CMAKE_MODULE_PATH that contains a large number of find modules, some of which are interdependent (just like how the example I sent uses find_package(BLAS) - which is a module that comes bundled with cmake). -- Exactly! I'm thinking now that this is indeed a good solution: Writing *separate* FindLibraryX.cmake files for all the libraries included in MyPackage and putting all the dependency information in there; then, make a meta .cmake file which will allow for specifying the keyword COMPONENTS, and where all the meta information goes (e.g., version number of MyPackage). Minor drawbacks of this approach I find would be that the fact that all those libraries live under one roof is entirely discarded, that is, that they all share a common LIB directory, INCLUDE directory, all have the same version string (namely the one of MyPackage). Plus also, new libraries included require their own new FindNewLib.cmake to be created, while all FindLibrary*.cmake would actually be the same file, except for the dependency info (nasty (?) code duplication). How I came to think about COMPONENTS in the first place was looking at FindBoost.cmake which I *thought does what I'm doing -- except for the intercomponent linking info. Cheers! Nico ___ 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] using cmake on windows - query on existing targets
On Tue, Jan 12, 2010 at 2:04 PM, Bill Hoffman bill.hoff...@kitware.comwrote: What version of the compiler did you install? The commercial versions of the compiler have a VS command prompt under the tools menu that you can use to create a shell with the correct env to run the compiler. The same is true for the free Visual Studio Express (which somewhat confusingly is NOT identified as the free VC compiler by CMake, but it all works fine). Ceej aka Chris Hillery ___ 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 to make dependency scanner ignore some paths?
The code is in Source/cmDependsC.cxx. I think it's already quite optimized, but feel free to have a look at it :-) Thanks, I'll have a look. -- Best regards, Pavel ___ 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