mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-21 22:50:26 -06:00
Tests: Add test for exported JARs
Add a unit test to test the new functions to export JAR targets. The test builds three sub-projects: two that generate and export a JAR (one does a build-directory-only export, one an install-only export), and a third that consumes the first two as imported targets.
This commit is contained in:
committed by
Brad King
parent
5341c0d84a
commit
95d84369b8
10
Tests/JavaExportImport/BuildExport/CMakeLists.txt
Normal file
10
Tests/JavaExportImport/BuildExport/CMakeLists.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
project(foo Java)
|
||||
|
||||
cmake_minimum_required (VERSION 3.5)
|
||||
set(CMAKE_VERBOSE_MAKEFILE 1)
|
||||
|
||||
find_package(Java COMPONENTS Development)
|
||||
include(UseJava)
|
||||
|
||||
add_jar(${PROJECT_NAME} Foo.java)
|
||||
export_jars(TARGETS ${PROJECT_NAME} FILE JavaBuildExportTestConfig.cmake)
|
||||
11
Tests/JavaExportImport/BuildExport/Foo.java
Normal file
11
Tests/JavaExportImport/BuildExport/Foo.java
Normal file
@@ -0,0 +1,11 @@
|
||||
class Foo
|
||||
{
|
||||
public Foo()
|
||||
{
|
||||
}
|
||||
|
||||
public void printName()
|
||||
{
|
||||
System.out.println("Foo");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user