Skip to content

Commit

Permalink
Modify configuration headers
Browse files Browse the repository at this point in the history
* CMakeLists.txt: Set unspecified project version components to 0 so that
  corresponding version macros in generated configuration headers are
  defined appropriately.
* cmake/CheckCXXConcepts.cmake: Added additional documentation.
* origin.graph/config.hpp.in: Modified date in Doxygen documentation comment
  and added version number.
* origin.math/config.hpp.in: Likewise.
* origin/algorithm/config.hpp.in: Likewise.
* origin/core/config.hpp.in: Likewise. Also modified #define directive so
  that ORIGIN_HAVE_STD_TO_STRING is 1 when defined.
* origin/core/type.hpp: Modified #if conditional to test
  !ORIGIN_HAVE_STD_TO_STRING.
* origin/data/CMakeLists.txt: Renamed a CMake variable.
* origin/data/config.hpp.in: Modified date in Doxygen documentation comment
  and added version number.
* origin/iterator/config.hpp.in: Likewise.
* origin/memory/config.hpp.in: Likewise.
* origin/numeric/config.hpp.in: Likewise.
* origin/range/config.hpp.in: Likewise.
  • Loading branch information
Jenny-fa committed Nov 28, 2015
1 parent bf0c99c commit 8fa593c
Show file tree
Hide file tree
Showing 13 changed files with 32 additions and 12 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ set(ORIGIN_PACKAGE_STRING "${ORIGIN_PACKAGE_NAME} ${ORIGIN_PACKAGE_VERSION}")
set(ORIGIN_PACKAGE_BUGREPORT "https://github.com/asutton/origin/issues")
set(ORIGIN_PACKAGE_URL "https://github.com/asutton/origin")
set(ORIGIN_VERSION ${PROJECT_VERSION})

foreach(component MAJOR MINOR PATCH TWEAK)
if(PROJECT_VERSION_${component} STREQUAL "")
set(PROJECT_VERSION_${component} 0)
endif()
endforeach()

set(ORIGIN_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
set(ORIGIN_VERSION_MINOR ${PROJECT_VERSION_MINOR})
set(ORIGIN_VERSION_PATCH ${PROJECT_VERSION_PATCH})
Expand Down
4 changes: 4 additions & 0 deletions cmake/CheckCXXConcepts.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
# ``CMAKE_REQUIRED_QUIET``
# Execute quietly without messages.
#
# .. note::
# As of 2015, the only known compiler that supports this language feature
# is `GCC 6.0 <https://gcc.gnu.org>`_.
#
# Requires CMake 2.8 or later.

include(CheckCXXSourceCompiles)
Expand Down
3 changes: 2 additions & 1 deletion origin.graph/config.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
* @file origin.graph/config.hpp
* The configuration header for the Origin.Graph library.
*
* @date 9/10/2015
* @date 2015
* @version @ORIGIN_VERSION@
*/

/* config.hpp. Generated from config.hpp.in by cmake. */
Expand Down
3 changes: 2 additions & 1 deletion origin.math/config.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
* @file origin.math/config.hpp
* The configuration header for the Origin.Math library.
*
* @date 9/10/2015
* @date 2015
* @version @ORIGIN_VERSION@
*/

/* config.hpp. Generated from config.hpp.in by cmake. */
Expand Down
3 changes: 2 additions & 1 deletion origin/algorithm/config.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
* @file origin/algorithm/config.hpp
* The configuration header for the Origin.Algorithm library.
*
* @date 9/10/2015
* @date 2015
* @version @ORIGIN_VERSION@
*/

/* config.hpp. Generated from config.hpp.in by cmake. */
Expand Down
5 changes: 3 additions & 2 deletions origin/core/config.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
* @file origin/core/config.hpp
* The configuration header for the Origin.Core library.
*
* @date 9/10/2015
* @date 2015
* @version @ORIGIN_VERSION@
*/

/* config.hpp. Generated from config.hpp.in by cmake. */
Expand Down Expand Up @@ -47,7 +48,7 @@
#define ORIGIN_VERSION_TWEAK @ORIGIN_VERSION_TWEAK@

/* Define to 1 if you have the std::to_string() function. */
#cmakedefine ORIGIN_HAVE_STD_TO_STRING
#cmakedefine ORIGIN_HAVE_STD_TO_STRING 1

#include <origin/core/export.hpp>

Expand Down
2 changes: 1 addition & 1 deletion origin/core/type.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// TODO: Remove when libstdc++ on Cygwin defines numeric
// conversion functions. We need to include C libray
// headers because these functions don't exist in std.
#if !defined(ORIGIN_HAVE_STD_TO_STRING)
#if !ORIGIN_HAVE_STD_TO_STRING
# include <stdio.h>
#endif

Expand Down
2 changes: 1 addition & 1 deletion origin/data/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include(GenerateExportHeader)
# Set variables.

# Add options.
# option(ORIGIN_DATA_SSO "Enable the short/small string optimization." ON)
# option(ORIGIN_USE_SSO "Enable the short/small string optimization." ON)

# Run platform checks.

Expand Down
3 changes: 2 additions & 1 deletion origin/data/config.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
* @file origin/data/config.hpp
* The configuration header for the Origin.Data library.
*
* @date 9/10/2015
* @date 2015
* @version @ORIGIN_VERSION@
*/

/* config.hpp. Generated from config.hpp.in by cmake. */
Expand Down
3 changes: 2 additions & 1 deletion origin/iterator/config.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
* @file origin/iterator/config.hpp
* The configuration header for the Origin.Iterator library.
*
* @date 9/10/2015
* @date 2015
* @version @ORIGIN_VERSION@
*/

/* config.hpp. Generated from config.hpp.in by cmake. */
Expand Down
3 changes: 2 additions & 1 deletion origin/memory/config.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
* @file origin/memory/config.hpp
* The configuration header for the Origin.Memory library.
*
* @date 9/10/2015
* @date 2015
* @version @ORIGIN_VERSION@
*/

/* config.hpp. Generated from config.hpp.in by cmake. */
Expand Down
3 changes: 2 additions & 1 deletion origin/numeric/config.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
* @file origin/numeric/config.hpp
* The configuration header for the Origin.Numeric library.
*
* @date 9/10/2015
* @date 2015
* @version @ORIGIN_VERSION@
*/

/* config.hpp. Generated from config.hpp.in by cmake. */
Expand Down
3 changes: 2 additions & 1 deletion origin/range/config.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
* @file origin/range/config.hpp
* The configuration header for the Origin.Range library.
*
* @date 9/10/2015
* @date 2015
* @version @ORIGIN_VERSION@
*/

/* config.hpp. Generated from config.hpp.in by cmake. */
Expand Down

0 comments on commit 8fa593c

Please sign in to comment.