summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build_settings.cmake2
-rw-r--r--config/src/vespa/config/common/vespa_version.cpp7
-rw-r--r--persistence/src/vespa/persistence/proxy/buildid.cpp3
-rw-r--r--searchlib/src/vespa/searchlib/util/fileheadertk.cpp22
-rw-r--r--vespalib/src/vespa/vespalib/component/CMakeLists.txt1
-rw-r--r--vespalib/src/vespa/vespalib/component/vtag.h4
6 files changed, 20 insertions, 19 deletions
diff --git a/build_settings.cmake b/build_settings.cmake
index 17ee05bff1b..5d8ea2b114b 100644
--- a/build_settings.cmake
+++ b/build_settings.cmake
@@ -22,7 +22,7 @@ set(WARN_OPTS "-Wuninitialized -Werror -Wall -W -Wchar-subscripts -Wcomment -Wfo
# C and C++ compiler flags
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O3 ${WARN_OPTS} -fPIC -D_GLIBCXX_USE_CXX11_ABI=0 -DBOOST_DISABLE_ASSERTS -DWITH_SHIPPED_GEOIP -march=westmere -mtune=intel")
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${VTAG_DEFINES}")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C_FLAGS} -Wnon-virtual-dtor -fvisibility-inlines-hidden -fdiagnostics-color=auto")
diff --git a/config/src/vespa/config/common/vespa_version.cpp b/config/src/vespa/config/common/vespa_version.cpp
index 595f4dfd23b..5e23d5889e6 100644
--- a/config/src/vespa/config/common/vespa_version.cpp
+++ b/config/src/vespa/config/common/vespa_version.cpp
@@ -1,14 +1,11 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "vespa_version.h"
-
-#ifndef V_TAG_COMPONENT
-#define V_TAG_COMPONENT "1.0.0"
-#endif
+#include <vespa/vespalib/component/vtag.h>
namespace config {
-const VespaVersion currentVersion(VespaVersion::fromString(vespalib::string(V_TAG_COMPONENT)));
+const VespaVersion currentVersion(VespaVersion::fromString(vespalib::string(vespalib::VersionTagComponent)));
VespaVersion::VespaVersion(const VespaVersion & vespaVersion)
diff --git a/persistence/src/vespa/persistence/proxy/buildid.cpp b/persistence/src/vespa/persistence/proxy/buildid.cpp
index e102288610c..c78af647de2 100644
--- a/persistence/src/vespa/persistence/proxy/buildid.cpp
+++ b/persistence/src/vespa/persistence/proxy/buildid.cpp
@@ -1,8 +1,9 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/fastos/fastos.h>
+#include <vespa/vespalib/component/vtag.h>
#include "buildid.h"
const char *storage::spi::getBuildId() {
- return V_TAG_COMPONENT;
+ return vespalib::VersionTagComponent;
}
diff --git a/searchlib/src/vespa/searchlib/util/fileheadertk.cpp b/searchlib/src/vespa/searchlib/util/fileheadertk.cpp
index d1ae39d15c7..d58367c6eb8 100644
--- a/searchlib/src/vespa/searchlib/util/fileheadertk.cpp
+++ b/searchlib/src/vespa/searchlib/util/fileheadertk.cpp
@@ -1,23 +1,21 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/fastos/fastos.h>
+#include <vespa/vespalib/component/vtag.h>
#include "fileheadertk.h"
using namespace search;
using vespalib::GenericHeader;
+using namespace vesplib
void
FileHeaderTk::addVersionTags(vespalib::GenericHeader &header)
{
-#ifdef V_TAG
- header.putTag(GenericHeader::Tag("version-tag", V_TAG));;
- header.putTag(GenericHeader::Tag("version-date", V_TAG_DATE));;
- header.putTag(GenericHeader::Tag("version-pkg", V_TAG_PKG));;
- header.putTag(GenericHeader::Tag("version-arch", V_TAG_ARCH));;
- header.putTag(GenericHeader::Tag("version-system", V_TAG_SYSTEM));
- header.putTag(GenericHeader::Tag("version-system-rev", V_TAG_SYSTEM_REV));
- header.putTag(GenericHeader::Tag("version-builder", V_TAG_BUILDER));
- header.putTag(GenericHeader::Tag("version-component", V_TAG_COMPONENT));
-#else
- (void)header;
-#endif
+ header.putTag(GenericHeader::Tag("version-tag", VersionTag));
+ header.putTag(GenericHeader::Tag("version-date", VersionTagDate));
+ header.putTag(GenericHeader::Tag("version-pkg", VersionTagPkg));
+ header.putTag(GenericHeader::Tag("version-arch", VersionTagArch));
+ header.putTag(GenericHeader::Tag("version-system", VersionTagSystem));
+ header.putTag(GenericHeader::Tag("version-system-rev", VersionTagSystemRev));
+ header.putTag(GenericHeader::Tag("version-builder", VersionTagBuilder));
+ header.putTag(GenericHeader::Tag("version-component", VersionTagComponent));
}
diff --git a/vespalib/src/vespa/vespalib/component/CMakeLists.txt b/vespalib/src/vespa/vespalib/component/CMakeLists.txt
index 3b1b4c2cb41..113735cc974 100644
--- a/vespalib/src/vespa/vespalib/component/CMakeLists.txt
+++ b/vespalib/src/vespa/vespalib/component/CMakeLists.txt
@@ -6,3 +6,4 @@ vespa_add_library(vespalib_vespalib_component OBJECT
vtag.cpp
DEPENDS
)
+set_source_files_properties(avx.cpp PROPERTIES COMPILE_FLAGS "${VTAG_DEFINES}")
diff --git a/vespalib/src/vespa/vespalib/component/vtag.h b/vespalib/src/vespa/vespalib/component/vtag.h
index ed2b21413a3..b8f07063a51 100644
--- a/vespalib/src/vespa/vespalib/component/vtag.h
+++ b/vespalib/src/vespa/vespalib/component/vtag.h
@@ -12,6 +12,10 @@ extern char VersionTagDate[];
extern char VersionTagSystem[];
extern char VersionTagSystemRev[];
extern char VersionTagBuilder[];
+extern char VersionTagPkg[];
+extern char VersionTagComponent[];
+extern char VersionTagArch[];
+
class Vtag {
public: