cpputils-cmake icon indicating copy to clipboard operation
cpputils-cmake copied to clipboard

Fix for projects not using cmake

Open berhoel opened this issue 9 years ago • 4 comments

Although some of my software projects use cmake not all do. For those projects who do not, the irony support in cpputils-cmake causes problems. This patch fixes the warnings for me:

*** cpputils-cmake.el_SAVE	2016-09-29 10:00:01.803673300 +0200
--- cpputils-cmake.el	2016-12-01 09:35:42.905213897 +0100
***************
*** 723,727 ****
  
      ;; irony compile-commands-path
!     (if (fboundp 'irony-cdb-json-add-compile-commands-path)
          (irony-cdb-json-add-compile-commands-path cppcm-src-dir (concat cppcm-build-dir "compile_commands.json")))
  
--- 723,728 ----
  
      ;; irony compile-commands-path
!     (if (and cppcm-src-dir
!              (fboundp 'irony-cdb-json-add-compile-commands-path))
          (irony-cdb-json-add-compile-commands-path cppcm-src-dir (concat cppcm-build-dir "compile_commands.json")))

berhoel avatar Dec 01 '16 08:12 berhoel

Which one is correct version , the above one or below one?

redguardtoo avatar Dec 01 '16 09:12 redguardtoo

The below. irony-cdb-json-add-compile-commands-path fails if cppcm-src-dir is nil.

berhoel avatar Dec 01 '16 12:12 berhoel

#72

Reference to pull request fixing the above issue.

berhoel avatar Dec 01 '16 22:12 berhoel

thanks

redguardtoo avatar Dec 01 '16 22:12 redguardtoo