Commit fd942bf6 authored by Chris Cantwell's avatar Chris Cantwell
Browse files

Condense IDs in FLD files.

Removed Git SHA1 and Branch from compile definitions on files except FieldIO.cpp
parent 45770bed
......@@ -31,7 +31,9 @@ IF( NOT NEKTAR_PASSED_FIRST_CONFIGURE )
SET(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/dist CACHE PATH "" FORCE)
ENDIF()
# Attempt to retrieve git branch and SHA1 hash
INCLUDE(GetGitRevisionDescription)
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
SET(LIB_DIR "lib")
IF( CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" )
......
......@@ -115,18 +115,10 @@ MACRO(SET_COMMON_PROPERTIES name)
ENDIF()
ENDIF( NOT MSVC)
# Attempt to retrieve git branch and SHA1 hash
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
# Define version
SET_PROPERTY(TARGET ${name}
APPEND PROPERTY COMPILE_DEFINITIONS NEKTAR_VERSION=\"${NEKTAR_VERSION}\")
# Define the git branch and SHA1 hash if we are in a git repository
IF (NOT ${GIT_REFSPEC} STREQUAL "GITDIR-NOTFOUND")
SET_PROPERTY(TARGET ${name}
APPEND PROPERTY COMPILE_DEFINITIONS GIT_SHA1=\"${GIT_SHA1}\" GIT_BRANCH=\"${GIT_REFSPEC}\")
ENDIF ()
APPEND PROPERTY COMPILE_DEFINITIONS
NEKTAR_VERSION=\"${NEKTAR_VERSION}\")
SET(CMAKE_CXX_FLAGS_RELEASE
"${CMAKE_CXX_FLAGS_RELEASE} -DNEKTAR_RELEASE")
......
......@@ -317,15 +317,7 @@ namespace Nektar
{
std::stringstream idStringStream;
bool first = true;
for (std::vector<unsigned int>::size_type i = 0;
i < fielddefs[f]->m_elementIDs.size(); i++)
{
if (!first)
idStringStream << ",";
idStringStream << fielddefs[f]->m_elementIDs[i];
first = false;
}
idString = idStringStream.str();
GenerateSeqString(fielddefs[f]->m_elementIDs,idString);
}
elemTag->SetAttribute("ID", idString);
......
......@@ -328,6 +328,13 @@ SET(LibUtilitySources
${MemorySources}
)
# Define the git branch and SHA1 hash if we are in a git repository
# Only apply to FieldIO.cpp to minimise rebuilding on git commit/update.
IF (NOT ${GIT_REFSPEC} STREQUAL "GITDIR-NOTFOUND")
SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/BasicUtils/FieldIO.cpp
APPEND PROPERTY COMPILE_DEFINITIONS
GIT_SHA1=\"${GIT_SHA1}\" GIT_BRANCH=\"${GIT_REFSPEC}\")
ENDIF ()
ADD_DEFINITIONS(-DLIB_UTILITIES_EXPORTS)
ADD_NEKTAR_LIBRARY(LibUtilities lib ${NEKTAR_LIBRARY_TYPE} ${LibUtilitySources} ${LibUtilityHeaders})
......
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