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()