Skip to content
Snippets Groups Projects
Commit 37ccbfa1 authored by Gigg, Martyn Anthony's avatar Gigg, Martyn Anthony
Browse files

Fix initialization order of MANTIDLIBS cmake variable.

If MPI is enabled then this ensures the Boost_LIBRARIES variable is
captured before it is overwritten.
Refs #10632
parent 8386003f
No related branches found
No related tags found
No related merge requests found
......@@ -39,6 +39,16 @@ if ( boost_stdint )
add_definitions ( -DBOOST_CSTDINT_HPP )
endif ()
###########################################################################
# Globally-linked libraries variable
###########################################################################
# Might just as well link everything to Boost & Poco (found in CommonSetup)
# Boost_LIBRARIES variable is redefined by MPISetup so capture the value here
# and just add MPI stuff if required
# TCMalloc & MPI_CXX variables will be empty if not using
set ( MANTIDLIBS ${Boost_LIBRARIES} ${POCO_LIBRARIES} ${TCMALLOC_LIBRARY} )
###########################################################################
# MPI-enable build setup
###########################################################################
......@@ -48,17 +58,10 @@ if ( ${CMAKE_PROJECT_NAME} MATCHES "MantidFramework" AND ${CMAKE_SYSTEM_NAME} MA
set ( MPI_BUILD OFF CACHE BOOL "Enable MPI options" )
if ( MPI_BUILD )
include ( MPISetup )
set ( MANTIDLIBS ${MANTIDLIBS} ${Boost_LIBRARIES} ${MPI_CXX_LIBRARIES} )
endif ( MPI_BUILD )
endif ()
###########################################################################
# Globally-linked libraries variable
###########################################################################
# Might just as well link everything to Boost & Poco (found in CommonSetup)
# TCMalloc & MPI_CXX variables will be empty if not using
set ( MANTIDLIBS ${Boost_LIBRARIES} ${POCO_LIBRARIES} ${TCMALLOC_LIBRARY} ${MPI_CXX_LIBRARIES} )
###########################################################################
# Now add the packages one-by-one, building up the dependencies as we go
###########################################################################
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment