0

I am going to start a personal project on C++14, using Visual Studio Community 2017 as IDE and GitHub as hosting website. I recently discovered buddy.works, an online CI service that allows support for 5 GitHub projects in the free tier, but only supports GCC as C++ compiler. Thus, I am not sure if I'll be able to flawlessly write code in VS and maintain the CI server.

I read How to support both vcxproj to cmake on a project? and figured out that this will indeed be a moderate pain to manage. However, the post is 7 years old and maybe some improvements were made in that time. Are you aware of ways to generate VS projects so that they can be compiled with GCC? Should I change my IDE of choice while I'm able to, or change CI service?

Thank you.

[Edit] I just saw in VS2017 you can indeed create a CMake project, "platform independent". It's just about finding a way to translate CMakeLists.txt files into standard Makefiles then.

phagio
  • 196
  • 1
  • 14

1 Answers1

0

Ok, I found out it's possible to use CMake based projects since VS2015, but they won't have the smart code recognition features as msbuild-based projects do (in other words, when adding a source file it will not be automatically added to the "project files" / CMake files). I will have to learn how to write CMakeLists.txt files (which are mostly high-level Makefiles as far as I understand).

In the CI environment, I had to use a version of GCC that came with CMake, and launch it with a specific target:

mkdir -p cmake-build && cd cmake-build
cmake .. -G"Unix Makefiles"
make

This led to a compiled binary in the cmake-build directory.

phagio
  • 196
  • 1
  • 14