Commit 913d4650 authored by Brian Panneton's avatar Brian Panneton
Browse files

FIX: Corrected possible future XdmfVersion header collision problem.

parent 413c4279
......@@ -38,14 +38,22 @@ MACRO(VersionCalculate)
SET(vMinor ${count})
ENDMACRO(VersionCalculate)
# This Macro writes your hpp file
# This Macro writes your hpp/cpp files
MACRO(VersionWrite vProjectName)
FILE(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/${vProjectName}Version.hpp
"\#ifndef ${vProjectName}_VERSION_HPP
\#define ${vProjectName}_VERSION_HPP
/* Current Version of ${vProjectName} */
FILE(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/${vProjectName}Version.hpp
"/* Current Version of ${vProjectName}
* Major is: ${vMajor}
* Minor is: ${vMinor}
*/
\#include \"ProjectVersion.hpp\"
ProjectVersion ${vProjectName}Version = ProjectVersion(\"${vProjectName}\", ${vMajor}, ${vMinor});
\#endif\n"
extern ProjectVersion ${vProjectName}Version;\n"
)
FILE(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/${vProjectName}Version.cpp
"/* Current Version of ${vProjectName}
* Make sure to include this file in your built sources
*/
\#include \"${vProjectName}Version.hpp\"
ProjectVersion ${vProjectName}Version = ProjectVersion(\"${vProjectName}\", ${vMajor}, ${vMinor});\n"
)
ENDMACRO(VersionWrite)
......@@ -58,6 +58,7 @@ set(XdmfCoreSources
XdmfItem
XdmfItemProperty
XdmfSystemUtils
XdmfVersion
XdmfVisitor
XdmfWriter
)
......
/* Current Version of Xdmf
* Make sure to include this file in your built sources
*/
#include "XdmfVersion.hpp"
ProjectVersion XdmfVersion = ProjectVersion("Xdmf", 2, 0);
#ifndef Xdmf_VERSION_HPP
#define Xdmf_VERSION_HPP
/* Current Version of Xdmf */
/* Current Version of Xdmf
* Major is: 2
* Minor is: 0
*/
#include "ProjectVersion.hpp"
ProjectVersion XdmfVersion = ProjectVersion("Xdmf", 2, 0);
#endif
extern ProjectVersion XdmfVersion;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment