diff options
author | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2015-07-23 14:41:35 +0000 |
---|---|---|
committer | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2015-07-23 14:41:35 +0000 |
commit | 77c78985158b3e32293aee64d7f72e44a99d2a01 (patch) | |
tree | 67634a4e1a50f7e6c91c43ae612600797d8ca5b7 /openmp | |
parent | 2ba8374612cf7c9ffcde3e6e73da328f10e5037b (diff) | |
download | bcm5719-llvm-77c78985158b3e32293aee64d7f72e44a99d2a01.tar.gz bcm5719-llvm-77c78985158b3e32293aee64d7f72e44a99d2a01.zip |
[CMake] Fix libomp_check_linker_flag function
libomp_check_linker_flag rewrites src_to_link.c and CMakeLists.txt in build
directory for test project, but cmake does not rebuild the project. The root
cause is that on some filesystems (ext3, reiserfs) timestamp resoultion is 1
second. So cmake does not rebuild test project if check takes less than 1 second.
This patch puts each test in its own directory to avoid the timestamp problem.
Patch by Chris Bergstrom
http://lists.cs.uiuc.edu/pipermail/openmp-dev/2015-July/000817.html
llvm-svn: 243017
Diffstat (limited to 'openmp')
-rw-r--r-- | openmp/runtime/cmake/LibompCheckLinkerFlag.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openmp/runtime/cmake/LibompCheckLinkerFlag.cmake b/openmp/runtime/cmake/LibompCheckLinkerFlag.cmake index 1c4a085d101..75a38e316b1 100644 --- a/openmp/runtime/cmake/LibompCheckLinkerFlag.cmake +++ b/openmp/runtime/cmake/LibompCheckLinkerFlag.cmake @@ -23,7 +23,7 @@ function(libomp_check_linker_flag flag boolean) set(CMAKE_SHARED_LINKER_FLAGS \"${flag}\") add_library(foo SHARED src_to_link.c)") set(failed_regexes "[Ee]rror;[Uu]nknown;[Ss]kipping;LINK : warning") - set(base_dir ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/link_flag_check) + set(base_dir ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/link_flag_check_${boolean}) file(MAKE_DIRECTORY ${base_dir}) file(MAKE_DIRECTORY ${base_dir}/build) file(WRITE ${base_dir}/src_to_link.c "${library_source}") |