From eb4a4cebcb40fa1305e366f76f47ab6623d56b88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Klinkovsk=C3=BD?= <klinkovsky@mmg.fjfi.cvut.cz> Date: Wed, 8 Jan 2020 15:29:13 +0100 Subject: [PATCH] Fixed internal macro in Logger_impl.h --- src/TNL/Logger_impl.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/TNL/Logger_impl.h b/src/TNL/Logger_impl.h index 6f71b40277..d419f31b8b 100644 --- a/src/TNL/Logger_impl.h +++ b/src/TNL/Logger_impl.h @@ -48,9 +48,12 @@ Logger::writeSystemInformation( const Config::ParameterContainer& parameters ) // http://nadeausoftware.com/articles/2012/10/c_c_tip_how_detect_compiler_name_and_version_using_compiler_predefined_macros // https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#compilation-phases #if defined(__NVCC__) - #define TNL_STRINGIFY(x) #x + #define TNL_STRINGIFY_IMPL(x) #x + // indirection is necessary in order to expand macros in the argument + #define TNL_STRINGIFY(x) TNL_STRINGIFY_IMPL(x) const char* compiler_name = "Nvidia NVCC (" TNL_STRINGIFY(__CUDACC_VER_MAJOR__) "." TNL_STRINGIFY(__CUDACC_VER_MINOR__) "." TNL_STRINGIFY(__CUDACC_VER_BUILD__) ")"; #undef TNL_STRINGIFY + #undef TNL_STRINGIFY_IMPL #elif defined(__clang__) const char* compiler_name = "Clang/LLVM (" __VERSION__ ")"; #elif defined(__ICC) || defined(__INTEL_COMPILER) -- GitLab