forked from lijiext/lammps
cmake: improve some error messages
This commit is contained in:
parent
0231cc38a3
commit
408d9d99a9
|
@ -179,7 +179,7 @@ if(ENABLE_PYTHON)
|
|||
endif()
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/../python/lammps.py DESTINATION ${PYTHON_INSTDIR})
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
message(FATAL_ERROR "Python package need lammps to be build shared, -DBUILD_SHARED_LIBS=ON")
|
||||
message(FATAL_ERROR "Python package need lammps to be build shared, use -DBUILD_SHARED_LIBS=ON")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@ -451,7 +451,7 @@ if(ENABLE_GPU)
|
|||
find_package(CUDA REQUIRED)
|
||||
find_program(BIN2C bin2c)
|
||||
if(NOT BIN2C)
|
||||
message(FATAL_ERROR "Couldn't find bin2c")
|
||||
message(FATAL_ERROR "Couldn't find bin2c, use -DBIN2C helping cmake to find it.")
|
||||
endif()
|
||||
include_directories(${CUDA_INCLUDE_DIRS})
|
||||
list(APPEND LAMMPS_LINK_LIBS ${CUDA_LIBRARIES} ${CUDA_CUDA_LIBRARY})
|
||||
|
@ -522,7 +522,7 @@ if(INSTALL_LIB)
|
|||
install(TARGETS lammps LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
install(FILES ${LAMMPS_SOURCE_DIR}/lammps.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
elseif(BUILD_SHARED_LIBS)
|
||||
message(FATAL_ERROR "Shared library has to be installed, use -DBUILD_SHARED_LIBS=ON to install lammps with a library")
|
||||
message(FATAL_ERROR "Shared library has to be installed, use -DINSTALL_LIB=ON to install lammps with a library")
|
||||
endif()
|
||||
|
||||
add_executable(lmp ${LMP_SOURCES})
|
||||
|
|
Loading…
Reference in New Issue