From: <ai...@us...> - 2008-08-26 02:20:42
|
Revision: 8711 http://plplot.svn.sourceforge.net/plplot/?rev=8711&view=rev Author: airwin Date: 2008-08-26 02:20:52 +0000 (Tue, 26 Aug 2008) Log Message: ----------- Emacs CMake mode indentation. Modified Paths: -------------- trunk/plplot_test/CMakeLists.txt Modified: trunk/plplot_test/CMakeLists.txt =================================================================== --- trunk/plplot_test/CMakeLists.txt 2008-08-25 04:30:45 UTC (rev 8710) +++ trunk/plplot_test/CMakeLists.txt 2008-08-26 02:20:52 UTC (rev 8711) @@ -3,258 +3,258 @@ if(SH_EXECUTABLE) -set(TEST_ENVIRONMENT - "EXAMPLES_DIR=${CMAKE_BINARY_DIR}/examples SRC_EXAMPLES_DIR=${CMAKE_SOURCE_DIR}/examples PLPLOT_LIB=${CMAKE_SOURCE_DIR}/data/" -) + set(TEST_ENVIRONMENT + "EXAMPLES_DIR=${CMAKE_BINARY_DIR}/examples SRC_EXAMPLES_DIR=${CMAKE_SOURCE_DIR}/examples PLPLOT_LIB=${CMAKE_SOURCE_DIR}/data/" + ) -set(TEST_DEVICE psc CACHE STRING "device used for ctest") -set(TEST_SCRIPT "./plplot-test.sh --verbose") -set(TEST_SCRIPT_DEVICE "${TEST_SCRIPT} --device=${TEST_DEVICE}") + set(TEST_DEVICE psc CACHE STRING "device used for ctest") + set(TEST_SCRIPT "./plplot-test.sh --verbose") + set(TEST_SCRIPT_DEVICE "${TEST_SCRIPT} --device=${TEST_DEVICE}") -set(JAVA_TEST_ENVIRONMENT "${TEST_ENVIRONMENT} PLPLOT_JAVA_WRAP_DIR=${CMAKE_BINARY_DIR}/bindings/java/ PLPLOT_CLASSPATH=${CMAKE_BINARY_DIR}/examples/java/plplot.jar") + set(JAVA_TEST_ENVIRONMENT "${TEST_ENVIRONMENT} PLPLOT_JAVA_WRAP_DIR=${CMAKE_BINARY_DIR}/bindings/java/ PLPLOT_CLASSPATH=${CMAKE_BINARY_DIR}/examples/java/plplot.jar") -configure_file( - plplot-test.sh.cmake - ${CMAKE_CURRENT_BINARY_DIR}/plplot-test.sh - @ONLY - ) + configure_file( + plplot-test.sh.cmake + ${CMAKE_CURRENT_BINARY_DIR}/plplot-test.sh + @ONLY + ) -configure_file(test_c.sh.in ${CMAKE_CURRENT_BINARY_DIR}/test_c.sh @ONLY) -set(SCRIPTS test_c.sh) -add_test(examples_c - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=c" - ) + configure_file(test_c.sh.in ${CMAKE_CURRENT_BINARY_DIR}/test_c.sh @ONLY) + set(SCRIPTS test_c.sh) + add_test(examples_c + ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=c" + ) -if(ENABLE_cxx) - configure_file(test_cxx.sh.in ${CMAKE_CURRENT_BINARY_DIR}/test_cxx.sh @ONLY) - set(SCRIPTS ${SCRIPTS} test_cxx.sh) - add_test(examples_cxx - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=cxx" - ) -endif(ENABLE_cxx) + if(ENABLE_cxx) + configure_file(test_cxx.sh.in ${CMAKE_CURRENT_BINARY_DIR}/test_cxx.sh @ONLY) + set(SCRIPTS ${SCRIPTS} test_cxx.sh) + add_test(examples_cxx + ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=cxx" + ) + endif(ENABLE_cxx) -if(ENABLE_f77) - configure_file(test_f77.sh.in ${CMAKE_CURRENT_BINARY_DIR}/test_f77.sh @ONLY) - set(SCRIPTS ${SCRIPTS} test_f77.sh) - add_test(examples_f77 - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=f77" - ) -endif(ENABLE_f77) + if(ENABLE_f77) + configure_file(test_f77.sh.in ${CMAKE_CURRENT_BINARY_DIR}/test_f77.sh @ONLY) + set(SCRIPTS ${SCRIPTS} test_f77.sh) + add_test(examples_f77 + ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=f77" + ) + endif(ENABLE_f77) -if(ENABLE_f95) - configure_file(test_f95.sh.in ${CMAKE_CURRENT_BINARY_DIR}/test_f95.sh @ONLY) - set(SCRIPTS ${SCRIPTS} test_f95.sh) - add_test(examples_f95 - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=f95" - ) -endif(ENABLE_f95) + if(ENABLE_f95) + configure_file(test_f95.sh.in ${CMAKE_CURRENT_BINARY_DIR}/test_f95.sh @ONLY) + set(SCRIPTS ${SCRIPTS} test_f95.sh) + add_test(examples_f95 + ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=f95" + ) + endif(ENABLE_f95) -if(ENABLE_java) - configure_file( - test_java.sh.in - ${CMAKE_CURRENT_BINARY_DIR}/test_java.sh - @ONLY - ) - set(SCRIPTS ${SCRIPTS} test_java.sh) - add_test(examples_java - ${SH_EXECUTABLE} -c "${JAVA_TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=java" - ) -endif(ENABLE_java) + if(ENABLE_java) + configure_file( + test_java.sh.in + ${CMAKE_CURRENT_BINARY_DIR}/test_java.sh + @ONLY + ) + set(SCRIPTS ${SCRIPTS} test_java.sh) + add_test(examples_java + ${SH_EXECUTABLE} -c "${JAVA_TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=java" + ) + endif(ENABLE_java) -if(ENABLE_octave) - configure_file( - test_octave.sh.in - ${CMAKE_CURRENT_BINARY_DIR}/test_octave.sh - @ONLY - ) - set(SCRIPTS ${SCRIPTS} test_octave.sh) - add_test(examples_octave - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=octave" - ) -endif(ENABLE_octave) + if(ENABLE_octave) + configure_file( + test_octave.sh.in + ${CMAKE_CURRENT_BINARY_DIR}/test_octave.sh + @ONLY + ) + set(SCRIPTS ${SCRIPTS} test_octave.sh) + add_test(examples_octave + ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=octave" + ) + endif(ENABLE_octave) -if(ENABLE_python) - if(HAVE_NUMPY) - # The following examples only work with numpy - set(NUMPY_EXAMPLES "21") - else(HAVE_NUMPY) - set(NUMPY_EXAMPLES) - endif(HAVE_NUMPY) - configure_file( - test_python.sh.in - ${CMAKE_CURRENT_BINARY_DIR}/test_python.sh - @ONLY - ) - set(SCRIPTS ${SCRIPTS} test_python.sh) - add_test(examples_python - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=python" - ) -endif(ENABLE_python) + if(ENABLE_python) + if(HAVE_NUMPY) + # The following examples only work with numpy + set(NUMPY_EXAMPLES "21") + else(HAVE_NUMPY) + set(NUMPY_EXAMPLES) + endif(HAVE_NUMPY) + configure_file( + test_python.sh.in + ${CMAKE_CURRENT_BINARY_DIR}/test_python.sh + @ONLY + ) + set(SCRIPTS ${SCRIPTS} test_python.sh) + add_test(examples_python + ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=python" + ) + endif(ENABLE_python) -if(ENABLE_tcl) - configure_file(test_tcl.sh.in ${CMAKE_CURRENT_BINARY_DIR}/test_tcl.sh @ONLY) - set(SCRIPTS ${SCRIPTS} test_tcl.sh) - add_test(examples_tcl - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=tcl" - ) -endif(ENABLE_tcl) + if(ENABLE_tcl) + configure_file(test_tcl.sh.in ${CMAKE_CURRENT_BINARY_DIR}/test_tcl.sh @ONLY) + set(SCRIPTS ${SCRIPTS} test_tcl.sh) + add_test(examples_tcl + ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=tcl" + ) + endif(ENABLE_tcl) -if(ENABLE_pdl) - configure_file( - test_perl.sh.in - ${CMAKE_CURRENT_BINARY_DIR}/test_perl.sh - @ONLY - ) - set(SCRIPTS ${SCRIPTS} test_perl.sh) - add_test(examples_perl - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=perl" - ) -endif(ENABLE_pdl) + if(ENABLE_pdl) + configure_file( + test_perl.sh.in + ${CMAKE_CURRENT_BINARY_DIR}/test_perl.sh + @ONLY + ) + set(SCRIPTS ${SCRIPTS} test_perl.sh) + add_test(examples_perl + ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=perl" + ) + endif(ENABLE_pdl) -if(ENABLE_ada) - configure_file( - test_ada.sh.in - ${CMAKE_CURRENT_BINARY_DIR}/test_ada.sh - @ONLY - ) - set(SCRIPTS ${SCRIPTS} test_ada.sh) - add_test(examples_ada - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=ada" - ) -endif(ENABLE_ada) + if(ENABLE_ada) + configure_file( + test_ada.sh.in + ${CMAKE_CURRENT_BINARY_DIR}/test_ada.sh + @ONLY + ) + set(SCRIPTS ${SCRIPTS} test_ada.sh) + add_test(examples_ada + ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=ada" + ) + endif(ENABLE_ada) -if(ENABLE_ocaml) - configure_file( - test_ocaml.sh.in - ${CMAKE_CURRENT_BINARY_DIR}/test_ocaml.sh - @ONLY - ) - set(SCRIPTS ${SCRIPTS} test_ocaml.sh) - add_test(examples_ocaml - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=ocaml" - ) -endif(ENABLE_ocaml) + if(ENABLE_ocaml) + configure_file( + test_ocaml.sh.in + ${CMAKE_CURRENT_BINARY_DIR}/test_ocaml.sh + @ONLY + ) + set(SCRIPTS ${SCRIPTS} test_ocaml.sh) + add_test(examples_ocaml + ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=ocaml" + ) + endif(ENABLE_ocaml) -# Run C examples with different drivers -if(PLD_psc) - if (NOT TEST_DEVICE STREQUAL "psc") - add_test(examples_psttfc - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=psttfc" - ) - endif(NOT TEST_DEVICE STREQUAL "psc") -endif(PLD_psc) + # Run C examples with different drivers + if(PLD_psc) + if (NOT TEST_DEVICE STREQUAL "psc") + add_test(examples_psttfc + ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=psttfc" + ) + endif(NOT TEST_DEVICE STREQUAL "psc") + endif(PLD_psc) -if(PLD_psttf) - if (NOT TEST_DEVICE STREQUAL "psttfc") - add_test(examples_psttfc - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=psttfc" - ) - endif(NOT TEST_DEVICE STREQUAL "psttfc") -endif(PLD_psttf) + if(PLD_psttf) + if (NOT TEST_DEVICE STREQUAL "psttfc") + add_test(examples_psttfc + ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=psttfc" + ) + endif(NOT TEST_DEVICE STREQUAL "psttfc") + endif(PLD_psttf) -if(PLD_pstex) - if (NOT TEST_DEVICE STREQUAL "pstex") - add_test(examples_pstex - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=pstex" - ) - endif(NOT TEST_DEVICE STREQUAL "pstex") -endif(PLD_pstex) + if(PLD_pstex) + if (NOT TEST_DEVICE STREQUAL "pstex") + add_test(examples_pstex + ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=pstex" + ) + endif(NOT TEST_DEVICE STREQUAL "pstex") + endif(PLD_pstex) -if(PLD_png) - if (NOT TEST_DEVICE STREQUAL "png") - add_test(examples_png - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=png" - ) - endif(NOT TEST_DEVICE STREQUAL "png") -endif(PLD_png) + if(PLD_png) + if (NOT TEST_DEVICE STREQUAL "png") + add_test(examples_png + ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=png" + ) + endif(NOT TEST_DEVICE STREQUAL "png") + endif(PLD_png) -if(PLD_svg) - if (NOT TEST_DEVICE STREQUAL "svg") - add_test(examples_svg - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=svg" - ) - endif(NOT TEST_DEVICE STREQUAL "svg") -endif(PLD_svg) + if(PLD_svg) + if (NOT TEST_DEVICE STREQUAL "svg") + add_test(examples_svg + ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=svg" + ) + endif(NOT TEST_DEVICE STREQUAL "svg") + endif(PLD_svg) -if(PLD_plmeta) - if (NOT TEST_DEVICE STREQUAL "plmeta") - add_test(examples_plmeta - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=plmeta" - ) - endif(NOT TEST_DEVICE STREQUAL "plmeta") -endif(PLD_plmeta) + if(PLD_plmeta) + if (NOT TEST_DEVICE STREQUAL "plmeta") + add_test(examples_plmeta + ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=plmeta" + ) + endif(NOT TEST_DEVICE STREQUAL "plmeta") + endif(PLD_plmeta) -if(PLD_pscairo) - if (NOT TEST_DEVICE STREQUAL "pscairo") - add_test(examples_pscairo - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=pscairo" - ) - endif(NOT TEST_DEVICE STREQUAL "pscairo") -endif(PLD_pscairo) + if(PLD_pscairo) + if (NOT TEST_DEVICE STREQUAL "pscairo") + add_test(examples_pscairo + ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=pscairo" + ) + endif(NOT TEST_DEVICE STREQUAL "pscairo") + endif(PLD_pscairo) -if(PLD_pngcairo) - if (NOT TEST_DEVICE STREQUAL "pngcairo") - add_test(examples_pngcairo - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=pngcairo" - ) - endif(NOT TEST_DEVICE STREQUAL "pngcairo") -endif(PLD_pngcairo) + if(PLD_pngcairo) + if (NOT TEST_DEVICE STREQUAL "pngcairo") + add_test(examples_pngcairo + ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=pngcairo" + ) + endif(NOT TEST_DEVICE STREQUAL "pngcairo") + endif(PLD_pngcairo) -if(DIFF_EXECUTABLE AND TAIL_EXECUTABLE) -configure_file(test_diff.sh.in ${CMAKE_CURRENT_BINARY_DIR}/test_diff.sh @ONLY) -set(SCRIPTS test_diff.sh) -add_test(examples_compare - ${SH_EXECUTABLE} -c "./test_diff.sh" -) -endif(DIFF_EXECUTABLE AND TAIL_EXECUTABLE) + if(DIFF_EXECUTABLE AND TAIL_EXECUTABLE) + configure_file(test_diff.sh.in ${CMAKE_CURRENT_BINARY_DIR}/test_diff.sh @ONLY) + set(SCRIPTS test_diff.sh) + add_test(examples_compare + ${SH_EXECUTABLE} -c "./test_diff.sh" + ) + endif(DIFF_EXECUTABLE AND TAIL_EXECUTABLE) -# Make a copy of lena.pgm to the test subdirectory of the build -# tree so that example 20 will run from there. -# Also need a copy of lena.img for the octave bindings -if(BUILD_TEST) - add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lena.pgm - COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_SOURCE_DIR}/examples/lena.pgm - ${CMAKE_CURRENT_BINARY_DIR}/lena.pgm - DEPENDS ${CMAKE_SOURCE_DIR}/examples/lena.pgm - ) - add_custom_target(lena_file ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/lena.pgm) - if(ENABLE_octave) + # Make a copy of lena.pgm to the test subdirectory of the build + # tree so that example 20 will run from there. + # Also need a copy of lena.img for the octave bindings + if(BUILD_TEST) add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lena.img + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lena.pgm COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_SOURCE_DIR}/bindings/octave/demos/lena.img - ${CMAKE_CURRENT_BINARY_DIR}/lena.img - DEPENDS ${CMAKE_SOURCE_DIR}/bindings/octave/demos/lena.img + ${CMAKE_SOURCE_DIR}/examples/lena.pgm + ${CMAKE_CURRENT_BINARY_DIR}/lena.pgm + DEPENDS ${CMAKE_SOURCE_DIR}/examples/lena.pgm + ) + add_custom_target(lena_file ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/lena.pgm) + if(ENABLE_octave) + add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lena.img + COMMAND ${CMAKE_COMMAND} -E copy + ${CMAKE_SOURCE_DIR}/bindings/octave/demos/lena.img + ${CMAKE_CURRENT_BINARY_DIR}/lena.img + DEPENDS ${CMAKE_SOURCE_DIR}/bindings/octave/demos/lena.img + ) + add_custom_target(lena_octave_file ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/lena.img) + endif(ENABLE_octave) + endif(BUILD_TEST) + + set(PERM_SCRIPTS + OWNER_READ + OWNER_WRITE + OWNER_EXECUTE + GROUP_READ + GROUP_EXECUTE + WORLD_READ + WORLD_EXECUTE ) - add_custom_target(lena_octave_file ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/lena.img) - endif(ENABLE_octave) -endif(BUILD_TEST) -set(PERM_SCRIPTS -OWNER_READ -OWNER_WRITE -OWNER_EXECUTE -GROUP_READ -GROUP_EXECUTE -WORLD_READ -WORLD_EXECUTE -) + foreach(SCRIPT ${SCRIPTS}) + install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/${SCRIPT} + DESTINATION ${DATA_DIR}/examples + PERMISSIONS ${PERM_SCRIPTS} + ) + endforeach(SCRIPT ${SCRIPTS}) -foreach(SCRIPT ${SCRIPTS}) install( - FILES ${CMAKE_CURRENT_BINARY_DIR}/${SCRIPT} - DESTINATION ${DATA_DIR}/examples - PERMISSIONS ${PERM_SCRIPTS} - ) -endforeach(SCRIPT ${SCRIPTS}) + FILES ${CMAKE_CURRENT_BINARY_DIR}/plplot-test.sh + DESTINATION ${DATA_DIR}/examples + PERMISSIONS ${PERM_SCRIPTS} + ) -install( -FILES ${CMAKE_CURRENT_BINARY_DIR}/plplot-test.sh -DESTINATION ${DATA_DIR}/examples -PERMISSIONS ${PERM_SCRIPTS} -) - endif(SH_EXECUTABLE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |