Mentions légales du service

Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • solverstack/morse_cmake
  • gmarait/morse_cmake
  • rboucher/morse_cmake
  • mkuhn/morse_cmake
  • lvilleve/morse_cmake
  • tmijieux/morse_cmake
  • tcojean/morse_cmake
  • thibault/morse_cmake
  • vperrier/morse_cmake
  • tdelarue/morse_cmake
  • ekorkmaz/morse_cmake
11 results
Show changes
Commits on Source (4)
......@@ -639,11 +639,8 @@ if(FFTW_LIBRARIES)
endif()
morse_finds_remove_duplicates()
set(CMAKE_REQUIRED_DEFINITIONS "${REQUIRED_DEFINITIONS}")
set(CMAKE_REQUIRED_FLAGS "${REQUIRED_FLAGS}")
set(CMAKE_REQUIRED_LIBRARIES)
list(APPEND CMAKE_REQUIRED_LIBRARIES "${REQUIRED_LDFLAGS}")
list(APPEND CMAKE_REQUIRED_LIBRARIES "${REQUIRED_LIBS}")
list(APPEND CMAKE_REQUIRED_FLAGS "${REQUIRED_FLAGS}")
set(CMAKE_REQUIRED_FLAGS "${REQUIRED_LDFLAGS}")
set(CMAKE_REQUIRED_LIBRARIES "${REQUIRED_LIBS}")
string(REGEX REPLACE "^ -" "-" CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}")
# test link
......
......@@ -109,12 +109,6 @@ if(HYPRE_LIBRARIES)
if (MPI_C_INCLUDE_PATH)
list(APPEND REQUIRED_INCDIRS "${MPI_C_INCLUDE_PATH}")
endif()
if (MPI_C_LINK_FLAGS)
if (${MPI_C_LINK_FLAGS} MATCHES " -")
string(REGEX REPLACE " -" "-" MPI_C_LINK_FLAGS ${MPI_C_LINK_FLAGS})
endif()
list(APPEND REQUIRED_LDFLAGS "${MPI_C_LINK_FLAGS}")
endif()
list(APPEND REQUIRED_LIBS "${MPI_C_LIBRARIES}")
endif()
# libm
......
......@@ -432,12 +432,6 @@ if(MUMPS_LIBRARIES)
if (MPI_C_INCLUDE_PATH)
list(APPEND REQUIRED_INCDIRS "${MPI_C_INCLUDE_PATH}")
endif()
if (MPI_Fortran_LINK_FLAGS)
if (${MPI_Fortran_LINK_FLAGS} MATCHES " -")
string(REGEX REPLACE " -" "-" MPI_Fortran_LINK_FLAGS ${MPI_Fortran_LINK_FLAGS})
endif()
list(APPEND REQUIRED_LDFLAGS "${MPI_Fortran_LINK_FLAGS}")
endif()
list(APPEND REQUIRED_LIBS "${MPI_Fortran_LIBRARIES}")
endif()
# SCOTCH
......@@ -539,10 +533,8 @@ if(MUMPS_LIBRARIES)
endif()
morse_finds_remove_duplicates()
set(CMAKE_REQUIRED_DEFINITIONS "${REQUIRED_DEFINITIONS}")
set(CMAKE_REQUIRED_FLAGS "${REQUIRED_FLAGS}")
set(CMAKE_REQUIRED_LIBRARIES)
list(APPEND CMAKE_REQUIRED_LIBRARIES "${REQUIRED_LDFLAGS}")
list(APPEND CMAKE_REQUIRED_LIBRARIES "${REQUIRED_LIBS}")
set(CMAKE_REQUIRED_FLAGS "${REQUIRED_LDFLAGS}")
set(CMAKE_REQUIRED_LIBRARIES "${REQUIRED_LIBS}")
string(REGEX REPLACE "^ -" "-" CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}")
# test link
......
......@@ -256,7 +256,7 @@ macro(morse_set_required_test_lib_link name)
endif()
morse_finds_remove_duplicates()
set(CMAKE_REQUIRED_DEFINITIONS "${REQUIRED_DEFINITIONS}")
set(CMAKE_REQUIRED_FLAGS "${REQUIRED_FLAGS}")
set(CMAKE_REQUIRED_FLAGS "${REQUIRED_LDFLAGS}")
set(CMAKE_REQUIRED_LIBRARIES)
list(APPEND CMAKE_REQUIRED_LIBRARIES "${${name}${STATIC}_LDFLAGS_OTHER}")
if (${name}${STATIC}_LIBRARY_DIRS)
......
......@@ -125,12 +125,6 @@ if(PAMPA_LIBRARIES)
if (MPI_C_INCLUDE_PATH)
list(APPEND CMAKE_REQUIRED_INCLUDES "${MPI_C_INCLUDE_PATH}")
endif()
if (MPI_C_LINK_FLAGS)
if (${MPI_C_LINK_FLAGS} MATCHES " -")
string(REGEX REPLACE " -" "-" MPI_C_LINK_FLAGS ${MPI_C_LINK_FLAGS})
endif()
list(APPEND REQUIRED_LDFLAGS "${MPI_C_LINK_FLAGS}")
endif()
list(APPEND REQUIRED_LIBS "${MPI_C_LIBRARIES}")
endif()
# PTSCOTCH
......@@ -165,10 +159,8 @@ if(PAMPA_LIBRARIES)
endif()
morse_finds_remove_duplicates()
set(CMAKE_REQUIRED_DEFINITIONS "${REQUIRED_DEFINITIONS}")
set(CMAKE_REQUIRED_FLAGS "${REQUIRED_FLAGS}")
set(CMAKE_REQUIRED_LIBRARIES)
list(APPEND CMAKE_REQUIRED_LIBRARIES "${REQUIRED_LDFLAGS}")
list(APPEND CMAKE_REQUIRED_LIBRARIES "${REQUIRED_LIBS}")
set(CMAKE_REQUIRED_FLAGS "${REQUIRED_LDFLAGS}")
set(CMAKE_REQUIRED_LIBRARIES "${REQUIRED_LIBS}")
string(REGEX REPLACE "^ -" "-" CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}")
# test link
......
......@@ -130,12 +130,6 @@ if(PARMETIS_LIBRARIES)
if (MPI_C_INCLUDE_PATH)
list(APPEND REQUIRED_INCDIRS "${MPI_C_INCLUDE_PATH}")
endif()
if (MPI_C_LINK_FLAGS)
if (${MPI_C_LINK_FLAGS} MATCHES " -")
string(REGEX REPLACE " -" "-" MPI_C_LINK_FLAGS ${MPI_C_LINK_FLAGS})
endif()
list(APPEND REQUIRED_LDFLAGS "${MPI_C_LINK_FLAGS}")
endif()
list(APPEND REQUIRED_LIBS "${MPI_C_LIBRARIES}")
endif()
# m
......@@ -161,10 +155,8 @@ if(PARMETIS_LIBRARIES)
endif()
morse_finds_remove_duplicates()
set(CMAKE_REQUIRED_DEFINITIONS "${REQUIRED_DEFINITIONS}")
set(CMAKE_REQUIRED_FLAGS "${REQUIRED_FLAGS}")
set(CMAKE_REQUIRED_LIBRARIES)
list(APPEND CMAKE_REQUIRED_LIBRARIES "${REQUIRED_LDFLAGS}")
list(APPEND CMAKE_REQUIRED_LIBRARIES "${REQUIRED_LIBS}")
set(CMAKE_REQUIRED_FLAGS "${REQUIRED_LDFLAGS}")
set(CMAKE_REQUIRED_LIBRARIES "${REQUIRED_LIBS}")
string(REGEX REPLACE "^ -" "-" CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}")
# test link
......
......@@ -32,6 +32,7 @@
# - MPI
#
# COMPONENTS can be some of the following:
# - ERREXIT: to choose libptscotcherrexit as error library instead of libptscotcherr (default)
# - ESMUMPS: to activate detection of PT-Scotch with the esmumps interface
#
# This module finds headers and ptscotch library.
......@@ -70,10 +71,15 @@ include(FindMorseInit)
morse_find_package_get_envdir(PTSCOTCH)
# Set the version to find
set(PTSCOTCH_LOOK_FOR_ERREXIT OFF)
set(PTSCOTCH_LOOK_FOR_ESMUMPS OFF)
if( PTSCOTCH_FIND_COMPONENTS )
foreach( component ${PTSCOTCH_FIND_COMPONENTS} )
if (${component} STREQUAL "ERREXIT")
# means we look for ptscotcherrexit library
set(PTSCOTCH_LOOK_FOR_ERREXIT ON)
endif()
if (${component} STREQUAL "ESMUMPS")
# means we look for esmumps library
set(PTSCOTCH_LOOK_FOR_ESMUMPS ON)
......@@ -107,12 +113,15 @@ morse_find_path(PTSCOTCH
# Looking for lib
# ---------------
set(PTSCOTCH_libs_to_find "ptscotch;ptscotcherr")
if (PTSCOTCH_LOOK_FOR_ERREXIT)
list(APPEND PTSCOTCH_libs_to_find "ptscotch;ptscotcherrexit;scotch;scotcherrexit")
else()
list(APPEND PTSCOTCH_libs_to_find "ptscotch;ptscotcherr;scotch;scotcherr")
endif()
if (PTSCOTCH_LOOK_FOR_ESMUMPS)
list(INSERT PTSCOTCH_libs_to_find 0 "ptesmumps")
list(APPEND PTSCOTCH_libs_to_find "esmumps" )
endif()
list(APPEND PTSCOTCH_libs_to_find "scotch;scotcherr")
morse_find_library(PTSCOTCH
LIBRARIES ${PTSCOTCH_libs_to_find}
......@@ -146,12 +155,6 @@ if(PTSCOTCH_LIBRARIES)
if (MPI_C_INCLUDE_PATH)
list(APPEND REQUIRED_INCDIRS "${MPI_C_INCLUDE_PATH}")
endif()
if (MPI_C_LINK_FLAGS)
if (${MPI_C_LINK_FLAGS} MATCHES " -")
string(REGEX REPLACE " -" "-" MPI_C_LINK_FLAGS ${MPI_C_LINK_FLAGS})
endif()
list(APPEND REQUIRED_LDFLAGS "${MPI_C_LINK_FLAGS}")
endif()
list(APPEND REQUIRED_LIBS "${MPI_C_LIBRARIES}")
endif()
# THREADS
......@@ -196,10 +199,8 @@ if(PTSCOTCH_LIBRARIES)
endif()
morse_finds_remove_duplicates()
set(CMAKE_REQUIRED_DEFINITIONS "${REQUIRED_DEFINITIONS}")
set(CMAKE_REQUIRED_FLAGS "${REQUIRED_FLAGS}")
set(CMAKE_REQUIRED_LIBRARIES)
list(APPEND CMAKE_REQUIRED_LIBRARIES "${REQUIRED_LDFLAGS}")
list(APPEND CMAKE_REQUIRED_LIBRARIES "${REQUIRED_LIBS}")
set(CMAKE_REQUIRED_FLAGS "${REQUIRED_LDFLAGS}")
set(CMAKE_REQUIRED_LIBRARIES "${REQUIRED_LIBS}")
string(REGEX REPLACE "^ -" "-" CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}")
# test link
......
......@@ -174,10 +174,8 @@ if(QUARK_LIBRARIES)
endif()
morse_finds_remove_duplicates()
set(CMAKE_REQUIRED_DEFINITIONS "${REQUIRED_DEFINITIONS}")
set(CMAKE_REQUIRED_FLAGS "${REQUIRED_FLAGS}")
set(CMAKE_REQUIRED_LIBRARIES)
list(APPEND CMAKE_REQUIRED_LIBRARIES "${REQUIRED_LDFLAGS}")
list(APPEND CMAKE_REQUIRED_LIBRARIES "${REQUIRED_LIBS}")
set(CMAKE_REQUIRED_FLAGS "${REQUIRED_LDFLAGS}")
set(CMAKE_REQUIRED_LIBRARIES "${REQUIRED_LIBS}")
string(REGEX REPLACE "^ -" "-" CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}")
# test link
......
......@@ -28,6 +28,7 @@
# )
#
# COMPONENTS can be some of the following:
# - ERREXIT: to choose libscotcherrexit as error library instead of libscotcherr (default)
# - ESMUMPS: to activate detection of Scotch with the esmumps interface
#
# This module finds headers and scotch library.
......@@ -64,10 +65,15 @@ include(FindMorseInit)
morse_find_package_get_envdir(SCOTCH)
# Set the version to find
set(SCOTCH_LOOK_FOR_ERREXIT OFF)
set(SCOTCH_LOOK_FOR_ESMUMPS OFF)
if( SCOTCH_FIND_COMPONENTS )
foreach( component ${SCOTCH_FIND_COMPONENTS} )
if (${component} STREQUAL "ERREXIT")
# means we look for scotcherrexit library
set(SCOTCH_LOOK_FOR_ERREXIT ON)
endif()
if (${component} STREQUAL "ESMUMPS")
# means we look for esmumps library
set(SCOTCH_LOOK_FOR_ESMUMPS ON)
......@@ -94,7 +100,11 @@ morse_find_path(SCOTCH
# Looking for lib
# ---------------
set(SCOTCH_libs_to_find "scotch;scotcherrexit")
if (SCOTCH_LOOK_FOR_ERREXIT)
list(APPEND SCOTCH_libs_to_find "scotch;scotcherrexit")
else()
list(APPEND SCOTCH_libs_to_find "scotch;scotcherr")
endif()
if (SCOTCH_LOOK_FOR_ESMUMPS)
list(INSERT SCOTCH_libs_to_find 0 "esmumps")
endif()
......@@ -131,7 +141,9 @@ if(SCOTCH_LIBRARIES)
list(APPEND REQUIRED_FLAGS "${CMAKE_THREAD_LIBS_INIT}")
list(APPEND REQUIRED_LDFLAGS "${CMAKE_THREAD_LIBS_INIT}")
else()
list(APPEND REQUIRED_LIBS "${CMAKE_THREAD_LIBS_INIT}")
if (CMAKE_THREAD_LIBS_INIT)
list(APPEND REQUIRED_LIBS "${CMAKE_THREAD_LIBS_INIT}")
endif()
endif()
set(Z_LIBRARY "Z_LIBRARY-NOTFOUND")
find_library(Z_LIBRARY NAMES z)
......@@ -154,8 +166,7 @@ if(SCOTCH_LIBRARIES)
morse_finds_remove_duplicates()
# set required libraries for link
set(CMAKE_REQUIRED_INCLUDES "${REQUIRED_INCDIRS}")
set(CMAKE_REQUIRED_LIBRARIES)
list(APPEND CMAKE_REQUIRED_LIBRARIES "${REQUIRED_LIBS}")
set(CMAKE_REQUIRED_LIBRARIES "${REQUIRED_LIBS}")
string(REGEX REPLACE "^ -" "-" CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}")
# test link
......
......@@ -233,10 +233,8 @@ if(SUITESPARSE_LIBRARIES)
endif()
morse_finds_remove_duplicates()
set(CMAKE_REQUIRED_DEFINITIONS "${REQUIRED_DEFINITIONS}")
set(CMAKE_REQUIRED_FLAGS "${REQUIRED_FLAGS}")
set(CMAKE_REQUIRED_LIBRARIES)
list(APPEND CMAKE_REQUIRED_LIBRARIES "${REQUIRED_LDFLAGS}")
list(APPEND CMAKE_REQUIRED_LIBRARIES "${REQUIRED_LIBS}")
set(CMAKE_REQUIRED_FLAGS "${REQUIRED_LDFLAGS}")
set(CMAKE_REQUIRED_LIBRARIES "${REQUIRED_LIBS}")
string(REGEX REPLACE "^ -" "-" CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}")
# test link
......