Commit b3142ca7 authored by PRUVOST Florent's avatar PRUVOST Florent

clean this mess

parent d0f6e805
......@@ -938,6 +938,26 @@ list(APPEND CHAMELEON_DEP ${EXTRA_LIBRARIES})
list(REMOVE_DUPLICATES CHAMELEON_DEP)
#list(REVERSE CHAMELEON_DEP)
# we add chameleon's own library
set(CHAMELEON_LIBRARIES "chameleon")
if (NOT CHAMELEON_SIMULATION)
list(APPEND CHAMELEON_LIBRARIES coreblas)
if (CHAMELEON_USE_CUDA)
list(APPEND CHAMELEON_LIBRARIES cudablas)
endif()
endif()
if (CHAMELEON_SCHED_QUARK)
list(APPEND CHAMELEON_LIBRARIES chameleon_quark)
endif()
if (CHAMELEON_SCHED_PARSEC)
list(APPEND CHAMELEON_LIBRARIES chameleon_parsec)
endif()
if (CHAMELEON_SCHED_STARPU)
list(APPEND CHAMELEON_LIBRARIES chameleon_starpu)
endif()
list(APPEND CHAMELEON_LIBRARIES hqr)
set(CHAMELEON_LIBRARIES_DEP ${CHAMELEON_LIBRARIES} ${CHAMELEON_DEP})
# Check for the subdirectories
# ----------------------------
......
......@@ -96,7 +96,7 @@ set(dep_message "${dep_message}"
" timing ...............: ${CHAMELEON_ENABLE_TIMING}\n"
"\n"
" CHAMELEON dependencies :\n")
foreach (_dep ${CHAMELEON_DEP})
foreach (_dep ${CHAMELEON_LIBRARIES_DEP})
set(dep_message "${dep_message}"
" ${_dep}\n")
endforeach ()
......
......@@ -294,21 +294,16 @@ set(CHAMELEON_SOURCES_TARGETS "${CHAMELEON_SOURCES_TARGETS};chameleon_sources" C
add_library(chameleon ${CHAMELEON_SRCS} ${CHAMELEON_SRCSF})
if(CHAMELEON_SCHED_STARPU)
target_link_libraries(chameleon chameleon_starpu)
list(INSERT CHAMELEON_DEP 0 -lchameleon_starpu)
elseif(CHAMELEON_SCHED_PARSEC)
target_link_libraries(chameleon chameleon_parsec)
list(INSERT CHAMELEON_DEP 0 -lchameleon_parsec)
elseif(CHAMELEON_SCHED_QUARK)
target_link_libraries(chameleon chameleon_quark)
list(INSERT CHAMELEON_DEP 0 -lchameleon_quark)
endif()
if (NOT CHAMELEON_SIMULATION)
add_dependencies(chameleon
coreblas_include)
add_dependencies(chameleon coreblas_include)
target_link_libraries(chameleon coreblas)
endif()
target_link_libraries(chameleon hqr)
list(INSERT CHAMELEON_DEP 0 -lchameleon)
add_dependencies(chameleon
chameleon_include
......
......@@ -114,16 +114,14 @@ set(CHAMELEON_SOURCES_TARGETS "${CHAMELEON_SOURCES_TARGETS};coreblas_sources" CA
# Compile step
# ------------
add_library(coreblas ${COREBLAS_SRCS})
list(INSERT CHAMELEON_DEP 0 -lcoreblas)
add_dependencies(coreblas coreblas_include coreblas_sources)
set_property(TARGET coreblas PROPERTY LINKER_LANGUAGE Fortran)
set_property(TARGET coreblas PROPERTY INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
target_link_libraries(coreblas
${LAPACKE_LIBRARIES}
${LAPACK_SEQ_LIBRARIES}
${CBLAS_LIBRARIES}
${BLAS_SEQ_LIBRARIES}
${TMG_LIBRARIES_DEP}
${LAPACKE_LIBRARIES_DEP}
${CBLAS_LIBRARIES_DEP}
)
# Installation
......
......@@ -102,7 +102,7 @@ set_property(TARGET cudablas PROPERTY INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/
target_link_libraries(cudablas
coreblas
${CUDA_LIBRARIES})
${EXTRA_LIBRARIES_CUDA})
# installation
# ------------
......
......@@ -41,53 +41,9 @@ precisions_rules_py(EXAMPLES "${ZSRC}"
# Define what libraries we have to link with
# ------------------------------------------
unset(libs_for_examples)
list(APPEND libs_for_examples
chameleon
)
list(APPEND libs_for_examples ${CHAMELEON_LIBRARIES_DEP})
# message(STATUS "libs_for_examples: ${libs_for_examples}")
if(CHAMELEON_SCHED_STARPU)
list(APPEND libs_for_examples
chameleon_starpu
${STARPU_LIBRARIES_DEP}
)
link_directories(${STARPU_LIBRARY_DIRS})
elseif(CHAMELEON_SCHED_PARSEC)
list(APPEND libs_for_examples
chameleon_parsec
${PARSEC_LIBRARIES_DEP}
)
link_directories(${PARSEC_LIBRARY_DIRS_DEP})
elseif(CHAMELEON_SCHED_QUARK)
list(APPEND libs_for_examples
chameleon_quark
${QUARK_LIBRARIES}
)
link_directories(${QUARK_LIBRARY_DIRS})
endif()
if(CHAMELEON_USE_CUDA)
list(APPEND libs_for_examples
cudablas)
endif()
if(CHAMELEON_USE_CUDA)
link_directories(${CUDA_LIBRARY_DIRS})
endif()
list(APPEND libs_for_examples
coreblas
${LAPACKE_LIBRARIES}
${CBLAS_LIBRARIES}
${LAPACK_SEQ_LIBRARIES}
${BLAS_SEQ_LIBRARIES}
${EXTRA_LIBRARIES}
)
link_directories(${LAPACKE_LIBRARY_DIRS})
link_directories(${LAPACK_LIBRARY_DIRS})
link_directories(${CBLAS_LIBRARY_DIRS})
link_directories(${BLAS_LIBRARY_DIRS})
# message(STATUS "libs timings: ${libs_for_examples}")
foreach(_example ${EXAMPLES})
get_filename_component(_name_exe ${_example} NAME_WE)
add_executable(${_name_exe} ${_example})
......
......@@ -78,13 +78,8 @@ list(APPEND libs_for_ltm
${BLAS_SEQ_LIBRARIES}
${EXTRA_LIBRARIES}
)
# message(STATUS "libs_for_ltm: ${libs_for_ltm}")
link_directories(${LAPACKE_LIBRARY_DIRS})
link_directories(${LAPACK_LIBRARY_DIRS})
link_directories(${CBLAS_LIBRARY_DIRS})
link_directories(${BLAS_LIBRARY_DIRS})
# message(STATUS "libs examples: ${libs_for_ltm}")
foreach(_ltm ${LTM_SOURCES})
get_filename_component(_name_exe ${_ltm} NAME_WE)
add_executable(${_name_exe} ${_ltm})
......
......@@ -37,24 +37,9 @@ set(OOC_SOURCES
# Define what libraries we have to link with
# ------------------------------------------
unset(libs_for_ooc)
list(APPEND libs_for_ooc
chameleon
${STARPU_LIBRARIES_DEP}
)
link_directories(${STARPU_LIBRARY_DIRS})
list(APPEND libs_for_ooc ${CHAMELEON_LIBRARIES_DEP})
# message(STATUS "libs_for_ooc: ${libs_for_ooc}")
list(APPEND libs_for_ooc
${LAPACKE_LIBRARIES}
${LAPACK_SEQ_LIBRARIES}
${BLAS_SEQ_LIBRARIES}
${EXTRA_LIBRARIES}
)
link_directories(${LAPACKE_LIBRARY_DIRS})
link_directories(${LAPACK_LIBRARY_DIRS})
link_directories(${BLAS_LIBRARY_DIRS})
# message(STATUS "libs examples: ${libs_for_ooc}")
foreach(_ooc ${OOC_SOURCES})
get_filename_component(_name_exe ${_ooc} NAME_WE)
add_executable(${_name_exe} ${_ooc})
......
......@@ -117,11 +117,9 @@ set_property(TARGET chameleon_parsec PROPERTY INSTALL_NAME_DIR "${CMAKE_INSTALL_
target_link_libraries(chameleon_parsec
${PARSEC_LIBRARIES_DEP})
if (NOT CHAMELEON_SIMULATION)
target_link_libraries(chameleon_parsec
coreblas)
target_link_libraries(chameleon_parsec coreblas)
if(CHAMELEON_USE_CUDA)
target_link_libraries(chameleon_parsec
cudablas)
target_link_libraries(chameleon_parsec cudablas)
endif(CHAMELEON_USE_CUDA)
endif(NOT CHAMELEON_SIMULATION)
......
......@@ -104,46 +104,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
# Define what libraries we have to link with
# ------------------------------------------
unset(libs_for_tests)
list(APPEND libs_for_tests
chameleon
)
if(CHAMELEON_USE_CUDA)
list(APPEND libs_for_tests
cudablas)
endif()
if(CHAMELEON_USE_CUDA)
link_directories(${CUDA_LIBRARY_DIRS})
endif()
list(APPEND libs_for_tests
coreblas
${LAPACKE_LIBRARIES}
${TMG_LIBRARIES}
${LAPACK_LIBRARIES}
${CBLAS_LIBRARIES}
${BLAS_LIBRARIES}
)
link_directories(${LAPACKE_LIBRARY_DIRS})
link_directories(${TMG_LIBRARY_DIRS})
link_directories(${LAPACK_LIBRARY_DIRS})
link_directories(${CBLAS_LIBRARY_DIRS})
link_directories(${BLAS_LIBRARY_DIRS})
list(APPEND libs_for_tests
hqr
${EXTRA_LIBRARIES}
)
# message("LAPACKE_LIBRARY_DIRS: ${LAPACKE_LIBRARY_DIRS}")
# message("LAPACK_LIBRARY_DIRS: ${LAPACK_LIBRARY_DIRS}")
# message("CBLAS_LIBRARY_DIRS: ${CBLAS_LIBRARY_DIRS}")
# message("BLAS_LIBRARY_DIRS: ${BLAS_LIBRARY_DIRS}")
# list(APPEND libs_for_tests ${CMAKE_Fortran_FLAGS} )
# list(APPEND libs_for_tests ${CMAKE_Fortran_LDFLAGS})
list(APPEND libs_for_tests ${CHAMELEON_LIBRARIES_DEP})
# message(STATUS "libs testings: ${libs_for_tests}")
# Create one testing per precision with all files
......
......@@ -170,52 +170,9 @@ if(NOT CHAMELEON_SIMULATION)
list(APPEND libs_for_timings chameleon_timing)
endif()
list(APPEND libs_for_timings
chameleon
)
# Add dependency toward StarPU for StarPU specific calls
if(CHAMELEON_SCHED_STARPU)
list(APPEND libs_for_timings
${STARPU_LIBRARIES_DEP}
)
link_directories(${STARPU_LIBRARY_DIRS})
endif()
if(NOT CHAMELEON_SIMULATION)
list(APPEND libs_for_timings
${LAPACKE_LIBRARIES}
${TMG_LIBRARIES}
${CBLAS_LIBRARIES}
${LAPACK_SEQ_LIBRARIES}
${BLAS_SEQ_LIBRARIES}
)
link_directories(${LAPACKE_LIBRARY_DIRS})
link_directories(${TMG_LIBRARY_DIRS})
link_directories(${LAPACK_LIBRARY_DIRS})
link_directories(${CBLAS_LIBRARY_DIRS})
link_directories(${BLAS_LIBRARY_DIRS})
endif()
list(APPEND libs_for_timings
hqr
${EXTRA_LIBRARIES}
)
# message("BLAS_SEQ_LIBRARIES: ${BLAS_SEQ_LIBRARIES}")
# message("CBLAS_LIBRARIES: ${CBLAS_LIBRARIES}")
# message("LAPACK_SEQ_LIBRARIES: ${LAPACK_SEQ_LIBRARIES}")
# message("LAPACKE_LIBRARIES: ${LAPACKE_LIBRARIES}")
# message("LAPACKE_LIBRARY_DIRS: ${LAPACKE_LIBRARY_DIRS}")
# message("LAPACK_LIBRARY_DIRS: ${LAPACK_LIBRARY_DIRS}")
# message("CBLAS_LIBRARY_DIRS: ${CBLAS_LIBRARY_DIRS}")
# message("BLAS_LIBRARY_DIRS: ${BLAS_LIBRARY_DIRS}")
list(APPEND libs_for_timings ${CHAMELEON_LIBRARIES_DEP})
# message(STATUS "libs timings: ${libs_for_timings}")
foreach(_timing ${TIMINGS})
get_filename_component(_name_exe ${_timing} NAME_WE)
add_executable(${_name_exe} ${_timing})
......
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