-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
# CMakeLists file for the Chapter 2 example illustrating how to create a simple executable | ||
# | ||
# SPDX-License-Identifier: MIT | ||
|
||
cmake_minimum_required(VERSION 3.23) | ||
|
||
# Define a CMake project | ||
project( | ||
ch2_simple_example | ||
VERSION 1.0 | ||
DESCRIPTION "A simple C++ project to demonstrate basic CMake usage" | ||
LANGUAGES CXX) | ||
|
||
# Add an executable target named `chapter2_simple_example` | ||
add_executable(chapter2_simple_example) | ||
# Add sources to the target `chapter2_simple_example` | ||
target_sources(chapter2_simple_example PRIVATE src/main.cpp) | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#include <iostream> | ||
|
||
int main(int, char **) { | ||
std::cout << "Welcome to CMake Best Practices\n"; | ||
return 0; | ||
} |