Skip to content
Snippets Groups Projects
Commit 638aa8f0 authored by Pietro Incardona's avatar Pietro Incardona
Browse files

Fixing CMAKE unsupported operations

parent f27958f2
No related branches found
No related tags found
No related merge requests found
Pipeline #3900 passed
......@@ -164,25 +164,6 @@ if (OPENMP_FOUND)
set(DEFINE_HAVE_OPENMP "#define HAVE_OPENMP")
endif()
macro(getAllLinkedLibraries iTarget iReturnValue)
if(NOT TARGET ${iTarget})
message(WARNING "${iTarget} is not a target")
else()
get_target_property(path ${iTarget} LOCATION)
if(NOT ${path} IN_LIST ${iReturnValue})
if (NOT ${path} STREQUAL "path-NOTFOUND")
list(APPEND ${iReturnValue} ${path})
endif()
endif()
get_target_property(linkedLibrairies ${iTarget} INTERFACE_LINK_LIBRARIES)
if(NOT "${linkedLibrairies}" STREQUAL "")
FOREACH(linkedLibrary ${linkedLibrairies})
getAllLinkedLibraries(${linkedLibrary} ${iReturnValue})
ENDFOREACH()
endif()
endif()
endmacro()
if(MPI_FOUND)
get_filename_component(OPENFPM_MPI_DEP "${MPI_C_INCLUDE_DIRS}" DIRECTORY)
file(READ ${CMAKE_SOURCE_DIR}/src/cmake/openfpmConfig-configure.cmake CMAKE_OPENFPM_CONFIG_VARS)
......@@ -199,10 +180,11 @@ if (Boost_FOUND)
message( FATAL_ERROR "BOOST is invalid reinstalling" )
endif()
# Get the library names
getAllLinkedLibraries(Boost::context OPENFPM_CONTEXT_LIBS)
getAllLinkedLibraries(Boost::fiber OPENFPM_CONTEXT_LIBS)
string (REPLACE ";" " " OPENFPM_CONTEXT_LIBS "${OPENFPM_CONTEXT_LIBS}")
file(WRITE optional_boost_libs "${OPENFPM_CONTEXT_LIBS}")
if (Boost_context_FOUND AND Boost_fiber_FOUND)
file(WRITE optional_boost_libs "-L${BOOST_ROOT}/lib -lboost_context -lboost_fiber")
else()
file(WRITE optional_boost_libs " ")
endif()
else()
file(WRITE error_code "202")
message( FATAL_ERROR "BOOST is required in order to install OpenFPM" )
......
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