diff options
author | Brad King <brad.king@kitware.com> | 2019-10-02 11:48:45 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-10-02 11:48:55 (GMT) |
commit | 9649c91f830a6fad5c2f84b90f34af10c2edfa15 (patch) | |
tree | 0c4ec155a2b3302fddeab4ca4ef244d31b72cdf0 /Tests/RunCMake | |
parent | 20e9151e6cf47299bb99d85446beb5dc656dba7e (diff) | |
parent | e6e189e02bb6e3efafc5d635edf5eb9688291e71 (diff) | |
download | CMake-9649c91f830a6fad5c2f84b90f34af10c2edfa15.zip CMake-9649c91f830a6fad5c2f84b90f34af10c2edfa15.tar.gz CMake-9649c91f830a6fad5c2f84b90f34af10c2edfa15.tar.bz2 |
Merge topic 'pch-compile-pdb'
e6e189e02b PCH: Report error when setting COMPILE_PDB_NAME property
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3864
Diffstat (limited to 'Tests/RunCMake')
4 files changed, 18 insertions, 0 deletions
diff --git a/Tests/RunCMake/VS10Project/RunCMakeTest.cmake b/Tests/RunCMake/VS10Project/RunCMakeTest.cmake index dcdd177..44ccd6b 100644 --- a/Tests/RunCMake/VS10Project/RunCMakeTest.cmake +++ b/Tests/RunCMake/VS10Project/RunCMakeTest.cmake @@ -26,6 +26,7 @@ run_cmake(VsPackageReferences) run_cmake(VsDpiAware) run_cmake(VsDpiAwareBadParam) run_cmake(VsPrecompileHeaders) +run_cmake(VsPrecompileHeadersReuseFromCompilePDBName) if(CMAKE_C_COMPILER_ID STREQUAL "MSVC" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 19.05) run_cmake(VsJustMyCode) diff --git a/Tests/RunCMake/VS10Project/VsPrecompileHeadersReuseFromCompilePDBName-result.txt b/Tests/RunCMake/VS10Project/VsPrecompileHeadersReuseFromCompilePDBName-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/VS10Project/VsPrecompileHeadersReuseFromCompilePDBName-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/VS10Project/VsPrecompileHeadersReuseFromCompilePDBName-stderr.txt b/Tests/RunCMake/VS10Project/VsPrecompileHeadersReuseFromCompilePDBName-stderr.txt new file mode 100644 index 0000000..2ff57cd --- /dev/null +++ b/Tests/RunCMake/VS10Project/VsPrecompileHeadersReuseFromCompilePDBName-stderr.txt @@ -0,0 +1,7 @@ +CMake Error at VsPrecompileHeadersReuseFromCompilePDBName.cmake:6 \(add_library\): + PRECOMPILE_HEADERS_REUSE_FROM property is set on target \("b"\). Reusable + precompile headers requires the COMPILE_PDB_NAME property to have the value + "a" + +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/VS10Project/VsPrecompileHeadersReuseFromCompilePDBName.cmake b/Tests/RunCMake/VS10Project/VsPrecompileHeadersReuseFromCompilePDBName.cmake new file mode 100644 index 0000000..ec11008 --- /dev/null +++ b/Tests/RunCMake/VS10Project/VsPrecompileHeadersReuseFromCompilePDBName.cmake @@ -0,0 +1,9 @@ +project(VsPrecompileHeadersReuseFromCompilePDBName CXX) + +add_library(a SHARED empty.cxx) +target_precompile_headers(a PRIVATE <windows.h>) + +add_library(b SHARED empty.cxx) +target_precompile_headers(b REUSE_FROM a) + +set_target_properties(b PROPERTIES COMPILE_PDB_NAME b) |