Skip to content

Commit

Permalink
Public release of MSCL 29.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rwslord committed Aug 10, 2017
1 parent eef5124 commit 7973e5e
Show file tree
Hide file tree
Showing 336 changed files with 12,449 additions and 5,438 deletions.
72 changes: 7 additions & 65 deletions BuildScripts/buildReadme.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,7 @@
# **MSCL build info**

The following information describes how to build MSCL for various platforms and programming languages.
Note that the specific versions of libraries/build tools may not be needed, however it is recommended to be on the same Major version. For instance, SWIG 3.0.6 is called out below. SWIG 3.0.5 will likely work fine, but SWIG 2.X.X will not.

#### Note:
Unfortunately, it seems there might be an issue in newer versions of bjam using msvc ([see this Stack Overflow](http://stackoverflow.com/questions/29450634/compile-boost-python-tutorial-with-vs-2015-ctp-5-and-python-3-5a-on-windows-10-t)).

From our internal build (using bjam from boost 1.61), it seems this fixes the issue:

1. Edit the file `D:\boost\boost_1_61_0\tools\build\src\tools\msvc.jam`
2. Change this (lines 1358-1363) from:
```
generators.register [ new msvc-linking-generator msvc.link.dll :
OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB : SHARED_LIB IMPORT_LIB :
<toolset>msvc <suppress-import-lib>false ] ;
generators.register [ new msvc-linking-generator msvc.link.dll :
OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB : SHARED_LIB :
<toolset>msvc <suppress-import-lib>true ] ;
```
to this:
```
generators.register [ new msvc-linking-generator msvc.link.dll :
OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB : SHARED_LIB IMPORT_LIB :
<toolset>msvc ] ;
```
3. Remove this (line 1479):
```
toolset.flags msvc.link.dll LINKFLAGS <suppress-import-lib>true : /NOENTRY ;
```
Note that the specific versions of libraries may not be needed, however it is recommended to be on the same Major version. For instance, SWIG 3.0.6 is called out below. SWIG 3.0.5 will likely work fine, but SWIG 2.X.X will not.

## **Windows**

Expand All @@ -38,9 +12,14 @@ toolset.flags msvc.link.dll LINKFLAGS <suppress-import-lib>true : /NOENTRY ;
- [SWIG 3.0.6](http://swig.org/) (.NET, Python only)
- [Turtle 1.2.6](http://turtle.sourceforge.net/) (Unit Tests only)
- [Boost.Build](http://www.boost.org/build/) (Python only)
- [Python 2.7 or 3.6](https://www.python.org/downloads/) (Python only)
- [Python 2.7.10](https://www.python.org/downloads/) (Python only)
- Create an environment variable, `LIB_PATH`, that points to a folder containing the above libraries.

Use the master build script to build everything (C++, .NET, Python, Unit Tests, and Documentation):
```
BuildScripts/buildAll.cmd
```

### C++

**Static Lib (`MSCL.lib`) - (x86, Debug/Release):**
Expand Down Expand Up @@ -80,29 +59,6 @@ or

Building the Python library involves using Boost.Build framework, using the `bjam` or `b2` command, and utilizing the provided Jamfiles.

Configure bjam by creating a [site-config.jam or user-config.jam file](http://www.boost.org/build/doc/html/bbv2/overview/configuration.html) in your Home path or Boost Build Path. The contents of the file should look like this:
```
using msvc
:
:
: <cxxflags>/I"C:/Lib/boost/boost_1_61_0"
<cxxflags>/I"C:/Python27/include"
<linkflags>/LIBPATH:"C:/Lib/boost/boost_1_61_0/lib32-msvc-14.0"
<linkflags>/LIBPATH:"C:/Python27/libs"
<cxxflags>/D"WIN32"
<cxxflags>/D"_WINDOWS"
<cxxflags>/D"_USRDLL"
<cxxflags>/D"NOMINMAX"
<cxxflags>/D"_WIN32_WINNT=0x0501"
<cxxflags>/D"_USING_V110_SDK71_"
<cxxflags>/D"BOOST_ALL_NO_LIB"
<cxxflags>/D"_UNICODE"
<cxxflags>/D"UNICODE"
;
```

Note: Please see the [Note on the bjam bug](https://github.com/LORD-MicroStrain/MSCL/blob/master/BuildScripts/buildReadme.md#note).

**Python File (`mscl.py` + `_mscl.pyd`)**

```
Expand All @@ -128,8 +84,6 @@ del Output\Python\_mscl.lib
- python2.7-dev (Python only)
- swig 3.0.6 (Python only)

**Note:** if using a version of GCC that does not fully support C++11, you may need to add the `-std=C++11` option for the cxx flags when building.

Use the master build script (run from the MSCL root directory) to build everything (C++, Python, Unit Tests):
```
BuildScripts/buildAll.sh
Expand All @@ -147,18 +101,6 @@ bjam MSCL//stage_c++ release

Building the Python library involves using Boost.Build framework, using the `bjam` or `b2` command, and utilizing the provided Jamfiles.

Configure bjam by creating a [site-config.jam or user-config.jam file](http://www.boost.org/build/doc/html/bbv2/overview/configuration.html) in your Home path or Boost Build Path. The contents of the file should look like this:
```
using gcc
: host
: g++
: <cxxflags>-I/usr/include/python2.7
;
```

Note: Please see the [Note on the bjam bug](https://github.com/LORD-MicroStrain/MSCL/blob/master/BuildScripts/buildReadme.md#note).


**Python File (`mscl.py` + `_mscl.so`)**

```
Expand Down
56 changes: 49 additions & 7 deletions BuildScripts/msbuildConfig_CPP.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,16 @@
<!--Clean and build the core project in Release build-->
CleanCore;
BuildCore;
CleanCore64;
BuildCore64;

<!--Clean and build the core project in Debug build-->
CleanCoreDebug;
BuildCoreDebug;
CleanCore64Debug;
BuildCore64Debug;

<!--Clean and build the unit testing project in Release build, then run the generated unit test executable-->
<!--Clean and build the unit testing project in Release build, then run the generated unit test executable-->
CleanUnitTesting;
BuildUnitTesting;
RunUnitTesting;
Expand All @@ -36,16 +40,25 @@
<Target Name="BuildAll" DependsOnTargets="$(FullBuildTask)"/>


<!--CLEAN CORE C++ PROJECT (Static Lib)-->
<!--CLEAN CORE C++ PROJECT (x86) (Static Lib)-->
<Target Name="CleanCore">
<Message Text="=====================Cleaning the Core Project (Release)====================="/>
<Message Text="=====================Cleaning the Core Project (x86) (Release)====================="/>
<MSBuild Projects="@(CoreProjectsToBuild)"
Targets="Clean"
Properties="Configuration=$(ConfigurationCPP)">
</MSBuild>
</Target>

<!--CLEAN CORE C++ PROJECT in DEBUG (Static Lib)-->
<!--CLEAN CORE C++ PROJECT (x64) (Static Lib)-->
<Target Name="CleanCore64">
<Message Text="=====================Cleaning the Core Project (x64) (Release)====================="/>
<MSBuild Projects="@(CoreProjectsToBuild)"
Targets="Clean"
Properties="Configuration=$(ConfigurationCPP);Platform=x64">
</MSBuild>
</Target>

<!--CLEAN CORE C++ PROJECT (x86) in DEBUG (Static Lib)-->
<Target Name="CleanCoreDebug">
<Message Text="=====================Cleaning the Core Project (Debug)====================="/>
<MSBuild Projects="@(CoreProjectsToBuild)"
Expand All @@ -54,6 +67,15 @@
</MSBuild>
</Target>

<!--CLEAN CORE C++ PROJECT (x64) in DEBUG (Static Lib)-->
<Target Name="CleanCore64Debug">
<Message Text="=====================Cleaning the Core Project (Debug)====================="/>
<MSBuild Projects="@(CoreProjectsToBuild)"
Targets="Clean"
Properties="Configuration=$(ConfigurationCPPDebug);Platform=x64">
</MSBuild>
</Target>

<!--CLEAN UNIT TESTING PROJECT-->
<Target Name="CleanUnitTesting">
<Message Text="=====================Cleaning the Unit Testing Projects====================="/>
Expand All @@ -65,7 +87,7 @@



<!--BUILD CORE C++ PROJECT (Static Lib)-->
<!--BUILD CORE C++ PROJECT (x86) (Static Lib)-->
<Target Name="BuildCore">
<Message Text="=====================Building the Core Project (Release)====================="/>
<MSBuild Projects="@(CoreProjectsToBuild)"
Expand All @@ -75,7 +97,17 @@
</MSBuild>
</Target>

<!--BUILD CORE C++ PROJECT in Debug (Static Lib)-->
<!--BUILD CORE C++ PROJECT (x64) (Static Lib)-->
<Target Name="BuildCore64">
<Message Text="=====================Building the Core Project (Release)====================="/>
<MSBuild Projects="@(CoreProjectsToBuild)"
ContinueOnError="false"
Properties="Configuration=$(ConfigurationCPP);Platform=x64">
<Output ItemName="OutputFiles" TaskParameter="TargetOutputs"/>
</MSBuild>
</Target>

<!--BUILD CORE C++ PROJECT (x86) in Debug (Static Lib)-->
<Target Name="BuildCoreDebug">
<Message Text="=====================Building the Core Project (Debug)====================="/>
<MSBuild Projects="@(CoreProjectsToBuild)"
Expand All @@ -85,6 +117,16 @@
</MSBuild>
</Target>

<!--BUILD CORE C++ PROJECT (x86) in Debug (Static Lib)-->
<Target Name="BuildCore64Debug">
<Message Text="=====================Building the Core Project (Debug)====================="/>
<MSBuild Projects="@(CoreProjectsToBuild)"
ContinueOnError="false"
Properties="Configuration=$(ConfigurationCPPDebug);Platform=x64">
<Output ItemName="OutputFiles" TaskParameter="TargetOutputs"/>
</MSBuild>
</Target>

<!--BUILD UNIT TESTING PROJECT-->
<Target Name="BuildUnitTesting">
<Message Text="=====================Building the Unit Testing Project====================="/>
Expand All @@ -99,7 +141,7 @@
<!--RUN UNIT TESTING EXE-->
<Target Name="RunUnitTesting">
<Message Text="Running Unit Tests"/>
<Exec Command='"..\MSCL_Unit_Tests\build\Release (C++)\MSCL_Unit_Tests.exe" --output_format=XML --log_level=all --report_level=no 1>"..\MSCL_Unit_Tests\unitTestResults.xml"'/>
<Exec Command='"..\MSCL_Unit_Tests\build\x86\Release (C++)\MSCL_Unit_Tests.exe" --output_format=XML --log_level=all --report_level=no 1>"..\MSCL_Unit_Tests\unitTestResults.xml"'/>
</Target>

</Project>
Loading

0 comments on commit 7973e5e

Please sign in to comment.