[Openmp-commits] [openmp] r267783 - Merging r263651:

Jonathan Peyton via Openmp-commits openmp-commits at lists.llvm.org
Wed Apr 27 13:39:38 PDT 2016


Author: jlpeyton
Date: Wed Apr 27 15:39:38 2016
New Revision: 267783

URL: http://llvm.org/viewvc/llvm-project?rev=267783&view=rev
Log:
Merging r263651:
------------------------------------------------------------------------
r263651 | jlpeyton | 2016-03-16 13:44:18 -0500 (Wed, 16 Mar 2016) | 10 lines

[CMake] Fix Windows build problem for CMake versions < 3.3

Building libomp using CMake versions < 3.3 caused a link time error.  These
errors occurred because when assembling z_Windows_NT-586_asm.asm, the
definitions: OMPT_SUPPORT, _M_AMD64|_M_IA32 weren't defined on the command line.
To fix the problem, the COMPILE_FLAGS property for the assembly file is appended
to instead of the COMPILE_DEFINITIONS property being set.  For whatever reason, the
COMPILE_DEFINITIONS property doesn't pick up the definitions for assembly files
for the older CMake versions.

------------------------------------------------------------------------

Modified:
    openmp/branches/release_38/   (props changed)
    openmp/branches/release_38/runtime/src/CMakeLists.txt

Propchange: openmp/branches/release_38/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Apr 27 15:39:38 2016
@@ -1 +1 @@
-/openmp/trunk:257833,258169,258528,258695,258990
+/openmp/trunk:257833,258169,258528,258695,258990,263651

Modified: openmp/branches/release_38/runtime/src/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/openmp/branches/release_38/runtime/src/CMakeLists.txt?rev=267783&r1=267782&r2=267783&view=diff
==============================================================================
--- openmp/branches/release_38/runtime/src/CMakeLists.txt (original)
+++ openmp/branches/release_38/runtime/src/CMakeLists.txt Wed Apr 27 15:39:38 2016
@@ -181,10 +181,11 @@ if(WIN32)
   add_dependencies(omp libomp-needed-windows-files)
   # z_Windows_NT-586_asm.asm requires definitions to be sent via command line
   # It only needs the architecutre macro and OMPT_SUPPORT=0|1
-  libomp_append(LIBOMP_MASM_DEFINITIONS "_M_IA32" IF_TRUE IA32)
-  libomp_append(LIBOMP_MASM_DEFINITIONS "_M_AMD64" IF_TRUE INTEL64)
-  libomp_append(LIBOMP_MASM_DEFINITIONS "OMPT_SUPPORT" IF_TRUE_1_0 LIBOMP_OMPT_SUPPORT)
-  set_source_files_properties(z_Windows_NT-586_asm.asm PROPERTIES COMPILE_DEFINITIONS "${LIBOMP_MASM_DEFINITIONS}")
+  libomp_append(LIBOMP_MASM_DEFINITIONS "-D_M_IA32" IF_TRUE IA32)
+  libomp_append(LIBOMP_MASM_DEFINITIONS "-D_M_AMD64" IF_TRUE INTEL64)
+  libomp_append(LIBOMP_MASM_DEFINITIONS "-DOMPT_SUPPORT" IF_TRUE_1_0 LIBOMP_OMPT_SUPPORT)
+  libomp_list_to_string("${LIBOMP_MASM_DEFINITIONS}" LIBOMP_MASM_DEFINITIONS)
+  set_property(SOURCE z_Windows_NT-586_asm.asm APPEND_STRING PROPERTY COMPILE_FLAGS " ${LIBOMP_MASM_DEFINITIONS}")
   set_source_files_properties(thirdparty/ittnotify/ittnotify_static.c PROPERTIES COMPILE_DEFINITIONS "UNICODE")
 
   # Create Windows import library




More information about the Openmp-commits mailing list