Commit 42675ba6 authored by Valeriu Codreanu's avatar Valeriu Codreanu
Browse files

added guards and messages to CMakeLists.txt from...

added guards and messages to CMakeLists.txt from dense_linear_algebra,monte_carlo_methods,sparse_linear_algebra,structured_grids dwarfs
parent 45355681
......@@ -30,12 +30,15 @@ if (OPENMP_FOUND)
add_executable(${NAME1_OMP} integral1_openmp.c)
target_link_libraries(${NAME1_OMP} m)
install(TARGETS ${NAME1_OMP} DESTINATION bin)
message("** Enabling '${NAME1_OMP}': with OpenMP")
add_executable(${NAME2_OMP} integral2_openmp.c)
target_link_libraries(${NAME2_OMP} m)
install(TARGETS ${NAME2_OMP} DESTINATION bin)
message("** Enabling '${NAME2_OMP}': with OpenMP")
add_executable(${NAME3_OMP} integral3_openmp.c)
target_link_libraries(${NAME3_OMP} m)
install(TARGETS ${NAME3_OMP} DESTINATION bin)
message("** Enabling '${NAME3_OMP}': with OpenMP")
else()
message("## Skipping 'integral 1/2/3 advanced': no OpenMP support found")
# dummy_install(${NAME} "OpenMP")
......@@ -47,12 +50,15 @@ if (MPI_FOUND)
add_executable(${NAME1_MPI} integral1_mpi.c)
target_link_libraries(${NAME1_MPI} m ${MPI_LIBRARIES} stdc++)
install(TARGETS ${NAME1_MPI} DESTINATION bin)
message("** Enabling '${NAME1_MPI}': with MPI")
add_executable(${NAME2_MPI} integral2_mpi.c)
target_link_libraries(${NAME2_MPI} m ${MPI_LIBRARIES} stdc++)
install(TARGETS ${NAME2_MPI} DESTINATION bin)
message("** Enabling '${NAME2_MPI}': with MPI")
add_executable(${NAME3_MPI} integral3_mpi.c)
target_link_libraries(${NAME3_MPI} m ${MPI_LIBRARIES} stdc++)
install(TARGETS ${NAME3_MPI} DESTINATION bin)
message("** Enabling '${NAME3_MPI}': with MPI")
else()
message("## Skipping 'integral 1/2/3 advanced': no MPI support found")
# dummy_install(${NAME} "MPI")
......
......@@ -25,6 +25,7 @@ if (OPENMP_FOUND)
add_executable(${NAME_OMP} integral1d_OMP.c)
target_link_libraries(${NAME_OMP} m)
install(TARGETS ${NAME_OMP} DESTINATION bin)
message("** Enabling '${NAME_OMP}': with OpenMP")
else()
message("## Skipping 'integral1d_OMP': no OpenMP support found")
# dummy_install(${NAME} "OpenMP")
......@@ -37,6 +38,7 @@ if (MPI_FOUND)
add_executable(${NAME_MPI} integral1d_mpi.c)
target_link_libraries(${NAME_MPI} m ${MPI_LIBRARIES} stdc++)
install(TARGETS ${NAME_MPI} DESTINATION bin)
message("** Enabling '${NAME_MPI}': with MPI")
else()
message("## Skipping 'integral1d_mpi': no MPI support found")
# dummy_install(${NAME} "MPI")
......@@ -45,6 +47,7 @@ endif()
add_executable(${NAME_SERIAL} integral1d.c)
target_link_libraries(${NAME_SERIAL} m)
install(TARGETS ${NAME_SERIAL} DESTINATION bin)
message("** Enabling '${NAME_SERIAL}': serial version")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${C_FLAGS}")
......
......@@ -24,6 +24,7 @@ if (OPENMP_FOUND)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
add_executable(${NAME_OMP} pi_omp.c pi_shared.c)
install(TARGETS ${NAME_OMP} DESTINATION bin)
message("** Enabling '${NAME_OMP}': with OpenMP")
else()
message("## Skipping 'pi_omp': no OpenMP support found")
# dummy_install(${NAME} "OpenMP")
......@@ -36,9 +37,14 @@ if (MPI_FOUND)
add_executable(${NAME_MPI} pi_mpi.c pi_shared.c)
target_link_libraries(${NAME_MPI} ${MPI_LIBRARIES} stdc++)
install(TARGETS ${NAME_MPI} DESTINATION bin)
message("** Enabling '${NAME_MPI}': with MPI")
else()
message("## Skipping '${NAME_MPI}': no OpenMP support found")
# dummy_install(${NAME} "OpenMP")
endif()
add_executable(${NAME_SERIAL} pi_serial.c pi_shared.c)
message("** Enabling '${NAME_SERIAL}': serial version")
install(TARGETS ${NAME_SERIAL} DESTINATION bin)
......
......@@ -25,6 +25,8 @@ if (OPENMP_FOUND)
add_executable(${NAME_OMP} random_openmp.c)
target_link_libraries(${NAME_OMP} m)
install(TARGETS ${NAME_OMP} DESTINATION bin)
message("** Enabling '${NAME_OMP}': with OpenMP")
else()
message("## Skipping 'random_openmp': no OpenMP support found")
# dummy_install(${NAME_OMP} "OpenMP")
......@@ -37,6 +39,8 @@ if (MPI_FOUND)
add_executable(${NAME_MPI} random_mpi.c)
target_link_libraries(${NAME_MPI} m ${MPI_LIBRARIES} stdc++)
install(TARGETS ${NAME_MPI} DESTINATION bin)
message("** Enabling '${NAME_MPI}': with MPI")
else()
message("## Skipping 'random_mpi': no MPI support found")
# dummy_install(${NAME_MPI} "MPI")
......@@ -46,6 +50,7 @@ add_executable(${NAME_SERIAL} random.c)
target_link_libraries(${NAME_SERIAL} m)
install(TARGETS ${NAME_SERIAL} DESTINATION bin)
message("** Enabling '${NAME_SERIAL}': serial version")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${C_FLAGS}")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment