Skip to content

Commit

Permalink
Merge pull request #526 from AVSLab/feature/windows-debug-build
Browse files Browse the repository at this point in the history
Correct windows debug build flags
  • Loading branch information
patkenneally authored Dec 8, 2023
2 parents 8d12915 + b7a242e commit 6ecf071
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 17 deletions.
25 changes: 19 additions & 6 deletions docs/source/Install/installOnWindows.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Setup On Windows
================

The following was developed using Windows 7 and Visual Studio Community 2017 or 2019.
The following was developed using Windows 7 and Visual Studio Community 15 2017 or 16 2019.

Software setup
--------------
Expand All @@ -17,10 +17,10 @@ In order to run Basilisk, the following software will be necessary:
program from the command line
- `Python <https://www.python.org/downloads/windows/>`__ 3.8.x or greater
- `pip <https://pip.pypa.io/en/stable/installing/>`__
- Visual Studios 15 or Greater
- Visual Studios 15 2017 or greater
- `Swig <http://www.swig.org/download.html>`__ version 3 or 4
- (Optional) Get the `GitKraken <https://www.gitkraken.com>`__
application to be able to pull and manage a copy of Basilisk
- (Optional) A GiT GUI application such as `GitKraken <https://www.gitkraken.com>`__
to manage your copy of the Basilisk repository

The following python package dependencies are automatically checked and installed in the steps below.

Expand All @@ -32,11 +32,24 @@ Configuration
Strongly recommended to stick with default 64-bit installations.
Decide whether target deployment is 32 (win32) or 64 (x64) bit. Which ever chosen you will need the matching python and software for that architecture.

Configuring Python
Installing Python
~~~~~~~~~~~~~~~~~~

Python is installed using the Windows installer found on the Python website. Make sure to choose the correct
installer for your architecture.
installer for your architecture. When stepping through the installer there are two menus options menus. The
first is the optional features menu for which all options should be selected.

.. image:: /_images/static/windows-installer-python-optional-features-installer-menu.png
:align: center
:scale: 75%

The second menu is the python advanced options menu where both "Download debugging symbols" and "Download debug binaries
(requires VS 2017 or later)" should be selected in order to build Basilisk with a Debug profile. A Debug profile is
required to place accurate breakpoints/attach a debugger to C/C++ code.

.. image:: /_images/static/windows-installer-python-advanced-options-installer-menu.png
:align: center
:scale: 75%

Install Swig
~~~~~~~~~~~~
Expand Down
15 changes: 9 additions & 6 deletions docs/source/Support/User/createHtmlDocumentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ See :ref:`installOptionalPackages` to learn what python packages must be install

Making the HTML Documentation Folder
------------------------------------
To create the HTML documentation with all the associated scenario
figures, be sure to run ``pytest`` first from within the ``/src``
directory.
First generate the test plots::

cd src

pytest

Next, in a terminal window switch to the ``docs`` folder::

Expand All @@ -39,10 +41,11 @@ Finally, type the following command to build the HTML documenation::

The final html documenation folder is stored in ``docs/build/html``.

To open the HTML index file and view the documentation in the browser use::

make view

To clean out the sphinx generated documents and folder use::

make clean

To open the HTML index file and view the documentation in the browser use::

make view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/source/bskPkgOptions.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
``sphinx``
``sphinx<5.0``
``breathe``
``sphinx_rtd_theme==0.5.1``
``recommonmark``
Expand Down
12 changes: 8 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -396,10 +396,14 @@ if(MSVC)
# Make sure we are using Multi-Threaded run time library
foreach(flag CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG
CMAKE_CXX_FLAGS_RELEASE)
string(REPLACE "/D_DEBUG" "" "${flag}" "${${flag}}")
string(REPLACE "/MD" "${CONAN_LINK_RUNTIME_MULTI}" "${flag}" "${${flag}}")
string(REPLACE "/MDd" "${CONAN_LINK_RUNTIME_MULTI}" "${flag}" "${${flag}}")
string(REPLACE "/MTd" "${CONAN_LINK_RUNTIME_MULTI}" "${flag}" "${${flag}}")
if (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
string(REPLACE "/D_DEBUG" "" "${flag}" "${${flag}}")
string(REPLACE "/MDd" "${CONAN_LINK_RUNTIME_MULTI}" "${flag}" "${${flag}}")
string(REPLACE "/MTd" "${CONAN_LINK_RUNTIME_MULTI}" "${flag}" "${${flag}}")
else()
string(REPLACE "/MD" "${CONAN_LINK_RUNTIME_MULTI}" "${flag}" "${${flag}}")
string(REPLACE "/MT" "${CONAN_LINK_RUNTIME_MULTI}" "${flag}" "${${flag}}")
endif()
set("${flag}" "${${flag}} /EHsc")
endforeach()
elseif(APPLE)
Expand Down

0 comments on commit 6ecf071

Please sign in to comment.