MSYS build scripts and instructions (#99) and warning fixes

* Preliminary MSYS2 + MinGW build scripts and instructions.

* CMakeLists.txt: MinGW tweaks, enforce C++03, suppress warnings for now.

* Fix some GCC warnings.

* Fix unused parameter warnings coming from Ifc*.h.

* Fix warning regarding unreachable code (++jt) on MSVC.

* Add IfcParse_EXPORT for IfcInvalidTokenException

* Fix potentially uninitialized pointer variables.

* Note about OpenCASCADE cyclic dependencies fix.

* GCC warning fix: don't generate 'current_enum' variable that is only set and not used for anything ever

* Work around -Wmaybe-uninitialized warnings about boost::optional constructs. Also prevent passing of negative values for --bounds.

* Remove unused variable.

* CMakeLists.txt: ENABLE_BUILD_OPTIMIZATIONS for GCC (simply enforce -03)
This commit is contained in:
Ali Kämäräinen
2016-07-15 06:49:32 +03:00
committed by Thomas Krijnen
parent 435eb7ae10
commit 4a85e5e7a5
26 changed files with 1125 additions and 938 deletions
+22 -9
View File
@@ -5,10 +5,18 @@ and its dependencies.
As a general guideline, `.cmd` files are non-standalone batch files that need to be run from command prompt or from
another batch file, and/or while the Visual Studio environment variables set, and `.bat` files are standalone batch
files that can also be invoked e.g. by double-clicking in the File Explorer.
files that can also be invoked e.g. by double-clicking in the File Explorer. `.sh` files are for MSYS2 + MinGW compilation.
Usage Instructions
------------------
### MSYS2 + MinGW
Building using MSYS2 + MinGW is very similar to using the Visual Studio batch files, but instead the shell scripts
are used. Note that the MSYS2 + MinGW support is currently a bit experimental. It is advised to check out the contents
of the shell scripts before using them. Note that contrary to Visual Studio, with MinGW all of the dependencies are not
built or used as static libaries. Currently Release build is used for all libraries.
### Visual Studio
Execute `build-deps.cmd` to fetch, build and install the dependencies. The batch file will print the requirements for
a successful execution. The script allows a few user-configurable build options which are listed in the usage
instructions. Either edit the script file or set these values before running the script.
@@ -78,20 +86,25 @@ Directory Structure
------------------
```
..
+---build-vs<VER>-<ARCH> - Created by run-cmake.bat, for a certain VS version and target architecture
+---deps - Created by build-deps.cmd, common for all VS versions and target architectures
+---deps-installed-vs<VER>-<ARCH> - Created by build-deps.cmd, for a certain VS version and target architecture
+---installed-vs<VER>-<ARCH> - Created by building the IFCOS's INSTALL project
+---build-* - Created by run-cmake.bat/sh, specific for a certain compiler and and target architecture
+---deps - Created by build-deps.cmd/sh, common for all compilers
+---deps-*-installed - Created by build-deps.cmd/sh, specific for a certain compiler and target architecture
+---installed-* - Created by installing the IFCOS project, specific for a certain compiler and target architecture
\---win
| build-all.cmd - Runs all of the build scripts for IFCOS and it dependencies in a row without pauses
| build-deps.cmd - Fetches and builds all needed dependencies for IFCOS
| build-deps.cmd - Fetches and builds all needed dependencies for IFCOS using Visual Studio
| build-deps.sh - Fetches and builds all needed dependencies for IFCOS using MSYS2 + MinGW
| BuildDepsCache-<ARCH>.txt - Cache file created by build-deps.cmd
| build-ifcopenshell.bat - Builds IFCOS
| build-ifcopenshell.bat - Builds IFCOS using Visual Studio
| build-ifcopenshell.sh - Builds IFCOS using MSYS2 + MinGW
| build-type-cfg.cmd - Utility file used by the build scripts
| install-ifcopenshell.bat - Builds IFCOS's INSTALL project
| install-ifcopenshell.bat - Installs/deployes IFCOS using Visual Studio.
| install-ifcopenshell.sh - Installs/deployes IFCOS using MSYS2 + MinGW.
| readme.md - This file
| run-cmake.bat - Sets environment variables for the dependencies and runs CMake for IFCOS
| run-cmake.bat - Sets environment variables for the dependencies and runs CMake for IFCOS using Visual Studio
| run-cmake.sh - Sets environment variables for the dependencies and runs CMake for IFCOS using MSYS2 + MinGW
| set-python-to-path.bat - Utility for setting PYTHONHOME (read from BuildDepsCache-<ARCH>.txt) to PATH
| vs-cfg.cmd - Utility file used by the build scripts
\---patches - Contains patches for the dependencies
\---utils - Contains various utilities for the build scripts
```