Summary: | Wrong variable scope in subdirs | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Nicolás Alvarez <nalvarez> |
Component: | Build tools: CMake | Assignee: | kdevelop-bugs-null |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | aleixpol, tobias_henkel, torbjoern.k |
Priority: | LO | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Nicolás Alvarez
2010-05-22 04:12:59 UTC
And I'm an idiot and forgot to replace REPLACEME with "bug 238456" before submitting -.- CMake functions (not macros) have their own variable scope too: function(sub) message(STATUS "this is sub: ${foo}") set(foo "one") message(STATUS "changed to: ${foo}") endfunction(sub) set(foo "asd") sub() message(STATUS "result: ${foo}") CMake 2.8.1: -- this is sub1: asd -- changed to: one -- result: asd KDevelop 4.0: message: ("this is sub1: asd") message: ("changed to: one") message: ("result: one") Changing severity and importance as this can cause KDevelop to eat all memory because variable contents grow beyond all limits. Can't have it as VHI It's not a crash either it can crash, see Andreas' comment. Git commit a06e144523f56358f1921e06e175228f01c5d5ad by Aleix Pol. Committed on 19/12/2011 at 03:25. Pushed by apol into branch 'master'. Support scopes in CMake support Only implemented for functions for the moment. CCBUG: 238455 M +27 -21 projectmanagers/cmake/parser/cmakeprojectvisitor.cpp M +3 -1 projectmanagers/cmake/parser/cmakeprojectvisitor.h M +52 -2 projectmanagers/cmake/parser/variablemap.cpp M +15 -2 projectmanagers/cmake/parser/variablemap.h M +37 -5 projectmanagers/cmake/tests/cmake_cmakeprojectvisitor_test.cpp http://commits.kde.org/kdevelop/a06e144523f56358f1921e06e175228f01c5d5ad Since last commit, this can't lead to recursively eating all memory in function, so it's not a crash anymore. *** Bug 309830 has been marked as a duplicate of this bug. *** Git commit df00d058fcce0d4026704aeffbb6802dd9582433 by Aleix Pol. Committed on 15/11/2012 at 03:48. Pushed by apol into branch 'master'. Fix subdirectory scoping in cmake projects Don't pop the scope until all the subdirectories have been processed. Thanks to Daniel Calviño Sánchez for such a helpful bug report :) Related: bug 309687 M +6 -3 projectmanagers/cmake/cmakemanager.cpp M +27 -0 projectmanagers/cmake/tests/cmakemanagertest.cpp M +1 -0 projectmanagers/cmake/tests/cmakemanagertest.h http://commits.kde.org/kdevelop/df00d058fcce0d4026704aeffbb6802dd9582433 Thank you for the bug report. As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists. If this bug is no longer persisting or relevant please change the status to resolved. |