From a0f0541f356da18bbcab28325dd5c1258190effc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mariusz=20Pluci=C5=84ski?= Date: Sun, 21 Feb 2016 01:17:29 +0100 Subject: [PATCH] Tests: fix PDBDirectoryAndName on Clang/C2 --- Tests/PDBDirectoryAndName/CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Tests/PDBDirectoryAndName/CMakeLists.txt b/Tests/PDBDirectoryAndName/CMakeLists.txt index 180f9fea2..5fd69efdf 100644 --- a/Tests/PDBDirectoryAndName/CMakeLists.txt +++ b/Tests/PDBDirectoryAndName/CMakeLists.txt @@ -1,4 +1,5 @@ cmake_minimum_required(VERSION 2.8) +cmake_policy(SET CMP0054 NEW) project(PDBDirectoryAndName C) # Make sure the proper compiler is in use. @@ -62,6 +63,14 @@ list(APPEND my_targets myexe2) target_link_libraries(myexe2 mylibA mylibD) + +# Clang/C2 does not produce pdb files for static libraries +if (CMAKE_C_COMPILER_ID STREQUAL "Clang" AND + CMAKE_C_SIMULATE_ID STREQUAL "MSVC") + list(REMOVE_ITEM my_targets mylibB mylibD) +endif() + + #----------------------------------------------------------------------------- # Check that PDB files actually appear where expected.