problems solved… working openmp/runtime/src/CMakefiles.txt as starting point

I puzzled out that I was missing,

— CMakeLists.txt.last2 2014-05-31 13:06:06.000000000 -0400
+++ CMakeLists.txt 2014-05-31 15:52:15.000000000 -0400
@@ -137,6 +137,10 @@

add_custom_target(gen_kmp_i18n DEPENDS kmp_i18n_id.inc kmp_i18n_default.inc omp.h z_Linux_asm.o)

+if(NOT APPLE)

  • set(CMAKE_SHARED_LINKER_FLAGS “-Wl,–version-script=${CMAKE_CURRENT_SOURCE_DIR}/exports_so.txt”)
    +endif()

CMakeLists.txt (5.16 KB)

    I puzzled out that I was missing,

--- CMakeLists.txt.last22014-05-31 13:06:06.000000000 -0400
+++ CMakeLists.txt2014-05-31 15:52:15.000000000 -0400
@@ -137,6 +137,10 @@
add_custom_target(gen_kmp_i18n DEPENDS kmp_i18n_id.inc kmp_i18n_default.inc omp.h z_Linux_asm.o)
+if(NOT APPLE)
+ set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/exports_so.txt")
+endif()
+
add_library(iomp5 SHARED ${SOURCES} z_Linux_asm.o)
add_dependencies(iomp5 gen_kmp_i18n)
which now allows libiomp5.so to link properly using the cmake build on x86_64 Fedora 15 against clang-omp. It also builds libiomp5.dylib fine on darwin12.
     IMHO, the attached CMakeLists is a reasonable starting point and we can refactor into separate CMakelist.txt's if necessary. The main omission at the moment is the lack of support for handling exported symbols within cmake. I think we would have to resort to a rather complex set of add_custom_command()'s in order to duplicate the manual generation of exported symbol lists as done in the 'make compiler=clang' build. I can take a look at implementing this if we really need it. Let me know if anyone has trouble with using this as…

This sounds good enough to get started. Can you post the complete patch against SVN as a unified diff attachment along with a brief summary for review?

Alp.