-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Report build and version information from the mayaHydra plugin (#10)
* Working version and build information reporting. * Moved code to MayaHydra namespace. * Added unit test for version and build info. * Read build information from CMake. * Implement build date support. * Addressed code review comments. * Removed obsolete MAYAHYDRA_CUT_ID support.
- Loading branch information
Showing
10 changed files
with
173 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// | ||
// Copyright 2023 Autodesk, Inc. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
|
||
#include <mayaHydraLib/mhBuildInfo.h> | ||
|
||
namespace MAYAHYDRA_NS_DEF { | ||
|
||
int MhBuildInfo::buildNumber() { return MAYAHYDRA_BUILD_NUMBER; } | ||
const char* MhBuildInfo::gitCommit() { return MAYAHYDRA_GIT_COMMIT; } | ||
const char* MhBuildInfo::gitBranch() { return MAYAHYDRA_GIT_BRANCH; } | ||
const char* MhBuildInfo::buildDate() { return MAYAHYDRA_BUILD_DATE; } | ||
|
||
} // namespace MAYAHYDRA_NS_DEF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// | ||
// Copyright 2023 Autodesk, Inc. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
|
||
#ifndef LIB_MAYAHYDRA_HYDRAEXTENSIONS_MHBUILDINFO_H | ||
#define LIB_MAYAHYDRA_HYDRAEXTENSIONS_MHBUILDINFO_H | ||
|
||
#include <mayaHydraLib/api.h> | ||
#include <mayaHydraLib/mayaHydra.h> | ||
|
||
#define MAYAHYDRA_BUILD_NUMBER ${MAYAHYDRA_BUILD_NUMBER} | ||
#define MAYAHYDRA_GIT_COMMIT "${MAYAHYDRA_GIT_COMMIT}" | ||
#define MAYAHYDRA_GIT_BRANCH "${MAYAHYDRA_GIT_BRANCH}" | ||
#define MAYAHYDRA_BUILD_DATE ${MAYAHYDRA_BUILD_DATE} | ||
|
||
namespace MAYAHYDRA_NS_DEF { | ||
|
||
class MAYAHYDRALIB_API MhBuildInfo | ||
{ | ||
public: | ||
static int buildNumber(); | ||
static const char* gitCommit(); | ||
static const char* gitBranch(); | ||
static const char* buildDate(); | ||
}; | ||
|
||
} | ||
|
||
#endif // LIB_MAYAHYDRA_HYDRAEXTENSIONS_MHBUILDINFO_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters