Skip to content

Commit

Permalink
new target
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenneth Assogba committed Apr 6, 2023
1 parent 5492c78 commit 124cd68
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,26 @@ set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
set(CMAKE_CXX_FLAGS_DEBUG "-g -fsanitize=address")

include_directories(include)


add_executable(usage bin/usage.cpp)
# target_include_directories(usage PUBLIC include)

# OpenMP
find_package(OpenMP)
if(OpenMP_CXX_FOUND)
target_link_libraries(usage PUBLIC OpenMP::OpenMP_CXX)
# target_link_libraries(usage PUBLIC OpenMP::OpenMP_CXX)
set(LINK_LIBS ${LINK_LIBS} ${OpenMP_CXX_LIBRARIES})
endif()

# MPI
find_package(MPI)
target_link_libraries(usage PUBLIC MPI::MPI_CXX)
# target_link_libraries(usage PUBLIC MPI::MPI_CXX)
set(LINK_LIBS ${LINK_LIBS} ${MPI_CXX_LIBRARIES})


# Executables

add_executable(usage bin/usage.cpp)
target_link_libraries(usage PUBLIC ${LINK_LIBS})


add_executable(broadcast bin/broadcast.cpp)
target_link_libraries(broadcast PUBLIC ${LINK_LIBS})

0 comments on commit 124cd68

Please sign in to comment.