kartikkumar / cppbase Goto Github PK
View Code? Open in Web Editor NEWBoilerplate for a simple CMake-based C++ project
Home Page: https://kartikkumar.github.io/cppbase
License: MIT License
Boilerplate for a simple CMake-based C++ project
Home Page: https://kartikkumar.github.io/cppbase
License: MIT License
Set up packager in CMake to tar all the core project files for distribution.
Currently, the version of CMake built from source for the Travis CI build doesn't support add_compile_definitions
. This means that for PR #3, the deprecated add_definitions
has to be used instead.
To switch to add_compile_definitions
, the CMake version has to be bumped up, but initial testing shows that this causes issues for the custom Doxygen scripts for the Travis CI build, because of updates in FindDoxygen.cmake
.
So this issue requires both the CMake and Doxygen scripts for Travis to be updated.
CMake doesn't ship with an uninstall target, but there's this snippet on the official CMake Wiki: https://gitlab.kitware.com/cmake/community/wikis/FAQ#can-i-do-make-uninstall-with-cmake
I got the recommendation to revise the whole CMake setup to make use of "modern CMake".
I've got to investigate further and understand what that entails. In any case, I understand that it's bad practice to hard code compiler flags and the like, which is now in the main CMakeLists.txt
file due to legacy when I started building this project.
This talk was recommended to me:
And this doc:
This will probably take some time and a bit of effort for me to upgrade my knowledge to be able to migrate to modern CMake.
Add version detection in Findcppbase.cmake
so that find_package()
respects minimum version required.
Currently, to stop Doxygen from throwing the following warnings, there's an ugly \cond \endcond
block at the top of the README.md
file to wrap the clickable logos:
warning: Unexpected html tag <img> found within <a href=...> context
This seems to be a recurring and unsolved issue with the way the HTML parser in Doxygen works:
Catch2 currently doesn't support testing assert statements.
Some resources:
Update to match new modern CMake setup as of 2d941d3
Consider only using the Catch2 single header to avoid building the whole library (slow)
Find a way to nest variables in Doxygen config file, so that something like the following is possible: @@CMAKE_PROJECT_NAME@_VERSION@
.
I cloned this project with depth=1, changed the "origin" to an existing empty repo on my page and when I tried pushing the local repo to the remote, it gave me an error that shallow clones can not be pushed to the remote. Is there another way to push shallow clones to a different remote repo?
Add find_package call to use Catch2 that is already present and only fetch otherwise
Set up CMake target to install package: make install
Add option in CMake to generate code coverage using gcov
, lcov
, etc.
Also add to GitHub Actions workflow and push to CodeCov.
Include CodeCov badge in README.
The README link is broken!
Currently you have enable_testing()
and a custom BUILD_TESTS
flag. This functionality is already provided in CMake. Diff:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 22b3617..2ac71a0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -130,8 +130,10 @@ if(BUILD_DOXYGEN_DOCS)
SOURCES ${PROJECT_BINARY_DIR}/Doxyfile)
endif(BUILD_DOXYGEN_DOCS)
-if(BUILD_TESTS)
- enable_testing()
+# Calls enable_testing() and provides BUILD_TESTING flag
+include(CTest)
+
+if(BUILD_TESTING)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${TEST_PATH})
add_executable(${TEST_NAME} ${TEST_SRC})
You will need to replace BUILD_TESTS
with BUILD_TESTING
everywhere and wrap appropriate blocks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.