|
From: <ai...@us...> - 2013-11-28 06:10:52
|
Revision: 12774
http://sourceforge.net/p/plplot/code/12774
Author: airwin
Date: 2013-11-28 06:10:49 +0000 (Thu, 28 Nov 2013)
Log Message:
-----------
Change some target names to a more consistent naming convention:
test_tcl_standard_examples ==> test_pltcl_standard_examples
test_tk_standard_examples ==> test_plserver_standard_examples
Make sure the targets test_tclsh_standard_examples,
test_wish_standard_examples, and test_wish_runAllDemos are only
configured for the case when BUILD_SHARED_LIBS is true because from
experiment the "package require" method of dynamically loading Tcl
extension modules only works for shared objects.
Modified Paths:
--------------
trunk/examples/CMakeLists.txt
Modified: trunk/examples/CMakeLists.txt
===================================================================
--- trunk/examples/CMakeLists.txt 2013-11-28 06:00:42 UTC (rev 12773)
+++ trunk/examples/CMakeLists.txt 2013-11-28 06:10:49 UTC (rev 12774)
@@ -1,7 +1,7 @@
# examples/CMakeLists.txt
### Process this file with cmake to produce Makefile
###
-# Copyright (C) 2006-2012 Alan W. Irwin
+# Copyright (C) 2006-2013 Alan W. Irwin
#
# This file is part of PLplot.
#
@@ -423,7 +423,7 @@
set(plplot_test_debug)
endif(VALGRIND_ALL_TESTS)
else(VALGRIND_EXECUTABLE)
- set(plplot_test_debug)
+ set(plplot_test_debug)
endif(VALGRIND_EXECUTABLE)
if(CORE_BUILD)
@@ -869,38 +869,41 @@
endif(ENABLE_pygcw)
if(ENABLE_tcl AND PLD_xwin)
- add_custom_target(test_tcl_standard_examples
+ add_custom_target(test_pltcl_standard_examples
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tcl/standard_examples -dev xwin -np
DEPENDS ${xwin_target}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tcl
)
- add_dependencies(test_tcl_standard_examples
+ add_dependencies(test_pltcl_standard_examples
pltcl
tcl_examples
tclIndex_tcl
xwin
)
if(FILE_DEPENDS_xwin)
- add_dependencies(test_tcl_standard_examples test_xwin_dyndriver)
+ add_dependencies(test_pltcl_standard_examples test_xwin_dyndriver)
endif(FILE_DEPENDS_xwin)
- list(APPEND interactive_targets_LIST test_tcl_standard_examples)
+ list(APPEND interactive_targets_LIST test_pltcl_standard_examples)
- add_custom_target(test_tclsh_standard_examples
- COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tcl/tclsh_standard_examples
- DEPENDS ${xwin_target}
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tcl
- )
- add_dependencies(test_tclsh_standard_examples
- plplottcltk${LIB_TAG}
- tcl_examples
- tclIndex_tcl
- xwin
- )
- if(FILE_DEPENDS_xwin)
- add_dependencies(test_tclsh_standard_examples test_xwin_dyndriver)
- endif(FILE_DEPENDS_xwin)
- list(APPEND interactive_targets_LIST test_tclsh_standard_examples)
-
+ if(BUILD_SHARED_LIBS)
+ # tests that use "package require Pltcl" only work if
+ # BUILD_SHARED_LIBS is true.
+ add_custom_target(test_tclsh_standard_examples
+ COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tcl/tclsh_standard_examples
+ DEPENDS ${xwin_target}
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tcl
+ )
+ add_dependencies(test_tclsh_standard_examples
+ plplottcltk${LIB_TAG}
+ tcl_examples
+ tclIndex_tcl
+ xwin
+ )
+ if(FILE_DEPENDS_xwin)
+ add_dependencies(test_tclsh_standard_examples test_xwin_dyndriver)
+ endif(FILE_DEPENDS_xwin)
+ list(APPEND interactive_targets_LIST test_tclsh_standard_examples)
+ endif(BUILD_SHARED_LIBS)
endif(ENABLE_tcl AND PLD_xwin)
if(ENABLE_tk AND PLD_tk)
@@ -960,12 +963,12 @@
endif(FILE_DEPENDS_xwin)
list(APPEND targets_examples_tk test_tk_plgrid)
- add_custom_target(test_tk_standard_examples
+ add_custom_target(test_plserver_standard_examples
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tk/standard_examples
DEPENDS ${xwin_target}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tk
)
- add_dependencies(test_tk_standard_examples
+ add_dependencies(test_plserver_standard_examples
plserver
tcl_examples
tclIndex_tcl
@@ -974,38 +977,42 @@
xwin
)
if(FILE_DEPENDS_xwin)
- add_dependencies(test_tk_standard_examples test_xwin_dyndriver)
+ add_dependencies(test_plserver_standard_examples test_xwin_dyndriver)
endif(FILE_DEPENDS_xwin)
- list(APPEND targets_examples_tk test_tk_standard_examples)
+ list(APPEND targets_examples_tk test_plserver_standard_examples)
- add_custom_target(test_wish_standard_examples
- COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tk/wish_standard_examples -geometry 800x600
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tk
- )
- add_dependencies(test_wish_standard_examples
- plplottcltk${LIB_TAG}
- tk
- xwin
- tcl_examples
- tclIndex_tcl
- tclIndex_tk
- tclIndex_examples_tk
- )
- if(FILE_DEPENDS_xwin)
- add_dependencies(test_wish_standard_examples test_xwin_dyndriver)
- endif(FILE_DEPENDS_xwin)
- # Temporarily suspend adding this target to the rest of the Tk
- # interactive targets (and therefore also this target is not added
- # to the overall list of targets run by the test_interactive
- # target) because of a segfault generated by this target. The
- # cause of that segfault is the Tcl exit command is somehow not
- # compatible with how we have implemented the Tcl plframe command
- # that is run by tkdemos.tcl in the wish case, but that is as much
- # as we know at this stage.
- message(STATUS "WARNING: The test_wish_standard_examples target can be run independently but
+ if(BUILD_SHARED_LIBS)
+ # tests that use "package require Pltk" only work if
+ # BUILD_SHARED_LIBS is true.
+ add_custom_target(test_wish_standard_examples
+ COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tk/wish_standard_examples -geometry 800x600
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tk
+ )
+ add_dependencies(test_wish_standard_examples
+ plplottcltk${LIB_TAG}
+ tk
+ xwin
+ tcl_examples
+ tclIndex_tcl
+ tclIndex_tk
+ tclIndex_examples_tk
+ )
+ if(FILE_DEPENDS_xwin)
+ add_dependencies(test_wish_standard_examples test_xwin_dyndriver)
+ endif(FILE_DEPENDS_xwin)
+ # Temporarily suspend adding this target to the rest of the Tk
+ # interactive targets (and therefore also this target is not added
+ # to the overall list of targets run by the test_interactive
+ # target) because of a segfault generated by this target. The
+ # cause of that segfault is the Tcl exit command is somehow not
+ # compatible with how we have implemented the Tcl plframe command
+ # that is run by tkdemos.tcl in the wish case, but that is as much
+ # as we know at this stage.
+ message(STATUS "WARNING: The test_wish_standard_examples target can be run independently but
it segfaults at the end so it is temporarily excluded from being a dependency
of other more general interactive test targets")
- # list(APPEND targets_examples_tk test_wish_standard_examples)
+ # list(APPEND targets_examples_tk test_wish_standard_examples)
+ endif(BUILD_SHARED_LIBS)
if(ENABLE_itk)
add_custom_target(test_tk_02
@@ -1059,6 +1066,7 @@
tclIndex_tcl
tclIndex_tk
tclIndex_examples_tk
+ xwin
)
message(STATUS "WARNING: The test_plserver_runAlldemos target can be run independently but
@@ -1066,22 +1074,26 @@
dependency of other more general interactive test targets")
#list(APPEND targets_examples_tk test_plserver_runAllDemos)
- add_custom_target(test_wish_runAllDemos
- COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tk/wish_runAllDemos -geometry 800x600
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tk
- )
- add_dependencies(test_wish_runAllDemos
- plplottcltk${LIB_TAG}
- tkwin
- tcl_examples
- tclIndex_tcl
- tclIndex_tk
- tclIndex_examples_tk
- )
- message(STATUS "WARNING: The test_wish_runAlldemos target can be run independently but
+ if(BUILD_SHARED_LIBS)
+ # tests that use "package require Plplotter" only work if
+ # BUILD_SHARED_LIBS is true.
+ add_custom_target(test_wish_runAllDemos
+ COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tk/wish_runAllDemos -geometry 800x600
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tk
+ )
+ add_dependencies(test_wish_runAllDemos
+ plplottcltk${LIB_TAG}
+ tkwin
+ tcl_examples
+ tclIndex_tcl
+ tclIndex_tk
+ tclIndex_examples_tk
+ )
+ message(STATUS "WARNING: The test_wish_runAlldemos target can be run independently but
there are several issues with this target so it is temporarily excluded from being a
dependency of other more general interactive test targets")
- # list(APPEND targets_examples_tk test_wish_runAlldemos)
+ # list(APPEND targets_examples_tk test_wish_runAlldemos)
+ endif(BUILD_SHARED_LIBS)
endif(ENABLE_itk)
endif(ENABLE_tk AND PLD_tk)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|