Skip to content

Commit

Permalink
mv chapters 13-16 back by one
Browse files Browse the repository at this point in the history
  • Loading branch information
bast committed May 27, 2018
1 parent 4144081 commit 8ef328c
Show file tree
Hide file tree
Showing 121 changed files with 188 additions and 189 deletions.
9 changes: 4 additions & 5 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@ chapter-07/* @robertodr
chapter-08/* @bast
chapter-09/* @bast
chapter-10/* @robertodr
chapter-11/* @robertodr
chapter-12/* @bast
chapter-13/* @robertodr
chapter-11/* @bast @robertodr
chapter-12/* @robertodr
chapter-13/* @bast
chapter-14/* @bast
chapter-15/* @bast
chapter-16/* @bast

# Testing infrastructure owners
testing/* @bast @robertodr
testing/* @bast @robertodr
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ script:
pipenv run python testing/collect_tests.py 'chapter-11/recipe-01*';
pipenv run python testing/collect_tests.py 'chapter-11/recipe-02';
pipenv run python testing/collect_tests.py 'chapter-11/recipe-03';
pipenv run python testing/collect_tests.py 'chapter-12/recipe-*';
pipenv run python testing/collect_tests.py 'chapter-13/recipe-*';
pipenv run python testing/collect_tests.py 'chapter-14/recipe-*';
pipenv run python testing/collect_tests.py 'chapter-15/recipe-*';
pipenv run python testing/collect_tests.py 'chapter-16/recipe-*';
fi
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,25 +150,25 @@
- [Distributing a project with dependencies as Conda package](chapter-11/recipe-05/README.md)


### [Chapter 13: Building Documentation](chapter-13/README.md)
### [Chapter 12: Building Documentation](chapter-12/README.md)

- [Building documentation using Doxygen](chapter-13/recipe-01/README.md)
- [Building documentation using Sphinx](chapter-13/recipe-02/README.md)
- [Combining Doxygen and Sphinx](chapter-13/recipe-03/README.md)
- [Building documentation using Doxygen](chapter-12/recipe-01/README.md)
- [Building documentation using Sphinx](chapter-12/recipe-02/README.md)
- [Combining Doxygen and Sphinx](chapter-12/recipe-03/README.md)


### [Chapter 14: Alternative Generators and Cross-compilation](chapter-14/README.md)
### [Chapter 13: Alternative Generators and Cross-compilation](chapter-13/README.md)

- [Hello world example](chapter-14/recipe-01/README.md)
- [Cross-compiling a Windows binary with OpenMP parallelization](chapter-14/recipe-02/README.md)
- [Hello world example](chapter-13/recipe-01/README.md)
- [Cross-compiling a Windows binary with OpenMP parallelization](chapter-13/recipe-02/README.md)


### [Chapter 15: Testing Dashboards](chapter-15/README.md)
### [Chapter 14: Testing Dashboards](chapter-14/README.md)

- [Deploying tests to the CDash dashboard](chapter-15/recipe-01/README.md)
- [Reporting test coverage to the CDash dashboard](chapter-15/recipe-02/README.md)
- [Using the AddressSanitizer and reporting memory defects to CDash](chapter-15/recipe-03/README.md)
- [Using the ThreadSanitizer and reporting data races to CDash](chapter-15/recipe-04/README.md)
- [Deploying tests to the CDash dashboard](chapter-14/recipe-01/README.md)
- [Reporting test coverage to the CDash dashboard](chapter-14/recipe-02/README.md)
- [Using the AddressSanitizer and reporting memory defects to CDash](chapter-14/recipe-03/README.md)
- [Using the ThreadSanitizer and reporting data races to CDash](chapter-14/recipe-04/README.md)


### [Chapter 16: Porting a Project to CMake](https://github.com/dev-cafe/vim/compare/master...cmake-support)
### [Chapter 15: Porting a Project to CMake](https://github.com/dev-cafe/vim/compare/master...cmake-support)
5 changes: 5 additions & 0 deletions chapter-12/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Chapter 12: Building Documentation

- [Building documentation using Doxygen](recipe-01/README.md)
- [Building documentation using Sphinx](recipe-02/README.md)
- [Combining Doxygen and Sphinx](recipe-03/README.md)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Deploying tests to the CDash dashboard
# Building documentation using Doxygen

Abstract to be written ...

Expand Down
29 changes: 29 additions & 0 deletions chapter-12/recipe-01/cxx-example/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)

project(recipe-01 LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

include(GNUInstallDirs)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR})

list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")

include(UseDoxygenDoc)

add_subdirectory(src)

add_doxygen_doc(
BUILD_DIR
${CMAKE_CURRENT_BINARY_DIR}/_build
DOXY_FILE
${CMAKE_CURRENT_SOURCE_DIR}/docs/Doxyfile.in
TARGET_NAME
docs
COMMENT
"HTML documentation"
)
File renamed without changes.
1 change: 1 addition & 0 deletions chapter-12/recipe-01/title.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Building documentation using Doxygen
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Reporting test coverage to the CDash dashboard
# Building documentation using Sphinx

Abstract to be written ...

Expand Down
35 changes: 35 additions & 0 deletions chapter-12/recipe-02/cxx-example/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)

project(recipe-02 LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

include(GNUInstallDirs)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR})

list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")

include(UseSphinxDoc)

add_subdirectory(src)

add_sphinx_doc(
SOURCE_DIR
${CMAKE_CURRENT_SOURCE_DIR}/docs
BUILD_DIR
${CMAKE_CURRENT_BINARY_DIR}/_build
CACHE_DIR
${CMAKE_CURRENT_BINARY_DIR}/_doctrees
HTML_DIR
${CMAKE_CURRENT_BINARY_DIR}/sphinx_html
CONF_FILE
${CMAKE_CURRENT_SOURCE_DIR}/docs/conf.py.in
TARGET_NAME
docs
COMMENT
"HTML documentation"
)
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
targets:
- test
- docs
1 change: 1 addition & 0 deletions chapter-12/recipe-02/title.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Building documentation using Sphinx
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
targets:
- test
- docs
File renamed without changes.
1 change: 1 addition & 0 deletions chapter-12/title.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Building Documentation
7 changes: 3 additions & 4 deletions chapter-13/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Chapter 13: Building Documentation
# Chapter 13: Alternative Generators and Cross-compilation

- [Building documentation using Doxygen](recipe-01/README.md)
- [Building documentation using Sphinx](recipe-02/README.md)
- [Combining Doxygen and Sphinx](recipe-03/README.md)
- [Hello world example](recipe-01/README.md)
- [Cross-compiling a Windows binary with OpenMP parallelization](recipe-02/README.md)
2 changes: 1 addition & 1 deletion chapter-13/recipe-01/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Building documentation using Doxygen
# Hello world example

Abstract to be written ...

Expand Down
28 changes: 15 additions & 13 deletions chapter-13/recipe-01/cxx-example/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# set minimum cmake version
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)

# project name and language
project(recipe-01 LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 11)
Expand All @@ -11,19 +13,19 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR})

list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
# define executable and its source file
add_executable(hello-world hello-world.cpp)

include(UseDoxygenDoc)

add_subdirectory(src)
# we will print the system name in the code
target_compile_definitions(
hello-world
PUBLIC
"-DCMAKE_SYSTEM_NAME=\"${CMAKE_SYSTEM_NAME}\""
)

add_doxygen_doc(
BUILD_DIR
${CMAKE_CURRENT_BINARY_DIR}/_build
DOXY_FILE
${CMAKE_CURRENT_SOURCE_DIR}/docs/Doxyfile.in
TARGET_NAME
docs
COMMENT
"HTML documentation"
install(
TARGETS
hello-world
DESTINATION
${CMAKE_INSTALL_BINDIR}
)
13 changes: 12 additions & 1 deletion chapter-13/recipe-01/cxx-example/menu.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
targets:
- docs
- install

# we only test cross-compilation on linux
travis-osx:
failing_generators:
- 'Unix Makefiles'
- 'Ninja'

travis-linux:
definitions:
- CMAKE_TOOLCHAIN_FILE: $TRAVIS_BUILD_DIR/chapter-14/toolchain-travis-linux.cmake
- CMAKE_INSTALL_PREFIX: $TRAVIS_BUILD_DIR/../install
2 changes: 1 addition & 1 deletion chapter-13/recipe-01/title.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Building documentation using Doxygen
Hello world example
3 changes: 2 additions & 1 deletion chapter-13/recipe-02/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Building documentation using Sphinx
# Cross-compiling a Windows binary with OpenMP parallelization

Abstract to be written ...

- [cxx-example](cxx-example/)
- [fortran-example](fortran-example/)
35 changes: 15 additions & 20 deletions chapter-13/recipe-02/cxx-example/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
# set minimum cmake version
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)

# project name and language
project(recipe-02 LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 11)
Expand All @@ -11,25 +13,18 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR})

list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
find_package(OpenMP REQUIRED)

include(UseSphinxDoc)

add_subdirectory(src)
add_executable(example example.cpp)
target_link_libraries(
example
PUBLIC
OpenMP::OpenMP_CXX
)

add_sphinx_doc(
SOURCE_DIR
${CMAKE_CURRENT_SOURCE_DIR}/docs
BUILD_DIR
${CMAKE_CURRENT_BINARY_DIR}/_build
CACHE_DIR
${CMAKE_CURRENT_BINARY_DIR}/_doctrees
HTML_DIR
${CMAKE_CURRENT_BINARY_DIR}/sphinx_html
CONF_FILE
${CMAKE_CURRENT_SOURCE_DIR}/docs/conf.py.in
TARGET_NAME
docs
COMMENT
"HTML documentation"
install(
TARGETS
example
DESTINATION
${CMAKE_INSTALL_BINDIR}
)
13 changes: 12 additions & 1 deletion chapter-13/recipe-02/cxx-example/menu.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
targets:
- docs
- install

# we only test cross-compilation on linux
travis-osx:
failing_generators:
- 'Unix Makefiles'
- 'Ninja'

travis-linux:
definitions:
- CMAKE_TOOLCHAIN_FILE: $TRAVIS_BUILD_DIR/chapter-14/toolchain-travis-linux.cmake
- CMAKE_INSTALL_PREFIX: $TRAVIS_BUILD_DIR/../install
2 changes: 1 addition & 1 deletion chapter-13/recipe-02/title.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Building documentation using Sphinx
Cross-compiling a Windows binary with OpenMP parallelization
2 changes: 1 addition & 1 deletion chapter-13/title.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Building Documentation
Alternative Generators and Cross-compilation
File renamed without changes.
8 changes: 5 additions & 3 deletions chapter-14/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Chapter 14: Alternative Generators and Cross-compilation
# Chapter 14: Testing Dashboards

- [Hello world example](recipe-01/README.md)
- [Cross-compiling a Windows binary with OpenMP parallelization](recipe-02/README.md)
- [Deploying tests to the CDash dashboard](recipe-01/README.md)
- [Reporting test coverage to the CDash dashboard](recipe-02/README.md)
- [Using the AddressSanitizer and reporting memory defects to CDash](recipe-03/README.md)
- [Using the ThreadSanitizer and reporting data races to CDash](recipe-04/README.md)
2 changes: 1 addition & 1 deletion chapter-14/recipe-01/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Hello world example
# Deploying tests to the CDash dashboard

Abstract to be written ...

Expand Down
26 changes: 8 additions & 18 deletions chapter-14/recipe-01/cxx-example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,18 @@ cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
# project name and language
project(recipe-01 LANGUAGES CXX)

# require C++11
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

include(GNUInstallDirs)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR})
# process src/CMakeLists.txt
add_subdirectory(src)

# define executable and its source file
add_executable(hello-world hello-world.cpp)
enable_testing()

# we will print the system name in the code
target_compile_definitions(
hello-world
PUBLIC
"-DCMAKE_SYSTEM_NAME=\"${CMAKE_SYSTEM_NAME}\""
)
# allow to report to a cdash dashboard
include(CTest)

install(
TARGETS
hello-world
DESTINATION
${CMAKE_INSTALL_BINDIR}
)
# process tests/CMakeLists.txt
add_subdirectory(tests)
13 changes: 1 addition & 12 deletions chapter-14/recipe-01/cxx-example/menu.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,2 @@
targets:
- install

# we only test cross-compilation on linux
travis-osx:
failing_generators:
- 'Unix Makefiles'
- 'Ninja'

travis-linux:
definitions:
- CMAKE_TOOLCHAIN_FILE: $TRAVIS_BUILD_DIR/chapter-14/toolchain-travis-linux.cmake
- CMAKE_INSTALL_PREFIX: $TRAVIS_BUILD_DIR/../install
- test
2 changes: 1 addition & 1 deletion chapter-14/recipe-01/title.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Hello world example
Deploying tests to the CDash dashboard
3 changes: 1 addition & 2 deletions chapter-14/recipe-02/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Cross-compiling a Windows binary with OpenMP parallelization
# Reporting test coverage to the CDash dashboard

Abstract to be written ...

- [cxx-example](cxx-example/)
- [fortran-example](fortran-example/)
Loading

0 comments on commit 8ef328c

Please sign in to comment.