On Jan 23, 2014, at 4:17 PM, Stephen Kelly <[email protected]> wrote:
> Andreas Schuh wrote: > >> >> On Jan 23, 2014, at 1:11 PM, Andreas Schuh >> <[email protected]> wrote: >> >>> >>> On Jan 23, 2014, at 9:40 AM, Stephen Kelly >>> <[email protected]> wrote: >>>> >>>>>> Another example: You have code for adding scripts as executables. What >>>>>> are the generic (non-BASIS related) use cases for that? >>>>>> >>>>> You can define dependencies among them or to modules written in the >>>>> same scripting language. >>>> >>>> Can you say why this is useful? >> >> Let me give just one more example, if you could define that a script >> depends on another executable target (e.g., build from C++), when I >> rebuild only the script, the other executable will be recompiled and >> linked if it has changed since the last build as well. This is not >> possible at the moment without custom build commands/targets, but often >> (Shell) scripts are indeed calling other executables of your package. Then >> if you just want to test the changes made to the script, you can simply >> run “make myscript” and all dependencies will be updated as well. > > This looks like something that might be worth supporting better, but I can't > imagine how the cmake code would look or work. With the current CMake commands, you could actually do the following: add_executable(myutil main.cpp) add_custom_target(myscript SOURCES myscript.sh) add_dependencies(myscript myutil) My goal with BASIS was, however, to reduce the number of different commands needed as in add_executable(myutil.cpp) add_executable(myscript.sh) add_dependencies(myscript myutil) and to establish an understanding of scripts to be just another kind of executables and modules being just another kind of shared library. > Thanks, > > Steve. > > > -- > > Powered by www.kitware.com > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Kitware offers various services to support the CMake community. For more > information on each offering, please visit: > > CMake Support: http://cmake.org/cmake/help/support.html > CMake Consulting: http://cmake.org/cmake/help/consulting.html > CMake Training Courses: http://cmake.org/cmake/help/training.html > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Follow this link to subscribe/unsubscribe: > http://www.cmake.org/mailman/listinfo/cmake -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
