cmake: add cross-configure warning

This commit is contained in:
Christoph Junghans 2017-07-17 11:52:06 -06:00
parent 5ee2c31038
commit 2411192ab4
1 changed files with 8 additions and 0 deletions

View File

@ -18,6 +18,14 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_C_FLAGS)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." FORCE)
endif(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_C_FLAGS)
foreach(STYLE_FILE style_angle.h style_atom.h style_body.h style_bond.h style_command.h style_compute.h style_dihedral.h style_dump.h
style_fix.h style_improper.h style_integrate.h style_kspace.h style_minimize.h style_nbin.h style_npair.h style_nstencil.h
style_ntopo.h style_pair.h style_reader.h style_region.h)
if(EXISTS ${LAMMPS_SOURCE_DIR}/${STYLE_FILE})
message(FATAL_ERROR "There is a ${STYLE_FILE} in ${LAMMPS_SOURCE_DIR}, please clean up the source directory first")
endif()
endforeach()
enable_language(CXX)
######################################################################