From 12b238368c6cf2a3fc68eeb0d11afa0f6e1eaad1 Mon Sep 17 00:00:00 2001 From: Henrik Rusche Date: Thu, 31 May 2018 10:50:56 +0200 Subject: [PATCH] Added OMPI_SKIP_MPICXX option & fixed linkage against external libraries without SONAME --- cmake/FindCCMIO.cmake | 3 --- cmake/FindMesquite.cmake | 3 --- cmake/FindMetis.cmake | 3 --- cmake/FindParMGridGen.cmake | 3 --- cmake/FindParMetis.cmake | 3 --- cmake/FindScotch.cmake | 3 --- cmake/compileFOAM.cmake | 9 +++++++-- 7 files changed, 7 insertions(+), 20 deletions(-) diff --git a/cmake/FindCCMIO.cmake b/cmake/FindCCMIO.cmake index dce28195b..700bc2c56 100644 --- a/cmake/FindCCMIO.cmake +++ b/cmake/FindCCMIO.cmake @@ -34,9 +34,6 @@ find_library(CCMIO_LIBRARY2 ${CCMIO_PKGCONF_LIBRARY_DIRS} ) -message(STATUS ${CCMIO_INCLUDE_DIR}) -message(STATUS ${CCMIO_LIBRARY}) - # Set the include dir variables and the libraries and let libfind_process do the rest. # NOTE: Singular variables for this library, plural for libraries this this lib depends on. diff --git a/cmake/FindMesquite.cmake b/cmake/FindMesquite.cmake index a160c6fe4..a797bf753 100644 --- a/cmake/FindMesquite.cmake +++ b/cmake/FindMesquite.cmake @@ -20,9 +20,6 @@ find_library(MESQUITE_LIBRARY ${MESQUITE_PKGCONF_LIBRARY_DIRS} ) -message(STATUS ${MESQUITE_INCLUDE_DIR}) -message(STATUS ${MESQUITE_LIBRARY}) - # Set the include dir variables and the libraries and let libfind_process do the rest. # NOTE: Singular variables for this library, plural for libraries this this lib depends on. diff --git a/cmake/FindMetis.cmake b/cmake/FindMetis.cmake index fe283fdca..7ce176b79 100644 --- a/cmake/FindMetis.cmake +++ b/cmake/FindMetis.cmake @@ -23,9 +23,6 @@ find_library(METIS_LIBRARY # Set the include dir variables and the libraries and let libfind_process do the rest. # NOTE: Singular variables for this library, plural for libraries this this lib depends on. -message(STATUS ${METIS_INCLUDE_DIR}) -message(STATUS ${METIS_LIBRARY}) - set(METIS_PROCESS_INCLUDES METIS_INCLUDE_DIR) set(METIS_PROCESS_LIBS METIS_LIBRARY) libfind_process(METIS) diff --git a/cmake/FindParMGridGen.cmake b/cmake/FindParMGridGen.cmake index c7547464a..3082250fa 100644 --- a/cmake/FindParMGridGen.cmake +++ b/cmake/FindParMGridGen.cmake @@ -30,9 +30,6 @@ find_library(PARMGRIDGEN_LIBRARY # Set the include dir variables and the libraries and let libfind_process do the rest. # NOTE: Singular variables for this library, plural for libraries this this lib depends on. -message(STATUS ${PARMGRIDGEN_INCLUDE_DIR}) -message(STATUS ${PARMGRIDGEN_LIBRARY}) - set(PARMGRIDGEN_PROCESS_INCLUDE PARMGRIDGEN_INCLUDE_DIR) set(PARMGRIDGEN_PROCESS_INCLUDES PARMGRIDGEN_INCLUDE_DIR2) set(PARMGRIDGEN_PROCESS_LIB PARMGRIDGEN_LIBRARY) diff --git a/cmake/FindParMetis.cmake b/cmake/FindParMetis.cmake index 29975bce5..138bf3dfb 100644 --- a/cmake/FindParMetis.cmake +++ b/cmake/FindParMetis.cmake @@ -23,9 +23,6 @@ find_library(PARMETIS_LIBRARY # Set the include dir variables and the libraries and let libfind_process do the rest. # NOTE: Singular variables for this library, plural for libraries this this lib depends on. -message(STATUS ${PARMETIS_INCLUDE_DIR}) -message(STATUS ${PARMETIS_LIBRARY}) - set(PARMETIS_PROCESS_INCLUDES PARMETIS_INCLUDE_DIR) set(PARMETIS_PROCESS_LIBS PARMETIS_LIBRARY) libfind_process(PARMETIS) diff --git a/cmake/FindScotch.cmake b/cmake/FindScotch.cmake index 0c23d41f1..e2803c3b1 100644 --- a/cmake/FindScotch.cmake +++ b/cmake/FindScotch.cmake @@ -23,9 +23,6 @@ find_library(SCOTCH_LIBRARY # Set the include dir variables and the libraries and let libfind_process do the rest. # NOTE: Singular variables for this library, plural for libraries this this lib depends on. -message(STATUS ${SCOTCH_INCLUDE_DIR}) -message(STATUS ${SCOTCH_LIBRARY}) - set(SCOTCH_PROCESS_INCLUDE SCOTCH_INCLUDE_DIR) set(SCOTCH_PROCESS_LIB SCOTCH_LIBRARY) libfind_process(SCOTCH) diff --git a/cmake/compileFOAM.cmake b/cmake/compileFOAM.cmake index 26c9de0eb..65e810ee9 100644 --- a/cmake/compileFOAM.cmake +++ b/cmake/compileFOAM.cmake @@ -63,7 +63,8 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) find_package(MPI REQUIRED) add_library(mpi SHARED IMPORTED) set_property(TARGET mpi PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${MPI_C_INCLUDE_PATH}) -set_property(TARGET mpi PROPERTY IMPORTED_LOCATION ${MPI_LIBRARY}) +set_property(TARGET mpi PROPERTY IMPORTED_LOCATION ${MPI_C_LIBRARIES}) +set_property(TARGET mpi PROPERTY INTERFACE_COMPILE_DEFINITIONS OMPI_SKIP_MPICXX) find_package(ZLIB REQUIRED) @@ -87,6 +88,7 @@ if(SCOTCH_FOUND) add_library(scotch SHARED IMPORTED) set_property(TARGET scotch PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${SCOTCH_INCLUDE_DIRS}) set_property(TARGET scotch PROPERTY IMPORTED_LOCATION ${SCOTCH_LIBRARY}) + set_property(TARGET scotch PROPERTY IMPORTED_NO_SONAME TRUE) endif() find_package(Metis REQUIRED) @@ -108,6 +110,7 @@ if(PARMGRIDGEN_FOUND) add_library(parmgridgen SHARED IMPORTED) set_property(TARGET parmgridgen PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PARMGRIDGEN_INCLUDE_DIRS}) set_property(TARGET parmgridgen PROPERTY IMPORTED_LOCATION ${PARMGRIDGEN_LIBRARY}) + set_property(TARGET parmgridgen PROPERTY IMPORTED_NO_SONAME TRUE) endif() find_package(CCMIO REQUIRED) @@ -135,6 +138,7 @@ file(WRITE ${CMAKE_BINARY_DIR}/cmake/FOAMTargets.cmake "#" ) add_subdirectory(src) add_subdirectory(applications) +#add_subdirectory(tutorials) # @@ -147,6 +151,7 @@ if(NOT CMAKE_BUILD_TYPE) FORCE) endif() + # # Definitions inherited by all targets # @@ -168,7 +173,7 @@ target_compile_definitions(OSspecific PUBLIC WM_LABEL_SIZE=${FOAM_LABEL_SIZE}) # No Repository target_compile_definitions(OSspecific PUBLIC NoRepository) -# No Repository +# linux64 - hardcoded for the moment target_compile_definitions(OSspecific PUBLIC linux64) # FOAM's full debug mode