|
|
|
@ -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) { |
|
|
|
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
|
|
|
|
// 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(auto executable = get_executable_from_file_api(build_path, file_path)) |
|
|
|
if(executable) |
|
|
|
|
|
|
|
return *executable; |
|
|
|
return *executable; |
|
|
|
|
|
|
|
|
|
|
|
// CMake does not store in compile_commands.json if an object is part of an executable or not.
|
|
|
|
// CMake does not store in compile_commands.json if an object is part of an executable or not.
|
|
|
|
|