cmake: add simpleC to CMakeLists.txt

This commit is contained in:
Christoph Junghans
2020-03-28 17:57:53 -06:00
parent fa2df0df0f
commit f30116311f

View File

@ -4,11 +4,14 @@ project(simple CXX)
set(LAMMPS_SRC_DIRECTORY "" CACHE PATH "Path for lammps source")
if(NOT LAMMPS_SRC_DIRECTORY STREQUAL "" AND EXISTS ${LAMMPS_SRC_DIRECTORY}/cmake/CMakeLists.txt)
option(BUILD_LIB "Build LAMMPS library" ON)
option(LAMMPS_CREATE_IN_SOURCES_INCLUDE_DIR "include in-source lammps/ include dir" ON)
add_subdirectory(${LAMMPS_SRC_DIRECTORY}/cmake lammps)
else()
find_package(LAMMPS REQUIRED)
endif()
add_executable(simple simple.cpp)
target_link_libraries(simple LAMMPS::lammps)
add_executable(simpleCC simple.cpp)
target_link_libraries(simpleCC LAMMPS::lammps)
enable_language(C)
add_executable(simpleC simple.c)
target_link_libraries(simpleC LAMMPS::lammps)