[Openmp-commits] [PATCH] D111103: Address code review comments.
Bran Hagger via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Mon Oct 4 16:47:09 PDT 2021
branh created this revision.
Herald added a subscriber: mgorny.
branh requested review of this revision.
Herald added a project: OpenMP.
Herald added a subscriber: openmp-commits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D111103
Files:
openmp/CMakeLists.txt
openmp/runtime/CMakeLists.txt
openmp/runtime/src/CMakeLists.txt
Index: openmp/runtime/src/CMakeLists.txt
===================================================================
--- openmp/runtime/src/CMakeLists.txt
+++ openmp/runtime/src/CMakeLists.txt
@@ -158,19 +158,19 @@
set(LIBOMP_LINKER_LANGUAGE CXX)
endif()
-if(OPENMP_BUILD_140)
+if(MSVC_NAME_SCHEME)
if(uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
- set(LIBOMP_PDB_NAME ${LIBOMP_DEFAULT_LIB_NAME}140d.${LIBOMP_ARCH})
+ set(LIBOMP_PDB_NAME ${LIBOMP_DEFAULT_LIB_NAME}${MSVC_TOOLS_VERSION}d.${LIBOMP_ARCH})
set(LIBOMP_LIB_FILE ${LIBOMP_PDB_NAME}${LIBOMP_LIBRARY_SUFFIX})
else()
- # ${LIBOMP_LIB_NAME} is ${LIBOMP_DEFAULT_LIB_NAME}140.${LIBOMP_ARCH}
+ # ${LIBOMP_LIB_NAME} is ${LIBOMP_DEFAULT_LIB_NAME}${MSVC_TOOLS_VERSION}.${LIBOMP_ARCH}
set(LIBOMP_PDB_NAME ${LIBOMP_LIB_NAME})
endif()
# in debug
# LIBOMP_LIB_FILE should be LIBOMP_LIB_FILE_DBG = ${LIBOMP_LIB_NAME_DBG}${LIBOMP_LIBRARY_SUFFIX}
- # = ${LIBOMP_DEFAULT_LIB_NAME}140d.${LIBOMP_ARCH}${LIBOMP_LIBRARY_SUFFIX}
- # COMPILE_PDB_NAME/PDB_NAME should be LIBOMP_LIB_NAME_DBG = ${LIBOMP_DEFAULT_LIB_NAME}140d.${LIBOMP_ARCH}
+ # = ${LIBOMP_DEFAULT_LIB_NAME}${MSVC_TOOLS_VERSION}d.${LIBOMP_ARCH}${LIBOMP_LIBRARY_SUFFIX}
+ # COMPILE_PDB_NAME/PDB_NAME should be LIBOMP_LIB_NAME_DBG = ${LIBOMP_DEFAULT_LIB_NAME}${MSVC_TOOLS_VERSION}d.${LIBOMP_ARCH}
set_target_properties(omp PROPERTIES
PREFIX "" SUFFIX "" OUTPUT_NAME "${LIBOMP_LIB_FILE}"
PDB_NAME "${LIBOMP_PDB_NAME}"
@@ -243,7 +243,7 @@
# ${LIBOMP_DEFAULT_LIB_NAME}d${CMAKE_STATIC_LIBRARY_SUFFIX}
# and the ARCHIVE_OUTPUT_NAME of ompdbg should be ${LIBOMP_DEFAULT_LIB_NAME_DBG}${LIBOMP_LIBRARY_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}
- if(OPENMP_BUILD_140)
+ if(MSVC_NAME_SCHEME)
if(uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
set(LIBOMP_IMP_LIB_FILE ${LIBOMP_DEFAULT_LIB_NAME}d${CMAKE_STATIC_LIBRARY_SUFFIX})
set(LIBOMP_GENERATED_IMP_LIB_FILENAME ${LIBOMP_DEFAULT_LIB_NAME}d${LIBOMP_LIBRARY_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX})
Index: openmp/runtime/CMakeLists.txt
===================================================================
--- openmp/runtime/CMakeLists.txt
+++ openmp/runtime/CMakeLists.txt
@@ -355,8 +355,10 @@
set(LIBOMP_DEFAULT_LIB_NAME ${LIBOMP_DEFAULT_LIB_NAME}stubs)
endif()
set(LIBOMP_LIB_NAME ${LIBOMP_DEFAULT_LIB_NAME} CACHE STRING "Base OMP library name")
-if (OPENMP_BUILD_140)
- set(LIBOMP_LIB_NAME ${LIBOMP_LIB_NAME}140.${LIBOMP_ARCH})
+if (MSVC_NAME_SCHEME)
+ # MSVC_TOOLS_VERSION corresponds to the version of the VC++ toolset.
+ set(MSVC_TOOLS_VERSION 140)
+ set(LIBOMP_LIB_NAME ${LIBOMP_LIB_NAME}${MSVC_TOOLS_VERSION}.${LIBOMP_ARCH})
endif()
if(${LIBOMP_ENABLE_SHARED})
Index: openmp/CMakeLists.txt
===================================================================
--- openmp/CMakeLists.txt
+++ openmp/CMakeLists.txt
@@ -94,7 +94,7 @@
add_subdirectory(tools)
endif()
-option(OPENMP_BUILD_140 "Build dll with VC naming scheme." OFF)
+option(MSVC_NAME_SCHEME "Build dll with MSVC naming scheme." OFF)
# Build documentation
add_subdirectory(docs)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111103.377052.patch
Type: text/x-patch
Size: 3099 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20211004/273cc5fd/attachment.bin>
More information about the Openmp-commits
mailing list