Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ USE_PROFILE=0 # 0 = no profiling, 1 = C++ profiling, 2 = GLIBC profiling, 3
USE_AMBERLIB=0 # 1 = Use AMBERHOME to fill in NetCDF/BLAS/LAPACK/ARPACK as needed
BUILD_LIBS=0 # 1 = Means automatically say yes to building enabled libs when not present.
BUILD_MPI='' # If not empty, attempt to download and build specified mpi dist.
icpp=0 # Used to count cmake_prefix_paths

USE_SINGLEENSEMBLE=0 # Enable support for single ensemble trajectories
USE_CPPTRAJDEBUG=0 # Enable internal cpptraj debug flags
Expand Down Expand Up @@ -2510,6 +2511,20 @@ EOF
}

#-------------------------------------------------------------------------------
# Add cmake prefix path
AddCmakePrefixPath() {
# Search for existing
for ((idx1=0; idx1 < $icpp; idx1++)) ; do
if [ "$1" = "${cmake_prefix_paths[$idx1]}" ] ; then
#echo DEBUG duplicate path $1
return 0
fi
done
#echo DEBUG add cmake prefix path $icpp $1
cmake_prefix_paths[$icpp]=$1
((icpp++))
}

# Use cmake to configure build.
SetupCmake() {
CMAKE=`which cmake`
Expand Down Expand Up @@ -2584,6 +2599,35 @@ SetupCmake() {
if [ $COMPILE_VERBOSE -eq 1 ] ; then
cmake_options="$cmake_options -DCMAKE_VERBOSE_MAKEFILE=TRUE"
fi
# Libraries
icpp=0
for ((idx=0; idx < $NLIB; idx++)) ; do
if [ "${LIB_STAT[$idx]}" = 'specified' ] ; then
#echo Lib $idx # DEBUG
AddCmakePrefixPath "${LIB_HOME[$idx]}"
fi
done
#if [ "${LIB_STAT[$LNETCDF]}" = 'specified' ] ; then
# AddCmakePrefixPath "${LIB_HOME[$LNETCDF]}"
#fi
#if [ "${LIB_STAT[$LZIP]}" = 'specified' ] ; then
# AddCmakePrefixPath "${LIB_HOME[$LZIP]}"
#fi
#if [ "${LIB_STAT[$LBZIP]}" = 'specified' ] ; then
# AddCmakePrefixPath "${LIB_HOME[$LBZIP]}"
#fi

if [ $icpp -gt 0 ] ; then
cmppstring=""
for ((idx=0; idx < $icpp; idx++)) ; do
if [ ! -z "$cmppstring" ] ; then
cmppstring="$cmppstring;${cmake_prefix_paths[$idx]}"
else
cmppstring="${cmake_prefix_paths[$idx]}"
fi
done
cmake_options="$cmake_options -DCMAKE_PREFIX_PATH=$cmppstring"
fi
echo " Cmake options: $WORKDIR $cmake_options"
# Run cmake
$CMAKE $WORKDIR $cmake_options
Expand Down
2 changes: 1 addition & 1 deletion src/TextBlockBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ int TextBlockBuffer::BlockToDoubles(double* darray) {
{
Line();
char* ptr = BufferPosition();
if (*ptr == '\0' || ptr == 0) return (int)elt;
if (ptr == 0 || *ptr == '\0') return (int)elt;
unsigned int nRemaining = Nelts_ - elt;
unsigned int maxcol = std::min(Ncols_, nRemaining);
// Loop over columns in line
Expand Down
2 changes: 1 addition & 1 deletion src/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* Whenever a number that precedes <revision> is incremented, all subsequent
* numbers should be reset to 0.
*/
#define CPPTRAJ_INTERNAL_VERSION "V6.29.10"
#define CPPTRAJ_INTERNAL_VERSION "V6.29.11"
/// PYTRAJ relies on this
#define CPPTRAJ_VERSION_STRING CPPTRAJ_INTERNAL_VERSION
#endif
4 changes: 4 additions & 0 deletions src/tng/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ add_compile_options(${OPT_CFLAGS})
add_library(tng_io STATIC ${TNG_IO_SOURCES})
make_pic_if_needed(tng_io)
target_include_directories(tng_io PUBLIC .)
if(zlib_ENABLED)
include_directories(${ZLIB_INCLUDE_DIRS})
endif()


# checks based on tng_io's cmake script
check_all_includes(C inttypes.h)
Expand Down
Loading