1 /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2 file Copyright.txt or https://cmake.org/licensing for details. */
5 #include "cmConfigure.h" // IWYU pragma: keep
11 #if !defined(CMake_USE_MACH_PARSER)
12 # error "This file may be included only if CMake_USE_MACH_PARSER is enabled."
15 class cmMachOInternal;
18 * \brief Executable and Link Format (Mach-O) parser.
23 /** Construct with the name of the Mach-O input file to parse. */
24 cmMachO(const char* fname);
29 /** Get the error message if any. */
30 std::string const& GetErrorMessage() const;
32 /** Boolean conversion. True if the Mach-O file is valid. */
33 explicit operator bool() const { return this->Valid(); }
35 /** Get Install name from binary **/
36 bool GetInstallName(std::string& install_name);
38 /** Print human-readable information about the Mach-O file. */
39 void PrintInfo(std::ostream& os) const;
42 friend class cmMachOInternal;
44 std::unique_ptr<cmMachOInternal> Internal;