Branch data Line data Source code
1 : : /****************************************************************************** 2 : : * Top contributors (to current version): 3 : : * Morgan Deters, Gereon Kremer, Aina Niemetz 4 : : * 5 : : * This file is part of the cvc5 project. 6 : : * 7 : : * Copyright (c) 2009-2025 by the authors listed in the file AUTHORS 8 : : * in the top-level source directory and their institutional affiliations. 9 : : * All rights reserved. See the file COPYING in the top-level source 10 : : * directory for licensing information. 11 : : * **************************************************************************** 12 : : * 13 : : * Interface to a public class that provides compile-time information 14 : : * about the cvc5 library. 15 : : * 16 : : * Eventually, the configuration methods will all be migrated to the 17 : : * cvc5::internal::configuration namespace below. This is cleaner and avoids a 18 : : * gcc/10.1.0 bug. See https://github.com/cvc5/cvc5/pull/7898 for details. 19 : : */ 20 : : 21 : : #include "cvc5_public.h" 22 : : 23 : : #ifndef CVC5__CONFIGURATION_H 24 : : #define CVC5__CONFIGURATION_H 25 : : 26 : : #include <cvc5/cvc5_export.h> 27 : : 28 : : #include <string> 29 : : #include <vector> 30 : : 31 : : namespace cvc5::internal { 32 : : 33 : : namespace configuration { 34 : 4182 : static constexpr bool isStatisticsBuild() 35 : : { 36 : : #ifdef CVC5_STATISTICS_ON 37 : 4182 : return true; 38 : : #else 39 : : return false; 40 : : #endif 41 : : } 42 : : } // namespace configuration 43 : : 44 : : /** 45 : : * Represents the (static) configuration of cvc5. 46 : : */ 47 : : class CVC5_EXPORT Configuration 48 : : { 49 : : private: 50 : : /** Private default ctor: Disallow construction of this class */ 51 : : Configuration(); 52 : : 53 : : // these constants are filled in by the build system 54 : : static const bool GIT_BUILD; 55 : : static const bool CVC5_IS_RELEASE; 56 : : static const char* const CVC5_VERSION; 57 : : static const char* const CVC5_FULL_VERSION; 58 : : static const char* const CVC5_GIT_INFO; 59 : : 60 : : public: 61 : : 62 : : static std::string getName(); 63 : : 64 : : static bool isSafeBuild(); 65 : : 66 : : static bool isStableBuild(); 67 : : 68 : : static bool isDebugBuild(); 69 : : 70 : : static bool isTracingBuild(); 71 : : 72 : : static bool isMuzzledBuild(); 73 : : 74 : : static bool isAssertionBuild(); 75 : : 76 : : static bool isCoverageBuild(); 77 : : 78 : : static bool isProfilingBuild(); 79 : : 80 : : static bool isAsanBuild(); 81 : : 82 : : static bool isUbsanBuild(); 83 : : 84 : : static bool isTsanBuild(); 85 : : 86 : : static bool isCompetitionBuild(); 87 : : 88 : : static bool isStaticBuild(); 89 : : 90 : : static std::string getPackageName(); 91 : : 92 : : static std::string getVersionString(); 93 : : 94 : : static std::string copyright(); 95 : : 96 : : static std::string about(); 97 : : 98 : : static bool licenseIsGpl(); 99 : : 100 : : static bool isBuiltWithGmp(); 101 : : 102 : : static bool isBuiltWithCln(); 103 : : 104 : : static bool isBuiltWithGlpk(); 105 : : 106 : : static bool isBuiltWithCryptominisat(); 107 : : 108 : : static bool isBuiltWithKissat(); 109 : : 110 : : static bool isBuiltWithEditline(); 111 : : 112 : : static bool isBuiltWithPoly(); 113 : : 114 : : static bool isBuiltWithCoCoA(); 115 : : 116 : : static bool isBuiltWithPortfolio(); 117 : : 118 : : /* Return a sorted array of the trace tags name */ 119 : : static const std::vector<std::string>& getTraceTags(); 120 : : /* Test if the given argument is a known trace tag name */ 121 : : static bool isTraceTag(const std::string& tag); 122 : : 123 : : static bool isGitBuild(); 124 : : static std::string getGitInfo(); 125 : : 126 : : static std::string getCompiler(); 127 : : static std::string getCompiledDateTime(); 128 : : 129 : : }; /* class Configuration */ 130 : : 131 : : } // namespace cvc5::internal 132 : : 133 : : #endif /* CVC5__CONFIGURATION_H */