diff options
author | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2015-09-21 20:41:31 +0000 |
---|---|---|
committer | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2015-09-21 20:41:31 +0000 |
commit | 614c7ef81c7de51f61239e609edf9c6716b23ebc (patch) | |
tree | 63c8efa48baad379ffc568c6355f5e6ee8b6e0d0 /openmp/runtime/src | |
parent | 4003ed2da300c1c547c8ca96c211a2f8b0d24299 (diff) | |
download | bcm5719-llvm-614c7ef81c7de51f61239e609edf9c6716b23ebc.tar.gz bcm5719-llvm-614c7ef81c7de51f61239e609edf9c6716b23ebc.zip |
OpenMP Initial testsuite change to purely llvm-lit based testing
This change introduces a check-libomp target which is based upon llvm's lit
test infrastructure. Each test (generated from the University of Houston's
OpenMP testsuite) is compiled and then run. For each test, an exit status of 0
indicates success and non-zero indicates failure. This way, FileCheck is not
needed. I've added a bit of logic to generate symlinks (libiomp5 and libgomp)
in the build tree so that gcc can be tested as well. When building out-of-
tree builds, the user will have to provide llvm-lit either by specifying
-DLIBOMP_LLVM_LIT_EXECUTABLE or having llvm-lit in their PATH.
Differential Revision: http://reviews.llvm.org/D11821
llvm-svn: 248211
Diffstat (limited to 'openmp/runtime/src')
-rw-r--r-- | openmp/runtime/src/CMakeLists.txt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/openmp/runtime/src/CMakeLists.txt b/openmp/runtime/src/CMakeLists.txt index ce6b2600a62..d0c1183ac82 100644 --- a/openmp/runtime/src/CMakeLists.txt +++ b/openmp/runtime/src/CMakeLists.txt @@ -141,6 +141,26 @@ set_target_properties(omp PROPERTIES SKIP_BUILD_RPATH true # have Mac linker -install_name just be "-install_name libomp.dylib" ) +# Get the library's location within the build tree for the unit tester +get_target_property(LIBOMP_LIBRARY_DIR omp LIBRARY_OUTPUT_DIRECTORY) +if(NOT LIBOMP_LIBRARY_DIR) + set(LIBOMP_LIBRARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) + set(LIBOMP_LIBRARY_DIR ${CMAKE_CURRENT_BINARY_DIR} PARENT_SCOPE) +else() + set(LIBOMP_LIBRARY_DIR ${LIBOMP_LIBRARY_DIR} PARENT_SCOPE) +endif() + +# Add symbolic links to libomp +if(NOT WIN32) + add_custom_command(TARGET omp POST_BUILD + COMMAND ${CMAKE_COMMAND} -E create_symlink ${LIBOMP_LIB_FILE} + libgomp${CMAKE_SHARED_LIBRARY_SUFFIX} + COMMAND ${CMAKE_COMMAND} -E create_symlink ${LIBOMP_LIB_FILE} + libiomp5${CMAKE_SHARED_LIBRARY_SUFFIX} + WORKING_DIRECTORY ${LIBOMP_LIBRARY_DIR} + ) +endif() + # Linking command will include libraries in LIBOMP_CONFIGURED_LIBFLAGS libomp_get_libflags(LIBOMP_CONFIGURED_LIBFLAGS) target_link_libraries(omp ${LIBOMP_CONFIGURED_LIBFLAGS} ${CMAKE_DL_LIBS}) |