Commit 42147d35 authored by Kenneth Leiter's avatar Kenneth Leiter

COMP: Move XdmfFunctions.cmake to CMake directory.

Make some minor formatting fixes.
parent 03fb2f8f
# Version Suite
# Author: Brian Panneton
# Descrition: This small suite allows you to add support
# for versioning in your projects
# Descrition: This small suite allows you to add support
# for versioning in your projects
# This allows you to turn on and off the auto
# update of the (project name)Version.hpp file
......@@ -24,7 +24,7 @@ ENDMACRO(VersionCreate versionName versionMajor export_name)
# This Macro allows you to set the rewrite number
MACRO(VersionMajorSet versionMajor)
SET(vMajor ${versionMajor})
SET(vMajor ${versionMajor})
ENDMACRO(VersionMajorSet)
# This Macro calculates the number of tags from your git repo
......@@ -59,11 +59,11 @@ ${includes}
extern ${export_name} ProjectVersion ${vProjectName}Version;\n"
)
FILE(WRITE ${CMAKE_BINARY_DIR}/${vProjectName}Version.cpp
FILE(WRITE ${CMAKE_BINARY_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 vProjectName export_name)
function(xdmf_create_config_file name)
get_cmake_property(ALL_VARS VARIABLES)
set(XDMF_VARS "")
foreach(var ${ALL_VARS})
if ("${${var}}" MATCHES ".+")
string(REGEX REPLACE "\\\\" "\\\\\\\\" ${var} "${${var}}")
if (var MATCHES "^(XDMF).*$")
set(XDMF_VARS "${XDMF_VARS}\nset(${var}\t\t${${var}})")
else()
set(XDMF_VARS "${XDMF_VARS}\nset(XDMF_${var}\t\t${${var}})")
endif()
endif()
endforeach()
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/${name}Config.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/${name}Config.cmake @ONLY)
endfunction()
......@@ -10,7 +10,7 @@ set(CMAKE_MODULE_PATH
${CMAKE_SOURCE_DIR}/CMake/TestingSuite
${CMAKE_SOURCE_DIR}/CMake/VersionSuite)
include("${CMAKE_CURRENT_SOURCE_DIR}/XdmfFunctions.cmake")
include(XdmfFunctions)
# RPath
set(CMAKE_SKIP_BUILD_RPATH FALSE)
......
function(xdmf_create_config_file name)
get_cmake_property(ALL_VARS VARIABLES)
set(XDMF_VARS "")
foreach(var ${ALL_VARS})
if ("${${var}}" MATCHES ".+")
string(REGEX REPLACE "\\\\" "\\\\\\\\" ${var} "${${var}}")
if (var MATCHES "^(XDMF).*$")
set(XDMF_VARS "${XDMF_VARS}\nset(${var}\t\t${${var}})")
else()
set(XDMF_VARS "${XDMF_VARS}\nset(XDMF_${var}\t\t${${var}})")
endif()
endif()
endforeach()
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/${name}Config.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/${name}Config.cmake @ONLY)
endfunction()
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