Commit ce20ec58 authored by Brian Panneton's avatar Brian Panneton
Browse files

FIX: Made changes for WinXP Compatability

parent 48abd2f4
SET(java_runtime @JAVA_RUNTIME@)
SET(java_runtime "@JAVA_RUNTIME@")
SET(java_binary_dir @CMAKE_CURRENT_BINARY_DIR@)
SET(ENV{PATH} "${PATH}${SEPARATOR}$ENV{PATH}")
......@@ -7,9 +7,9 @@ SET(ENV{CLASSPATH} "${CLASSPATH}${SEPARATOR}$ENV{CLASSPATH}")
MESSAGE("| Calling:\t${java_runtime} ${EXECUTABLE} ${ARGUMENTS}")
EXECUTE_PROCESS(
COMMAND ${java_runtime} ${EXECUTABLE} ${ARGUMENTS}
WORKING_DIRECTORY ${java_binary_dir}
RESULT_VARIABLE java_result
COMMAND "${java_runtime}" "${EXECUTABLE}" ${ARGUMENTS}
WORKING_DIRECTORY "${java_binary_dir}"
RESULT_VARIABLE java_result
OUTPUT_VARIABLE java_output
ERROR_VARIABLE java_error
)
......@@ -28,3 +28,6 @@ MESSAGE("----------------------------------------------------------")
IF(java_error)
MESSAGE(SEND_ERROR "Test Failed.")
ENDIF(java_error)
IF(NOT "${java_result}" STREQUAL "0")
MESSAGE(SEND_ERROR "Result not zero.")
ENDIF(NOT "${java_result}" STREQUAL "0")
......@@ -130,7 +130,7 @@ if(XDMF_WRAP_JAVA)
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
)
set(java_compile_args -cp "${CMAKE_BINARY_DIR}/*.jar" *.java)
set(java_compile_args -cp ".\;${CMAKE_BINARY_DIR}/*" *.java)
set(java_dest "bin")
else(WIN32)
set(java_compile_args -cp "${CMAKE_BINARY_DIR}/*.jar" ${XDMF_JAVA_DIR}/*.java)
......@@ -146,9 +146,8 @@ if(XDMF_WRAP_JAVA)
${${java_name}_JAVA_JAR})
add_custom_command(OUTPUT ${${java_name}_JAVA_JAR}
COMMAND ${CMAKE_COMMAND} -E chdir ${XDMF_JAVA_PACKAGE_DIR}
${JAVA_COMPILE} ARGS ${java_compile_args}
COMMAND ${JAVA_ARCHIVE}
ARGS -cvf ${${java_name}_JAVA_JAR}
${JAVA_COMPILE} ${java_compile_args}
COMMAND ${JAVA_ARCHIVE} -cvf ${${java_name}_JAVA_JAR}
"${XDMF_JAVA_PACKAGE_DIR}/*.class"
)
add_dependencies(${java_name}Java ${java_name}_Java_Dir)
......
......@@ -55,7 +55,8 @@ find_package(LibXml2 REQUIRED)
if(LIBXML2_FOUND)
include_directories(${LIBXML2_INCLUDE_DIR})
get_filename_component(LIBXML2_ROOT "${LIBXML2_INCLUDE_DIR}/../" REALPATH)
set(LIBXML2_BINARY_DIRS ${LIBXML2_ROOT}/bin PARENT_SCOPE)
set(LIBXML2_BINARY_DIRS ${LIBXML2_ROOT}/bin)
set(LIBXML2_BINARY_DIRS ${LIBXML2_BINARY_DIRS} PARENT_SCOPE)
set(XDMF_LIBRARIES ${XDMF_LIBRARIES} ${LIBXML2_LIBRARIES})
set(XDMF_BINARIES ${XDMF_BINARIES} ${LIBXML2_BINARY_DIRS})
endif(LIBXML2_FOUND)
......@@ -125,10 +126,13 @@ install(TARGETS XdmfCore
set(XdmfCore_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR} ${HDF5_INCLUDE_DIR} ${LIBXML2_INCLUDE_DIR} ${PYTHON_INCLUDE_DIRS} CACHE INTERNAL "")
set(XDMF_LIBRARIES ${XDMF_LIBRARIES} ${CMAKE_INSTALL_PREFIX}/lib)
set(XDMF_BINARIES ${XDMF_BINARIES} ${CMAKE_INSTALL_PREFIX}/bin)
if(BUILD_TESTING)
add_subdirectory(tests)
endif(BUILD_TESTING)
set(XDMF_LIBRARIES ${XDMF_LIBRARIES} ${CMAKE_INSTALL_PREFIX}/lib PARENT_SCOPE)
set(XDMF_BINARIES ${XDMF_BINARIES} ${CMAKE_INSTALL_PREFIX}/bin PARENT_SCOPE)
set(XDMF_LIBRARIES ${XDMF_LIBRARIES} PARENT_SCOPE)
set(XDMF_BINARIES ${XDMF_BINARIES} PARENT_SCOPE)
......@@ -7,13 +7,11 @@ ADD_TEST_CXX_DEPENDENCIES("XdmfCore")
# Add any ldpath directories that the cxx tests may need
ADD_TEST_CXX_LDPATH("${CMAKE_BINARY_DIR}")
ADD_TEST_CXX_LDPATH("${HDF5_LIBRARIES}")
ADD_TEST_CXX_LDPATH("${LIBXML2_LIBRARIES}")
ADD_TEST_CXX_LDPATH("${XDMF_LIBRARIES}")
# Add any path directoreis that the Cxx tests may need
ADD_TEST_CXX_PATH("${CMAKE_BINARY_DIR}")
ADD_TEST_CXX_PATH("${HDF5_BINARY_DIRS}")
ADD_TEST_CXX_PATH("${LIBXML2_BINARY_DIRS}")
ADD_TEST_CXX_PATH("${XDMF_BINARIES}")
# Add any cxx tests here:
# Note: We don't want to use a foreach loop to test the files incase we
......
......@@ -9,13 +9,11 @@ ADD_TEST_JAVA_CLASSPATH("${XdmfCore_JAVA_JAR}")
# Add any ldpath directories that the java tests may need
ADD_TEST_JAVA_LDPATH("${CMAKE_BINARY_DIR}")
ADD_TEST_JAVA_LDPATH("${HDF5_LIBRARIES}")
ADD_TEST_JAVA_LDPATH("${LIBXML2_LIBRARIES}")
ADD_TEST_JAVA_LDPATH("${XDMF_LIBRARIES}")
# Add any path directories that the java tests may need
ADD_TEST_JAVA_PATH("${CMAKE_BINARY_DIR}")
ADD_TEST_JAVA_PATH("${HDF5_BINARY_DIRS}")
ADD_TEST_JAVA_PATH("${LIBXML2_BINARY_DIRS}")
ADD_TEST_JAVA_PATH("${XDMF_BINARIES}")
# Add any java tests here:
# Note: We don't want to use a foreach loop to test the files incase we
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment