All Projects → cmake-maven-project → cmake-maven-project

cmake-maven-project / cmake-maven-project

Licence: other
Project to enable using CMake from a Maven build.

Programming Languages

java
68154 projects - #9 most used programming language
XSLT
1337 projects
CMake
9771 projects
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to cmake-maven-project

pcljava
A port of the Point Cloud Library (PCL) using Java Native Interface (JNI).
Stars: ✭ 19 (-66.67%)
Mutual labels:  maven
Simple-YAML
A Java API that provides an easy-to-use way to store data using the YAML format.
Stars: ✭ 68 (+19.3%)
Mutual labels:  maven
WebChat
一份关于webSocket网页聊天的小demo
Stars: ✭ 54 (-5.26%)
Mutual labels:  maven
maven
Development repository for the maven cookbook
Stars: ✭ 35 (-38.6%)
Mutual labels:  maven
wordcount
Hadoop MapReduce word counting with Java
Stars: ✭ 18 (-68.42%)
Mutual labels:  maven
esm
Lightweight communicating state machine framework for embedded systems
Stars: ✭ 21 (-63.16%)
Mutual labels:  cmake
manon
🧪 Play with SpringBoot 2, JWT, Querydsl, GraphQL, Docker, ELK, PostgreSQL, MariaDB, Redis, MongoDB, Flyway, Maven, Gradle, TestNG, JUnit5, JaCoCo, GreenMail, CI, Quality Gates, Prometheus, Gatling, etc.
Stars: ✭ 26 (-54.39%)
Mutual labels:  maven
computer-vision-dojo
This is a repository to learn and get more computer vision skills, make robotics projects integrating the computer vision as a perception tool and create a lot of awesome advanced controllers for the robots of the future.
Stars: ✭ 15 (-73.68%)
Mutual labels:  cmake
cpp-utilities
Common C++ classes and routines used by my applications such as argument parser, IO and conversion utilities
Stars: ✭ 35 (-38.6%)
Mutual labels:  cmake
cmake-cheatsheet
CMake Cheat Sheet
Stars: ✭ 37 (-35.09%)
Mutual labels:  cmake
broom
A disk cleaning utility for developers.
Stars: ✭ 38 (-33.33%)
Mutual labels:  maven
sign-maven-plugin
Maven plugin which creates Open PGP / GPG signatures for all of the project's artifacts
Stars: ✭ 34 (-40.35%)
Mutual labels:  maven
tank-battle
Java坦克大战游戏,基于Spring Boot,JDK8,Swing组件开发,有一些Bug,还在持续更新完善中...
Stars: ✭ 52 (-8.77%)
Mutual labels:  maven
jenkins-pipeline-gitflow-maven
Sample Maven project with a Jenkinsfile doing git-flow based release management
Stars: ✭ 47 (-17.54%)
Mutual labels:  maven
flexmojos-introduction
A gentle introduction to Flexmojos & Maven
Stars: ✭ 50 (-12.28%)
Mutual labels:  maven
cheshuo
🎃A lightweight game server framework. Based on Springboot and Netty. Using ProtoBuf as communication between client and server.
Stars: ✭ 23 (-59.65%)
Mutual labels:  maven
OpenJij
OpenJij : Framework for the Ising model and QUBO.
Stars: ✭ 57 (+0%)
Mutual labels:  cmake
rpm-builder
Maven RPM builder plugin
Stars: ✭ 46 (-19.3%)
Mutual labels:  maven
wislove
Java 服务端api解决方案,处理部分通用业务逻辑。包括用户中心,支付,订单,IM相关,内容管理,角色权限授权。以及分库分表的处理,RPC分布式的解决方案等。一个人慢慢做
Stars: ✭ 14 (-75.44%)
Mutual labels:  maven
maven-native
www.mojohaus.org/maven-native/
Stars: ✭ 13 (-77.19%)
Mutual labels:  maven

CMake-Maven-Project build-status

Introduction

A Maven project for the CMake build system. It can be used by including it as a plugin within your Maven project's pom.xml file.

This repository originally lived on Google Code and was migrated to GitHub (and Git) after Google Code shut down.

Sample Usage

Generate Goal

