[Openmp-commits] [PATCH] LLVM OpenMP CMake Overhaul

Ed Maste emaste at freebsd.org
Thu Jun 25 13:31:52 PDT 2015


REPOSITORY
  rL LLVM

================
Comment at: runtime/CMakeLists.txt:30-44
@@ -62,18 +29,17 @@
 
 # Below, cmake will try and determine the operating system and architecture for you.
-# These values are set in CMakeCache.txt when cmake is first run (-Dvar_name=... will take precedence)
-#  parameter  | default value             
-# ----------------------------
-# Right now, this build system considers os=lin to mean "Unix-like that is not MAC"
+# Right now, this build system considers LIBOMP_OS=lin to mean "Unix-like that is not MAC"
 # Apple goes first because CMake considers Mac to be a Unix based 
 # operating system, while libomp considers it a special case
 if(${APPLE})
-    set(temp_os mac)
-elseif(${UNIX})
-    set(temp_os lin)
+    set(LIBOMP_DETECTED_OS mac)
 elseif(${WIN32})       
-    set(temp_os win)
+    set(LIBOMP_DETECTED_OS win)
+elseif(${UNIX})
+    set(LIBOMP_DETECTED_OS lin)
 else()
-    set(temp_os lin)
+    set(LIBOMP_DETECTED_OS lin)
 endif()
+set(LIBOMP_OS ${LIBOMP_DETECTED_OS} CACHE STRING
+    "The operating system to build for (lin/mac/win)")
 
----------------
chandlerc wrote:
> CMake already provides variables for querying the OS - why define your own?
And FreeBSD is missing if we do define our own; the current convention of lin == Unix-like that is not Apple is confusing.

http://reviews.llvm.org/D10656

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the Openmp-commits mailing list