Commit 7b66d6cf authored by Pawel Sznajder's avatar Pawel Sznajder
Browse files

improve cmake

parent 967b7994
......@@ -128,36 +128,37 @@ include_directories(include)
file(READ ${ElementaryUtils_INCLUDE_DIR}/ElementaryUtils/ElementaryUtilsVersion.h VERSION_STR)
string(REGEX MATCH "ELEMENTARY_UTILS_GIT_BRANCH[ \t]*[^\t\n]*\n" ELEMUTILS_BRANCH ${VERSION_STR})
string(REGEX REPLACE "ELEMENTARY_UTILS_GIT_BRANCH[ \t]*" "" ELEMUTILS_BRANCH ${ELEMUTILS_BRANCH})
string(REGEX REPLACE "\"" "" ELEMUTILS_BRANCH ${ELEMUTILS_BRANCH})
string(REGEX MATCH "ELEMENTARY_UTILS_GIT_BRANCH[ \t]*[^\t\n]*\n" ELEMUTILS_BRANCH "${VERSION_STR}")
string(REGEX REPLACE "ELEMENTARY_UTILS_GIT_BRANCH[ \t]*" "" ELEMUTILS_BRANCH "${ELEMUTILS_BRANCH}")
string(REGEX REPLACE "\"" "" ELEMUTILS_BRANCH "${ELEMUTILS_BRANCH}")
string(STRIP ${ELEMUTILS_BRANCH} ELEMUTILS_BRANCH)
string(REGEX MATCH "ELEMENTARY_UTILS_GIT_REVISION[ \t]*[^\t\n]*\n" ELEMUTILS_REVISION ${VERSION_STR})
string(REGEX REPLACE "ELEMENTARY_UTILS_GIT_REVISION[ \t]*" "" ELEMUTILS_REVISION ${ELEMUTILS_REVISION})
string(REGEX REPLACE "\"" "" ELEMUTILS_REVISION ${ELEMUTILS_REVISION})
string(STRIP ${ELEMUTILS_REVISION} ELEMUTILS_REVISION)
string(REGEX REPLACE "ELEMENTARY_UTILS_GIT_REVISION[ \t]*" "" ELEMUTILS_REVISION "${ELEMUTILS_REVISION}")
string(REGEX REPLACE "\"" "" ELEMUTILS_REVISION "${ELEMUTILS_REVISION}")
string(STRIP "${ELEMUTILS_REVISION}" ELEMUTILS_REVISION)
file(READ ${NumA++_INCLUDE_DIR}/NumA/NumAVersion.h VERSION_STR)
string(REGEX MATCH "NUMA_GIT_BRANCH[ \t]*[^\t\n]*\n" NUMA_BRANCH ${VERSION_STR})
string(REGEX REPLACE "NUMA_GIT_BRANCH[ \t]*" "" NUMA_BRANCH ${NUMA_BRANCH})
string(REGEX REPLACE "\"" "" NUMA_BRANCH ${NUMA_BRANCH})
string(STRIP ${NUMA_BRANCH} NUMA_BRANCH)
string(REGEX REPLACE "NUMA_GIT_BRANCH[ \t]*" "" NUMA_BRANCH "${NUMA_BRANCH}")
string(REGEX REPLACE "\"" "" NUMA_BRANCH "${NUMA_BRANCH}")
string(STRIP "${NUMA_BRANCH}" NUMA_BRANCH)
string(REGEX MATCH "NUMA_GIT_REVISION[ \t]*[^\t\n]*\n" NUMA_REVISION ${VERSION_STR})
string(REGEX REPLACE "NUMA_GIT_REVISION[ \t]*" "" NUMA_REVISION ${NUMA_REVISION})
string(REGEX REPLACE "\"" "" NUMA_REVISION ${NUMA_REVISION})
string(STRIP ${NUMA_REVISION} NUMA_REVISION)
string(REGEX REPLACE "NUMA_GIT_REVISION[ \t]*" "" NUMA_REVISION "${NUMA_REVISION}")
string(REGEX REPLACE "\"" "" NUMA_REVISION "${NUMA_REVISION}")
string(STRIP "${NUMA_REVISION}" NUMA_REVISION)
file(READ ${CMAKE_SOURCE_DIR}/include/partons/PartonsVersion.h VERSION_STR)
string(REGEX MATCH "PARTONS_GIT_BRANCH[ \t]*[^\t\n]*\n" PARTONS_BRANCH ${VERSION_STR})
string(REGEX REPLACE "PARTONS_GIT_BRANCH[ \t]*" "" PARTONS_BRANCH ${PARTONS_BRANCH})
string(REGEX REPLACE "\"" "" PARTONS_BRANCH ${PARTONS_BRANCH})
string(STRIP ${PARTONS_BRANCH} PARTONS_BRANCH)
string(REGEX REPLACE "PARTONS_GIT_BRANCH[ \t]*" "" PARTONS_BRANCH "${PARTONS_BRANCH}")
string(REGEX REPLACE "\"" "" PARTONS_BRANCH "${PARTONS_BRANCH}")
string(STRIP "${PARTONS_BRANCH}" PARTONS_BRANCH)
string(REGEX MATCH "PARTONS_GIT_REVISION[ \t]*[^\t\n]*\n" PARTONS_REVISION ${VERSION_STR})
string(REGEX REPLACE "PARTONS_GIT_REVISION[ \t]*" "" PARTONS_REVISION ${PARTONS_REVISION})
string(REGEX REPLACE "\"" "" PARTONS_REVISION ${PARTONS_REVISION})
string(STRIP ${PARTONS_REVISION} PARTONS_REVISION)
string(REGEX REPLACE "PARTONS_GIT_REVISION[ \t]*" "" PARTONS_REVISION "${PARTONS_REVISION}")
string(REGEX REPLACE "\"" "" PARTONS_REVISION "${PARTONS_REVISION}")
string(STRIP "${PARTONS_REVISION}" PARTONS_REVISION)
configure_file("${CMAKE_SOURCE_DIR}/data/config/environment_configuration.dat.in" "${CMAKE_SOURCE_DIR}/data/config/environment_configuration.dat")
......
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