1 <?xml version="1.0" encoding="UTF-8"?>
  2 <!--
  3 Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
  4 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  5 
  6 This code is free software; you can redistribute it and/or modify it
  7 under the terms of the GNU General Public License version 2 only, as
  8 published by the Free Software Foundation.  Oracle designates this
  9 particular file as subject to the "Classpath" exception as provided
 10 by Oracle in the LICENSE file that accompanied this code.
 11 
 12 This code is distributed in the hope that it will be useful, but WITHOUT
 13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 14 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 15 version 2 for more details (a copy is included in the LICENSE file that
 16 accompanied this code).
 17 
 18 You should have received a copy of the GNU General Public License version
 19 2 along with this work; if not, write to the Free Software Foundation,
 20 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 21 
 22 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 23 or visit www.oracle.com if you need additional information or have any
 24 questions.
 25 -->
 26 
 27 
 28 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 29 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 30    <modelVersion>4.0.0</modelVersion>
 31    <groupId>oracle.code</groupId>
 32    <version>1.0</version>
 33    <artifactId>hat.backends</artifactId>
 34    <packaging>pom</packaging>
 35     <!-- this required to inherit parent properties -->
 36     <parent>
 37         <groupId>oracle.code</groupId>
 38         <version>1.0</version>
 39         <artifactId>hat.root</artifactId>
 40     </parent>
 41 
 42    <modules>
 43      <module>opencl</module>
 44      <module>cuda</module>
 45      <module>mock</module>
 46      <module>ptx</module>
 47      <!--<module>spirv</module>-->
 48    </modules>
 49    <build>
 50      <plugins>
 51         <plugin>
 52            <groupId>org.codehaus.mojo</groupId>
 53            <artifactId>exec-maven-plugin</artifactId>
 54            <version>3.1.0</version>
 55             <executions>
 56               <execution>
 57                 <id>cmake_compile</id>
 58                 <phase>compile</phase>
 59                 <goals>
 60                    <goal>exec</goal>
 61                 </goals>
 62                 <configuration>
 63                    <executable>cmake</executable>
 64                    <arguments>
 65                       <argument>-DHAT_TARGET=${hat.target}</argument>
 66                       <argument>-B</argument>
 67                       <argument>cmake-build-debug</argument>
 68                    </arguments>
 69                 </configuration>
 70              </execution>
 71               <execution>
 72                 <id>cmake_install_build</id>
 73                 <phase>install</phase>
 74                 <goals>
 75                    <goal>exec</goal>
 76                 </goals>
 77                 <configuration>
 78                    <executable>cmake</executable>
 79                    <arguments>
 80                       <argument>--build</argument>
 81                       <argument>cmake-build-debug</argument>
 82                    </arguments>
 83                 </configuration>
 84              </execution>
 85               <execution>
 86                 <id>cmake_install_copy_libs</id>
 87                 <phase>install</phase>
 88                 <goals>
 89                    <goal>exec</goal>
 90                 </goals>
 91                 <configuration>
 92                    <executable>cmake</executable>
 93                    <arguments>
 94                       <argument>--build</argument>
 95                       <argument>cmake-build-debug</argument>
 96                       <argument>--target</argument>
 97                       <argument>copy_libs</argument>
 98                    </arguments>
 99                 </configuration>
100              </execution>
101 
102              <execution>
103                 <id>cmake_clean</id>
104                 <phase>clean</phase>
105                 <goals>
106                    <goal>exec</goal>
107                 </goals>
108                 <configuration>
109                    <executable>rm </executable>
110                    <arguments>
111                       <argument>-rf</argument>
112                       <argument>cmake-build-debug</argument>
113                    </arguments>
114                 </configuration>
115              </execution>
116 
117            </executions>
118         </plugin>
119      </plugins>
120    </build>
121 
122 </project>