[Openmp-commits] [openmp] r274052 - Revert r273898's UNICODE quick fix in favor of CMake's remove_definitions()
Jonathan Peyton via Openmp-commits
openmp-commits at lists.llvm.org
Tue Jun 28 12:25:14 PDT 2016
Author: jlpeyton
Date: Tue Jun 28 14:25:13 2016
New Revision: 274052
URL: http://llvm.org/viewvc/llvm-project?rev=274052&view=rev
Log:
Revert r273898's UNICODE quick fix in favor of CMake's remove_definitions()
UNICODE and _UNICODE defintions were added in the LLVM CMake build system.
While on Unices, the UNICODE/_UNICODE macros don't cause problems, on Windows
only ittnotify_static.c should be compiled using -DUNICODE. We are still
looking at a proper fix, but this change sets the build back to exactly what it
was doing before. Also, a comment and TODO were added in the src/CMakeLists.txt
file to help explain.
Modified:
openmp/trunk/runtime/cmake/LibompDefinitions.cmake
openmp/trunk/runtime/src/CMakeLists.txt
openmp/trunk/runtime/src/thirdparty/ittnotify/ittnotify_static.c
Modified: openmp/trunk/runtime/cmake/LibompDefinitions.cmake
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/cmake/LibompDefinitions.cmake?rev=274052&r1=274051&r2=274052&view=diff
==============================================================================
--- openmp/trunk/runtime/cmake/LibompDefinitions.cmake (original)
+++ openmp/trunk/runtime/cmake/LibompDefinitions.cmake Tue Jun 28 14:25:13 2016
@@ -21,8 +21,6 @@ function(libomp_get_definitions_flags cp
libomp_append(cppflags_local "-D _USRDLL")
libomp_append(cppflags_local "-D _ITERATOR_DEBUG_LEVEL=0" IF_TRUE DEBUG_BUILD)
libomp_append(cppflags_local "-D _DEBUG" IF_TRUE DEBUG_BUILD)
- libomp_append(cppflags_local "-UUNICODE")
- libomp_append(cppflags_local "-U_UNICODE")
else()
libomp_append(cppflags_local "-D _GNU_SOURCE")
libomp_append(cppflags_local "-D _REENTRANT")
Modified: openmp/trunk/runtime/src/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/CMakeLists.txt?rev=274052&r1=274051&r2=274052&view=diff
==============================================================================
--- openmp/trunk/runtime/src/CMakeLists.txt (original)
+++ openmp/trunk/runtime/src/CMakeLists.txt Tue Jun 28 14:25:13 2016
@@ -31,6 +31,11 @@ add_custom_command(
)
# Set the -D definitions for all sources
+# UNICODE and _UNICODE are set in LLVM's CMake system. They affect the
+# ittnotify code and should only be set when compiling ittnotify_static.c
+# on Windows (done below).
+# TODO: Fix the UNICODE usage in ittnotify code for Windows.
+remove_definitions(-DUNICODE -D_UNICODE)
libomp_get_definitions_flags(LIBOMP_CONFIGURED_DEFINITIONS_FLAGS)
add_definitions(${LIBOMP_CONFIGURED_DEFINITIONS_FLAGS})
@@ -192,7 +197,7 @@ if(WIN32)
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")
+ set_source_files_properties(thirdparty/ittnotify/ittnotify_static.c PROPERTIES COMPILE_DEFINITIONS "UNICODE")
# Create Windows import library
# the import library is "re-linked" to include kmp_import.c which prevents
Modified: openmp/trunk/runtime/src/thirdparty/ittnotify/ittnotify_static.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/thirdparty/ittnotify/ittnotify_static.c?rev=274052&r1=274051&r2=274052&view=diff
==============================================================================
--- openmp/trunk/runtime/src/thirdparty/ittnotify/ittnotify_static.c (original)
+++ openmp/trunk/runtime/src/thirdparty/ittnotify/ittnotify_static.c Tue Jun 28 14:25:13 2016
@@ -8,11 +8,6 @@
//
//===----------------------------------------------------------------------===//
-#if ITT_PLATFORM==ITT_PLATFORM_WIN
-#define UNICODE
-#define _UNICODE
-#endif
-
#include "kmp_config.h"
#include "ittnotify_config.h"
More information about the Openmp-commits
mailing list