Compare commits
6 Commits
master
...
release/20
Author | SHA1 | Date | |
---|---|---|---|
|
7f92a0b308 | ||
|
169003bc87 | ||
|
99ed183851 | ||
|
3a1c355100 | ||
|
8dcfef833a | ||
|
5f471c0ec8 |
@ -13,10 +13,17 @@
|
|||||||
# information as it gets tiresome to rebuild the project everytime one
|
# information as it gets tiresome to rebuild the project everytime one
|
||||||
# makes changes to any of the unit tests.
|
# makes changes to any of the unit tests.
|
||||||
|
|
||||||
|
message("-- Writing version information to local header project-version.h")
|
||||||
|
|
||||||
string (TOUPPER "${CMAKE_BUILD_TYPE}" cmake_build_type_upper_)
|
string (TOUPPER "${CMAKE_BUILD_TYPE}" cmake_build_type_upper_)
|
||||||
if (cmake_build_type_upper_ MATCHES DEBUG)
|
if (cmake_build_type_upper_ MATCHES DEBUG)
|
||||||
file (WRITE "${PROJECT_BINARY_DIR}/project-version.h"
|
file (WRITE "${PROJECT_BINARY_DIR}/project-version.h"
|
||||||
"#define PROJECT_VERSION \"${${project}_LABEL} (debug)\"\n"
|
"#ifndef OPM_GENERATED_OPM_VERSION_HEADER_INCLUDED\n"
|
||||||
|
"#define OPM_GENERATED_OPM_VERSION_HEADER_INCLUDED\n"
|
||||||
|
"#define PROJECT_VERSION_NAME \"${${project}_LABEL}\"\n"
|
||||||
|
"#define PROJECT_VERSION_HASH \"debug\"\n"
|
||||||
|
"#define PROJECT_VERSION \"${${project}_LABEL} (debug)\"\n"
|
||||||
|
"#endif // OPM_GENERATED_OPM_VERSION_HEADER_INCLUDED\n"
|
||||||
)
|
)
|
||||||
else ()
|
else ()
|
||||||
if (NOT GIT_FOUND)
|
if (NOT GIT_FOUND)
|
||||||
@ -29,8 +36,13 @@ else ()
|
|||||||
# above.
|
# above.
|
||||||
if (NOT GIT_FOUND)
|
if (NOT GIT_FOUND)
|
||||||
file (WRITE "${PROJECT_BINARY_DIR}/project-version.h"
|
file (WRITE "${PROJECT_BINARY_DIR}/project-version.h"
|
||||||
"#define PROJECT_VERSION \"${${project}_LABEL}\"\n"
|
"#ifndef OPM_GENERATED_OPM_VERSION_HEADER_INCLUDED\n"
|
||||||
)
|
"#define OPM_GENERATED_OPM_VERSION_HEADER_INCLUDED\n"
|
||||||
|
"#define PROJECT_VERSION_NAME \"${${project}_LABEL}\"\n"
|
||||||
|
"#define PROJECT_VERSION_HASH \"unknown git version\"\n"
|
||||||
|
"#define PROJECT_VERSION \"${${project}_LABEL} (unknown git version)\"\n"
|
||||||
|
"#endif // OPM_GENERATED_OPM_VERSION_HEADER_INCLUDED\n"
|
||||||
|
)
|
||||||
else ()
|
else ()
|
||||||
add_custom_target (update-version ALL
|
add_custom_target (update-version ALL
|
||||||
COMMAND ${CMAKE_COMMAND}
|
COMMAND ${CMAKE_COMMAND}
|
||||||
|
@ -45,15 +45,17 @@ if (sha1)
|
|||||||
if (dirty OR staged)
|
if (dirty OR staged)
|
||||||
set (sha1 "${sha1}*")
|
set (sha1 "${sha1}*")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# make a formatted version that can be appended to the label
|
|
||||||
set (sha1 " (${sha1})")
|
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# write the content to a temporary file in a C compatible format
|
# write the content to a temporary file in a C compatible format
|
||||||
file (WRITE "${PROJECT_BINARY_DIR}/project-version.tmp"
|
file (WRITE "${PROJECT_BINARY_DIR}/project-version.tmp"
|
||||||
"#define PROJECT_VERSION \"${PROJECT_LABEL}${sha1}\"\n"
|
"#ifndef OPM_GENERATED_OPM_VERSION_HEADER_INCLUDED\n"
|
||||||
)
|
"#define OPM_GENERATED_OPM_VERSION_HEADER_INCLUDED\n"
|
||||||
|
"#define PROJECT_VERSION_NAME \"${PROJECT_LABEL}\"\n"
|
||||||
|
"#define PROJECT_VERSION_HASH \"${sha1}\"\n"
|
||||||
|
"#define PROJECT_VERSION \"${PROJECT_LABEL} (${sha1})\"\n"
|
||||||
|
"#endif // OPM_GENERATED_OPM_VERSION_HEADER_INCLUDED\n"
|
||||||
|
)
|
||||||
|
|
||||||
# only commit this to source code if it actually changed. here
|
# only commit this to source code if it actually changed. here
|
||||||
# we use execute_process instead of exec_program to avoid having
|
# we use execute_process instead of exec_program to avoid having
|
||||||
|
2
debian/changelog
vendored
2
debian/changelog
vendored
@ -1,4 +1,4 @@
|
|||||||
opm-common (2015.10-1~trusty) trusty; urgency=medium
|
opm-common (2015.10-rfinal-1~trusty) trusty; urgency=medium
|
||||||
|
|
||||||
* New release
|
* New release
|
||||||
|
|
||||||
|
@ -1,4 +1,12 @@
|
|||||||
|
####################################################################
|
||||||
|
# Dune module information file: This file gets parsed by dunecontrol
|
||||||
|
# and by the CMake build scripts.
|
||||||
|
####################################################################
|
||||||
|
|
||||||
Module: opm-common
|
Module: opm-common
|
||||||
Description: Open Porous Media Initiative shared infrastructure
|
Description: Open Porous Media Initiative shared infrastructure
|
||||||
Version: 2015.10
|
Version: 2015.10
|
||||||
|
Label: 2015.10
|
||||||
Maintainer: opm@opm-project.org
|
Maintainer: opm@opm-project.org
|
||||||
|
MaintainerName: OPM community
|
||||||
|
Url: http://opm-project.org
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# spec file for package opm-common
|
# spec file for package opm-common
|
||||||
#
|
#
|
||||||
|
|
||||||
%define tag rc4
|
%define tag final
|
||||||
|
|
||||||
Name: opm-common
|
Name: opm-common
|
||||||
Version: 2015.10
|
Version: 2015.10
|
||||||
|
Loading…
Reference in New Issue
Block a user