This commit is contained in:
Carl William Pearson
2021-06-02 11:08:25 -06:00
parent fde859b825
commit b0d2bd24f4
4 changed files with 17 additions and 32 deletions

View File

@@ -90,13 +90,13 @@ endfunction()
configure_file(${CMAKE_CURRENT_LIST_DIR}/run-all.sh ${CMAKE_CURRENT_BINARY_DIR}/run-all.sh COPYONLY)
if (MPI_FOUND)
add_executable(main main.cpp)
target_link_libraries(main MPI::MPI_CXX)
# target_include_directories(main PRIVATE ${MPI_CXX_INCLUDE_PATH})
# target_compile_options(main PRIVATE ${MPI_CXX_COMPILE_FLAGS})
# target_link_libraries(main ${MPI_CXX_LIBRARIES} ${MPI_CXX_LINK_FLAGS})
set_cxx_options(main)
set_cxx_standard(main)
add_executable(hello-world hello_world.cpp)
target_link_libraries(hello-world MPI::MPI_CXX)
# target_include_directories(hello-world PRIVATE ${MPI_CXX_INCLUDE_PATH})
# target_compile_options(hello-world PRIVATE ${MPI_CXX_COMPILE_FLAGS})
# target_link_libraries(hello-world ${MPI_CXX_LIBRARIES} ${MPI_CXX_LINK_FLAGS})
set_cxx_options(hello-world)
set_cxx_standard(hello-world)
endif()
if (MPI_FOUND)