The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=15384 ====================================================================== Reported By: Egor P. Assigned To: ====================================================================== Project: CMake Issue ID: 15384 Category: CMake Reproducibility: always Severity: major Priority: high Status: new ====================================================================== Date Submitted: 2015-01-31 11:34 EST Last Modified: 2015-01-31 11:34 EST ====================================================================== Summary: Rules are disappeared from solution (VS12) after touching any CMakeLists.txt file Description: I have several custom commands and custom target which depends on them. After initial cmake run custom command rules correctly appear in VS projects. After any changes in CMakeLists.txt file and cmake run, those rules disappear from project (and solution). The change can be trivial: just add an empty line or a comment.
I noticed it depends on existence of file. 1) run cmake; rules are in solution 2) first build (files are generated by custom rules - commands); rules are in solution 3) add new line to root (any) CMakeLists.txt file, save 4) run cmake or build; RULES ARE DISAPPEARED!!! <------------ Now any changes to CMakeLists.txt does not make rules appear. How to do this? 5) Delete files generated during build 6) Repeat p.3 7) run cmake or build; RULES ARE APPEARED!!! <------------ I'm not sure, maybe this behavior is expected, BUT... When I clean solution via VS (generated files are deleted now) and then I press rebuild, it does not rebuild custom files (commands)! Because there is no rules at solution and cmake is not run to check this issue and add this rules again. This causes build errors etc. The only way now to regenerate rules is to (!) touch cmake file and run cmake command. Steps to Reproduce: 1) svn co svn://svn.code.sf.net/p/firebird/code/firebird/trunk firebird 2) Put 'sed' in your PATH (can be taken from 'git' package). 3) cmake -H. -Bwin 4) Run win/firebird.sln 5) Look at 'databases' project in 'Boot/Custom build steps' solution dir. It contains several rules in '/databases/CMake Rules/*': help.fdb.rule, metadata.fdb.rule, msg.fdb.rule, security.fdb.rule. 6) Build solution (takes 5-10 minutes). 7) Touch firebird/src/CMakeLists.txt (add an empty line) 8) Re-run 'cmake' command or build 'ZERO_BUILD' project in solution. 9) Look at 'Boot/Custom build steps/databases/CMake Rules/*' again! There are no files listed above. !!! These rules are declared in 'src/CMakeLists.txt', lines 90-185. 10) Delete 'win/src/*.fdb' 11) Repeat p.7 12) Re-run 'cmake' command or build 'CMake Targets/ZERO_BUILD' project in solution. Rule files are appeared. !!! Additional Information: I cannot reproduce this on simple small cmake configuration, so providing real case. On simple example the rules do not disappear. ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-01-31 11:34 Egor P. New Issue ====================================================================== -- 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://public.kitware.com/mailman/listinfo/cmake-developers
