Skip to content

Instantly share code, notes, and snippets.

@locnnil
Created October 21, 2022 02:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save locnnil/2ddf78e1009854f54a14845ad44fbbc4 to your computer and use it in GitHub Desktop.
Save locnnil/2ddf78e1009854f54a14845ad44fbbc4 to your computer and use it in GitHub Desktop.
A basic CMakeLists.txt template
cmake_minimum_required(VERSION 3.22)
SET(CMAKE_C_STANDARD 11)
SET(CMAKE_CXX_STANDARD 20)
project(template)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-unused-variable -Werror -Wfatal-errors ")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-unused-variable -Werror -Wfatal-errors")
set(SOURCES
${PROJECT_SOURCE_DIR}/src/main.cpp
${PROJECT_SOURCE_DIR}/src/utils/other.cpp
)
add_executable(Marthe_Linux ${SOURCES})
target_include_directories(${PROJECT_NAME}
PUBLIC ${PROJECT_SOURCE_DIR}/include/
PUBLIC ${PROJECT_SOURCE_DIR}/include/utils/
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment