Merge pull request #789 from F0REacH/nvcc_stray_character_fix

Fix nvcc stray character Issue #760
avx_docs
gangliao 9 years ago committed by GitHub
commit 0b73318f8b

@ -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: " << xstr(PADDLE_VERSION) << std::endl
<< std::boolalpha << "\t"
<< "withGpu: " << version::isWithGpu() << std::endl
<< "\t"

Loading…
Cancel
Save