It seems that the macro is called twice while the value of ${PROJECT} didn't changed (maybe twice in the same file?). If your project is open source, I can take a look

        Yes, it is. I can send you my main CMakeLists file.

No, this variable add path(s) to the standard path where cmake search modules.
http://www.cmake.org/Wiki/CMake_Useful_Variables

        Oh, thanks.
        But I added it (CMAKE_MODULE_PATH) and the problem persists.

Ok, but my macro generate a control file name control_${PROJECT_NAME} in ${PROJECT_BINARY_DIR} folder.

I started to read your MACRO and, after comment the first ADD_CUSTOM_COMMAND (the one that creates the control file, I think), I got no more errors. I added a simple ADD_CUSTOM_COMMAND and the SAME error is displayed. But I can't figure why, because I don't see any other rule...
        My ${PROJECT_BINARY_DIR} is the same of ${PROJECT_SOURCE_DIR}.

Your problem is not to that the file already exist, but that there is two rule trying to generate the same control file. (there may be a problem, I should use DEB_TARGET_NAME instead of the project name, I'll change it tomorrow. I hope it will solve your problem because I'm soon on vacation for two weeks)

        Thanks a lot. (I'll be on vacation tuesday...)
Oh, let me know if you need my CMakeFile, I can send it to you. (Althought it's not finished yet...)

--
        Vitor VASCONCELOS
        Projet QGAR
        LORIA / INRIA-Lorraine
        Campus Scientifique, BP 239
        54506, Vandoeuvre-lès-Nancy, FRANCE
        Tel: +33 (0)3 54 95 85 76

_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to