avoid the multiple definition of rdkitVersion/boostVersion

This commit is contained in:
Riccardo Vianello
2016-02-10 12:18:50 +01:00
parent 2c52a18d07
commit a62e126f1f
4 changed files with 21 additions and 17 deletions

View File

@@ -1,9 +1,9 @@
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/versions.h.cmake
${CMAKE_CURRENT_SOURCE_DIR}/versions.h )
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/versions.cpp.cmake
${CMAKE_CURRENT_SOURCE_DIR}/versions.cpp )
rdkit_library(RDGeneral
Invariant.cpp types.cpp utils.cpp RDLog.cpp Dict.cpp
LocaleSwitcher.cpp SHARED
LocaleSwitcher.cpp versions.cpp SHARED
LINK_LIBRARIES ${RDKit_THREAD_LIBS})
target_link_libraries(RDGeneral ${RDKit_THREAD_LIBS})

View File

@@ -0,0 +1,8 @@
#include <RDGeneral/versions.h>
const char * RDKit::rdkitVersion = "@RDKit_RELEASENAME@";
// The Boost version as detected at build time.
// CMake's Boost_LIB_VERSION is defined by the FindBoost.cmake module
// to be the same as the value from <boost/version.hpp>
const char * RDKit::boostVersion = "@Boost_LIB_VERSION@";

10
Code/RDGeneral/versions.h Normal file
View File

@@ -0,0 +1,10 @@
// $Id: versions.h 1443 2010-07-01 03:55:11Z glandrum $
//
// Copyright (c) 2010 greg Landrum
//
// @@ All Rights Reserved @@
//
namespace RDKit {
extern const char * rdkitVersion;
extern const char * boostVersion;
}

View File

@@ -1,14 +0,0 @@
// $Id: versions.h 1443 2010-07-01 03:55:11Z glandrum $
//
// Copyright (c) 2010 greg Landrum
//
// @@ All Rights Reserved @@
//
namespace RDKit {
const char * const rdkitVersion="@RDKit_RELEASENAME@";
// The Boost version as detected at build time.
// CMake's Boost_LIB_VERSION is defined by the FindBoost.cmake module
// to be the same as the value from <boost/version.hpp>
const char * const boostVersion="@Boost_LIB_VERSION@";
}