summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2004-09-24 19:40:40 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2004-09-24 19:40:40 (GMT)
commit0a26f8d46cdcb7e39a2cf3d28f367f2e444272d3 (patch)
tree763a6b9306dd97c7b713d3d80c83483981052a41 /Tests
parente63ea0a6d25c203a896972efa330e5c271fa119b (diff)
downloadCMake-0a26f8d46cdcb7e39a2cf3d28f367f2e444272d3.zip
CMake-0a26f8d46cdcb7e39a2cf3d28f367f2e444272d3.tar.gz
CMake-0a26f8d46cdcb7e39a2cf3d28f367f2e444272d3.tar.bz2
ENH: add some java code to try and find the system path
Diffstat (limited to 'Tests')
-rw-r--r--Tests/Java/CMakeCheckJavaPath.java8
-rw-r--r--Tests/Java/CMakeLists.txt8
2 files changed, 16 insertions, 0 deletions
diff --git a/Tests/Java/CMakeCheckJavaPath.java b/Tests/Java/CMakeCheckJavaPath.java
new file mode 100644
index 0000000..c838435
--- /dev/null
+++ b/Tests/Java/CMakeCheckJavaPath.java
@@ -0,0 +1,8 @@
+class CMakeCheckJavaPath
+{
+ public static void main(String args[])
+ {
+ System.out.println(System.getProperty("sun.boot.class.path", "(none)"));
+ }
+}
+
diff --git a/Tests/Java/CMakeLists.txt b/Tests/Java/CMakeLists.txt
index cbba036..8736b74 100644
--- a/Tests/Java/CMakeLists.txt
+++ b/Tests/Java/CMakeLists.txt
@@ -2,6 +2,14 @@ PROJECT(hello Java)
SET(CMAKE_VERBOSE_MAKEFILE 1)
SET(OLD_CUSTOM_COMMAND_WAY )
IF(NOT OLD_CUSTOM_COMMAND_WAY)
+ CONFIGURE_FILE(${hello_SOURCE_DIR}/CMakeCheckJavaPath.java
+ ${hello_BINARY_DIR}/CMakeCheckJavaPath.java IMMEDIATE)
+ EXEC_PROGRAM(${CMAKE_Java_COMPILER} ${hello_BINARY_DIR}
+ ARGS CMakeCheckJavaPath.java)
+ EXEC_PROGRAM(${CMAKE_Java_RUNTIME} ${hello_BINARY_DIR}
+ ARGS CMakeCheckJavaPath OUTPUT_VARIABLE OUT)
+ INCLUDE_DIRECTORIES(${hello_SOURCE_DIR} ${OUT}
+ ${hello_BINARY_DIR} )
ADD_LIBRARY(hello A.java HelloWorld.java)
ENDIF(NOT OLD_CUSTOM_COMMAND_WAY)