Re: [CMake] multi core project
OK, thanks. But somehow complicated. I wonder If I couldn't (miss)use the UPDATE_COMMAND for this. Can I use a macro as UPDATE_COMMAND? My CMakeLists.txt looks like that right now: include(ExternalProject) SET(subprojects "core0" "core1" "core2") foreach(MYPROJ ${subprojects}) ExternalProject_Add( ${MYPROJ} SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${MYPROJ} CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_SOURCE_DIR}/MyToolChain.cmake UPDATE_COMMAND "" INSTALL_COMMAND "" ) ExternalProject_Add_Step(${MYPROJ} rescan COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_SOURCE_DIR}/${MYPROJ}/CMakeLists.txt DEPENDEES forcebuild DEPENDERS build ALWAYS 1 ) ExternalProject_Add_Step(${MYPROJ} forcebuild COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_CURRENT_BUILD_DIR}/${MYPROJ}-prefix/src/${MYPROJ}-stamp/${MYPROJ}-build DEPENDEES configure DEPENDERS rescan ALWAYS 1 ) endforeach(MYPROJ) I tried to play a little bit around with the prefix dir to make this a little bit more sens full, but not a real success so far. Any better Idea? Next I need to link the Outputs of the three cores together. Can I somehow automatically get the targets from each subproject? I also like to improve the "touch" thing for my globbing procedure, but maybe I will discuss this separately in an other thread. thanks Arne -- 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
Re: [CMake] multi core project
Add this: set(proj CORE0) ExternalProject_Add_Step(${proj} forcebuild COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_CURRENT_BUILD_DIR}/${proj}-prefix/src/${proj}-stamp/${proj}-build DEPENDEES configure DEPENDERS build ALWAYS 1 ) ExternalProject keeps track of project phases based on 'stamp' files that are created if a stage is completed successfully. The stuff above removes the stamp for 'build' so that a build is forced every time you run make (or the build tool of your choice). You can also just build in the directory for CORE0 which the way you have it set up would be ${CMAKE_CURRENT_BUILD_DIR}/${proj}-prefix/src/${proj}-build I believe. We generally keep all our ExternalProject build directories grouped together on the same level by setting the BINARY_DIR argument to ExternalProject_add. This overrides (the way SOURCE_DIR does) the default place where things get built. -- Kent Williams norman-k-willi...@uiowa.edu On 11/19/13 12:31 PM, "Arne Pagel" wrote: >Dear all, > >I just tried to use the ExternalProject_Add for this multicore project, >having different separate >camke projects for each core > >Now I have 2 Problems: > >1.) >with the ExternalProject_Add and a given source dir it seams that my >external projects are not >rebuild if I made some changes there. Is there some nice way to rebuild >the exeternal project all >the time? > >This is how I call the External Project now: > >ExternalProject_Add( > CORE0 > > SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/core0 > > CMAKE_ARGS >-DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_SOURCE_DIR}/MyToolChain.cmake > > UPDATE_COMMAND "" > INSTALL_COMMAND "" >) > > >2.) >Since there is some code generation involved which produces a number of >randomly named c files I >have to use a globbing function to get all source files. >This inherits, that before each build, I have to call "make >rebuild_cache", in order to scan for >these new C files. (Is ther maybe a smarter way to do this?) >So I have to include also this step within the build, I tried >ExternalProject_Add_Step, but so far I >couldn't get it running make in the dir. > > > >Any suggestion for me? > > > > > > >-- > >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 Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error, then delete it. Thank you. -- 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
Re: [CMake] multi core project
Dear all, I just tried to use the ExternalProject_Add for this multicore project, having different separate camke projects for each core Now I have 2 Problems: 1.) with the ExternalProject_Add and a given source dir it seams that my external projects are not rebuild if I made some changes there. Is there some nice way to rebuild the exeternal project all the time? This is how I call the External Project now: ExternalProject_Add( CORE0 SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/core0 CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_SOURCE_DIR}/MyToolChain.cmake UPDATE_COMMAND "" INSTALL_COMMAND "" ) 2.) Since there is some code generation involved which produces a number of randomly named c files I have to use a globbing function to get all source files. This inherits, that before each build, I have to call "make rebuild_cache", in order to scan for these new C files. (Is ther maybe a smarter way to do this?) So I have to include also this step within the build, I tried ExternalProject_Add_Step, but so far I couldn't get it running make in the dir. Any suggestion for me? -- 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
Re: [CMake] multi core project
2013/11/11 Arne Pagel : > Dear all, > > I am using cmake for an embedded environment where I now have to add multi > core support. > > In this case I have a Controller with up to 4 different cores! > There is for example one core dedicated for fast peripheral access, > one core for with additional dsp instructions and so on. > For 3 Controllers I can use the same C Compiler, but with different Compiler > Options, > for the 4th core I even have to involve a different Compiler. > > What I see so far for this controllers are the use of hand made makefiles. > Lets say there are four source directories, with more or less independent > makefiles, > later the output files are merged. > (btw. does anyone know an elf merging tool? So far I use a very simple > approach based on libelf, > producing an hex file) > > Finally all these Cores are accessing the same flash area, and I need one > final executable after my > build process. > Since there is a big dependency between the cores and code reallocation > between the cores will > happen quite often in the future, I want to treat everything as one project. > > So basically in cmake I need target dependent compiler options and toolchains. > > > Does anyone have an Idea how to setup this with cmake in a smart way? I guess this is unsupported yet see: http://public.kitware.com/Bug/view.php?id=14539 -- Erk L'élection n'est pas la démocratie -- http://www.le-message.org -- 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
[CMake] multi core project
Dear all, I am using cmake for an embedded environment where I now have to add multi core support. In this case I have a Controller with up to 4 different cores! There is for example one core dedicated for fast peripheral access, one core for with additional dsp instructions and so on. For 3 Controllers I can use the same C Compiler, but with different Compiler Options, for the 4th core I even have to involve a different Compiler. What I see so far for this controllers are the use of hand made makefiles. Lets say there are four source directories, with more or less independent makefiles, later the output files are merged. (btw. does anyone know an elf merging tool? So far I use a very simple approach based on libelf, producing an hex file) Finally all these Cores are accessing the same flash area, and I need one final executable after my build process. Since there is a big dependency between the cores and code reallocation between the cores will happen quite often in the future, I want to treat everything as one project. So basically in cmake I need target dependent compiler options and toolchains. Does anyone have an Idea how to setup this with cmake in a smart way? regards Arne -- 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