summaryrefslogtreecommitdiff
path: root/cmake/dtrace_prelink.cmake
diff options
context:
space:
mode:
authorVladislav Vaintroub <vvaintroub@mysql.com>2009-12-11 15:51:39 +0100
committerVladislav Vaintroub <vvaintroub@mysql.com>2009-12-11 15:51:39 +0100
commit55ccb35ba66e4e9168c412c95ebbb85106db8b2c (patch)
treefa038e3ac6dc4935686d55c7c0d764d5b0db0b64 /cmake/dtrace_prelink.cmake
parent1ec457961df55720e465a46f5ee340654429bed1 (diff)
downloadmariadb-git-55ccb35ba66e4e9168c412c95ebbb85106db8b2c.tar.gz
Introduce a workaround for Solaris' inability to deal with dtrace in static libraries.
Rerun dtrace -G on all objects that can contan dtrace probes (also objects that are part of static libs) before linking mysqld to produce dtrace_probes_all.o and link dtrace_probes_all.o with mysqld This ugly workaround was inspired by handling dtrace using autotools.
Diffstat (limited to 'cmake/dtrace_prelink.cmake')
-rw-r--r--cmake/dtrace_prelink.cmake15
1 files changed, 8 insertions, 7 deletions
diff --git a/cmake/dtrace_prelink.cmake b/cmake/dtrace_prelink.cmake
index 53e12407cb9..ae475a90921 100644
--- a/cmake/dtrace_prelink.cmake
+++ b/cmake/dtrace_prelink.cmake
@@ -19,13 +19,14 @@
# Do not follow symlinks in GLOB_RECURSE
CMAKE_POLICY(SET CMP0009 NEW)
-FILE(GLOB_RECURSE OBJECTS *.o)
-
-# Use relative paths to generate shorter command line
-GET_FILENAME_COMPONENT(CURRENT_ABS_DIR . ABSOLUTE)
-FOREACH(OBJ ${OBJECTS})
- FILE(RELATIVE_PATH REL ${CURRENT_ABS_DIR} ${OBJ})
- LIST(APPEND REL_OBJECTS ${REL})
+FOREACH(dir ${DIRS})
+ FILE(GLOB_RECURSE OBJECTS ${dir}/*.o)
+ # Use relative paths to generate shorter command line
+ GET_FILENAME_COMPONENT(CURRENT_ABS_DIR . ABSOLUTE)
+ FOREACH(OBJ ${OBJECTS})
+ FILE(RELATIVE_PATH REL ${CURRENT_ABS_DIR} ${OBJ})
+ LIST(APPEND REL_OBJECTS ${REL})
+ ENDFOREACH()
ENDFOREACH()
EXECUTE_PROCESS(