Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Starter for TriBITS Tutorial #192

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
\#*#
.#*
.*.swp
*.DS_Store
.gitignore

# TriBITSDoc repo
/TriBITSDoc/
Expand Down
6 changes: 3 additions & 3 deletions tribits/README.DIRECTORY_CONTENTS.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
TriBITS/tribits/ Directory Contents
+++++++++++++++++++++++++++++++++++

This directory contains the implementation for the varous parts of TriBITS
This directory contains the implementation for the various parts of TriBITS
that are used by TriBITS projects to implement TriBITS functionality. It also
contains basic documentation in the subdirectory doc/ that is very close to
the TriBITS implementation. Files and directories from here are what get
installed on the system or will be snapshotted into
``<projectDir>/cmake/tribits/``. Each TriBITS Project decides what parts of
TriBITS it wants to install or shapshot using the script
TriBITS it wants to install or snapshot using the script
``tribits/snapshot_tribits.py`` (which takes arguments for what dirs to
snapshot). This directory contains no tests at all. All of the tests for
TriBITS are in the ``test/`` directory in the parent TriBITS repository.
Expand Down Expand Up @@ -46,7 +46,7 @@ If you have a better way to manage multiple builds (e.g. Jenkins) then use
that instead.

**common_tpls/**: TPLs that are very common and are used by several different
TriBITS projects but are not built into the TriBITS system itslef. Having some
TriBITS projects but are not built into the TriBITS system itself. Having some
of these common TPLs in a central location enhances uniformity, reuse, and
makes it easier to pull TriBITS packages out of a repo and build them
independently.
Expand Down
8 changes: 4 additions & 4 deletions tribits/ci_support/clone_extra_repos.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@

<projectDir>/"""+g_extraRerposFileDefault+r"""

(other repo types can be selected usng --extra-repos-type).
(other repo types can be selected using --extra-repos-type).

The list of which repos to clone can be "white-list" selected with the option
--extra-repos (see options below for details). Extra repos can in addition be
Expand All @@ -94,7 +94,7 @@

If the git repo server is using gitolite, one can set
--gitolite-root=<gitolite-root> and that will result in git repos being
selected only if the selcted repos are listed in 'ssh <gitolite-root> info'.
selected only if the selected repos are listed in 'ssh <gitolite-root> info'.
This allows one to automatically exclude repos from being cloned that the user
has no permissions to clone. NOTE: See warning about the --gitolite-root option below!

Expand Down Expand Up @@ -154,7 +154,7 @@ def injectCmndLineOptionsInParser(clp, gitoliteRootDefault=""):
"--extra-repos-type", "extraReposType",
g_extraReposTypes , g_extraReposTypesDefaulIdx,
"Type of extra repositories <extra-repos-type> to select from " \
"<extra-repos-file>. When --extra-repos is set, then this arugment" \
"<extra-repos-file>. When --extra-repos is set, then this argument" \
" is ignored.",
clp )

Expand All @@ -164,7 +164,7 @@ def injectCmndLineOptionsInParser(clp, gitoliteRootDefault=""):
" If specified, then any git repos with the <gitolite-root> listed as their" \
" root will only be selected if they are listed with 'R' permissions returned" \
" from 'ssh <gitolite-root> info'. WARNING: Make sure that you have your" \
" gitoliote SSH registred correctly before using this option by typing" \
" gitoliote SSH registered correctly before using this option by typing" \
" the command 'ssh <gitlite-root> info' and make sure that it does *not*"
" ask for a password! (Default = '"+gitoliteRootDefault+"')" )

Expand Down
4 changes: 2 additions & 2 deletions tribits/core/package_arch/TribitsAddAdvancedTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ INCLUDE(PrintVar)
#
# If specified, the test command will be assumed to pass if it matches the
# given regular expression. Otherwise, it is assumed to fail. TIPS:
# Replace ';' with '[;]' or CMake will interpretet this as a array eleemnt
# Replace ';' with '[;]' or CMake will interpret this as an array elemnt
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

elemnt should be element

# boundary. To match '.', use '[.]'.
#
# ``PASS_REGULAR_EXPRESSION_ALL "<regex1>" "<regex2>" ... "<regexn>"``
Expand All @@ -413,7 +413,7 @@ INCLUDE(PrintVar)
# matches all of the provided regular expressions. Note that this is not
# a capability of raw ctest and represents an extension provided by
# TriBITS. NOTE: It is critical that you replace ';' with '[;]' or CMake
# will interpretet this as a array eleemnt boundary.
# will interpret this as an array elemnt boundary.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

elemnt should be element

#
# ``STANDARD_PASS_OUTPUT``
#
Expand Down
8 changes: 4 additions & 4 deletions tribits/core/package_arch/TribitsAddExecutable.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ INCLUDE(CMakeParseArguments)
#
# ``<exeRootName>``
#
# The root name of the exectuable (and CMake target) (see `Executable and
# The root name of the executable (and CMake target) (see `Executable and
# Target Name (TRIBITS_ADD_EXECUTABLE())`_). This must be the first
# argument.
#
Expand All @@ -114,7 +114,7 @@ INCLUDE(CMakeParseArguments)
# If passed in, the directory path relative to the package's base
# directory (with "/" replaced by "_") is added to the executable name
# (see `Executable and Target Name (TRIBITS_ADD_EXECUTABLE())`_). This
# provides a simple way to create unique test exectuable names inside of a
# provides a simple way to create unique test executable names inside of a
# given TriBITS package. Only test executables in the same directory
# would need to have unique ``<execRootName>`` passed in.
#
Expand Down Expand Up @@ -253,7 +253,7 @@ INCLUDE(CMakeParseArguments)
# set with the name of the executable target passed to
# ``ADD_EXECUTABLE(<exeTargetName> ... )``. Having this name allows the
# calling ``CMakeLists.txt`` file access and set additional target
# propeties (see `Additional Executable and Source File Properties
# properties (see `Additional Executable and Source File Properties
# (TRIBITS_ADD_EXECUTABLE())`_).
#
# .. _Executable and Target Name (TRIBITS_ADD_EXECUTABLE()):
Expand All @@ -278,7 +278,7 @@ INCLUDE(CMakeParseArguments)
# added to the actual executable file name if the option ``NOEXESUFFIX`` is
# *not* passed in but this suffix is never added to the target name.
# (However, note that on Windows platforms, the default ``*.exe`` extension is
# always added because windows will not run an exectuable in many contexts
# always added because windows will not run an executable in many contexts
# unless it has the ``*.exe`` extension.)
#
# The reason that a default prefix is prepended to the executable and target
Expand Down
14 changes: 7 additions & 7 deletions tribits/core/package_arch/TribitsAddTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ INCLUDE(TribitsAddTestHelpers)
# ``POSTFIX_AND_ARGS_<IDX>`` form instead. **WARNING:** Multiple
# arguments passed to a single test invocation must be quoted or multiple
# tests taking single arguments will be created instead! See `Adding
# Multiple Tests (TRIBITS_ADD_TEST())`_ for more details and exmaples.
# Multiple Tests (TRIBITS_ADD_TEST())`_ for more details and examples.
#
# ``POSTFIX_AND_ARGS_<IDX> <postfix> <arg0> <arg1> ...``
#
Expand All @@ -187,7 +187,7 @@ INCLUDE(TribitsAddTestHelpers)
# that one can give a meaningful name to each test case and one can
# specify multiple arguments without having to quote them and one can
# allow long argument lists to span multiple lines. See `Adding Multiple
# Tests (TRIBITS_ADD_TEST())`_ for more details and exmaples.
# Tests (TRIBITS_ADD_TEST())`_ for more details and examples.
#
# ``COMM [serial] [mpi]``
#
Expand Down Expand Up @@ -272,7 +272,7 @@ INCLUDE(TribitsAddTestHelpers)
# the environment``) for which the test is allowed to be added. If
# ``HOSTTYPE`` is specified and ``CMAKE_HOST_SYSTEM_NAME`` is not equal to
# one of the values of ``<hosttypei>``, then the test will **not** be
# added. Typical host system type names include ``Linux``, ``Darwain``,
# added. Typical host system type names include ``Linux``, ``Darwin``,
# ``Windows``, etc.
#
# ``XHOSTTYPE <hosttype0> <hosttype1> ...``
Expand Down Expand Up @@ -347,7 +347,7 @@ INCLUDE(TribitsAddTestHelpers)
# with the name(S) of the tests passed to ``ADD_TEST()``. If more than
# one test is added, then this will be a list of test names. Having this
# name allows the calling ``CMakeLists.txt`` file access and set
# additional test propeties (see `Setting additional test properties
# additional test properties (see `Setting additional test properties
# (TRIBITS_ADD_TEST())`_).
#
# In the end, this function just calls the built-in CMake commands
Expand Down Expand Up @@ -399,7 +399,7 @@ INCLUDE(TribitsAddTestHelpers)
# run in this case.
#
# NOTE: On native Windows platforms, the ``NOEXESUFFIX`` will still allow
# CTest to run exectuables that have the ``*.exe`` suffix.
# CTest to run executables that have the ``*.exe`` suffix.
#
# Whatever executable path is specified using this logic, if the executable is
# not found, then when ``ctest`` goes to run the test, it will mark it as
Expand Down Expand Up @@ -459,7 +459,7 @@ INCLUDE(TribitsAddTestHelpers)
#
# may be preferable since it will not add any postfix name to the test. To
# add more than one test case using ``ARGS``, one will use more than one
# quoted set of arugments such as with::
# quoted set of arguments such as with::
#
# ARGS "<arg0> <arg1>" "<arg2> <arg2>"
#
Expand All @@ -477,7 +477,7 @@ INCLUDE(TribitsAddTestHelpers)
# the individual tests can be given more understandable names.
#
# The other advantage of the ``POSTFIX_AND_ARGS_<IDX>`` form is that the
# arugments ``<arg0>``, ``<arg1>``, ... do not need to be quoted and can
# arguments ``<arg0>``, ``<arg1>``, ... do not need to be quoted and can
# therefore be extended over multiple lines like::
#
# POSTFIX_AND_ARGS_0 long_args --this-is-the-first-long-arg=very
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ ENDMACRO()
# directly setting the variables is that an SE package only needs to list
# dependencies that exist. Otherwise, the ``Dependencies.cmake`` file will
# need to set all of the above local variables, even those that are empty.
# This is a error checking property of the TriBITS system to avoid misspelling
# This is an error checking property of the TriBITS system to avoid misspelling
# the names of these variables.
#
MACRO(TRIBITS_PACKAGE_DEFINE_DEPENDENCIES)
Expand Down
4 changes: 2 additions & 2 deletions tribits/core/package_arch/TribitsGlobalMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ MACRO(TRIBITS_SETUP_INSTALLATION_PATHS)
ENDIF()

#
# C) Set the cache varibles for the install dirs
# C) Set the cache variables for the install dirs
#

ADVANCED_SET( ${PROJECT_NAME}_INSTALL_INCLUDE_DIR
Expand Down Expand Up @@ -2605,7 +2605,7 @@ ENDMACRO()
# CMake/CPack as a regex that is prefixed by the project's and package's
# source directory names so as to not exclude files and directories of the
# same name and path from other packages. If ``<filei>`` is an absolute path
# it it not prefixed but is appended to ``CPACK_SOURCE_IGNORE_FILES``
# it is not prefixed but is appended to ``CPACK_SOURCE_IGNORE_FILES``
# unmodified.
#
# In general, do **NOT** put in excludes for files and directories that are
Expand Down
4 changes: 2 additions & 2 deletions tribits/core/package_arch/TribitsLibraryMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ ENDFUNCTION()
#
# ``<libBaseName>``
#
# Required base name of the library. The name of the actual libray name
# Required base name of the library. The name of the actual library name
# will be prefixed by ``${${PROJECT_NAME}_LIBRARY_NAME_PREFIX}`` to
# produce::
#
Expand Down Expand Up @@ -355,7 +355,7 @@ ENDFUNCTION()
# If specified, then on output the variable ``<libTargetName>`` will be
# set with the name of the library passed to ``ADD_LIBRARY()``. Having
# this name allows the calling ``CMakeLists.txt`` file access and set
# additional target propeties (see `Additional Library and Source File
# additional target properties (see `Additional Library and Source File
# Properties (TRIBITS_ADD_LIBRARY())`_).
#
# .. _Include Directories (TRIBITS_ADD_LIBRARY()):
Expand Down
2 changes: 1 addition & 1 deletion tribits/core/package_arch/TribitsProcessEnabledTpl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ INCLUDE(AppendStringVar)
#
# @FUNCTION: TRIBITS_PROCESS_ENABLED_TPL()
#
# Processs an enabled TPL's FindTPL${TPL_NAME}.cmake module.
# Process an enabled TPL's FindTPL${TPL_NAME}.cmake module.
#
FUNCTION(TRIBITS_PROCESS_ENABLED_TPL TPL_NAME)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ INCLUDE(TribitsSortListAccordingToMasterList)
# in this repo come before the project's native packages. If the keyword
# ``POST`` is provided then the packages are listed after the project's
# native packages. The default is assumed to be ``POST`` if neither of
# these keywords are provided. The keywords must be separated by a comm
# these keywords are provided. The keywords must be separated by a comma
# with no spaces such as with "``PRE,HASPACKAGES``",
# "``HASPACKAGES,POST``", "``POST,NOPACKAGES``", etc. If no keywords are
# provided, then the empty string "" must be used (which defaults to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ INCLUDE(TribitsListHelpers)
# TriBITS repo that might be combined into a single TriBITS project
# meta-build (see `Globally unique TriBITS package names`_). The name
# should be a valid identifier (e.g. matches the regex
# ``[a-zA-Z_][a-zA-Z0-9_]*``). The package names tend to used mixed case
# ``[a-zA-Z_][a-zA-Z0-9_]*``). The package names tend to use mixed case
# (e.g. ```SomePackge`` not ``SOMEPACKGE``).
#
# 1. **DIR** (``<pkgi_dir>``): The relative directory for the package
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ ENDFUNCTION()
#
# Function that sets up cache variables for users to specify where to find a
# `TriBITS TPL`_'s headers and libraries. This function is typically called
# inside of a ``FindTPL<tplName>.cmake`` moulde file (see
# inside of a ``FindTPL<tplName>.cmake`` module file (see
# `${TPL_NAME}_FINDMOD`_).
#
# Usage::
Expand Down Expand Up @@ -692,7 +692,7 @@ ENDFUNCTION()
# TRIBITS_TPL_TENTATIVELY_ENABLE(<tplName>)
#
# This function can be called from any CMakeLists.txt file to put a TPL in
# tentative enable mode. But typically, it is called from an SE Pakcage's
# tentative enable mode. But typically, it is called from an SE Package's
# `<packageDir>/cmake/Dependencies.cmake`_ file (see `How to tentatively
# enable a TPL`_).
#
Expand All @@ -704,7 +704,7 @@ ENDFUNCTION()
# not already been set, and sets ``TPL_TENTATIVE_ENABLE_<tplName>=ON`` in the
# cache.
#
# NOTE: This function will only tentatively enable a TPL it its enable has not
# NOTE: This function will only tentatively enable a TPL if its enable has not
# be explicitly set on input, i.e. if ``-D TPL_ENABLE_<tplName>=""``. If the
# TPL has been explicitly enabled (i.e. ``-D TPL_ENABLE_<tplName>=ON``) or
# disabled (i.e. ``-D TPL_ENABLE_<tplName>=OFF``), then this function has no
Expand Down
6 changes: 3 additions & 3 deletions tribits/core/package_arch/TribitsWriteClientExportFiles.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ ENDFUNCTION()
# Usage::
#
# TRIBITS_WRITE_FLEXIBLE_PACKAGE_CLIENT_EXPORT_FILES(
# PACKAGE_NAME <pakageName>
# PACKAGE_NAME <packageName>
# [EXPORT_FILE_VAR_PREFIX <exportFileVarPrefix>]
# [WRITE_CMAKE_CONFIG_FILE <cmakeConfigFileFullPath>]
# [WRITE_EXPORT_MAKEFILE <exportMakefileFileFullPath>]
Expand All @@ -134,7 +134,7 @@ ENDFUNCTION()
#
# The arguments are:
#
# ``PACKAGE_NAME <pakageName>``
# ``PACKAGE_NAME <packageName>``
#
# Gives the name of the TriBITS package for which the export files should
# be created.
Expand All @@ -143,7 +143,7 @@ ENDFUNCTION()
#
# If specified, then all of the variables in the generated export files
# will be prefixed with ``<exportFileVarPrefix>_`` instead of
# ``<pakageName>_``.
# ``<packageName>_``.
#
# ``WRITE_CMAKE_CONFIG_FILE <cmakeConfigFileFullPath>``
#
Expand Down
2 changes: 1 addition & 1 deletion tribits/core/utils/MessageWrapper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ INCLUDE(GlobalSet)
# function. However, when the variable ``MESSAGE_WRAPPER_UNIT_TEST_MODE`` is
# set to ``TRUE``, then this function will not call ``MESSAGE(...)`` but
# instead will prepend set to the global variable ``MESSAGE_WRAPPER_INPUT``
# the input argument that would have gon to ``MESSAGE()``. To capture just
# the input argument that would have gone to ``MESSAGE()``. To capture just
# this call's input, first call::
#
# GLOBAL_NULL_SET(MESSAGE_WRAPPER_INPUT)
Expand Down
2 changes: 1 addition & 1 deletion tribits/core/utils/ParseVariableArguments.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ ENDMACRO()
# NOTE: If the above function turns out to be a performance bottle neck, there
# are a few things that could be done to improve performance. One thing you
# could do is repalce the O(len(arg_names)) and O(len(option_names)) lookups
# with O(1) lookups by creating CMake varibles of the name
# with O(1) lookups by creating CMake variables of the name
# ${OUTER_FUNC_NAME}_arg_<argNamei> and then just look of that varible exists
# or not. That should use a hash function. That might actually slow things
# down for short lists however so we would have to measure, measure,
Expand Down
2 changes: 1 addition & 1 deletion tribits/core/utils/PrependSet.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#
# @MACRO: PREPEND_SET()
#
# Utility macro to prepend elements to a varible (reduces boiler-plate code).
# Utility macro to prepend elements to a variable (reduces boiler-plate code).
#
# Usage::
#
Expand Down
8 changes: 4 additions & 4 deletions tribits/core/utils/PrintNonemptyVar.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ INCLUDE(PrintVar)
#
# Calls ``PRINT_VAR(<varName>)`` if ``${<varName>}`` is not empty.
#
FUNCTION(PRINT_NONEMPTY_VAR VARIBLE_NAME)
ASSERT_DEFINED(VARIBLE_NAME)
IF (NOT "${${VARIBLE_NAME}}" STREQUAL "")
PRINT_VAR(${VARIBLE_NAME})
FUNCTION(PRINT_NONEMPTY_VAR VARIABLE_NAME)
ASSERT_DEFINED(VARIABLE_NAME)
IF (NOT "${${VARIABLE_NAME}}" STREQUAL "")
PRINT_VAR(${VARIABLE_NAME})
ENDIF()
ENDFUNCTION()
10 changes: 5 additions & 5 deletions tribits/doc/build_ref/TribitsBuildReferenceBody.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1674,7 +1674,7 @@ most projects is 1500 seconds (see the default value set in the CMake cache).
This value gets scaled by `<Project>_SCALE_TEST_TIMEOUT`_ and then set as the
field ``TimeOut`` in the CMake-generated file ``DartConfiguration.tcl``. The
value ``TimeOut`` from this file is what is directly read by the ``ctest``
exectuable. Timeouts for tests are important. For example, when an MPI
executable. Timeouts for tests are important. For example, when an MPI
program has a defect, it can easily hang (forever) until it is manually
killed. If killed by a timeout, CTest will kill the test process and all of
its child processes correctly.
Expand Down Expand Up @@ -2420,7 +2420,7 @@ absolute paths, use the data type ``PATH`` as shown above.
Setting install RPATH
---------------------

Setting RPATH for installed shared libraries and exectuables
Setting RPATH for installed shared libraries and executables
(i.e. ``BUILD_SHARED_LIBS=ON``) can be a little tricky. Some discussion of
how raw CMake handles RPATH and installations can be found at:

Expand All @@ -2442,7 +2442,7 @@ same as the raw CMake default behavior):
``CMAKE_INSTALL_RPATH_USE_LINK_PATH`` which is set to ``TRUE`` by default
for most TriBITS projects but is empty "" for raw CMake.)

The above default behavior allows the installed exectuables and libraries to
The above default behavior allows the installed executables and libraries to
be run without needing to set ``LD_LIBRARY_PATH`` or any other system
environment variables. However, this setting does not allow the installed
libraries and executables to be easily moved or relocated. There are several
Expand Down Expand Up @@ -2499,7 +2499,7 @@ These scenarios in detail are:
-D<Project>_SET_INSTALL_RPATH=TRUE \
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE \

As described above, this allows libraries and exectuables to be used right
As described above, this allows libraries and executables to be used right
away once installed without needing to set any environment variables.

Note that this also allows the installed libraries and executables to be
Expand Down Expand Up @@ -2558,7 +2558,7 @@ These scenarios in detail are:
may help to avoid confusion.)

Once the install directories are moved to the final location, the
exectuables can be run without any need to set environment variables.
executables can be run without any need to set environment variables.

Note that TriBITS also accepts the directory separator "``:``" for::

Expand Down
Loading