2

I want to write a clang tool that can run on C++ projects that I have that already exist which use Makefiles to build. The problem is, it seems as though any project that is going to be put through a clang AST must be built using cmake so that it can get a compile_commands.json file. Is there a way to do this for projects that don't use cmake? Or is there a way to build Makefile projects with cmake?

slyslayer223
  • 175
  • 2
  • 6
  • Why don't you use GNU Make for Windows? – tomas789 Oct 22 '13 at 18:22
  • `Or is there a way to build Makefile projects with cmake?` Mhm, `cmake` is used to create `Makefiles` for your project?! See here: http://stackoverflow.com/questions/395169/using-cmake-to-generate-visual-studio-c-project-files how to do it with Visual Studio... – Alexander Vogt Oct 22 '13 at 18:23
  • Some searching brought up [Bear](https://github.com/rizsotto/Bear), but that looks to be unix only. – David Brown Oct 22 '13 at 18:24
  • These projects run on both linux and windows, so I have no problem on the linux side of things because as David Brown mentioned, bear solves my problem there – slyslayer223 Oct 22 '13 at 18:45

1 Answers1

2

You might be able to use this script with cygwin:

https://github.com/woboq/woboq_codebrowser/blob/master/scripts/fake_compiler.sh

steveire
  • 10,694
  • 1
  • 37
  • 48