On Wednesday 22 December 2010, tfjiang wrote: > Hi,everyone. > While using cmake to generate a code::blocks project, I met a problem. I > can not send argument to "int main(int argc,char *argv[])". I found some > suggestions like that: add arguments in "projects-send programs' > argument". It works in my testing project which is directly generated > by code::blocks, but if the project is generated by cmake, there is an > error "You can not run a commands-only target".
Do you mean adding command line arguments when trying to execute the binary which you just built ? If so, please add this as a bug to the cmake bug tracker and assign it to me: http://public.kitware.com/Bug/ > Also, I notice that the cmake project doesn't contain Debug/Releas > directories. Yes. The C::B generator in cmake is based on the Makefile-generator, i.e. it generates makefiles and additionally the project file. The makefile generators in cmake are one-configuration-generators, i.e. one configuration in one build tree, if you want to build in multiple configurations you have to set up one build tree for each configuration. This will result in one project file for each configuration. You should be able to load these multiple projects without problems in C::B. 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
