Commit c80edd03 authored by Dave Moxey's avatar Dave Moxey

Fix BLAS issue, reorder root config slightly to make dependent options...

Fix BLAS issue, reorder root config slightly to make dependent options disappear correctly and fix library interdependencies
parent ab6eaaf7
......@@ -293,7 +293,14 @@ ENDIF (APPLE)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
# Build active components
# Build active components. Add utilities and solvers directories first, because
# that allows us to detect library dependencies automatically.
INCLUDE_DIRECTORIES(utilities)
ADD_SUBDIRECTORY(utilities)
INCLUDE_DIRECTORIES(solvers)
ADD_SUBDIRECTORY(solvers)
IF (NEKTAR_BUILD_LIBRARY)
SET(NEKTAR++_LIBRARIES SolverUtils LibUtilities StdRegions SpatialDomains LocalRegions
MultiRegions Collections GlobalMapping FieldUtils NekMeshUtils)
......@@ -302,14 +309,6 @@ IF (NEKTAR_BUILD_LIBRARY)
INSTALL(EXPORT Nektar++Libraries DESTINATION ${LIB_DIR}/cmake COMPONENT dev)
ENDIF (NEKTAR_BUILD_LIBRARY)
IF (NEKTAR_BUILD_SOLVERS)
INCLUDE_DIRECTORIES(solvers)
ADD_SUBDIRECTORY(solvers)
ENDIF(NEKTAR_BUILD_SOLVERS)
INCLUDE_DIRECTORIES(utilities)
ADD_SUBDIRECTORY(utilities)
IF (NEKTAR_BUILD_TESTS)
INCLUDE_DIRECTORIES(tests)
ADD_SUBDIRECTORY(tests)
......
......@@ -451,39 +451,37 @@ IF( NEKTAR_USE_MPI )
ENDIF( NEKTAR_USE_MPI )
# Lapack and Blas
IF( NEKTAR_USE_BLAS_LAPACK )
IF( NEKTAR_USE_MKL AND MKL_FOUND )
TARGET_LINK_LIBRARIES(LibUtilities LINK_PUBLIC ${MKL} )
SET_TARGET_PROPERTIES(LibUtilities
PROPERTIES COMPILE_FLAGS "${THE_COMPILE_FLAGS} -DMKL_ILP64")
ENDIF( NEKTAR_USE_MKL AND MKL_FOUND )
IF( NEKTAR_USE_ACML AND ACML_FOUND )
TARGET_LINK_LIBRARIES(LibUtilities LINK_PUBLIC ${ACML_TARGET_LINK_LIBRARIES} )
ENDIF( NEKTAR_USE_ACML AND ACML_FOUND )
IF( NEKTAR_USE_ACCELERATE_FRAMEWORK )
TARGET_LINK_LIBRARIES(LibUtilities LINK_PUBLIC ${ACCELERATE_FRAMEWORK_LINK_FLAGS})
ENDIF ( NEKTAR_USE_ACCELERATE_FRAMEWORK )
IF( NEKTAR_USE_WIN32_LAPACK )
TARGET_LINK_LIBRARIES(LibUtilities LINK_PUBLIC ${WIN32_LAPACK} ${WIN32_BLAS})
INSTALL(FILES ${WIN32_LAPACK_DLL} ${WIN32_BLAS_DLL}
DESTINATION ${NEKTAR_BIN_DIR})
ENDIF( NEKTAR_USE_WIN32_LAPACK )
IF( NEKTAR_USE_OPENBLAS AND OPENBLAS_FOUND )
TARGET_LINK_LIBRARIES(LibUtilities LINK_PUBLIC ${OPENBLAS})
ENDIF( NEKTAR_USE_OPENBLAS AND OPENBLAS_FOUND )
IF( NEKTAR_USE_SYSTEM_BLAS_LAPACK )
TARGET_LINK_LIBRARIES(LibUtilities LINK_PUBLIC ${NATIVE_LAPACK} ${NATIVE_BLAS})
ENDIF( NEKTAR_USE_SYSTEM_BLAS_LAPACK )
IF(THIRDPARTY_BUILD_BLAS_LAPACK)
ADD_DEPENDENCIES(LibUtilities lapack-3.7.0)
ENDIF()
ENDIF( NEKTAR_USE_BLAS_LAPACK )
IF( NEKTAR_USE_MKL AND MKL_FOUND )
TARGET_LINK_LIBRARIES(LibUtilities LINK_PUBLIC ${MKL} )
SET_TARGET_PROPERTIES(LibUtilities
PROPERTIES COMPILE_FLAGS "${THE_COMPILE_FLAGS} -DMKL_ILP64")
ENDIF( NEKTAR_USE_MKL AND MKL_FOUND )
IF( NEKTAR_USE_ACML AND ACML_FOUND )
TARGET_LINK_LIBRARIES(LibUtilities LINK_PUBLIC ${ACML_TARGET_LINK_LIBRARIES} )
ENDIF( NEKTAR_USE_ACML AND ACML_FOUND )
IF( NEKTAR_USE_ACCELERATE_FRAMEWORK )
TARGET_LINK_LIBRARIES(LibUtilities LINK_PUBLIC ${ACCELERATE_FRAMEWORK_LINK_FLAGS})
ENDIF ( NEKTAR_USE_ACCELERATE_FRAMEWORK )
IF( NEKTAR_USE_WIN32_LAPACK )
TARGET_LINK_LIBRARIES(LibUtilities LINK_PUBLIC ${WIN32_LAPACK} ${WIN32_BLAS})
INSTALL(FILES ${WIN32_LAPACK_DLL} ${WIN32_BLAS_DLL}
DESTINATION ${NEKTAR_BIN_DIR})
ENDIF( NEKTAR_USE_WIN32_LAPACK )
IF( NEKTAR_USE_OPENBLAS AND OPENBLAS_FOUND )
TARGET_LINK_LIBRARIES(LibUtilities LINK_PUBLIC ${OPENBLAS})
ENDIF( NEKTAR_USE_OPENBLAS AND OPENBLAS_FOUND )
IF( NEKTAR_USE_SYSTEM_BLAS_LAPACK )
TARGET_LINK_LIBRARIES(LibUtilities LINK_PUBLIC ${NATIVE_LAPACK} ${NATIVE_BLAS})
ENDIF( NEKTAR_USE_SYSTEM_BLAS_LAPACK )
IF(THIRDPARTY_BUILD_BLAS_LAPACK)
ADD_DEPENDENCIES(LibUtilities lapack-3.7.0)
ENDIF()
IF( NEKTAR_USE_PETSC )
TARGET_LINK_LIBRARIES(LibUtilities LINK_PRIVATE ${PETSC_LIBRARIES})
......
......@@ -2,6 +2,10 @@ CMAKE_DEPENDENT_OPTION(NEKTAR_SOLVER_ADR
"Build the ADR Solver." ON
"NEKTAR_BUILD_SOLVERS" OFF)
IF (NOT NEKTAR_BUILD_SOLVERS)
SET(NEKTAR_SOLVER_ADR OFF CACHE INTERNAL "")
ENDIF()
IF( NEKTAR_SOLVER_ADR )
SET(ADRSolverSource
./ADRSolver.cpp
......
......@@ -2,6 +2,10 @@ CMAKE_DEPENDENT_OPTION(NEKTAR_SOLVER_APE
"Build the APE solver." ON
"NEKTAR_BUILD_SOLVERS" OFF)
IF (NOT NEKTAR_BUILD_SOLVERS)
SET(NEKTAR_SOLVER_APE OFF CACHE INTERNAL "")
ENDIF()
IF( NEKTAR_SOLVER_APE )
SET(APESolverSource
./APESolver.cpp
......
......@@ -2,6 +2,10 @@ CMAKE_DEPENDENT_OPTION(NEKTAR_SOLVER_CARDIAC_EP
"Build the Cardiac electrophysiology solver." ON
"NEKTAR_BUILD_SOLVERS" OFF)
IF (NOT NEKTAR_BUILD_SOLVERS)
SET(NEKTAR_SOLVER_CARDIAC_EP OFF CACHE INTERNAL "")
ENDIF()
IF( NEKTAR_SOLVER_CARDIAC_EP )
ADD_SOLVER_EXECUTABLE(CardiacEPSolver
SOURCES CardiacEPSolver.cpp
......
......@@ -2,6 +2,10 @@ CMAKE_DEPENDENT_OPTION(NEKTAR_SOLVER_COMPRESSIBLE_FLOW
"Build the Compressible Flow Solver." ON
"NEKTAR_BUILD_SOLVERS" OFF)
IF (NOT NEKTAR_BUILD_SOLVERS)
SET(NEKTAR_SOLVER_COMPRESSIBLE_FLOW OFF CACHE INTERNAL "")
ENDIF()
IF( NEKTAR_SOLVER_COMPRESSIBLE_FLOW )
SET(CompressibleFlowSolverSource
./ArtificialDiffusion/ArtificialDiffusion.cpp
......
......@@ -2,6 +2,10 @@ CMAKE_DEPENDENT_OPTION(NEKTAR_SOLVER_DIFFUSION
"Build the Diffusion Solver." ON
"NEKTAR_BUILD_SOLVERS" OFF)
IF (NOT NEKTAR_BUILD_SOLVERS)
SET(NEKTAR_SOLVER_DIFFUSION OFF CACHE INTERNAL "")
ENDIF()
IF( NEKTAR_SOLVER_DIFFUSION )
SET(DiffusionSolverSource
./DiffusionSolver.cpp)
......
......@@ -2,6 +2,10 @@ CMAKE_DEPENDENT_OPTION(NEKTAR_SOLVER_IMAGE_WARPING
"Build the Image Warping solver." ON
"NEKTAR_BUILD_SOLVERS" OFF)
IF (NOT NEKTAR_BUILD_SOLVERS)
SET(NEKTAR_SOLVER_IMAGE_WARPING OFF CACHE INTERNAL "")
ENDIF()
IF( NEKTAR_SOLVER_IMAGE_WARPING )
SET(ImageWarpingSolverSource
./ImageWarpingSolver.cpp
......
......@@ -2,6 +2,10 @@ CMAKE_DEPENDENT_OPTION(NEKTAR_SOLVER_INCNAVIERSTOKES
"Build the Incompressible Navier-Stokes solver." ON
"NEKTAR_BUILD_SOLVERS" OFF)
IF (NOT NEKTAR_BUILD_SOLVERS)
SET(NEKTAR_SOLVER_INCNAVIERSTOKES OFF CACHE INTERNAL "")
ENDIF()
IF( NEKTAR_SOLVER_INCNAVIERSTOKES )
ADD_SOLVER_EXECUTABLE(IncNavierStokesSolver
SOURCES ./IncNavierStokesSolver.cpp
......
......@@ -2,6 +2,10 @@ CMAKE_DEPENDENT_OPTION(NEKTAR_SOLVER_ELASTICITY
"Build the linear elasticity solver." ON
"NEKTAR_BUILD_SOLVERS" OFF)
IF (NOT NEKTAR_BUILD_SOLVERS)
SET(NEKTAR_SOLVER_ELASTICITY OFF CACHE INTERNAL "")
ENDIF()
IF (NEKTAR_SOLVER_ELASTICITY)
SET(LinearElasticSolverSource
./LinearElasticSolver.cpp
......
......@@ -2,6 +2,10 @@ CMAKE_DEPENDENT_OPTION(NEKTAR_SOLVER_PULSEWAVE
"Build the Pulse-wave solver." ON
"NEKTAR_BUILD_SOLVERS" OFF)
IF (NOT NEKTAR_BUILD_SOLVERS)
SET(NEKTAR_SOLVER_PULSEWAVE OFF CACHE INTERNAL "")
ENDIF()
IF( NEKTAR_SOLVER_PULSEWAVE )
ADD_SOLVER_EXECUTABLE(PulseWaveSolver
SOURCES PulseWaveSolver.cpp
......
......@@ -2,6 +2,10 @@ CMAKE_DEPENDENT_OPTION(NEKTAR_SOLVER_SHALLOW_WATER
"Build the Shallow Water solver." ON
"NEKTAR_BUILD_SOLVERS" OFF)
IF (NOT NEKTAR_BUILD_SOLVERS)
SET(NEKTAR_SOLVER_SHALLOW_WATER OFF CACHE INTERNAL "")
ENDIF()
IF( NEKTAR_SOLVER_SHALLOW_WATER )
SET(ShallowWaterSolverSource
./ShallowWaterSolver.cpp
......
......@@ -2,6 +2,10 @@ CMAKE_DEPENDENT_OPTION(NEKTAR_SOLVER_VORTEXWAVE
"Build the Vortex-Wave interaction solver." ON
"NEKTAR_BUILD_SOLVERS" OFF)
IF (NOT NEKTAR_BUILD_SOLVERS)
SET(NEKTAR_SOLVER_VORTEXWAVE OFF CACHE INTERNAL "")
ENDIF()
IF( NEKTAR_SOLVER_VORTEXWAVE )
SET(VortexWaveInteractionSolverSource
../ADRSolver/EquationSystems/SteadyAdvectionDiffusion.cpp
......
......@@ -21,5 +21,21 @@ CMAKE_DEPENDENT_OPTION(NEKTAR_UTILITY_EXTRAS
"Build extra Nektar++ utilities." OFF
"NEKTAR_BUILD_UTILITIES" OFF)
IF (NOT NEKTAR_BUILD_UTILITIES)
SET(NEKTAR_UTILITY_NEKMESH OFF CACHE INTERNAL "")
SET(NEKTAR_UTILITY_FIELDCONVERT OFF CACHE INTERNAL "")
SET(NEKTAR_UTILITY_EXTRAS OFF CACHE INTERNAL "")
ENDIF()
# Generate list of available utilities
SUBDIRS(NekMesh FieldConvert Extras)
IF (NEKTAR_UTILITY_NEKMESH)
SUBDIRS(NekMesh)
ENDIF()
IF (NEKTAR_UTILITY_FIELDCONVERT)
SUBDIRS(FieldConvert)
ENDIF()
IF (NEKTAR_UTILITY_EXTRAS)
SUBDIRS(Extras)
ENDIF()
\ No newline at end of file
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