Created
October 21, 2022 02:21
-
-
Save locnnil/2ddf78e1009854f54a14845ad44fbbc4 to your computer and use it in GitHub Desktop.
A basic CMakeLists.txt template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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