https://bugs.kde.org/show_bug.cgi?id=420572

            Bug ID: 420572
           Summary: Targets in launches don't update until reboot
           Product: kdevelop
           Version: 5.2.1
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Build tools: CMake
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

SUMMARY
The available targets for a CMake project are not accurate until KDevelop is
rebooted: the CMake cache does not get rescanned for project executables when
the cache is updated, but merely on KDevelop reboot

STEPS TO REPRODUCE
1. Create a cmake project
2. Add an executable hello_world target in the CMakeLists.txt file.  
3. Save and build.
3. go to Configure Launches.  There are no available targets.
4.  Reboot KDevelop
5.  Go to configure launches.  now the executable is available for launching

OBSERVED RESULT

The executable added in the cmakelists.txt is not available for launching until
KDevelop reboots, even if it builds properly.

EXPECTED RESULT

The executable should be available in the configured launches immediately. 
More generally, the project targets and launches should automatically be
repopulated when any CMakeLists.txt goes out of date (or at least when the
CMake Cache is updated).

There are actually several bugs here caused by this issue.  Another one can be
reproduced if you create an executable target, create a launch for it, then
rename it in the CMakeLists.txt:  The old executable sits around in the cmake
cache, and the launch configuration for the old executable remains even though
it no longer exists in the project.

The end result is that if you rename an executable in the cmake lists, then
immediately run or debug run the default launch configuration, two things
happen:  First, the project appears to rebuild as expected before the run
(because the cmake configuration is out of date), and no errors occur.  Second,
the old executable runs from the cache instead of the one that was just built,
and the program appears to run.   But it's simply erroneously running the old
binary.   This behavior caused me almost an hour of debugging time to figure
out.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Linux Mint 19 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to