Browse Source

Minor cleanup of CMake::get_executable

merge-requests/413/head
eidheim 3 years ago
parent
commit
de242f310b
  1. 3
      src/cmake.cpp

3
src/cmake.cpp

@ -149,8 +149,7 @@ bool CMake::update_debug_build(const boost::filesystem::path &debug_build_path,
boost::filesystem::path CMake::get_executable(const boost::filesystem::path &build_path, const boost::filesystem::path &file_path) {
// Prefer the CMake file API (if available) which gives exact information about the targets a file belongs to
auto executable = get_executable_from_file_api(build_path, file_path);
if(executable)
if(auto executable = get_executable_from_file_api(build_path, file_path))
return *executable;
// CMake does not store in compile_commands.json if an object is part of an executable or not.

Loading…
Cancel
Save