empty-proj

Empty project to clone for new C/C++ libraries.

Download as .zip Download as .tar.gz View on GitHub

empty-proj Build Status

A simple C/C++ project scaffold. Uses CMake to allow new C and C++ projects to be easily integrated.

Comes built-in with support for:

To use this repo:

git clone https://github.com/aadityakalsi/empty-proj

To create a new C or C++ project, call clone.

empty-proj/clone myNewProject

Then:

cd myNewProject
tools/build [Debug/Release]
tools/codecov
tools/install

For the CMake module:

 ProjTools.cmake
 ---------------

 CMake module that is meant as a single include in your op level
 CMakeLists.txt.

 Before including this module, the following efinitions need to
 be in place in your main CMakeLists.txt file.

 Project structure:

 + project
 |
 |- CMakeLists.txt
 |- LICENSE.txt
 |- README.txt
 |+ cmake
 |+ module1
 |+ module2
 |...
 |+ unittest (Unittest header available for writing nittests)
 |

 Sample CMakeLists.txt file:

 # CMakeLists.txt
 #
 # # -- This cmake file works only wth CMake >= 2.8
 # cmake_minimum_required(VERSION 2.8)
 #
 # # -- Set the project versioning details
 # set(PROJ_NAME <your_project_name>)
 # project(${PROJ_NAME})
 # set(PROJ_INSTALL_DIR <install_location>)
 # set(CPACK_PACKAGE_VERSION "0.1.1")
 # set(CPACK_PACKAGE_VERSION_MAJOR "0")
 # set(CPACK_PACKAGE_VERSION_MINOR "1"))
 # set(CPACK_PACKAGE_VERSION_PATCH "1")
 # set(CPACK_PACKAGE_CONTACT <your_email>)
 #
 # # -- Set the license and readme file for your project
 # set(license_file <license_file>)
 # set(readme_file  <readme_file>)

 # # -- Include this module
 # set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} {CMAKE_CURRENT_SOURCE_DIR}/cmake)
 # set(USE_CPP )
 # # -- Can also set USE_CPP11
 #
 # # -- Finally include this magic CMake file
 # include(ProjTools)
 #
 # # -- Add targets below
 # add_subdirectory(module1; module2)
 #
 # # -- Functions available
 # add_inc_dir()
 # add_exe()
 # add_lib()
 # add_lib_build_def()
 # link_libs()
 # set_tgt_ver()
 # install_hdr()
 # install_tgt()
 # 
 # # -- Functions available for tests
 # In tests, you should use:
 # add_test_exe()
 # test_link_libs()
 # create_test()
 #