forked from lijiext/lammps
Merge branch 'collected-small-changes' of github.com:akohlmey/lammps into collected-small-changes
This commit is contained in:
commit
0951fea738
|
@ -1,3 +1,3 @@
|
||||||
# utility script to call GenerateBinaryHeader function
|
# utility script to call GenerateBinaryHeader function
|
||||||
include(${SOURCE_DIR}/Modules/LAMMPSUtils.cmake)
|
include(${SOURCE_DIR}/Modules/LAMMPSUtils.cmake)
|
||||||
GenerateBinaryHeader(${VARNAME} ${HEADER_FILE} ${SOURCE_FILES})
|
GenerateBinaryHeader(${VARNAME} ${HEADER_FILE} ${SOURCE_FILE})
|
||||||
|
|
|
@ -71,19 +71,15 @@ macro(pkg_depends PKG1 PKG2)
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
# CMake-only replacement for bin2c and xxd
|
# CMake-only replacement for bin2c and xxd
|
||||||
function(GenerateBinaryHeader varname outfile files)
|
function(GenerateBinaryHeader varname outfile infile)
|
||||||
message("Creating ${outfile}...")
|
message("Creating ${outfile}...")
|
||||||
file(WRITE ${outfile} "// CMake generated file\n")
|
file(WRITE ${outfile} "// CMake generated file\n")
|
||||||
math(EXPR ARG_END "${ARGC}-1")
|
|
||||||
|
|
||||||
foreach(IDX RANGE 2 ${ARG_END})
|
file(READ ${infile} content HEX)
|
||||||
list(GET ARGV ${IDX} filename)
|
|
||||||
file(READ ${filename} content HEX)
|
|
||||||
string(REGEX REPLACE "([0-9a-f][0-9a-f])" "0x\\1," content "${content}")
|
string(REGEX REPLACE "([0-9a-f][0-9a-f])" "0x\\1," content "${content}")
|
||||||
string(REGEX REPLACE ",$" "" content "${content}")
|
string(REGEX REPLACE ",$" "" content "${content}")
|
||||||
file(APPEND ${outfile} "const unsigned char ${varname}[] = { ${content} };\n")
|
file(APPEND ${outfile} "const unsigned char ${varname}[] = { ${content} };\n")
|
||||||
file(APPEND ${outfile} "const unsigned int ${varname}_size = sizeof(${varname});\n")
|
file(APPEND ${outfile} "const unsigned int ${varname}_size = sizeof(${varname});\n")
|
||||||
endforeach()
|
|
||||||
endfunction(GenerateBinaryHeader)
|
endfunction(GenerateBinaryHeader)
|
||||||
|
|
||||||
# fetch missing potential files
|
# fetch missing potential files
|
||||||
|
|
|
@ -309,7 +309,7 @@ elseif(GPU_API STREQUAL "HIP")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_custom_command(OUTPUT ${CUBIN_H_FILE}
|
add_custom_command(OUTPUT ${CUBIN_H_FILE}
|
||||||
COMMAND ${CMAKE_COMMAND} -D SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -D VARNAME=${CU_NAME} -D HEADER_FILE=${CUBIN_H_FILE} -D SOURCE_FILES=${CUBIN_FILE} -P ${CMAKE_CURRENT_SOURCE_DIR}/Modules/GenerateBinaryHeader.cmake
|
COMMAND ${CMAKE_COMMAND} -D SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -D VARNAME=${CU_NAME} -D HEADER_FILE=${CUBIN_H_FILE} -D SOURCE_FILE=${CUBIN_FILE} -P ${CMAKE_CURRENT_SOURCE_DIR}/Modules/GenerateBinaryHeader.cmake
|
||||||
DEPENDS ${CUBIN_FILE}
|
DEPENDS ${CUBIN_FILE}
|
||||||
COMMENT "Generating ${CU_NAME}_cubin.h")
|
COMMENT "Generating ${CU_NAME}_cubin.h")
|
||||||
|
|
||||||
|
|
|
@ -30,12 +30,12 @@ From: fedora:32
|
||||||
mingw32-expat mingw64-expat \
|
mingw32-expat mingw64-expat \
|
||||||
mingw64-expat-static mingw32-expat-static \
|
mingw64-expat-static mingw32-expat-static \
|
||||||
mingw32-sqlite-static mingw64-sqlite-static \
|
mingw32-sqlite-static mingw64-sqlite-static \
|
||||||
enchant python3-virtualenv doxygen \
|
enchant python3-virtualenv doxygen latexmk \
|
||||||
texlive-latex-fonts texlive-pslatex texlive-collection-latexrecommended \
|
texlive-latex-fonts texlive-pslatex texlive-collection-latexrecommended \
|
||||||
texlive-latex texlive-latexconfig doxygen-latex texlive-collection-latex \
|
texlive-latex texlive-latexconfig doxygen-latex texlive-collection-latex \
|
||||||
texlive-latex-bin texlive-lualatex-math texlive-fncychap texlive-tabulary \
|
texlive-latex-bin texlive-lualatex-math texlive-fncychap texlive-tabulary \
|
||||||
texlive-framed texlive-wrapfig texlive-upquote texlive-capt-of \
|
texlive-framed texlive-wrapfig texlive-upquote texlive-capt-of \
|
||||||
texlive-needspace texlive-titlesec texlive-anysize texlive-dvipng \
|
texlive-needspace texlive-titlesec texlive-anysize texlive-dvipng texlive-xindy \
|
||||||
blas-devel lapack-devel libyaml-devel openkim-models kim-api-devel \
|
blas-devel lapack-devel libyaml-devel openkim-models kim-api-devel \
|
||||||
zstd libzstd-devel
|
zstd libzstd-devel
|
||||||
dnf clean all
|
dnf clean all
|
||||||
|
|
|
@ -64,6 +64,8 @@ From: ubuntu:18.04
|
||||||
texlive-publishers \
|
texlive-publishers \
|
||||||
texlive-science \
|
texlive-science \
|
||||||
dvipng \
|
dvipng \
|
||||||
|
latexmk \
|
||||||
|
xindy \
|
||||||
vim-nox \
|
vim-nox \
|
||||||
virtualenv \
|
virtualenv \
|
||||||
voro++-dev \
|
voro++-dev \
|
||||||
|
|
|
@ -37,7 +37,7 @@ if (Python_EXECUTABLE)
|
||||||
set(PYTHON_TEST_RUNNER ${Python_EXECUTABLE} -u)
|
set(PYTHON_TEST_RUNNER ${Python_EXECUTABLE} -u)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
set(PYTHON_TEST_RUNNER ${Python_EXECUTABLE})
|
set(PYTHON_TEST_RUNNER ${Python_EXECUTABLE} -u)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_test(NAME PythonOpen
|
add_test(NAME PythonOpen
|
||||||
|
|
|
@ -12,7 +12,11 @@ except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
try:
|
try:
|
||||||
lmp = lammps()
|
if 'LAMMPS_MACHINE_NAME' in os.environ:
|
||||||
|
machine = os.environ['LAMMPS_MACHINE_NAME']
|
||||||
|
else:
|
||||||
|
machine = ""
|
||||||
|
lmp = lammps(name=machine)
|
||||||
has_mpi = lmp.has_mpi_support
|
has_mpi = lmp.has_mpi_support
|
||||||
lmp.close()
|
lmp.close()
|
||||||
except:
|
except:
|
||||||
|
|
Loading…
Reference in New Issue