-
Notifications
You must be signed in to change notification settings - Fork 616
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improvements for Bazel build support (#1015)
* Pin Imath version to 3.0.1 (instead of Imath 3.0.0 beta) Signed-off-by: Vertexwahn <julian.amann@tum.de> * Add comments for treating compile warnings as errors Signed-off-by: Vertexwahn <julian.amann@tum.de> * Improve config headers for Imath Signed-off-by: Vertexwahn <julian.amann@tum.de> Signed-off-by: Cary Phillips <cary@ilm.com>
- Loading branch information
1 parent
f663390
commit fd0deca
Showing
5 changed files
with
81 additions
and
199 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,29 @@ | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
# Copyright (c) Contributors to the OpenEXR Project. | ||
|
||
def _generate_header_impl(ctx): | ||
out = ctx.actions.declare_file(ctx.label.name) | ||
ctx.actions.expand_template( | ||
output = out, | ||
template = ctx.file.template, | ||
substitutions = ctx.attr.substitutions, | ||
) | ||
return [CcInfo( | ||
compilation_context = cc_common.create_compilation_context( | ||
includes = depset([out.dirname]), | ||
headers = depset([out]), | ||
), | ||
)] | ||
|
||
generate_header = rule( | ||
implementation = _generate_header_impl, | ||
attrs = { | ||
"substitutions": attr.string_dict( | ||
mandatory = True, | ||
), | ||
"template": attr.label( | ||
allow_single_file = [".h.in"], | ||
mandatory = True, | ||
), | ||
}, | ||
) |
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