Convert app to c++
This commit is contained in:
parent
069f8c8465
commit
c35b33b613
8 changed files with 64 additions and 16 deletions
|
@ -1,8 +1,11 @@
|
|||
# Specifies the minimum version of CMake required to configure the project.
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
set(SMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
# Defines the name of the project. This name is used for various CMake targets and variables.
|
||||
project(cmake_tutorial C)
|
||||
project(cmake_tutorial C CXX)
|
||||
|
||||
# Configures CMake to generate a 'compile_commands.json' file in the build directory.
|
||||
# This file is used by many IDEs and language servers (e.g., VS Code, CLion)
|
||||
|
@ -17,7 +20,7 @@ add_subdirectory(libs/lib2)
|
|||
add_subdirectory(libs/lib3)
|
||||
|
||||
# Defines an executable target named 'cmake_tutorialApp' from the source file 'src/app.c'.
|
||||
add_executable(cmake_tutorial src/app.c)
|
||||
add_executable(cmake_tutorial src/app.cpp)
|
||||
|
||||
# Links the executable target 'cmake_tutorialApp' to the specified libraries.
|
||||
# - PRIVATE: Indicates that 'cmake_tutorialApp' needs these libraries for its own compilation/linking,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue