C unit test framework for CMake [closed] - unit-testing

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm starting a C project with CMake and I want to use TDD. So I need an efficient unit testing framework which can be integrated with CMake.
I'm looking for a UTF wich can:
Be easily integrated with CMake
Gives me code coverage
Be (if it is possible) BSD-licenced
I have tried Kuya wich matches 3. but doesn't give a CC, then Check wich matches 2. but I haven't find any UTF that can be easily integrated with CMake.
By "easily integrated with CMake" I mean a tool wich can be launched by $ make tests.

http://code.google.com/p/googletest/ is C++.
It's well integrated with CMake, and I guess that shouldn't be a big problem to have your tests using a bit of C++, even if your tested files are in plain C.

What about CTest? CTest allows you to integrate tests into CMakeLists.txt. See http://cmake.org/Wiki/CMake/Testing_With_CTest for more thorough explanations. For your for requirements:
It can't be more simple.
That depends on how you design your tests - ctest only runs them
The same license as cmake

Related

Building C++ project for Arduino [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed yesterday.
Improve this question
The official Arduino IDE has some nice features, such as the board and library management, which works relatively well. However, when it comes to building. It only supports .ino files, while my project has .hpp and .cpp files, just like any regular C++ project. I tried things like the VS Code plugin for Arduino, but that also uses .ino files.
The only alternative I found is Sloeber, which is an Eclipse plugin, and it has the usual problem of Eclipse plugins that I can either install it or not. I had a previous version installed, but when I tried to update it, it completely broke my Eclipse installation. I tried installing the latest version, but it doesn't work.
Is there any alternative to sloeber? I'd prefer something that can be used from the command line, but an IDE is just fine too.

How to develop on windows using C++ and CMake [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Question is - how to develop on Windows platform with comfort, using CMake as primary configuration tool. What I mean is IDE or something, that parse CMake config and help you to include external hpp files for example. I know that Qt Creator can (it support MSVC compiler), but Qt Creator sometimes fail to save file with error "Can't write to disk. Is it full". Seems like bug. And that's all.
What I mean is not generate .sln for Visual Studio.
Also I tried VS 2017 RC, but its crashing constantly with my project.
P.S. I tried Visual Studio with separate .sln, but it's really uncomfortably to support two different configs.
Thanks
Try out KDevelop 5 for Windows, it has great CMake support, as well as Clang based language features.

Problems compiling Qt [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Recently I downloaded Qt 5.6
I didn't knew that installing visual studio is necessary to build with Qt.
I have a poor internet connection and somehow managed to download Qt. But now is it necessary to install visual studio of 7 GiBs which is nearly impossible for me to download with my shitty kind of internet? I had searched on google and found that MinGW can be used to build with Qt. Please help me to configure it.
You can download a pre-build version of Qt, building it yourself is not necessary or recommended for beginners:
http://download.qt.io/official_releases/qt/5.6/5.6.0/
The qt-opensource-windows-x86-mingw492-5.6.0.exe comes with MinGW 4.9.2 bundled.
Building Qt from sources can take many hours on a slow machine, and potentially fail for a number of reasons, also it has 3rd party requirements such as perl and python.

Move from Gradle to CMake for C++ project [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
We have been using Gradle for our C++ project(s) for the last year now but as the complexity of the project grows and our use/creation of libraries increases I find myself dealing with situations where my knowledge of Gradle falls short.
The net is full of helpful resources for Gradle but it is extremely Java focused. Furthermore, I have not seen many C++ projects using Gradle. For these reasons, I am considering making the move to CMake since I am at point where I need to significantly edit our build scripts.
Is the move to CMake, a more battle testing and ubiquitous C/C++ build system, worth it? Or is sticking with Gradle, which recently came into the C++ game, worth the trouble?
Note: I know they are other C++ options out there but CMake seems like the one that would best replace our current solution.
My advice would be to use CMake. Many projects have already been successfully using it. CMake also has the CPack and CTest features, which are very helpful when working with projects. Additionally, many IDE projects can be generated using either Gradle or CMake.
Just to point out, CMake is not a build system but a build system generator.

C++ cross platform for processes: is POCO lib good? other alternatives? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I would like to use some cross platform C++ library for starting, stopping and getting standard output for processes. I found and I would like to use C++ POCO libraries:
are these good?
What's the best alternatives? I use Boost and they have Boost Process, but is not part of the official release and AFAIK it won't be neither very soon (development stopped at 2008).
Can you advise me a bit on this POCO lib or other?
I don't have any direct experience with the Processes lib in POCO but I'm a big fan of the project in general and the networking and threading libs in particular. Works great under Windows (MinGW & VS), OS X, and Linux.
I have used POCO cross-platform for iOS/Android and it was very straightforward, dynamic pointers, threading and much much more. There was some threshold on getting it running at first, but once first sample was running: no problems... You may want to check out our entire project here