improve portability for building SWIG Tcl wrappers

This commit is contained in:
Axel Kohlmeyer 2020-10-21 14:06:25 -04:00
parent 1753c9f361
commit 53028b24d6
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
2 changed files with 3 additions and 3 deletions

View File

@ -90,11 +90,11 @@ if(BUILD_SWIG_TCL)
find_package(TCL REQUIRED)
target_include_directories(tcllammps PRIVATE ${TCL_INCLUDE_PATH})
swig_link_libraries(tcllammps PRIVATE lammps ${TCL_LIBRARY})
configure_file(run_tcl_example.sh run_tcl_example.sh COPYONLY)
set_property(SOURCE lammps_shell.i PROPERTY SWIG_MODULE_NAME tcllmpsh)
swig_add_library(libtcllmpsh TYPE STATIC LANGUAGE tcl SOURCES lammps_shell.i)
add_executable(tcllmpsh tcldummy.c)
target_include_directories(tcllmpsh PRIVATE ${TCL_INCLUDE_PATH})
target_include_directories(libtcllmpsh PRIVATE ${TCL_INCLUDE_PATH})
target_link_libraries(tcllmpsh PRIVATE libtcllmpsh lammps ${TCL_LIBRARY})
configure_file(run_tcl_example.sh.in run_tcl_example.sh @ONLY)
endif()

View File

@ -58,7 +58,7 @@ puts "Current size of timestep: \$dt"
lammps_close \$lmp
EOF
tclsh example.tcl
@TCL_TCLSH@ example.tcl
# now try again with static extended shell
echo '====================================================================='