From 34516dd7a8ed9ede4b9c927856a65f44ace92c06 Mon Sep 17 00:00:00 2001 From: sowle Date: Sat, 2 Mar 2019 22:24:01 +0300 Subject: [PATCH] PCH for coretests corrected --- tests/CMakeLists.txt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 725dd33a..fe608853 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -62,11 +62,9 @@ add_test(coretests coretests) # set PCH for core_tests -if(MSVC) +if(MSVC AND USE_PCH) set_property(TARGET coretests APPEND_STRING PROPERTY COMPILE_FLAGS " /Yuchaingen.h /Zm1000") set_property(SOURCE "core_tests/chaingen.cpp" APPEND_STRING PROPERTY COMPILE_FLAGS " /Ycchaingen.h /Zm1000") - if(USE_PCH) # see also src/CMakeLists.txt for details - set_property(TARGET coretests difficulty-tests functional_tests hash-target-tests performance_tests unit_tests APPEND_STRING PROPERTY LINK_FLAGS "$(MSBuildProjectDirectory)/../src/$(ConfigurationName)/stdafx.obj") - set_property(TARGET db_tests APPEND_STRING PROPERTY LINK_FLAGS "$(MSBuildProjectDirectory)/../../src/$(ConfigurationName)/stdafx.obj") - endif() + set_property(TARGET coretests difficulty-tests functional_tests hash-target-tests performance_tests unit_tests APPEND_STRING PROPERTY LINK_FLAGS "$(MSBuildProjectDirectory)/../src/$(ConfigurationName)/stdafx.obj") + set_property(TARGET db_tests APPEND_STRING PROPERTY LINK_FLAGS "$(MSBuildProjectDirectory)/../../src/$(ConfigurationName)/stdafx.obj") endif()