You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<h1id="building-with-cmake">Building with CMake</h1>
261
261
262
+
<p>Drake’s build rules are defined using Bazel <codeclass="language-plaintext highlighter-rouge">BUILD</code> files, but we provide a
263
+
CMake wrapper for installing Drake. While this compiles and installs Drake by
264
+
invoking Bazel under the hood, it does so according to CMake conventions
265
+
and using the options provided via CMake.</p>
266
+
262
267
<p>For sample projects that show how to import Drake as a CMake external project
263
268
(either by building Drake from source, or by downloading a pre-compiled Drake
264
269
release) please see our gallery of
@@ -282,10 +287,35 @@ <h1 id="building-with-cmake">Building with CMake</h1>
282
287
<p>To change the build options, you can run one of the standard CMake GUIs (e.g.,
283
288
<codeclass="language-plaintext highlighter-rouge">ccmake</code> or <codeclass="language-plaintext highlighter-rouge">cmake-gui</code>) or specify command-line options with <codeclass="language-plaintext highlighter-rouge">-D</code> to <codeclass="language-plaintext highlighter-rouge">cmake</code>.</p>
284
289
290
+
<p>Important note: when compiling Drake with Clang 17 or newer on Linux, you must
291
+
add <codeclass="language-plaintext highlighter-rouge">-fno-assume-unique-vtables</code> to your project’s <codeclass="language-plaintext highlighter-rouge">CMAKE_CXX_FLAGS</code>, or else
292
+
Drake’s use of run-time type information and dynamic casts will not work correctly.</p>
293
+
294
+
<h2id="native-cmake-options-supported-by-drake">Native CMake Options Supported by Drake</h2>
<p>Important note: when compiling Drake with Clang 17 or newer on Linux, you must
383
-
add <codeclass="language-plaintext highlighter-rouge">-fno-assume-unique-vtables</code> to your project’s <codeclass="language-plaintext highlighter-rouge">CXXFLAGS</code>, or else Drake’s
384
-
use of run-time type information and dynamic casts will not work correctly.</p>
412
+
<p>Adjusting installation methods (advanced):</p>
413
+
414
+
<ul>
415
+
<li><codeclass="language-plaintext highlighter-rouge">INSTALL_NAME_TOOL</code>. When specified, uses the path to the
<li><codeclass="language-plaintext highlighter-rouge">INSTALL_STRIP_TOOL</code>. When specified, uses the path to the <codeclass="language-plaintext highlighter-rouge">strip</code> program.</li>
0 commit comments