Re: [CMake] Multiple folder depths in VS projects
Jon W a écrit : Is there a way to have more than one level of folders in Visual Studio projects? Try this : For your foo project SOURCE_GROUP(Source Files/Dir1 FILES source1.h source1.cpp ...) or SOURCE_GROUP(Source Files\\Dir1 FILES source1.h source1.cpp ...) -Sylvain ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
RE: [CMake] Progress above 100% when making chicken-2.6
CMake can get above 100% (or other screwy situations) in a couple odd cases, such as killing an install done as root half way through, and then doing a build as non-root. Basically it uses some files for tracking progress and if they get written by root and left there (like in an aborted install) then the user account cannot clean them out. Another case is if you do two builds in the same tree from different processes (not a parallel build using -j 2, but two different make invocations in the same tree) This can also happen if you invoke a make in the tree as part of a custom rule within the build. e.g. you do a recusrive make on your own as part of a custom rule. They are odd cases but they could happen. I'll try adding some more error checking for those cases at some point. But more specifically for your case, what target are you making? The all target from the top level? Is there a /CMakeFIles/Progress directory still lying around? Are you running just one make? Does chicken do a recusrise make/build as part of a custom command (e.g. invoke make directly as part of a custom command?) Thanks Ken Ken Martin PhD Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Clark J. Wang Sent: Wednesday, June 27, 2007 9:59 PM To: CMake Mailing List Subject: [CMake] Progress above 100% when making chicken-2.6 I downloaded chicken-2.6 from http://www.call-with-current-continuation.org/index.html and compiled it with CMake-2.4.6. When making, the progress percentage showed more than 100%: ... ... [ 96%] Building C object CMakeFiles/libuchicken.dir/runtime.o [ 98%] Building C object CMakeFiles/libuchicken.dir/match.o [ 98%] Building C object CMakeFiles/libuchicken.dir/profiler.o [ 98%] Building C object CMakeFiles/libuchicken.dir/scheduler.o [100%] Building C object CMakeFiles/libuchicken.dir/stub.o [100%] Building C object CMakeFiles/libuchicken.dir/ueval.o [100%] Building C object CMakeFiles/libuchicken.dir/uextras.o [100%] Building C object CMakeFiles/libuchicken.dir/ulibrary.o [101%] Building C object CMakeFiles/libuchicken.dir/ulolevel.o [101%] Building C object CMakeFiles/libuchicken.dir/uposixunix.o /root/tmp/chicken-2.6/cmakebuild/uposixunix.c: In function 'f_5645': /root/tmp/chicken- 2.6/cmakebuild/uposixunix.c:3591: warning: implicit declaration of function 'getpgid' [101%] Building C object CMakeFiles/libuchicken.dir/uregex.o [103%] Building C object CMakeFiles/libuchicken.dir/usrfi-1.o [103%] Building C object CMakeFiles/libuchicken.dir/usrfi- 4.o [103%] Building C object CMakeFiles/libuchicken.dir/usrfi-13.o [104%] Building C object CMakeFiles/libuchicken.dir/usrfi-14.o [104%] Building C object CMakeFiles/libuchicken.dir/usrfi-18.o [104%] Building C object CMakeFiles/libuchicken.dir/utcp.o [106%] Building C object CMakeFiles/libuchicken.dir/uutils.o Linking C shared library libuchicken.so [113%] Built target libuchicken ... ... Interesting :-) ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Progress above 100% when making chicken-2.6
On 6/28/07, Ken Martin [EMAIL PROTECTED] wrote: CMake can get above 100% (or other screwy situations) in a couple odd cases, such as killing an install done as root half way through, and then doing a build as non-root. Basically it uses some files for tracking progress and if they get written by root and left there (like in an aborted install) then the user account cannot clean them out. Another case is if you do two builds in the same tree from different processes (not a parallel build using -j 2, but two different make invocations in the same tree) This can also happen if you invoke a make in the tree as part of a custom rule within the build. e.g. you do a recusrive make on your own as part of a custom rule. They are odd cases but they could happen. I'll try adding some more error checking for those cases at some point. But more specifically for your case, what target are you making? The all target from the top level? Yep. Is there a /CMakeFIles/Progress directory still lying around? Yes there is. It has only 1 line: CMAKE_ALL_PROGRESS = 72. I'll try rebuilding from scratch and seeing what happens. Are you running just one make? Just one. Does chicken do a recusrise make/build as part of a custom command (e.g. invoke make directly as part of a custom command?) No recursive make. Some cmake -P scripts are invoked though. Another weird thing I do is reuse object files from a previous build step, so that I don't have to include the same underlying library 6 times. Cheers, Brandon Van Every ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] custom target (kernel modules)
Hi! I am trying to build kernel modules with CMake. To do that I use the command below: add_custom_target ( manager.ko ${kbuild_cmd} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/linux DEPENDS ${src} linux/Kbuild ) The problem is that nobody depends on this custom target and so it is never build when running make. If I use the ALL parameter in add_custom_target() it will always rebuild it, even if none of source files has changes. So how do I make this work so that it builds when I run make but also builds only when necessary, like any other target add_library(), add_executable(), etc. ? Alex Ciobanu ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] custom target (kernel modules)
On 2007-06-28 10:08-0400 Alexandru Ciobanu wrote: Hi! I am trying to build kernel modules with CMake. To do that I use the command below: add_custom_target ( manager.ko ${kbuild_cmd} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/linux DEPENDS ${src} linux/Kbuild ) The problem is that nobody depends on this custom target and so it is never build when running make. If I use the ALL parameter in add_custom_target() it will always rebuild it, even if none of source files has changes. So how do I make this work so that it builds when I run make but also builds only when necessary, like any other target add_library(), add_executable(), etc. ? Use ADD_CUSTOM_COMMAND instead with an empty (COMMANDless) ADD_CUSTOM_TARGET with the ALL parameter that-file depends on the custom command. Alan __ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __ Linux-powered Science __ ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Multiple folder depths in VS projects
On 6/28/07, Sylvain Benner [EMAIL PROTECTED] wrote: Jon W a écrit : Is there a way to have more than one level of folders in Visual Studio projects? Try this : For your foo project SOURCE_GROUP(Source Files/Dir1 FILES source1.h source1.cpp ...) or SOURCE_GROUP(Source Files\\Dir1 FILES source1.h source1.cpp ...) -Sylvain The following code worked perfectly: SOURCE_GROUP(Source Files\\Dir1 FILES source1.h source1.cpp ...) Thank you, Jon ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] custom target (kernel modules)
Thanks Alan, it works. =) Alan W. Irwin wrote: On 2007-06-28 10:08-0400 Alexandru Ciobanu wrote: Hi! I am trying to build kernel modules with CMake. To do that I use the command below: add_custom_target ( manager.ko ${kbuild_cmd} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/linux DEPENDS ${src} linux/Kbuild ) The problem is that nobody depends on this custom target and so it is never build when running make. If I use the ALL parameter in add_custom_target() it will always rebuild it, even if none of source files has changes. So how do I make this work so that it builds when I run make but also builds only when necessary, like any other target add_library(), add_executable(), etc. ? Use ADD_CUSTOM_COMMAND instead with an empty (COMMANDless) ADD_CUSTOM_TARGET with the ALL parameter that-file depends on the custom command. Alan __ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __ Linux-powered Science __ ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] Finding Parent Directory for a Library
I need to get the Parent Directory for a library so I can add that directory to the LINK_DIRECTORIES(). I have this so far: FIND_LIBRARY(MXADataModel_LIBRARY MXADataModel /usr/local/lib /usr/lib ${MXA_DIR}/lib CACHE ) Which will put the path to libMXADataModel.dylib into the variable, How do I get its parent? -- Mike Jackson imikejackson gmail * com ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Finding Parent Directory for a Library
GET_FILENAME_COMPONENT(dir ${MXADataModel_LIBRARY} PATH) will put the PATH into the variable 'dir' HTH, David On 6/28/07, Mike Jackson [EMAIL PROTECTED] wrote: I need to get the Parent Directory for a library so I can add that directory to the LINK_DIRECTORIES(). I have this so far: FIND_LIBRARY(MXADataModel_LIBRARY MXADataModel /usr/local/lib /usr/lib ${MXA_DIR}/lib CACHE ) Which will put the path to libMXADataModel.dylib into the variable, How do I get its parent? -- Mike Jackson imikejackson gmail * 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
[CMake] Getting an RPath set in a Library
I have a project where I am building a shared library. How do I get cmake to add an rpath to the built library? I would like the rpath to reflect my installed location? I am on OS X 10.4.10 Intel. Thanks -- Mike Jackson imikejackson gmail * com ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Getting an RPath set in a Library
On 2007-06-28 16:33-0400 Mike Jackson wrote: I have a project where I am building a shared library. How do I get cmake to add an rpath to the built library? I would like the rpath to reflect my installed location? I am on OS X 10.4.10 Intel. From the documentation of SET_TARGET_PROPERTIES I believe INSTALL_NAME_DIR is what you want for Mac OS X. Alan __ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __ Linux-powered Science __ ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] custom target (kernel modules)
Hi, could you post the working example? I'm doing something similar but I'm doing it wrong, the add_custom_command is always being build in my case. Thanks in advance, Peter. On 6/28/07, Alexandru Ciobanu [EMAIL PROTECTED] wrote: Thanks Alan, it works. =) Alan W. Irwin wrote: On 2007-06-28 10:08-0400 Alexandru Ciobanu wrote: Hi! I am trying to build kernel modules with CMake. To do that I use the command below: add_custom_target ( manager.ko ${kbuild_cmd} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/linux DEPENDS ${src} linux/Kbuild ) The problem is that nobody depends on this custom target and so it is never build when running make. If I use the ALL parameter in add_custom_target() it will always rebuild it, even if none of source files has changes. So how do I make this work so that it builds when I run make but also builds only when necessary, like any other target add_library(), add_executable(), etc. ? Use ADD_CUSTOM_COMMAND instead with an empty (COMMANDless) ADD_CUSTOM_TARGET with the ALL parameter that-file depends on the custom command. Alan __ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __ Linux-powered Science __ ___ 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] custom target (kernel modules)
Hi, Peter! Sure, I can show you how I've used it exactly. Here it is: set ( kofile ${CMAKE_CURRENT_SOURCE_DIR}/manager.ko ) add_custom_command ( OUTPUT ${kofile} COMMAND ${kbuild_cmd} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DEPENDS ${src} Kbuild ) add_custom_target ( cool_driver ALL DEPENDS ${kofile} ) Alex Ciobanu Peter Visser wrote: Hi, could you post the working example? I'm doing something similar but I'm doing it wrong, the add_custom_command is always being build in my case. Thanks in advance, Peter. On 6/28/07, *Alexandru Ciobanu* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Thanks Alan, it works. =) Alan W. Irwin wrote: On 2007-06-28 10:08-0400 Alexandru Ciobanu wrote: Hi! I am trying to build kernel modules with CMake. To do that I use the command below: add_custom_target ( manager.ko ${kbuild_cmd} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/linux DEPENDS ${src} linux/Kbuild ) The problem is that nobody depends on this custom target and so it is never build when running make. If I use the ALL parameter in add_custom_target() it will always rebuild it, even if none of source files has changes. So how do I make this work so that it builds when I run make but also builds only when necessary, like any other target add_library(), add_executable(), etc. ? Use ADD_CUSTOM_COMMAND instead with an empty (COMMANDless) ADD_CUSTOM_TARGET with the ALL parameter that-file depends on the custom command. Alan __ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria ( astrowww.phys.uvic.ca http://astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net http://freeeos.sf.net); PLplot scientific plotting software package (plplot.org http://plplot.org); the libLASi project (unifont.org/lasi http://unifont.org/lasi); the Loads of Linux Links project ( loll.sf.net http://loll.sf.net); and the Linux Brochure Project (lbproject.sf.net http://lbproject.sf.net). __ Linux-powered Science __ ___ CMake mailing list CMake@cmake.org mailto:CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake 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
Re: [CMake] custom target (kernel modules)
On 6/28/07, Alan W. Irwin [EMAIL PROTECTED] wrote: On 2007-06-28 10:08-0400 Alexandru Ciobanu wrote: Hi! I am trying to build kernel modules with CMake. To do that I use the command below: add_custom_target ( manager.ko ${kbuild_cmd} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/linux DEPENDS ${src} linux/Kbuild ) The problem is that nobody depends on this custom target and so it is never build when running make. If I use the ALL parameter in add_custom_target() it will always rebuild it, even if none of source files has changes. So how do I make this work so that it builds when I run make but also builds only when necessary, like any other target add_library(), add_executable(), etc. ? Use ADD_CUSTOM_COMMAND instead with an empty (COMMANDless) ADD_CUSTOM_TARGET with the ALL parameter that-file depends on the custom command. Hi Alan, I have a question here. Why bother to call both ADD_CUSTOM_COMMAND and ADD_CUSTOM_TARGET? It seems like only ADD_CUSTOM_TARGET with ALL parameter is enough. Does your method have some advantage? Thanks. Alan __ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __ Linux-powered Science __ ___ 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] custom target (kernel modules)
On 2007-06-29 09:04+0800 Clark J. Wang wrote: On 6/28/07, Alan W. Irwin [EMAIL PROTECTED] wrote: On 2007-06-28 10:08-0400 Alexandru Ciobanu wrote: If I use the ALL parameter in add_custom_target() it will always rebuild it, even if none of source files has changes. ^^ Hi Alan, I have a question here. Why bother to call both ADD_CUSTOM_COMMAND and ADD_CUSTOM_TARGET? It seems like only ADD_CUSTOM_TARGET with ALL parameter is enough. Does your method have some advantage? See above quote from Alexandru. Also, if you read the ADD_CUSTOM_TARGET documentation, the reason why it always rebuilds is fully explained there. The target has no output file and is ALWAYS CONSIDERED OUT OF DATE Alan __ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __ Linux-powered Science __ ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] custom target (kernel modules)
On 6/29/07, Alan W. Irwin [EMAIL PROTECTED] wrote: On 2007-06-29 09:04+0800 Clark J. Wang wrote: On 6/28/07, Alan W. Irwin [EMAIL PROTECTED] wrote: On 2007-06-28 10:08-0400 Alexandru Ciobanu wrote: If I use the ALL parameter in add_custom_target() it will always rebuild it, even if none of source files has changes. ^^ Hi Alan, I have a question here. Why bother to call both ADD_CUSTOM_COMMAND and ADD_CUSTOM_TARGET? It seems like only ADD_CUSTOM_TARGET with ALL parameter is enough. Does your method have some advantage? See above quote from Alexandru. Also, if you read the ADD_CUSTOM_TARGET documentation, the reason why it always rebuilds is fully explained there. The target has no output file and is ALWAYS CONSIDERED OUT OF DATE I see. Thank you so much. Alan __ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __ Linux-powered Science __ ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake