[Openmp-commits] [openmp] r243017 - [CMake] Fix libomp_check_linker_flag function

Peyton, Jonathan L jonathan.l.peyton at intel.com
Thu Jul 23 07:54:13 PDT 2015


Hans,

Can you merge this fix to the 3.7 branch?

-- Johnny

-----Original Message-----
From: openmp-commits-bounces at cs.uiuc.edu [mailto:openmp-commits-bounces at cs.uiuc.edu] On Behalf Of Jonathan Peyton
Sent: Thursday, July 23, 2015 9:42 AM
To: openmp-commits at cs.uiuc.edu
Subject: [Openmp-commits] [openmp] r243017 - [CMake] Fix libomp_check_linker_flag function

Author: jlpeyton
Date: Thu Jul 23 09:41:35 2015
New Revision: 243017

URL: http://llvm.org/viewvc/llvm-project?rev=243017&view=rev
Log:
[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

Modified:
    openmp/trunk/runtime/cmake/LibompCheckLinkerFlag.cmake

Modified: openmp/trunk/runtime/cmake/LibompCheckLinkerFlag.cmake
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/cmake/LibompCheckLinkerFlag.cmake?rev=243017&r1=243016&r2=243017&view=diff
==============================================================================
--- openmp/trunk/runtime/cmake/LibompCheckLinkerFlag.cmake (original)
+++ openmp/trunk/runtime/cmake/LibompCheckLinkerFlag.cmake Thu Jul 23 
+++ 09:41:35 2015
@@ -23,7 +23,7 @@ function(libomp_check_linker_flag flag b
      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}")


_______________________________________________
Openmp-commits mailing list
Openmp-commits at dcs-maillist2.engr.illinois.edu
http://lists.cs.uiuc.edu/mailman/listinfo/openmp-commits




More information about the Openmp-commits mailing list