ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
CompilerInfo.cpp
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
9 
10 #include <Logging.h>
11 
12 #include <memory>
13 #include <string>
14 
15 namespace cloudViewer {
16 namespace utility {
17 
18 CompilerInfo::CompilerInfo() {}
19 
21  static CompilerInfo instance;
22  return instance;
23 }
24 
25 std::string CompilerInfo::CXXStandard() const {
26  return std::string(CLOUDVIEWER_CXX_STANDARD);
27 }
28 
29 std::string CompilerInfo::CXXCompilerId() const {
30  return std::string(CLOUDVIEWER_CXX_COMPILER_ID);
31 }
32 
33 std::string CompilerInfo::CXXCompilerVersion() const {
34  return std::string(CLOUDVIEWER_CXX_COMPILER_VERSION);
35 }
36 
37 std::string CompilerInfo::CUDACompilerId() const {
38  return std::string(CLOUDVIEWER_CUDA_COMPILER_ID);
39 }
40 
41 std::string CompilerInfo::CUDACompilerVersion() const {
42  return std::string(CLOUDVIEWER_CUDA_COMPILER_VERSION);
43 }
44 
45 void CompilerInfo::Print() const {
46 #ifdef BUILD_CUDA_MODULE
47  utility::LogInfo("CompilerInfo: C++ {}, {} {}, {} {}, SYCL disabled.",
50 #else
51 #ifdef BUILD_SYCL_MODULE
53  "CompilerInfo: C++ {}, {} {}, CUDA disabled, SYCL enabled.",
55 #else
57  "CompilerInfo: C++ {}, {} {}, CUDA disabled, SYCL disabled",
59 #endif
60 #endif
61 }
62 
63 } // namespace utility
64 } // namespace cloudViewer
static CompilerInfo & GetInstance()
std::string CXXCompilerVersion() const
std::string CUDACompilerVersion() const
std::string CUDACompilerId() const
#define LogInfo(...)
Definition: Logging.h:81
Generic file read and write utility for python interface.