Skip to content

Commit

Permalink
Doxyfile version aligned with git tag
Browse files Browse the repository at this point in the history
  • Loading branch information
LuisPalacios committed Feb 23, 2024
1 parent f85efad commit edaa2b3
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 196 deletions.
16 changes: 0 additions & 16 deletions cmake/GitVersion.cmake

This file was deleted.

17 changes: 12 additions & 5 deletions configured/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
configure_file(
"config.hpp.in" "${CMAKE_BINARY_DIR}/configured_files/include/config.hpp"
"config.hpp.in"
"${CMAKE_BINARY_DIR}/configured_files/include/config.hpp"
ESCAPE_QUOTES)

SET(GITVERSION_FULL "v0.0.0-0-00000000")
SET(GITVERSION_TAG "v0.0.0")
SET(GITVERSION_COMMIT "00000000")

IF(EXISTS ${CMAKE_SOURCE_DIR}/.git)
FIND_PACKAGE(Git)
IF(GIT_FOUND)
Expand All @@ -27,14 +32,16 @@ IF(EXISTS ${CMAKE_SOURCE_DIR}/.git)
OUTPUT_STRIP_TRAILING_WHITESPACE)

MESSAGE( STATUS "Git version: ${GITVERSION_FULL}" )
ELSE(GIT_FOUND)
SET(GITVERSION_FULL "v0.0.0-0-00000000")
SET(GITVERSION_TAG "v0.0.0")
SET(GITVERSION_COMMIT "00000000")
ENDIF(GIT_FOUND)
ENDIF(EXISTS ${CMAKE_SOURCE_DIR}/.git)

CONFIGURE_FILE(
"gitversion.hpp.in"
"${CMAKE_BINARY_DIR}/configured_files/include/gitversion.hpp"
ESCAPE_QUOTES)

MESSAGE( STATUS "Git TAG: ${GITVERSION_TAG} para el Doxyfile !!!!!!!!" )
configure_file(
"Doxyfile.in"
"${CMAKE_SOURCE_DIR}/docs/Doxyfile"
ESCAPE_QUOTES)
44 changes: 44 additions & 0 deletions configured/Doxyfile.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Configuración para Doxygen para usarse con CMake
#
# Echarle un ojo a esto: https://github.com/biojppm/cmake/blob/master/ConfigurationTypes.cmake
#---------------------------------------------------------------------------
# Opciones relacionadas con el proyecto
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "Librería Parchis C++"
PROJECT_NUMBER = "@GITVERSION_TAG@"
PROJECT_BRIEF =
PROJECT_LOGO =
OUTPUT_DIRECTORY = ./
OUTPUT_LANGUAGE = English
MARKDOWN_SUPPORT = YES

#---------------------------------------------------------------------------
# Opciones de configuración relacionadas
#---------------------------------------------------------------------------
EXTRACT_ALL = YES
RECURSIVE = YES
GENERATE_HTML = YES
GENERATE_LATEX = NO

HAVE_DOT = YES
EXTRACT_PRIVATE = YES
EXTRACT_STATIC = YES
CALL_GRAPH = YES
CALLER_GRAPH = YES
#DISABLE_INDEX = YES
#GENERATE_TREEVIEW = YES

#---------------------------------------------------------------------------
# Opciones de configuraicón relacionadas con los fuentes
#---------------------------------------------------------------------------
INPUT = ../src \
../include
INPUT_ENCODING = UTF-8
FILE_PATTERNS = *.c \
*.cc \
*.cpp \
*.h \
*.hpp \
*.md \
*.txt
4 changes: 3 additions & 1 deletion docs/Doxyfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Configuración para Doxygen para usarse con CMake
#
# Echarle un ojo a esto: https://github.com/biojppm/cmake/blob/master/ConfigurationTypes.cmake
#---------------------------------------------------------------------------
# Opciones relacionadas con el proyecto
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "Librería Parchis C++"
PROJECT_NUMBER = 1.5.0
PROJECT_NUMBER = "v1.0.0"
PROJECT_BRIEF =
PROJECT_LOGO =
OUTPUT_DIRECTORY = ./
Expand Down
1 change: 0 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Fichero `cmake` que incluye subdirectorios de mis fuentes.
#
#add_subdirectory(my_lib)
add_subdirectory(libparchis)
115 changes: 0 additions & 115 deletions src/libparchis/PVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,123 +128,8 @@
* g3ad9785
*
*
*
*
*
$ cat > _libcpp_git.sh
git=/usr/bin/git
version=`$git describe --tags --long`
echo '#include "PVersion.h"' > ../PVersion.cpp
echo "" >> ../PVersion.cpp
echo "" >> ../PVersion.cpp
echo "PVersion::PVersion () " >> ../PVersion.cpp
echo "{" >> ../PVersion.cpp
echo -n ' version = "' >> ../PVersion.cpp
echo -n ${version} >> ../PVersion.cpp
echo '";' >> ../PVersion.cpp
echo "}" >> ../PVersion.cpp
echo "" >> ../PVersion.cpp
echo "PVersion::~PVersion () " >> ../PVersion.cpp
echo "{" >> ../PVersion.cpp
echo "}" >> ../PVersion.cpp
echo "" >> ../PVersion.cpp
echo "const char* PVersion::getVersion ()" >> ../PVersion.cpp
echo "{" >> ../PVersion.cpp
echo " return version;" >> ../PVersion.cpp
echo "}" >> ../PVersion.cpp
$ chmod 755 _libcpp_git.sh
* 2) Invoque it as the first built step in QTCreator
Projects, build steps, add a step and move it to the first position
Enable : Yes
Name : Create Version.cpp
Command : Complete_path_to_the_script/_libcpp_svnversion.sh or
Complete_path_to_the_script/_libcpp_git.sh or
Work Dir : %{sourceDir}
* @endcode
*
*
* @par Under XCode
* Project->Target->Add Target->Aggregate->Run Script
* @code
git=/usr/bin/git
version=`$git describe --tags --long`
echo "/ ** " > ../PVersion.cpp
echo ' * @class PVersion PVersion.cpp \"PVersion.cpp\" ' >> ../PVersion.cpp
echo " * @file PVersion.cpp " >> ../PVersion.cpp
echo " * @brief Parchis Class: Simply used to return the subversion number " >> ../PVersion.cpp
echo " * " >> ../PVersion.cpp
echo " * ---------------------------------------------------------------------------" >> ../PVersion.cpp
echo " * / " >> ../PVersion.cpp
echo " " >> ../PVersion.cpp
echo " " >> ../PVersion.cpp
echo "//--------------------------------------------------------------------------- " >> ../PVersion.cpp
echo " " >> ../PVersion.cpp
echo '#include "PVersion.h" ' >> ../PVersion.cpp
echo " " >> ../PVersion.cpp
echo "//--------------------------------------------------------------------------- " >> ../PVersion.cpp
echo " " >> ../PVersion.cpp
echo "//--------------------------------------------------------------------------- " >> ../PVersion.cpp
echo " " >> ../PVersion.cpp
echo " " >> ../PVersion.cpp
echo "#pragma mark - " >> ../PVersion.cpp
echo "#pragma mark Public Methods " >> ../PVersion.cpp
echo " " >> ../PVersion.cpp
echo "//--------------------------------------------------------------------------- " >> ../PVersion.cpp
echo " " >> ../PVersion.cpp
echo "/ ** " >> ../PVersion.cpp
echo " * Constructor of PVersion " >> ../PVersion.cpp
echo " * " >> ../PVersion.cpp
echo " * / " >> ../PVersion.cpp
echo "PVersion::PVersion () " >> ../PVersion.cpp
echo "{ " >> ../PVersion.cpp
echo -n ' version = "' >> ../PVersion.cpp
echo -n ${version} >> ../PVersion.cpp
echo '";' >> ../PVersion.cpp
echo "} " >> ../PVersion.cpp
echo " " >> ../PVersion.cpp
echo "//--------------------------------------------------------------------------- " >> ../PVersion.cpp
echo " " >> ../PVersion.cpp
echo "/ ** " >> ../PVersion.cpp
echo " * Destructor of PVersion " >> ../PVersion.cpp
echo " * " >> ../PVersion.cpp
echo " * / " >> ../PVersion.cpp
echo "PVersion::~PVersion () " >> ../PVersion.cpp
echo "{ " >> ../PVersion.cpp
echo "} " >> ../PVersion.cpp
echo " " >> ../PVersion.cpp
echo "//--------------------------------------------------------------------------- " >> ../PVersion.cpp
echo " " >> ../PVersion.cpp
echo "/ ** " >> ../PVersion.cpp
echo " * Getter: Return the version of Parchis Engine " >> ../PVersion.cpp
echo " * " >> ../PVersion.cpp
echo " * @return the version of parchis engine " >> ../PVersion.cpp
echo " * / " >> ../PVersion.cpp
echo "const char* PVersion::getVersion () " >> ../PVersion.cpp
echo "{ " >> ../PVersion.cpp
echo " return version; " >> ../PVersion.cpp
echo "} " >> ../PVersion.cpp
echo " " >> ../PVersion.cpp
echo "//--------------------------------------------------------------------------- " >> ../PVersion.cpp
echo " " >> ../PVersion.cpp
echo "//--------------------------------------------------------------------------- " >> ../PVersion.cpp
echo " " >> ../PVersion.cpp
* @endcode
*/


#ifndef PVERSION_H
#define PVERSION_H

Expand Down
58 changes: 0 additions & 58 deletions src/my_lib/CMakeLists.txt

This file was deleted.

0 comments on commit edaa2b3

Please sign in to comment.