summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSwaroop Sridhar <Swaroop.Sridhar@microsoft.com>2018-12-05 12:55:39 -0800
committerJeremy Koritzinsky <jkoritzinsky@gmail.com>2018-12-05 12:55:39 -0800
commit31a132a9c58facbfde91de6119df8c4fbfa52d48 (patch)
tree20772ca7681e2c8742e1729c981f8846c9beef3b
parenta3304a1fc6a442efc54f2fc765e6877ffba14a5a (diff)
downloadcoreclr-31a132a9c58facbfde91de6119df8c4fbfa52d48.tar.gz
coreclr-31a132a9c58facbfde91de6119df8c4fbfa52d48.tar.bz2
coreclr-31a132a9c58facbfde91de6119df8c4fbfa52d48.zip
Suppress a CMake Warning (#21147)
* Suppress a CMake Warning This change adds a local cmake_policy rule to suppress warnings about libraries with unicode names. ``` CMake Warning (dev) at tests/src/Interop/PInvoke/DllImportPath/CMakeLists.txt:14 (add_library): Policy CMP0037 is not set: Target names should not be reserved and should match a validity pattern. Run "cmake --help-policy CMP0037" for policy details. Use the cmake_policy command to set the policy and suppress this warning. The target name "DllImportPath_U�n�i�c�o�d�e" is reserved or not valid for certain CMake features, such as generator expressions, and may result in undefined behavior. This warning is for project developers. Use -Wno-dev to suppress it. ``` * Update tests/src/Interop/PInvoke/DllImportPath/CMakeLists.txt Co-Authored-By: swaroop-sridhar <Swaroop.Sridhar@microsoft.com>
-rw-r--r--tests/src/Interop/PInvoke/DllImportPath/CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/src/Interop/PInvoke/DllImportPath/CMakeLists.txt b/tests/src/Interop/PInvoke/DllImportPath/CMakeLists.txt
index a0d2992c61..34634b5b02 100644
--- a/tests/src/Interop/PInvoke/DllImportPath/CMakeLists.txt
+++ b/tests/src/Interop/PInvoke/DllImportPath/CMakeLists.txt
@@ -5,6 +5,13 @@ include_directories(${INC_PLATFORM_DIR})
set(SOURCES
DllImportPathNative.cpp
)
+
+# Set CMP0037 to OLD for this directory, so that
+# CMake doesn't complain about the libraries with Unicode characters.
+if(NOT (CMAKE_MAJOR_VERSION LESS 3))
+ cmake_policy(SET CMP0037 OLD)
+endif()
+
# Additional files to reference:
# add the executable
add_library (DllImportPath_Local SHARED ${SOURCES})