[cmake-commits] alex committed CMakeLists.txt 1.9 1.10

cmake-commits at cmake.org cmake-commits at cmake.org
Thu Jun 21 14:06:54 EDT 2007


Update of /cvsroot/CMake/CMake/Tests/Java
In directory public:/mounts/ram/cvs-serv26323

Modified Files:
	CMakeLists.txt 
Log Message:

STYLE: add some more output, so it is easier to understand

Alex


Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/Java/CMakeLists.txt,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- CMakeLists.txt	24 Apr 2006 03:24:48 -0000	1.9
+++ CMakeLists.txt	21 Jun 2007 18:06:52 -0000	1.10
@@ -1,19 +1,22 @@
 PROJECT(hello Java)
 SET(CMAKE_VERBOSE_MAKEFILE 1)
   
-SET(OLD_CUSTOM_COMMAND_WAY )
-message("${hello_SOURCE_DIR} STREQUAL ${hello_BINARY_DIR}")
 IF("${hello_SOURCE_DIR}" STREQUAL "${hello_BINARY_DIR}")
+  MESSAGE("In Source, building Java using ADD_CUSTOM_COMMAND()")
   SET(OLD_CUSTOM_COMMAND_WAY 1)
+ELSE("${hello_SOURCE_DIR}" STREQUAL "${hello_BINARY_DIR}")
+  MESSAGE("Out of source, using built-in Java support")
+  SET(OLD_CUSTOM_COMMAND_WAY )
 ENDIF("${hello_SOURCE_DIR}" STREQUAL "${hello_BINARY_DIR}")
+
 IF(NOT OLD_CUSTOM_COMMAND_WAY)
+
   INCLUDE_DIRECTORIES(${hello_SOURCE_DIR}
     ${hello_BINARY_DIR} )
   ADD_LIBRARY(hello A.java HelloWorld.java)
-ENDIF(NOT OLD_CUSTOM_COMMAND_WAY)
 
+ELSE(NOT OLD_CUSTOM_COMMAND_WAY)
 
-IF(OLD_CUSTOM_COMMAND_WAY)
   ADD_CUSTOM_COMMAND(
     OUTPUT ${hello_BINARY_DIR}/A.class
     MAIN_DEPENDENCY ${hello_SOURCE_DIR}/A.java
@@ -33,4 +36,6 @@
   
   ADD_CUSTOM_TARGET(hello.jar ALL 
     DEPENDS ${hello_BINARY_DIR}/hello.jar)
-ENDIF(OLD_CUSTOM_COMMAND_WAY)
+
+ENDIF(NOT OLD_CUSTOM_COMMAND_WAY)
+



More information about the Cmake-commits mailing list