From 910b9df1acd2eb58381278772187943cd38f6a88 Mon Sep 17 00:00:00 2001 From: Arthur Moreno Date: Mon, 4 Nov 2024 15:11:57 +0100 Subject: [PATCH] migrate to cpp --- CMakeLists.txt | 14 +++++++------- src/{main.c => main.cpp} | 0 2 files changed, 7 insertions(+), 7 deletions(-) rename src/{main.c => main.cpp} (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6a53a47..48f4e27 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,14 +6,14 @@ cmake_minimum_required(VERSION 3.10) # Project Name and Language -project(CampoDeBatalha C) +project(CampoDeBatalha CXX) -# Set the C standard (optional) -set(CMAKE_C_STANDARD 99) -set(CMAKE_C_STANDARD_REQUIRED True) +# Set the C++ standard +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED True) # Compiler Flags -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -g") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -g") # Include Directories include_directories( @@ -26,8 +26,8 @@ link_directories( C:/msys64/ucrt64/lib ) -# Source Files -file(GLOB SRC_FILES "${PROJECT_SOURCE_DIR}/src/*.c") +# Source Files (using .cpp files) +file(GLOB SRC_FILES "${PROJECT_SOURCE_DIR}/src/*.cpp") # Executable Output add_executable(campo_de_batalha ${SRC_FILES}) diff --git a/src/main.c b/src/main.cpp similarity index 100% rename from src/main.c rename to src/main.cpp