Skip to content
Snippets Groups Projects
Commit 94dc2790 authored by Janik Zikovsky's avatar Janik Zikovsky
Browse files

Refs #2632: Cmake target to put a script for patchelf

parent 5717424e
No related branches found
No related tags found
No related merge requests found
...@@ -70,21 +70,7 @@ endif () ...@@ -70,21 +70,7 @@ endif ()
# For the build servers, use patchelf to remove the rpaths (linux only) # For the build servers, use patchelf to remove the rpaths (linux only)
find_package ( Patchelf ) find_package ( Patchelf )
set ( RUN_PATCHELF OFF CACHE BOOL "Switch for running patchelf to strip rpaths from executables (Linux; this allows copying the binaries)") # set ( RUN_PATCHELF OFF CACHE BOOL "Switch for running patchelf to strip rpaths from executables (Linux; this allows copying the binaries)")
if ( RUN_PATCHELF )
MESSAGE ("RUN_PATCHELF is ON. Setting up patchelf command." )
add_custom_command(
OUTPUT patch_all
POST_BUILD
COMMAND bash ${CMAKE_SOURCE_DIR}/TestingTools/patchelf_all.sh
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Strips RPATH from all executables generated."
)
add_custom_target( run_patchelf DEPENDS patch_all)
endif ()
# COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/TestingTools/patchelf_all.sh ${CMAKE_CURRENT_BINARY_DIR}
# COMMAND bash ${CMAKE_SOURCE_DIR}/TestingTools/patchelf_all.sh
......
...@@ -157,6 +157,14 @@ public: ...@@ -157,6 +157,14 @@ public:
performTest(work_in1,work_in2); performTest(work_in1,work_in2);
} }
void test_1D_SingleValue_inPlace()
{
int nBins = 10;
MatrixWorkspace_sptr work_in1 = WorkspaceCreationHelper::Create1DWorkspaceConstant(nBins, 3.0, 3.0);
MatrixWorkspace_sptr work_in2 = WorkspaceCreationHelper::CreateWorkspaceSingleValue(6.0);
performTest(work_in1,work_in2, false /*not event out*/, 0.5, 0.1549, false, false, true /* do it in place */ ););
}
void test_SingleValue_1D_failsIfDivide() void test_SingleValue_1D_failsIfDivide()
{ {
int nBins = 10; int nBins = 10;
......
...@@ -136,4 +136,6 @@ if ( MAKE_VATES ) ...@@ -136,4 +136,6 @@ if ( MAKE_VATES )
set ( FRAMEWORK_LIBS ${FRAMEWORK_LIBS} MDDataObjects MDAlgorithms MDEvents) set ( FRAMEWORK_LIBS ${FRAMEWORK_LIBS} MDDataObjects MDAlgorithms MDEvents)
endif () endif ()
add_custom_target ( Framework DEPENDS ${FRAMEWORK_LIBS} ) add_custom_target ( Framework DEPENDS ${FRAMEWORK_LIBS})
...@@ -262,3 +262,13 @@ add_custom_command ( TARGET Kernel POST_BUILD ...@@ -262,3 +262,13 @@ add_custom_command ( TARGET Kernel POST_BUILD
${CMAKE_CURRENT_BINARY_DIR}/Mantid.properties ${CMAKE_CURRENT_BINARY_DIR}/Mantid.properties
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}
) )
# Copy a shell script for patchelf if it is found
if ( PATCHELF_FOUND )
add_custom_command ( TARGET Kernel POST_BUILD
COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different
${CMAKE_SOURCE_DIR}/TestingTools/patchelf_all.sh
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}
)
endif ()
find . -name "*.so" -exec patchelf --set-rpath . {} \;
find . -name "*Test" -exec patchelf --set-rpath . {} \;
find . -name "MantidPlot" -exec patchelf --set-rpath . {} \;
find . -name "WikiMaker" -exec patchelf --set-rpath . {} \;
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