Fix nvcc stray character Issue #760

avx_docs
FoREacH 8 years ago
parent 2039070e9c
commit 3adfdf0c58

@ -69,7 +69,7 @@ include(coveralls)
find_package(Git REQUIRED)
# version.cmake will get the current PADDLE_VERSION
include(version)
add_definitions(-DPADDLE_VERSION=\"${PADDLE_VERSION}\")
add_definitions(-DPADDLE_VERSION=${PADDLE_VERSION})
if(NOT WITH_GPU)
add_definitions(-DPADDLE_ONLY_CPU)

@ -33,7 +33,11 @@ void printVersion(std::ostream& os) {
#ifndef PADDLE_VERSION
#define PADDLE_VERSION "unknown"
#endif
os << "paddle version: " << PADDLE_VERSION << std::endl
// converts macro to string https://gcc.gnu.org/onlinedocs/cpp/Stringification.html
#define xstr(s) str(s)
#define str(s) #s
os << "paddle version: " << str(PADDLE_VERSION) << std::endl
<< std::boolalpha << "\t"
<< "withGpu: " << version::isWithGpu() << std::endl
<< "\t"

Loading…
Cancel
Save