-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Compared to the Ubuntu and macOS packages, this removes the LGPL'd "luksan" solver from the build, which means we can link the library statically (and eventually, hidden). This might mean that NLopt is no longer able to solve certain kinds of programs, but that is a fair trade-off given all of the problems caused by LGPL linking. The package.BUILD.bazel is modeled on nlopt.BUILD.bazel in a10ebb7. Deprecate the now-unused current (host OS) nlopt external.
- Loading branch information
1 parent
d95656f
commit c71afed
Showing
19 changed files
with
669 additions
and
17 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
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
File renamed without changes.
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,18 @@ | ||
Silence this warning: | ||
dreal/dreal/optimization/nlopt_optimizer.h:44:7: warning: | ||
'dreal::NloptOptimizer' declared with greater visibility than the type | ||
of its field 'dreal::NloptOptimizer::opt_' [-Wattributes] | ||
|
||
TODO(jwnimmer-tri) Try to use a hidden inline namespace for dReal as well, | ||
to silence this warning. | ||
|
||
--- tools/dreal.bzl | ||
+++ tools/dreal.bzl | ||
@@ -25,6 +25,7 @@ | ||
"-Woverloaded-virtual", | ||
"-Wpedantic", | ||
"-Wshadow", | ||
+ "-Wno-attributes", | ||
] | ||
|
||
# The CLANG_FLAGS will be enabled for all C++ rules in the project when |
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,45 @@ | ||
# -*- python -*- | ||
|
||
load("//tools/skylark:drake_py.bzl", "drake_py_unittest") | ||
load("//tools/lint:lint.bzl", "add_lint_tests") | ||
|
||
exports_files( | ||
["patches/gen_enums.patch"], | ||
visibility = ["@nlopt_internal//:__pkg__"], | ||
) | ||
|
||
# Creates api/nlopt.hpp using NLopt upstream's codegen so that we can | ||
# cross-check it versus our Drake-local patch file. | ||
genrule( | ||
name = "cmake_genrule", | ||
srcs = [ | ||
"@nlopt_internal//:cmake/generate-cpp.cmake", | ||
"@nlopt_internal//:src/api/nlopt-in.hpp", | ||
"@nlopt_internal//:src/api/nlopt.h", | ||
], | ||
outs = ["test/nlopt-upstream.hpp"], | ||
cmd = " ".join([ | ||
"cmake", | ||
"-DAPI_SOURCE_DIR=$$(dirname $(execpath @nlopt_internal//:src/api/nlopt.h))", # noqa | ||
"-P $(execpath @nlopt_internal//:cmake/generate-cpp.cmake)", | ||
"&&", | ||
"mv nlopt.hpp $@", | ||
]), | ||
tags = [ | ||
"manual", | ||
"nolint", | ||
], | ||
) | ||
|
||
drake_py_unittest( | ||
name = "enum_test", | ||
data = [ | ||
":test/nlopt-upstream.hpp", | ||
"@nlopt_internal//:genrule/nlopt.hpp", | ||
], | ||
deps = [ | ||
"@bazel_tools//tools/python/runfiles", | ||
], | ||
) | ||
|
||
add_lint_tests() |
Oops, something went wrong.