From: <ai...@us...> - 2010-12-29 23:24:11
|
Revision: 11399 http://plplot.svn.sourceforge.net/plplot/?rev=11399&view=rev Author: airwin Date: 2010-12-29 23:24:04 +0000 (Wed, 29 Dec 2010) Log Message: ----------- Use a variable to specify which of the standard examples is the formal file dependency for all given languages. Normally this formal file dependency is example 1. But this variable makes it much easier to deal with the cases where a language exists that does not have that particular standard example implemented. Modified Paths: -------------- trunk/examples/CMakeLists.txt Modified: trunk/examples/CMakeLists.txt =================================================================== --- trunk/examples/CMakeLists.txt 2010-12-29 05:51:49 UTC (rev 11398) +++ trunk/examples/CMakeLists.txt 2010-12-29 23:24:04 UTC (rev 11399) @@ -410,6 +410,8 @@ set(compare_command ${CMAKE_CURRENT_SOURCE_DIR}/test_diff.sh) endif(CORE_BUILD) + # Pick a standard example to depend on which is available in all languages. + set(stdnum 01) if(PLD_psc) set(compare_file_depends ${custom_test_command}) if(ENABLE_DYNDRIVERS) @@ -465,17 +467,17 @@ endif(language STREQUAL "java") add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/x01${suffix}.psc + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/x${stdnum}${suffix}.psc COMMAND ${CMAKE_COMMAND} -E echo "Generate ${language} results for psc device" COMMAND env ${environment} ${custom_test_command} --verbose --front-end=${language} --device=psc DEPENDS ${compare_file_depends_${language}} VERBATIM ) add_custom_target(test_${language}_psc - DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/x01${suffix}.psc + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/x${stdnum}${suffix}.psc ) list(APPEND diff_targets_LIST test_${language}_psc) - list(APPEND diff_files_LIST ${CMAKE_CURRENT_BINARY_DIR}/x01${suffix}.psc) + list(APPEND diff_files_LIST ${CMAKE_CURRENT_BINARY_DIR}/x${stdnum}${suffix}.psc) # If the subdirectory used an add_custom_target (as indicated # by both files_examples_${language} and targets_examples_${language} # being true), then for that special case must add a target-level @@ -554,10 +556,10 @@ ${FILE_DEPENDS_${driver}} ${driver} ) endif(ENABLE_DYNDRIVERS) - #message("DEBUG: OUTPUT filename = x01c${index}.${device}") + #message("DEBUG: OUTPUT filename = x${stdnum}c${index}.${device}") #message("DEBUG:file_device_depends_${device} = ${file_device_depends_${device}}") add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/x01c${index}.${device} + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/x${stdnum}c${index}.${device} COMMAND ${CMAKE_COMMAND} -E echo "Generate C results for ${device} file device" COMMAND env ${custom_env} ${custom_test_command} --verbose --front-end=c --device=${device} DEPENDS @@ -565,7 +567,7 @@ VERBATIM ) add_custom_target(test_c_${device} - DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/x01c${index}.${device} + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/x${stdnum}c${index}.${device} ) list(APPEND noninteractive_targets_LIST test_c_${device}) # Follow what was done above. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |