<!DOCTYPE html> | |
<html class="writer-html5" lang="en" > | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>CMake Variables and Options — OpenPASS Documentation</title> | |
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" /> | |
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" /> | |
<link rel="stylesheet" href="../../_static/tabs.css" type="text/css" /> | |
<link rel="stylesheet" href="../../_static/css/custom.css" type="text/css" /> | |
<link rel="shortcut icon" href="../../_static/openPASS.ico"/> | |
<!--[if lt IE 9]> | |
<script src="../../_static/js/html5shiv.min.js"></script> | |
<![endif]--> | |
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script> | |
<script src="../../_static/jquery.js"></script> | |
<script src="../../_static/underscore.js"></script> | |
<script src="../../_static/doctools.js"></script> | |
<script src="../../_static/tabs.js"></script> | |
<script type="text/javascript" src="../../_static/js/theme.js"></script> | |
<link rel="index" title="Index" href="../../genindex.html" /> | |
<link rel="search" title="Search" href="../../search.html" /> | |
<link rel="next" title="Custom Protobuf Build" href="40_custom_proto.html" /> | |
<link rel="prev" title="Further Guidance" href="../50_further_guidance.html" /> | |
</head> | |
<body class="wy-body-for-nav"> | |
<div class="wy-grid-for-nav"> | |
<nav data-toggle="wy-nav-shift" class="wy-nav-side"> | |
<div class="wy-side-scroll"> | |
<div class="wy-side-nav-search" > | |
<a href="../../index.html" class="icon icon-home"> openPASS | |
<img src="../../_static/openPASS.png" class="logo" alt="Logo"/> | |
</a> | |
<div class="version"> | |
0.8.0 | |
</div> | |
<div role="search"> | |
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get"> | |
<input type="text" name="q" placeholder="Search docs" /> | |
<input type="hidden" name="check_keywords" value="yes" /> | |
<input type="hidden" name="area" value="default" /> | |
</form> | |
</div> | |
</div> | |
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> | |
<p class="caption"><span class="caption-text">Installation Guide</span></p> | |
<ul class="current"> | |
<li class="toctree-l1"><a class="reference internal" href="../10_getting_started.html">Getting Started</a></li> | |
<li class="toctree-l1"><a class="reference internal" href="../20_install_prerequisites.html">Installing Prerequisites</a></li> | |
<li class="toctree-l1"><a class="reference internal" href="../30_install_openpass.html">Installing OpenPASS</a></li> | |
<li class="toctree-l1 current"><a class="reference internal" href="../50_further_guidance.html">Further Guidance</a><ul class="current"> | |
<li class="toctree-l2 current"><a class="current reference internal" href="#">CMake Variables and Options</a><ul> | |
<li class="toctree-l3"><a class="reference internal" href="#cmake-generator">CMake Generator</a></li> | |
<li class="toctree-l3"><a class="reference internal" href="#cmake-prefix-path">CMAKE_PREFIX_PATH</a></li> | |
<li class="toctree-l3"><a class="reference internal" href="#cmake-install-prefix">CMAKE_INSTALL_PREFIX</a></li> | |
<li class="toctree-l3"><a class="reference internal" href="#cmake-with-debug-postix">CMAKE_WITH_DEBUG_POSTIX</a></li> | |
<li class="toctree-l3"><a class="reference internal" href="#cmake-build-type">CMAKE_BUILD_TYPE</a></li> | |
<li class="toctree-l3"><a class="reference internal" href="#cmake-c-compiler">CMAKE_C_COMPILER</a></li> | |
<li class="toctree-l3"><a class="reference internal" href="#cmake-cxx-compiler">CMAKE_CXX_COMPILER</a></li> | |
<li class="toctree-l3"><a class="reference internal" href="#cmake-object-path-max">CMAKE_OBJECT_PATH_MAX</a></li> | |
<li class="toctree-l3"><a class="reference internal" href="#use-ccache">USE_CCACHE</a></li> | |
<li class="toctree-l3"><a class="reference internal" href="#with-simcore">WITH_SIMCORE</a></li> | |
<li class="toctree-l3"><a class="reference internal" href="#with-doc">WITH_DOC</a></li> | |
<li class="toctree-l3"><a class="reference internal" href="#with-api-doc">WITH_API_DOC</a></li> | |
<li class="toctree-l3"><a class="reference internal" href="#with-coverage">WITH_COVERAGE</a></li> | |
<li class="toctree-l3"><a class="reference internal" href="#with-gui">WITH_GUI</a></li> | |
<li class="toctree-l3"><a class="reference internal" href="#with-tests">WITH_TESTS</a></li> | |
<li class="toctree-l3"><a class="reference internal" href="#with-endtoend-tests">WITH_ENDTOEND_TESTS</a></li> | |
<li class="toctree-l3"><a class="reference internal" href="#openpass-adjust-output">OPENPASS_ADJUST_OUTPUT</a></li> | |
<li class="toctree-l3"><a class="reference internal" href="#with-extended-osi">WITH_EXTENDED_OSI</a></li> | |
<li class="toctree-l3"><a class="reference internal" href="#with-protobuf-arena">WITH_PROTOBUF_ARENA</a></li> | |
<li class="toctree-l3"><a class="reference internal" href="#install-system-runtime-deps">INSTALL_SYSTEM_RUNTIME_DEPS</a></li> | |
<li class="toctree-l3"><a class="reference internal" href="#install-extra-runtime-deps">INSTALL_EXTRA_RUNTIME_DEPS</a></li> | |
<li class="toctree-l3"><a class="reference internal" href="#make-targets-commands">Make Targets/Commands</a><ul> | |
<li class="toctree-l4"><a class="reference internal" href="#build-and-install">Build and Install</a></li> | |
<li class="toctree-l4"><a class="reference internal" href="#executing-tests">Executing Tests</a></li> | |
</ul> | |
</li> | |
</ul> | |
</li> | |
<li class="toctree-l2"><a class="reference internal" href="40_custom_proto.html">Custom Protobuf Build</a></li> | |
</ul> | |
</li> | |
<li class="toctree-l1"><a class="reference internal" href="../60_conan.html">Building with Conan</a></li> | |
</ul> | |
<p class="caption"><span class="caption-text">User Guides</span></p> | |
<ul> | |
<li class="toctree-l1"><a class="reference internal" href="../../user_guide/10_overview.html">Overview</a></li> | |
<li class="toctree-l1"><a class="reference internal" href="../../user_guide/20_tutorials.html">Tutorials</a></li> | |
<li class="toctree-l1"><a class="reference internal" href="../../user_guide/30_gui_plugins.html">GUI Plugins</a></li> | |
<li class="toctree-l1"><a class="reference internal" href="../../user_guide/40_configs_in_depth.html">Configs in Depth</a></li> | |
<li class="toctree-l1"><a class="reference internal" href="../../user_guide/50_outputs_in_depth.html">Outputs in Depth</a></li> | |
<li class="toctree-l1"><a class="reference internal" href="../../user_guide/60_scenario_simulation.html">Simulator</a></li> | |
</ul> | |
<p class="caption"><span class="caption-text">Advanced topics</span></p> | |
<ul> | |
<li class="toctree-l1"><a class="reference internal" href="../../advanced_topics/20_simulator_advanced.html">Simulator</a></li> | |
<li class="toctree-l1"><a class="reference internal" href="../../advanced_topics/30_testing.html">EndToEnd Test Framework</a></li> | |
</ul> | |
<p class="caption"><span class="caption-text">Developer Information</span></p> | |
<ul> | |
<li class="toctree-l1"><a class="reference internal" href="../../developer_information/10_ide_support.html">IDE Support</a></li> | |
<li class="toctree-l1"><a class="reference internal" href="../../developer_information/20_documentation.html">Documentation Concept</a></li> | |
</ul> | |
<p class="caption"><span class="caption-text">Other Information</span></p> | |
<ul> | |
<li class="toctree-l1"><a class="reference internal" href="../../other_information/10_external_dependencies.html">External Dependencies</a></li> | |
<li class="toctree-l1"><a class="reference internal" href="../../other_information/20_glossary.html">Glossary</a></li> | |
<li class="toctree-l1"><a class="reference internal" href="../../other_information/30_license.html">License</a></li> | |
</ul> | |
</div> | |
</div> | |
</nav> | |
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> | |
<nav class="wy-nav-top" aria-label="top navigation"> | |
<i data-toggle="wy-nav-top" class="fa fa-bars"></i> | |
<a href="../../index.html">openPASS</a> | |
</nav> | |
<div class="wy-nav-content"> | |
<div class="rst-content"> | |
<div role="navigation" aria-label="breadcrumbs navigation"> | |
<ul class="wy-breadcrumbs"> | |
<li><a href="../../index.html" class="icon icon-home"></a> »</li> | |
<li><a href="../50_further_guidance.html">Further Guidance</a> »</li> | |
<li>CMake Variables and Options</li> | |
<li class="wy-breadcrumbs-aside"> | |
<a href="../../_sources/installation_guide/further_guidance/10_cmake.rst.txt" rel="nofollow"> View page source</a> | |
</li> | |
</ul> | |
<hr/> | |
</div> | |
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> | |
<div itemprop="articleBody"> | |
<div class="section" id="cmake-variables-and-options"> | |
<span id="cmake"></span><h1>CMake Variables and Options<a class="headerlink" href="#cmake-variables-and-options" title="Permalink to this headline">¶</a></h1> | |
<p><strong>OpenPASS</strong> uses CMake as default cross-platform build environment. | |
CMake varibles describe configuration settings, which can be overriden by the user. | |
To override any build configuration, the CMake variables have to be provided when CMake gets run.</p> | |
<p>If available, recommended options are shown in <strong>bold</strong>.</p> | |
<p>The following guide is structered as follows: The first part describes the available variables and options. | |
There are standard CMake variables which are marked with the prefix <code class="docutils literal notranslate"><span class="pre">CMAKE_</span></code> and other defined variables | |
used internally to further specify the build of <strong>openPASS</strong>. As the result of a proper CMake call is a Makefile, | |
which then acts as base for the actual build using <code class="docutils literal notranslate"><span class="pre">make</span></code>, the second part describes best practices around the make commands using <code class="docutils literal notranslate"><span class="pre">make</span></code>.</p> | |
<p>Note, this guide approaches CMake from the <em>command line perspective</em>. | |
Adjustments for VSCode and QtCreator can be found under <a class="reference internal" href="../../developer_information/ide_support/30_vscode.html#vscode"><span class="std std-ref">Working with Visual Studio Code</span></a> and <a class="reference internal" href="../../developer_information/ide_support/20_qt_creator.html#qtcreator"><span class="std std-ref">Working with Qt Creator</span></a>.</p> | |
<div class="admonition-see-also admonition"> | |
<p class="admonition-title">See also</p> | |
<p>CMake Documentation: <a class="reference external" href="https://cmake.org/cmake/help/latest/index.html">https://cmake.org/cmake/help/latest/index.html</a></p> | |
</div> | |
<div class="section" id="cmake-generator"> | |
<h2>CMake Generator<a class="headerlink" href="#cmake-generator" title="Permalink to this headline">¶</a></h2> | |
<p>This is only important for <strong>Windows</strong>. | |
To generate MSYS compatible makefiles use <code class="docutils literal notranslate"><span class="pre">-G</span> <span class="pre">"MSYS</span> <span class="pre">Makefiles"</span></code> (c.f. <a class="reference internal" href="../20_install_prerequisites.html#msys2"><span class="std std-ref">MSYS2</span></a>).</p> | |
</div> | |
<div class="section" id="cmake-prefix-path"> | |
<span id="id1"></span><h2>CMAKE_PREFIX_PATH<a class="headerlink" href="#cmake-prefix-path" title="Permalink to this headline">¶</a></h2> | |
<p>This variable makes the prerequisites available to <strong>openPASS</strong> as semicolon-separated list of directories, | |
specifying installation prefixes to be searched by cmake. | |
Please refer to <a class="reference internal" href="../20_install_prerequisites.html#prerequisites"><span class="std std-ref">Installing Prerequisites</span></a> for the list of mandatory packages and libraries. | |
CMake will issue an error, if one prerequisite is missing.</p> | |
<p>Generally, cmake recognizes installed libraries (e.g. googletest) on its own. | |
By setting an explicit <code class="docutils literal notranslate"><span class="pre">CMAKE_PREFIX_PATH</span></code> for a library, it is possible to override the system libraries. | |
Use this, when an exact library version, or a customized library shall be used.</p> | |
<div class="admonition note"> | |
<p class="admonition-title">Note</p> | |
<p>In the following example, non-standard libraries are assumed to be in the folder <code class="docutils literal notranslate"><span class="pre">deps/thirdParty</span></code>.</p> | |
</div> | |
<p><strong>Example</strong> (system libraries <strong>not</strong> set):</p> | |
<div class="sphinx-tabs docutils container"> | |
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-0-0-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-0-0-0" name="0-0" role="tab" tabindex="0">Windows</button><button aria-controls="panel-0-0-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-0-0-1" name="0-1" role="tab" tabindex="-1">Linux</button></div><div aria-labelledby="tab-0-0-0" class="sphinx-tabs-panel" id="panel-0-0-0" name="0-0" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>cmake -G <span class="s2">"MSYS Makefiles"</span> | |
-D <span class="nv">CMAKE_PREFIX_PATH</span><span class="o">=</span><span class="s2">"\</span> | |
<span class="s2"> /mingw64/bin;\</span> | |
<span class="s2"> </span><span class="nv">$PWD</span><span class="s2">/../deps/thirdParty/win64/FMILibrary;\</span> | |
<span class="s2"> </span><span class="nv">$PWD</span><span class="s2">/../deps/thirdParty/win64/osi;\</span> | |
<span class="s2"> </span><span class="nv">$PWD</span><span class="s2">/../deps/thirdParty/win64/minizip;\</span> | |
<span class="s2"> -D <other variables>\</span> | |
<span class="s2"> ..</span> | |
</pre></div> | |
</div> | |
</div><div aria-labelledby="tab-0-0-1" class="sphinx-tabs-panel" hidden="true" id="panel-0-0-1" name="0-1" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>cmake -D <span class="nv">CMAKE_PREFIX_PATH</span><span class="o">=</span><span class="se">\</span> | |
<span class="nv">$PWD</span>/../deps/thirdParty/linux64/FMILibrary<span class="se">\;\</span> | |
<span class="nv">$PWD</span>/../deps/thirdParty/linux64/osi<span class="se">\;\</span> | |
<span class="nv">$PWD</span>/../deps/thirdParty/linux64/minizip<span class="se">\;\</span> | |
-D <other variables> <span class="se">\</span> | |
.. | |
</pre></div> | |
</div> | |
<div class="admonition warning"> | |
<p class="admonition-title">Warning</p> | |
<p>The semicolon <code class="docutils literal notranslate"><span class="pre">;</span></code> needs to be escaped (<code class="docutils literal notranslate"><span class="pre">\;</span></code>) unless the string is quoted.</p> | |
</div> | |
</div></div> | |
<div class="admonition note"> | |
<p class="admonition-title">Note</p> | |
<p>Please also read through <a class="reference internal" href="#cmake-openpass-variables"><span class="std std-ref">USE_CCACHE</span></a> for further useful hints, e.g. why explicitly setting the MinGW path might be a necessary in some situations.</p> | |
</div> | |
<p>Installation directory</p> | |
</div> | |
<div class="section" id="cmake-install-prefix"> | |
<h2>CMAKE_INSTALL_PREFIX<a class="headerlink" href="#cmake-install-prefix" title="Permalink to this headline">¶</a></h2> | |
<ul class="simple"> | |
<li><p>Install directory used by install, when invoking <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">install</span></code></p></li> | |
<li><p>Recommendation: <code class="docutils literal notranslate"><span class="pre">/OpenPASS/bin/core</span></code> (Linux) | <code class="docutils literal notranslate"><span class="pre">C:/OpenPASS/bin/core</span></code> (Windows)</p></li> | |
</ul> | |
</div> | |
<div class="section" id="cmake-with-debug-postix"> | |
<h2>CMAKE_WITH_DEBUG_POSTIX<a class="headerlink" href="#cmake-with-debug-postix" title="Permalink to this headline">¶</a></h2> | |
<ul class="simple"> | |
<li><p>Used only in conjunction with <em>Visual Studio Debug Builds</em> (MSVC), as it distinguishes release/debug DLLs by a postfix <code class="docutils literal notranslate"><span class="pre">d</span></code>.</p></li> | |
<li><p>Options: <strong>OFF</strong> | ON</p></li> | |
</ul> | |
</div> | |
<div class="section" id="cmake-build-type"> | |
<h2>CMAKE_BUILD_TYPE<a class="headerlink" href="#cmake-build-type" title="Permalink to this headline">¶</a></h2> | |
<ul class="simple"> | |
<li><p>Specifies the build type on single-configuration generators.</p></li> | |
<li><p>Typical: Release | Debug</p></li> | |
<li><p>See: <a class="reference external" href="https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html">https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html</a></p></li> | |
</ul> | |
<div class="admonition note"> | |
<p class="admonition-title">Note</p> | |
<p>IDEs, as Qt Creator, might set this variable base on the current build type on their own.</p> | |
</div> | |
</div> | |
<div class="section" id="cmake-c-compiler"> | |
<h2>CMAKE_C_COMPILER<a class="headerlink" href="#cmake-c-compiler" title="Permalink to this headline">¶</a></h2> | |
<ul class="simple"> | |
<li><p>Options: <strong>gcc-10</strong> | gcc-9 | gcc-8</p></li> | |
<li><p>See: <a class="reference external" href="https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER.html">https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER.html</a></p></li> | |
</ul> | |
<div class="admonition note"> | |
<p class="admonition-title">Note</p> | |
<p>IDEs, as Qt Creator, might set this variable via <em>kit</em> settings.</p> | |
</div> | |
</div> | |
<div class="section" id="cmake-cxx-compiler"> | |
<h2>CMAKE_CXX_COMPILER<a class="headerlink" href="#cmake-cxx-compiler" title="Permalink to this headline">¶</a></h2> | |
<ul class="simple"> | |
<li><p>Options: <strong>g++-10</strong> | g++-9 | g++-8</p></li> | |
<li><p>See: <a class="reference external" href="https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER.html">https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER.html</a></p></li> | |
</ul> | |
<div class="admonition note"> | |
<p class="admonition-title">Note</p> | |
<p>IDEs, as Qt Creator, might set this variable via <em>kit</em> settings.</p> | |
</div> | |
</div> | |
<div class="section" id="cmake-object-path-max"> | |
<h2>CMAKE_OBJECT_PATH_MAX<a class="headerlink" href="#cmake-object-path-max" title="Permalink to this headline">¶</a></h2> | |
<ul class="simple"> | |
<li><p>Under windows, errors from too long paths could be prevented by setting this value to 255 (maximum).</p></li> | |
<li><p>See: <a class="reference external" href="https://cmake.org/cmake/help/latest/variable/CMAKE_OBJECT_PATH_MAX.html">https://cmake.org/cmake/help/latest/variable/CMAKE_OBJECT_PATH_MAX.html</a></p></li> | |
</ul> | |
</div> | |
<div class="section" id="use-ccache"> | |
<span id="cmake-openpass-variables"></span><h2>USE_CCACHE<a class="headerlink" href="#use-ccache" title="Permalink to this headline">¶</a></h2> | |
<ul class="simple"> | |
<li><p>Activates ccache (see <a class="reference internal" href="../../other_information/10_external_dependencies.html#prerequisites-ccache"><span class="std std-ref">Ccache</span></a>)</p></li> | |
<li><p>Options: <strong>ON</strong> | OFF</p></li> | |
</ul> | |
</div> | |
<div class="section" id="with-simcore"> | |
<h2>WITH_SIMCORE<a class="headerlink" href="#with-simcore" title="Permalink to this headline">¶</a></h2> | |
<ul class="simple"> | |
<li><p>Build OSI based scenario simulation, also know as openPASS simulation core (opSimulation).</p></li> | |
<li><p>Options: OFF | <strong>ON</strong></p></li> | |
</ul> | |
</div> | |
<div class="section" id="with-doc"> | |
<h2>WITH_DOC<a class="headerlink" href="#with-doc" title="Permalink to this headline">¶</a></h2> | |
<ul class="simple"> | |
<li><p>Build sphinx based documentation</p></li> | |
<li><p>Options: OFF | <strong>ON</strong></p></li> | |
</ul> | |
</div> | |
<div class="section" id="with-api-doc"> | |
<h2>WITH_API_DOC<a class="headerlink" href="#with-api-doc" title="Permalink to this headline">¶</a></h2> | |
<ul class="simple"> | |
<li><p>Build sphinx based developer documentation</p></li> | |
<li><p>Options: <strong>OFF</strong> | ON</p></li> | |
</ul> | |
<div class="admonition note"> | |
<p class="admonition-title">Note</p> | |
<p>Automatically activates <code class="docutils literal notranslate"><span class="pre">WITH_DOC</span></code> if ON</p> | |
</div> | |
<div class="admonition warning"> | |
<p class="admonition-title">Warning</p> | |
<p>Building the API doc takes pretty long.</p> | |
</div> | |
</div> | |
<div class="section" id="with-coverage"> | |
<h2>WITH_COVERAGE<a class="headerlink" href="#with-coverage" title="Permalink to this headline">¶</a></h2> | |
<ul class="simple"> | |
<li><p>Add test targets for code coverage analysis (lcov) and HTML report generation (genhtml)</p></li> | |
<li><p>Options: <strong>OFF</strong> | ON</p></li> | |
<li><p>Use <code class="docutils literal notranslate"><span class="pre">COVERAGE_EXCLUDE</span></code> to remove folders from the analysis</p></li> | |
</ul> | |
<div class="admonition note"> | |
<p class="admonition-title">Note</p> | |
<p>The generated files are placed next to the test executable. | |
Each test will be built without optimization, which will increase the testing run-time.</p> | |
</div> | |
</div> | |
<div class="section" id="with-gui"> | |
<h2>WITH_GUI<a class="headerlink" href="#with-gui" title="Permalink to this headline">¶</a></h2> | |
<ul class="simple"> | |
<li><p>Activates the additional build of the GUI provided with <strong>OpenPASS</strong> (open source).</p></li> | |
<li><p>Options: <strong>OFF</strong> | ON</p></li> | |
</ul> | |
<div class="admonition note"> | |
<p class="admonition-title">Note</p> | |
<p>Please refer to <span class="xref std std-ref">gui_user_guide</span> for information on the GUI.</p> | |
</div> | |
</div> | |
<div class="section" id="with-tests"> | |
<h2>WITH_TESTS<a class="headerlink" href="#with-tests" title="Permalink to this headline">¶</a></h2> | |
<ul class="simple"> | |
<li><p>Build unit tests</p></li> | |
<li><p>Options: OFF | <strong>ON</strong></p></li> | |
</ul> | |
</div> | |
<div class="section" id="with-endtoend-tests"> | |
<h2>WITH_ENDTOEND_TESTS<a class="headerlink" href="#with-endtoend-tests" title="Permalink to this headline">¶</a></h2> | |
<ul class="simple"> | |
<li><p>Enables execution of end to end tests using <a class="reference internal" href="../../advanced_topics/30_testing.html#testing-endtoend"><span class="std std-ref">EndToEnd Test Framework</span></a>.</p></li> | |
<li><p>Tests can be ran by executing <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">install</span> <span class="pre">&&</span> <span class="pre">make</span> <span class="pre">pyOpenPASS</span></code></p></li> | |
<li><p>Options: <strong>OFF</strong> | ON</p></li> | |
</ul> | |
</div> | |
<div class="section" id="openpass-adjust-output"> | |
<h2>OPENPASS_ADJUST_OUTPUT<a class="headerlink" href="#openpass-adjust-output" title="Permalink to this headline">¶</a></h2> | |
<ul class="simple"> | |
<li><p>Adjusts if builds are executed in the (CMake default) folder <code class="docutils literal notranslate"><span class="pre">build</span></code> or directly in the specified install directory. | |
Latter mimics the former qmake behavior let you skip the call <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">install</span></code>.</p></li> | |
<li><p>Options: <strong>OFF</strong> | ON</p></li> | |
</ul> | |
<div class="admonition warning"> | |
<p class="admonition-title">Warning</p> | |
<p>When skipping <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">install</span></code>, dependencies are not copied into the output folder, which could cause crashes due to missing or outdated libraries.</p> | |
</div> | |
</div> | |
<div class="section" id="with-extended-osi"> | |
<span id="cmake-protobuf-arenas"></span><h2>WITH_EXTENDED_OSI<a class="headerlink" href="#with-extended-osi" title="Permalink to this headline">¶</a></h2> | |
<ul> | |
<li><p>When set, assumes that extended version of OSI is available, by enabling the <code class="docutils literal notranslate"><span class="pre">USE_EXTENDED_OSI</span></code> preprocessor variable.</p></li> | |
<li><p>This variable can be used to enable e.g. customized OSI features:</p> | |
<blockquote> | |
<div><div class="highlight-c++ notranslate"><div class="highlight"><pre><span></span><span class="cp">#ifdef USE_EXTENDED OSI</span> | |
<span class="cp">#include</span> <span class="cpf">"osi3/osi_<custom_message>.pb.h"</span><span class="cp"></span> | |
<span class="cp">#endif</span> | |
</pre></div> | |
</div> | |
</div></blockquote> | |
</li> | |
<li><p>Options: <strong>OFF</strong> | ON</p></li> | |
</ul> | |
</div> | |
<div class="section" id="with-protobuf-arena"> | |
<h2>WITH_PROTOBUF_ARENA<a class="headerlink" href="#with-protobuf-arena" title="Permalink to this headline">¶</a></h2> | |
<ul> | |
<li><div class="line-block"> | |
<div class="line"><em>Arena allocation is a C++-only feature that helps you optimize your memory usage and improve performance when working with protocol buffers.</em></div> | |
<div class="line">(from <a class="reference external" href="https://developers.google.com/protocol-buffers/docs/reference/arenas">https://developers.google.com/protocol-buffers/docs/reference/arenas</a>)</div> | |
</div> | |
</li> | |
<li><p>Options: <strong>ON</strong> | OFF</p></li> | |
</ul> | |
<div class="admonition note"> | |
<p class="admonition-title">Note</p> | |
<p>This feature is only available, if protobuf related libraries are also compiled with arenas (see <a class="reference internal" href="../20_install_prerequisites.html#building-osi"><span class="std std-ref">Build and Install OSI</span></a>). | |
Fortunately, the implementation falls back to regular allocation if not, which simply results in less performance.</p> | |
</div> | |
</div> | |
<div class="section" id="install-system-runtime-deps"> | |
<h2>INSTALL_SYSTEM_RUNTIME_DEPS<a class="headerlink" href="#install-system-runtime-deps" title="Permalink to this headline">¶</a></h2> | |
<ul class="simple"> | |
<li><p>during installation step, this configuration copies detected system runtime dependencies to install directory (i.e. MinGW system libraries)</p></li> | |
<li><p>Options: ON | <strong>OFF</strong></p></li> | |
</ul> | |
<div class="admonition warning"> | |
<p class="admonition-title">Warning</p> | |
<p>Under windows, automatic resolution might fail if other MinGW instances are installed. | |
As several programs use MinGW under the hood, it is recommended to set the used MinGW path in the CMAKE_PREFIX_PATH explicitly:</p> | |
<blockquote> | |
<div><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nv">CMAKE_PREFIX_PATH</span> <span class="o">=</span> mingw64/bin<span class="p">;</span><span class="se">\.</span>.. | |
</pre></div> | |
</div> | |
</div></blockquote> | |
</div> | |
</div> | |
<div class="section" id="install-extra-runtime-deps"> | |
<h2>INSTALL_EXTRA_RUNTIME_DEPS<a class="headerlink" href="#install-extra-runtime-deps" title="Permalink to this headline">¶</a></h2> | |
<ul class="simple"> | |
<li><p>during installation step, this configuration copies detected runtime dependencies (i.e. required shared libraries) specified in <cite>CMAKE_PREFIX_PATH</cite> to install directory</p></li> | |
<li><p>Options: ON | <strong>OFF</strong></p></li> | |
</ul> | |
</div> | |
<div class="section" id="make-targets-commands"> | |
<h2>Make Targets/Commands<a class="headerlink" href="#make-targets-commands" title="Permalink to this headline">¶</a></h2> | |
<p><strong>OpenPASS</strong> defines build targets by major modules or components, such as <code class="docutils literal notranslate"><span class="pre">opSimulation</span></code> or <code class="docutils literal notranslate"><span class="pre">Algorithm_FmuWrapper</span></code>. | |
After calling CMake, simply build <strong>openPASS</strong> by calling <code class="docutils literal notranslate"><span class="pre">make</span></code>.</p> | |
<div class="admonition-see-also admonition"> | |
<p class="admonition-title">See also</p> | |
<p><a class="reference external" href="https://www.tutorialspoint.com/unix_commands/make.htm">https://www.tutorialspoint.com/unix_commands/make.htm</a></p> | |
</div> | |
<div class="section" id="build-and-install"> | |
<h3>Build and Install<a class="headerlink" href="#build-and-install" title="Permalink to this headline">¶</a></h3> | |
<ul class="simple"> | |
<li><p><code class="docutils literal notranslate"><span class="pre">make</span></code></p></li> | |
<li><p><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">install</span></code></p> | |
</li> | |
<li><p><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre"><target></span></code>: Build a single target</p></li> | |
</ul> | |
</div> | |
<div class="section" id="executing-tests"> | |
<h3>Executing Tests<a class="headerlink" href="#executing-tests" title="Permalink to this headline">¶</a></h3> | |
<ul class="simple"> | |
<li><p>All tests: <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test</span> <span class="pre">ARGS="--output-on-failure</span> <span class="pre">-j3"</span></code></p></li> | |
<li><p>Single test: <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test</span> <span class="pre">opSimulation_Tests</span> <span class="pre">ARGS="--output-on-failure</span> <span class="pre">-j3"</span></code></p></li> | |
</ul> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<footer> | |
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> | |
<a href="40_custom_proto.html" class="btn btn-neutral float-right" title="Custom Protobuf Build" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a> | |
<a href="../50_further_guidance.html" class="btn btn-neutral float-left" title="Further Guidance" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a> | |
</div> | |
<hr/> | |
<div role="contentinfo"> | |
<p> | |
© Copyright 2021 OpenPASS Working Group. | |
</p> | |
</div> | |
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a | |
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a> | |
provided by <a href="https://readthedocs.org">Read the Docs</a>. | |
</footer> | |
</div> | |
</div> | |
</section> | |
</div> | |
<script type="text/javascript"> | |
jQuery(function () { | |
SphinxRtdTheme.Navigation.enable(true); | |
}); | |
</script> | |
</body> | |
</html> |