Skip to content
Snippets Groups Projects
Commit 2eba6e84 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Removed TNL_CPP_COMPILER_NAME from tnlConfig.h

parent 632087b6
No related branches found
No related tags found
1 merge request!22Header only
......@@ -157,11 +157,28 @@ void
SystemInfo::
writeDeviceInfo( Logger& logger )
{
// compiler detection macros:
// 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
const char* compiler_name = "Nvidia NVCC (" TNL_STRINGIFY(__CUDACC_VER_MAJOR__) "." TNL_STRINGIFY(__CUDACC_VER_MINOR__) "." TNL_STRINGIFY(__CUDACC_VER_BUILD__) ")";
#undef TNL_STRINGIFY
#elif defined(__clang__)
const char* compiler_name = "Clang/LLVM (" __VERSION__ ")";
#elif defined(__ICC) || defined(__INTEL_COMPILER)
const char* compiler_name = "Intel ICPC (" __VERSION__ ")";
#elif defined(__GNUC__) || defined(__GNUG__)
const char* compiler_name = "GNU G++ (" __VERSION__ ")";
#else
const char* compiler_name = "(unknown)";
#endif
logger.writeParameter< String >( "Host name:", getHostname() );
logger.writeParameter< String >( "System:", getSystemName() );
logger.writeParameter< String >( "Release:", getSystemRelease() );
logger.writeParameter< String >( "Architecture:", getArchitecture() );
logger.writeParameter< char* >( "TNL Compiler:", ( char* ) TNL_CPP_COMPILER_NAME );
logger.writeParameter< String >( "TNL compiler:", compiler_name );
// FIXME: generalize for multi-socket systems, here we consider only the first found CPU
const int cpu_id = 0;
const int threads = getNumberOfThreads( cpu_id );
......
......@@ -9,5 +9,3 @@
@HAVE_PNG_H@
@HAVE_JPEG_H@
#define TNL_CPP_COMPILER_NAME "@CMAKE_CXX_COMPILER_ID@ @CMAKE_CXX_COMPILER_VERSION@"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment