Skip to content

Instantly share code, notes, and snippets.

View vishvanathan-k's full-sized avatar
🎯

Vishvanathan K vishvanathan-k

🎯
View GitHub Profile
@vishvanathan-k
vishvanathan-k / CMakeLists.txt
Last active February 28, 2022 19:28
CMake file to build a Static C++ library with debug and release mode configuration
cmake_minimum_required(VERSION 3.20)
project("{PROJECT NAME}" DESCRIPTION "{PROJECT DESCRIPTION}")
if (NOT CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
message(STATUS "This project has a top-level one called [${CMAKE_PROJECT_NAME}]")
else()
message(STATUS "This project is a top-level one")
endif()
# here you can see how instead of writing "SomeLibrary"
# we can just use the PROJECT_NAME variable