<plugin>
  <groupId>com.googlecode.cmake-maven-project</groupId>
  <artifactId>cmake-maven-plugin</artifactId>
  <version>3.22.1-b1</version>
  <executions>
    <execution>
      <id>cmake-generate</id>
      <goals>
        <goal>generate</goal>
      </goals>
      <configuration>
        <sourcePath>
          <!-- The directory containing CMakeLists -->
        </sourcePath>
        <targetPath>
          <!-- The directory write the project files to -->
        </targetPath>
        <generator>
          <!--
          Optional: Overrides the default generator used by cmake.
          The list of available values can be found at 
          https://cmake.org/cmake/help/v3.22/manual/cmake-generators.7.html
          -->
        </generator>
        <environmentVariables>
          <!--
          Optional: Additional environment variables to expose to cmake. If a variable was already set,
          overrides the previous value.             
          -->              
          <key>value</key>
        </environmentVariables>
        <options>
          <!--
          Optional: One or more options found at https://cmake.org/cmake/help/v3.22/manual/cmake.1.html
          For example:
          -->
          <option>-DBUILD_THIRDPARTY:bool=on</option>
        </options>
      </configuration>
    </execution>
  </executions>
</plugin>

Compile Goal

<plugin>
  <groupId>com.googlecode.cmake-maven-project</groupId>
  <artifactId>cmake-maven-plugin</artifactId>
  <version>3.22.1-b1</version>
  <executions>
    <execution>
      <id>cmake-compile</id>
      <goals>
        <goal>compile</goal>
      </goals>
      <configuration>
        <config>
          <!-- Optional: the build configuration (e.g. "x64|Release") -->
        </config>
        <target>
          <!-- Optional: the build "target" -->
        </target>
        <projectDirectory>
          <!-- "targetPath" from the "generate" goal -->
        </projectDirectory>
        <environmentVariables>
          <key>value</key>
        </environmentVariables>
      </configuration>
    </execution>
  </executions>
</plugin>

Test Goal

<plugin>
  <groupId>com.googlecode.cmake-maven-project</groupId>
  <artifactId>cmake-maven-plugin</artifactId>
  <version>3.22.1-b1</version>
  <executions>
    <execution>
      <id>cmake-test</id>
      <goals>
        <goal>test</goal>
      </goals>
      <configuration>
        <!-- "buildDirectory" is "targetPath" from the "generate" goal -->
        <buildDirectory>${project.build.directory}</buildDirectory>
        <!-- Optional: do not fail the build on test failures. false by default. -->
        <testFailureIgnore>true</testFailureIgnore>
        <!-- Optional: skip only ctest tests. false by default. -->
        <ctest.skip.tests>true</ctest.skip.tests>
        <!-- Optional: Skip all Maven tests. false by default -->
        <maven.test.skip>true</maven.test.skip>
        <!-- Optional: the number of threads tests should use -->
        <threadCount>2</threadCount>
        <!-- Optional: dashboard configuration; used with CTestConfig.cmake -->
        <dashboard>Experimental</dashboard>
      </configuration>
    </execution>
  </executions>
</plugin>

Examples

The following projects contain examples of how to use this plugin:

Requirements API

Building instructions

To build the plugin, run:

mvn install

To clean an old build, run:

mvn clean

By default, Maven will activate the right profile based on your JVM:

  • windows-x86_64
  • linux-x86_64
  • linux-arm_32
  • mac-x86_64
  • mac-aarch64

If detection does not work, or you wish to override it then set -P<profile>.

For instance, when building for 64-bit Linux machines, use:

mvn -Plinux-x86_64 install

Using a local CMake installation

Sometimes it is preferable or necessary to use a preexisting CMake installation. cmake.org doesn't provide binaries for some platforms, such as Raspberry Pi. In such cases, users can install the binaries themselves (typically using package managers like apt-get) and point the plugin at them.

  1. Set ${cmake.download} to false.
  2. Optionally set ${cmake.dir} to the directory containing the binaries (e.g. /usr/bin). Otherwise, the plugin will expect the binaries to be on the PATH.

That's it! To learn more about CMake itself, consult the CMake.org website.

License

CMake-Maven-Project is released under an Apache License 2.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].