You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2019/07/08 07:21:17 UTC
[plc4x] branch feature/s7-cpp updated: - Added the building of
boost back.
This is an automated email from the ASF dual-hosted git repository.
cdutz pushed a commit to branch feature/s7-cpp
in repository https://gitbox.apache.org/repos/asf/plc4x.git
The following commit(s) were added to refs/heads/feature/s7-cpp by this push:
new f8cf558 - Added the building of boost back.
f8cf558 is described below
commit f8cf55893fae567bdee0e209c5f9cf8549a7e094
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Mon Jul 8 09:21:00 2019 +0200
- Added the building of boost back.
---
plc4cpp/pom.xml | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 93 insertions(+), 2 deletions(-)
diff --git a/plc4cpp/pom.xml b/plc4cpp/pom.xml
index 06ed7dc..585c36e 100644
--- a/plc4cpp/pom.xml
+++ b/plc4cpp/pom.xml
@@ -38,8 +38,99 @@
<sonar.language>c++</sonar.language>
</properties-->
+ <properties>
+ <boost-includes.dir>${project.build.directory}/lib/boost/includes</boost-includes.dir>
+ </properties>
+
+ <profiles>
+ <profile>
+ <id>windows</id>
+ <activation>
+ <os>
+ <family>windows</family>
+ </os>
+ </activation>
+ <properties>
+ <boost-includes.dir>${project.build.directory}/lib/boost/includes/boost-${boost.version.underline-short}</boost-includes.dir>
+ </properties>
+ </profile>
+ </profiles>
+
<build>
<plugins>
+ <!-- First download the sources for building the boost library -->
+ <plugin>
+ <groupId>com.googlecode.maven-download-plugin</groupId>
+ <artifactId>download-maven-plugin</artifactId>
+ <version>1.4.0</version>
+ <executions>
+ <execution>
+ <id>get-boost</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>wget</goal>
+ </goals>
+ <configuration>
+ <url>${boost.url}</url>
+ <unpack>true</unpack>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <!--
+ Then execute two boost build phases:
+
+ 1) bootstrap the boost build
+ 2) Perform the actual boost build and install
+ -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>1.6.0</version>
+ <executions>
+ <execution>
+ <id>bootstrap</id>
+ <phase>process-sources</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <executable>${boost.bootstrap.executable}</executable>
+ <arguments>
+ <argument>gcc</argument>
+ </arguments>
+ <workingDirectory>${project.build.directory}/boost_${boost.version.underline}</workingDirectory>
+ </configuration>
+ </execution>
+ <execution>
+ <id>compile</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <executable>${boost.build.executable}</executable>
+ <arguments>
+ <!-- Have the build install the built libraries -->
+ <argument>install</argument>
+ <!-- Tell it where to install the libraries and header files -->
+ <argument>--prefix=${project.build.directory}/lib/boost</argument>
+ <!-- List of modules to build -->
+ <argument>--with-system</argument>
+ <argument>--with-thread</argument>
+ <argument>--with-date_time</argument>
+ <argument>--with-regex</argument>
+ <argument>--with-log</argument>
+ <!-- On Windows machines the build failed, if this was not explicitly set -->
+ <argument>address-model=64</argument>
+ </arguments>
+ <workingDirectory>${project.build.directory}/boost_${boost.version.underline}</workingDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
<plugin>
<groupId>com.googlecode.cmake-maven-project</groupId>
<artifactId>cmake-maven-plugin</artifactId>
@@ -75,7 +166,7 @@
<classifier>${os.classifier}</classifier>
<environmentVariables>
<BOOST_ROOT>${project.build.directory}/lib</BOOST_ROOT>
- <BOOST_INCLUDEDIR>${project.build.directory}/lib/boost/includes</BOOST_INCLUDEDIR>
+ <BOOST_INCLUDEDIR>${boost-includes.dir}</BOOST_INCLUDEDIR>
<BOOST_LIBRARYDIR>${project.build.directory}/lib/boost/lib</BOOST_LIBRARYDIR>
<Boost_NO_SYSTEM_PATHS>ON</Boost_NO_SYSTEM_PATHS>
</environmentVariables>
@@ -94,7 +185,7 @@
<classifier>${os.classifier}</classifier>
<environmentVariables>
<BOOST_ROOT>${project.build.directory}/lib</BOOST_ROOT>
- <BOOST_INCLUDEDIR>${project.build.directory}/lib/boost/includes</BOOST_INCLUDEDIR>
+ <BOOST_INCLUDEDIR>${boost-includes.dir}</BOOST_INCLUDEDIR>
<BOOST_LIBRARYDIR>${project.build.directory}/lib/boost/lib</BOOST_LIBRARYDIR>
<Boost_NO_SYSTEM_PATHS>ON</Boost_NO_SYSTEM_PATHS>
</environmentVariables>