mirror of
https://github.com/ttroy50/cmake-examples.git
synced 2025-12-18 12:14:36 +03:00
link files from intro
This commit is contained in:
@@ -21,10 +21,10 @@ $ tree
|
||||
└── main.cpp
|
||||
```
|
||||
|
||||
* CMakeLists.txt - Contains the CMake commands you wish to run
|
||||
* inc/Hello.h - The header file to include
|
||||
* src/Hello.cpp - A source file to compile
|
||||
* src/main.cpp - The source file with main
|
||||
* link:CMakeLists.txt[] - Contains the CMake commands you wish to run
|
||||
* link:inc/Hello.h[] - The header file to include
|
||||
* link:src/Hello.cpp[] - A source file to compile
|
||||
* link:src/main.cpp[] - The source file with main
|
||||
|
||||
|
||||
# Concepts
|
||||
|
||||
@@ -24,11 +24,11 @@ $ tree
|
||||
└── main.cpp
|
||||
```
|
||||
|
||||
* CMakeLists.txt - Contains the CMake commands you wish to run
|
||||
* cmake-examples.conf - An example configuration file
|
||||
* inc/Hello.h - The header file to include
|
||||
* src/Hello.cpp - A source file to compile
|
||||
* src/main.cpp - The source file with main
|
||||
* link:CMakeLists.txt[] - Contains the CMake commands you wish to run
|
||||
* link:cmake-examples.conf[] - An example configuration file
|
||||
* link:inc/Hello.h[] - The header file to include
|
||||
* link:src/Hello.cpp[] - A source file to compile
|
||||
* link:src/main.cpp[] - The source file with main
|
||||
|
||||
# Concepts
|
||||
|
||||
|
||||
@@ -26,8 +26,8 @@ $ tree
|
||||
├── main.cpp
|
||||
```
|
||||
|
||||
* CMakeLists.txt - Contains the CMake commands you wish to run
|
||||
* main.cpp - The source file with main
|
||||
* link:CMakeLists.txt[] - Contains the CMake commands you wish to run
|
||||
* link:main.cpp[] - The source file with main
|
||||
|
||||
# Concepts
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@ $ tree
|
||||
├── main.cpp
|
||||
```
|
||||
|
||||
* CMakeLists.txt - Contains the CMake commands you wish to run
|
||||
* main.cpp - The source file with main
|
||||
* link:CMakeLists.txt[] - Contains the CMake commands you wish to run
|
||||
* link:main.cpp[] - The source file with main
|
||||
|
||||
# Concepts
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@ $ tree
|
||||
├── main.cpp
|
||||
```
|
||||
|
||||
* CMakeLists.txt - Contains the CMake commands you wish to run
|
||||
* main.cpp - The source file with main
|
||||
* link:CMakeLists.txt[] - Contains the CMake commands you wish to run
|
||||
* link:main.cpp[] - The source file with main
|
||||
|
||||
# Requirements
|
||||
|
||||
|
||||
@@ -13,14 +13,14 @@ method of changing the compiler from the default gcc to http://clang.llvm.org/[c
|
||||
The files in this tutorial are below:
|
||||
|
||||
```
|
||||
A-hello-cmake$ tree
|
||||
$ tree
|
||||
.
|
||||
├── CMakeLists.txt
|
||||
├── main.cpp
|
||||
```
|
||||
|
||||
* CMakeLists.txt - Contains the CMake commands you wish to run
|
||||
* main.cpp - A simple "Hello World" cpp file.
|
||||
* link:CMakeLists.txt[] - Contains the CMake commands you wish to run
|
||||
* link:main.cpp[] - A simple "Hello World" cpp file.
|
||||
|
||||
# Concepts
|
||||
|
||||
|
||||
@@ -6,21 +6,21 @@ toc::[]
|
||||
|
||||
# Introduction
|
||||
|
||||
As mentioned in the introduction, CMake is a meta-build system that can be used to
|
||||
As mentioned, CMake is a meta-build system that can be used to
|
||||
create the build files for many other build tools. This example shows how
|
||||
to have CMake use the https://ninja-build.org/[ninja build] tool.
|
||||
|
||||
The files in this tutorial are below:
|
||||
|
||||
```
|
||||
A-hello-cmake$ tree
|
||||
$ tree
|
||||
.
|
||||
├── CMakeLists.txt
|
||||
├── main.cpp
|
||||
```
|
||||
|
||||
* CMakeLists.txt - Contains the CMake commands you wish to run
|
||||
* main.cpp - A simple "Hello World" cpp file.
|
||||
* link:CMakeLists.txt[] - Contains the CMake commands you wish to run
|
||||
* link:main.cpp[] - A simple "Hello World" cpp file.
|
||||
|
||||
# Concepts
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ create the following:
|
||||
The files included in this example are:
|
||||
|
||||
```
|
||||
$ tree
|
||||
.
|
||||
├── CMakeLists.txt
|
||||
├── subbinary
|
||||
@@ -34,14 +35,14 @@ The files included in this example are:
|
||||
└── sublib2.h
|
||||
```
|
||||
|
||||
* CMakeLists.txt - Top level CMakeLists.txt
|
||||
* subbinary/CMakeLists.txt - to make the executable
|
||||
* subbinary/main.cpp - source for the executable
|
||||
* sublibrary1/CMakeLists.txt - to make a static library
|
||||
* sublibrary1/inc/sublib1.h
|
||||
* sublibrary1/src/sublib2.cpp
|
||||
* sublibrary2/CMakeLists.txt - to setup header only library
|
||||
* sublibrary2/inc/sublib2.h
|
||||
* link:CMakeLists.txt[] - Top level CMakeLists.txt
|
||||
* link:subbinary/CMakeLists.txt[] - to make the executable
|
||||
* link:subbinary/main.cpp[] - source for the executable
|
||||
* link:sublibrary1/CMakeLists.txt[] - to make a static library
|
||||
* link:sublibrary1/inc/sublib1.h[]
|
||||
* link:sublibrary1/src/sublib2.cpp[]
|
||||
* link:sublibrary2/CMakeLists.txt[] - to setup header only library
|
||||
* link:sublibrary2/inc/sublib2.h[]
|
||||
|
||||
# Concepts
|
||||
|
||||
|
||||
@@ -21,10 +21,10 @@ $ tree
|
||||
├── ver.h.in
|
||||
```
|
||||
|
||||
* CMakeLists.txt - Contains the CMake commands you wish to run
|
||||
* main.cpp - The source file with main
|
||||
* path.h.in - File to contain a path to the build directory
|
||||
* ver.h.in - File to contain the version of the project
|
||||
* link:CMakeLists.txt[] - Contains the CMake commands you wish to run
|
||||
* link:main.cpp[] - The source file with main
|
||||
* link:path.h.in[] - File to contain a path to the build directory
|
||||
* link:ver.h.in[] - File to contain the version of the project
|
||||
|
||||
# Concepts
|
||||
|
||||
|
||||
@@ -21,9 +21,9 @@ $ tree
|
||||
├── main.cpp
|
||||
```
|
||||
|
||||
* AddressBook.proto - proto file from main protocol buffer https://developers.google.com/protocol-buffers/docs/cpptutorial[example]
|
||||
* CMakeLists.txt - Contains the CMake commands you wish to run
|
||||
* main.cpp - The source file from the protobuf example.
|
||||
* link:AddressBook.proto[] - proto file from main protocol buffer https://developers.google.com/protocol-buffers/docs/cpptutorial[example]
|
||||
* link:CMakeLists.txt[] - Contains the CMake commands you wish to run
|
||||
* link:main.cpp[] - The source file from the protobuf example.
|
||||
|
||||
# Requirements
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ analysis on all sub-projects.
|
||||
The files included in this example are:
|
||||
|
||||
```
|
||||
cppcheck$ tree
|
||||
$ tree
|
||||
.
|
||||
├── cmake
|
||||
│ ├── analysis.cmake
|
||||
@@ -34,13 +34,13 @@ cppcheck$ tree
|
||||
└── main2.cpp
|
||||
```
|
||||
|
||||
* CMakeLists.txt - Top level CMakeLists.txt
|
||||
* cmake/analysis.cmake - Includes functions to add analysis targets
|
||||
* cmake/modules/FindCppCheck.cmake - A custom package module to find CppCheck
|
||||
* subproject1/CMakeLists.txt - CMake commands for subproject 1
|
||||
* subproject1/main.cpp - source for a subproject with no errors
|
||||
* subproject2/CMakeLists.txt - CMake commands for subproject 2
|
||||
* subproject2/main2.cpp - source for a subproject that includes errors
|
||||
* link:CMakeLists.txt[] - Top level CMakeLists.txt
|
||||
* link:cmake/analysis.cmake[] - Includes functions to add analysis targets
|
||||
* link:cmake/modules/FindCppCheck.cmake[] - A custom package module to find CppCheck
|
||||
* link:subproject1/CMakeLists.txt[] - CMake commands for subproject 1
|
||||
* link:subproject1/main.cpp[] - source for a subproject with no errors
|
||||
* link:subproject2/CMakeLists.txt[] - CMake commands for subproject 2
|
||||
* link:subproject2/main2.cpp[] - source for a subproject that includes errors
|
||||
|
||||
# Requirements
|
||||
|
||||
|
||||
@@ -25,10 +25,10 @@ $ tree
|
||||
├── unit_tests.cpp
|
||||
```
|
||||
|
||||
* CMakeLists.txt - Contains the CMake commands you wish to run
|
||||
* Reverse.h / .cpp - Class to reverse a string
|
||||
* Palindrome.h / .cpp - Class to test if a string is a palindrome
|
||||
* unit_test.cpp - Unit Tests using boost unit test framework
|
||||
* link:CMakeLists.txt[] - Contains the CMake commands you wish to run
|
||||
* link:Reverse.h[] / link:Reverse.cpp[.cpp] - Class to reverse a string
|
||||
* link:Palindrome.h[] / link:Palindrome.cpp[.cpp] - Class to test if a string is a palindrome
|
||||
* link:unit_test.cpp[] - Unit Tests using boost unit test framework
|
||||
|
||||
# Requirements
|
||||
|
||||
|
||||
@@ -23,11 +23,11 @@ $ tree
|
||||
└── main.cpp
|
||||
```
|
||||
|
||||
* CMakeLists.txt - Contains the CMake commands you wish to run
|
||||
* cmake-examples.conf - An example configuration file
|
||||
* inc/Hello.h - The header file to include
|
||||
* src/Hello.cpp - A source file to compile
|
||||
* src/main.cpp - The source file with main
|
||||
* link:CMakeLists.txt[] - Contains the CMake commands you wish to run
|
||||
* link:cmake-examples.conf[] - An example configuration file
|
||||
* link:inc/Hello.h[] - The header file to include
|
||||
* link:src/Hello.cpp[] - A source file to compile
|
||||
* link:src/main.cpp[] - The source file with main
|
||||
|
||||
# Concepts
|
||||
|
||||
|
||||
Reference in New Issue
Block a user