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) ...@@ -30,12 +30,15 @@ if (OPENMP_FOUND)
add_executable(${NAME1_OMP} integral1_openmp.c) add_executable(${NAME1_OMP} integral1_openmp.c)
target_link_libraries(${NAME1_OMP} m) target_link_libraries(${NAME1_OMP} m)
install(TARGETS ${NAME1_OMP} DESTINATION bin) install(TARGETS ${NAME1_OMP} DESTINATION bin)
message("** Enabling '${NAME1_OMP}': with OpenMP")
add_executable(${NAME2_OMP} integral2_openmp.c) add_executable(${NAME2_OMP} integral2_openmp.c)
target_link_libraries(${NAME2_OMP} m) target_link_libraries(${NAME2_OMP} m)
install(TARGETS ${NAME2_OMP} DESTINATION bin) install(TARGETS ${NAME2_OMP} DESTINATION bin)
message("** Enabling '${NAME2_OMP}': with OpenMP")
add_executable(${NAME3_OMP} integral3_openmp.c) add_executable(${NAME3_OMP} integral3_openmp.c)
target_link_libraries(${NAME3_OMP} m) target_link_libraries(${NAME3_OMP} m)
install(TARGETS ${NAME3_OMP} DESTINATION bin) install(TARGETS ${NAME3_OMP} DESTINATION bin)
message("** Enabling '${NAME3_OMP}': with OpenMP")
else() else()
message("## Skipping 'integral 1/2/3 advanced': no OpenMP support found") message("## Skipping 'integral 1/2/3 advanced': no OpenMP support found")
# dummy_install(${NAME} "OpenMP") # dummy_install(${NAME} "OpenMP")
...@@ -47,12 +50,15 @@ if (MPI_FOUND) ...@@ -47,12 +50,15 @@ if (MPI_FOUND)
add_executable(${NAME1_MPI} integral1_mpi.c) add_executable(${NAME1_MPI} integral1_mpi.c)
target_link_libraries(${NAME1_MPI} m ${MPI_LIBRARIES} stdc++) target_link_libraries(${NAME1_MPI} m ${MPI_LIBRARIES} stdc++)
install(TARGETS ${NAME1_MPI} DESTINATION bin) install(TARGETS ${NAME1_MPI} DESTINATION bin)
message("** Enabling '${NAME1_MPI}': with MPI")
add_executable(${NAME2_MPI} integral2_mpi.c) add_executable(${NAME2_MPI} integral2_mpi.c)
target_link_libraries(${NAME2_MPI} m ${MPI_LIBRARIES} stdc++) target_link_libraries(${NAME2_MPI} m ${MPI_LIBRARIES} stdc++)
install(TARGETS ${NAME2_MPI} DESTINATION bin) install(TARGETS ${NAME2_MPI} DESTINATION bin)
message("** Enabling '${NAME2_MPI}': with MPI")
add_executable(${NAME3_MPI} integral3_mpi.c) add_executable(${NAME3_MPI} integral3_mpi.c)
target_link_libraries(${NAME3_MPI} m ${MPI_LIBRARIES} stdc++) target_link_libraries(${NAME3_MPI} m ${MPI_LIBRARIES} stdc++)
install(TARGETS ${NAME3_MPI} DESTINATION bin) install(TARGETS ${NAME3_MPI} DESTINATION bin)
message("** Enabling '${NAME3_MPI}': with MPI")
else() else()
message("## Skipping 'integral 1/2/3 advanced': no MPI support found") message("## Skipping 'integral 1/2/3 advanced': no MPI support found")
# dummy_install(${NAME} "MPI") # dummy_install(${NAME} "MPI")
......
...@@ -25,6 +25,7 @@ if (OPENMP_FOUND) ...@@ -25,6 +25,7 @@ if (OPENMP_FOUND)
add_executable(${NAME_OMP} integral1d_OMP.c) add_executable(${NAME_OMP} integral1d_OMP.c)
target_link_libraries(${NAME_OMP} m) target_link_libraries(${NAME_OMP} m)
install(TARGETS ${NAME_OMP} DESTINATION bin) install(TARGETS ${NAME_OMP} DESTINATION bin)
message("** Enabling '${NAME_OMP}': with OpenMP")
else() else()
message("## Skipping 'integral1d_OMP': no OpenMP support found") message("## Skipping 'integral1d_OMP': no OpenMP support found")
# dummy_install(${NAME} "OpenMP") # dummy_install(${NAME} "OpenMP")
...@@ -37,6 +38,7 @@ if (MPI_FOUND) ...@@ -37,6 +38,7 @@ if (MPI_FOUND)
add_executable(${NAME_MPI} integral1d_mpi.c) add_executable(${NAME_MPI} integral1d_mpi.c)
target_link_libraries(${NAME_MPI} m ${MPI_LIBRARIES} stdc++) target_link_libraries(${NAME_MPI} m ${MPI_LIBRARIES} stdc++)
install(TARGETS ${NAME_MPI} DESTINATION bin) install(TARGETS ${NAME_MPI} DESTINATION bin)
message("** Enabling '${NAME_MPI}': with MPI")
else() else()
message("## Skipping 'integral1d_mpi': no MPI support found") message("## Skipping 'integral1d_mpi': no MPI support found")
# dummy_install(${NAME} "MPI") # dummy_install(${NAME} "MPI")
...@@ -45,6 +47,7 @@ endif() ...@@ -45,6 +47,7 @@ endif()
add_executable(${NAME_SERIAL} integral1d.c) add_executable(${NAME_SERIAL} integral1d.c)
target_link_libraries(${NAME_SERIAL} m) target_link_libraries(${NAME_SERIAL} m)
install(TARGETS ${NAME_SERIAL} DESTINATION bin) install(TARGETS ${NAME_SERIAL} DESTINATION bin)
message("** Enabling '${NAME_SERIAL}': serial version")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${C_FLAGS}") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${C_FLAGS}")
......
...@@ -24,6 +24,7 @@ if (OPENMP_FOUND) ...@@ -24,6 +24,7 @@ if (OPENMP_FOUND)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
add_executable(${NAME_OMP} pi_omp.c pi_shared.c) add_executable(${NAME_OMP} pi_omp.c pi_shared.c)
install(TARGETS ${NAME_OMP} DESTINATION bin) install(TARGETS ${NAME_OMP} DESTINATION bin)
message("** Enabling '${NAME_OMP}': with OpenMP")
else() else()
message("## Skipping 'pi_omp': no OpenMP support found") message("## Skipping 'pi_omp': no OpenMP support found")
# dummy_install(${NAME} "OpenMP") # dummy_install(${NAME} "OpenMP")
...@@ -36,9 +37,14 @@ if (MPI_FOUND) ...@@ -36,9 +37,14 @@ if (MPI_FOUND)
add_executable(${NAME_MPI} pi_mpi.c pi_shared.c) add_executable(${NAME_MPI} pi_mpi.c pi_shared.c)
target_link_libraries(${NAME_MPI} ${MPI_LIBRARIES} stdc++) target_link_libraries(${NAME_MPI} ${MPI_LIBRARIES} stdc++)
install(TARGETS ${NAME_MPI} DESTINATION bin) 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() endif()
add_executable(${NAME_SERIAL} pi_serial.c pi_shared.c) add_executable(${NAME_SERIAL} pi_serial.c pi_shared.c)
message("** Enabling '${NAME_SERIAL}': serial version")
install(TARGETS ${NAME_SERIAL} DESTINATION bin) install(TARGETS ${NAME_SERIAL} DESTINATION bin)
......
...@@ -25,6 +25,8 @@ if (OPENMP_FOUND) ...@@ -25,6 +25,8 @@ if (OPENMP_FOUND)
add_executable(${NAME_OMP} random_openmp.c) add_executable(${NAME_OMP} random_openmp.c)
target_link_libraries(${NAME_OMP} m) target_link_libraries(${NAME_OMP} m)
install(TARGETS ${NAME_OMP} DESTINATION bin) install(TARGETS ${NAME_OMP} DESTINATION bin)
message("** Enabling '${NAME_OMP}': with OpenMP")
else() else()
message("## Skipping 'random_openmp': no OpenMP support found") message("## Skipping 'random_openmp': no OpenMP support found")
# dummy_install(${NAME_OMP} "OpenMP") # dummy_install(${NAME_OMP} "OpenMP")
...@@ -37,6 +39,8 @@ if (MPI_FOUND) ...@@ -37,6 +39,8 @@ if (MPI_FOUND)
add_executable(${NAME_MPI} random_mpi.c) add_executable(${NAME_MPI} random_mpi.c)
target_link_libraries(${NAME_MPI} m ${MPI_LIBRARIES} stdc++) target_link_libraries(${NAME_MPI} m ${MPI_LIBRARIES} stdc++)
install(TARGETS ${NAME_MPI} DESTINATION bin) install(TARGETS ${NAME_MPI} DESTINATION bin)
message("** Enabling '${NAME_MPI}': with MPI")
else() else()
message("## Skipping 'random_mpi': no MPI support found") message("## Skipping 'random_mpi': no MPI support found")
# dummy_install(${NAME_MPI} "MPI") # dummy_install(${NAME_MPI} "MPI")
...@@ -46,6 +50,7 @@ add_executable(${NAME_SERIAL} random.c) ...@@ -46,6 +50,7 @@ add_executable(${NAME_SERIAL} random.c)
target_link_libraries(${NAME_SERIAL} m) target_link_libraries(${NAME_SERIAL} m)
install(TARGETS ${NAME_SERIAL} DESTINATION bin) install(TARGETS ${NAME_SERIAL} DESTINATION bin)
message("** Enabling '${NAME_SERIAL}': serial version")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${C_FLAGS}") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${C_FLAGS}")
......
Supports Markdown
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