classdef (Hidden) CMakeInfo < coder.make.ToolchainInfo
% Class for CMake build tool configuration

% In target framework CMakeBuildMethod and ToolchainBuildMethod inherit
% from a common BuildMethod object. In the same way CMakeInfo and
% ToolchainInfo share a common interface so that collections of both
% objects can be passed around the build process. 

%   Copyright 2020-2021 The MathWorks, Inc.
    
    properties
        % The name of the CMake generator, e.g. 'Unix Makefiles'
        Generator
        
        % Additional command line arguments that are passed to cmake when
        % invoking the generator
        GeneratorCommandArgs
        
        % Path to the CMake toolchain
        ToolchainPath
    end
    
    methods
        function this = CMakeInfo(cmakeBuildMethod)
            %CMAKEINFO Construct an instance of this class
            this.Name = cmakeBuildMethod.Name;
            this.Generator = cmakeBuildMethod.Generator;
            this.GeneratorCommandArgs = cmakeBuildMethod.GeneratorCommandArgs;
            this.ToolchainPath = cmakeBuildMethod.ToolchainPath;
            this.MATLABSetup = cmakeBuildMethod.MatlabSetup;
            this.MATLABCleanup = cmakeBuildMethod.MatlabCleanup;
            this.ShellSetup = cmakeBuildMethod.ShellSetup;
            this.ShellCleanup = cmakeBuildMethod.ShellCleanup;
            this.Platform = computer('arch'); 
        end            
    end        
end

