From 52029935557516c6af58c007879aaabfaa742a3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Tue, 28 Aug 2018 10:48:05 +0200 Subject: [PATCH] Fix VS2017 approvals on AppVeyor Because of a change in VS toolset, missing option is no longer interpreted as "don't pass /FC to the compiler", but rather as "pass /FC to the compiler". This is problematic, because /FC not only changes how much of the path is reporter by the compiler (e.g. in `__FILE__` macro), but it also lower cases the path. This lower-casing of the path broke our approval tests for VS2017 about 5 months ago. Using CMake 3.13 (not yet released) would also let us fix it, but for now we use a vcxproj.user file that is merged with the main project and explicitly disables `/FC`. --- misc/SelfTest.vcxproj.user | 23 +++++++++++++++++++++++ projects/CMakeLists.txt | 12 ++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 misc/SelfTest.vcxproj.user diff --git a/misc/SelfTest.vcxproj.user b/misc/SelfTest.vcxproj.user new file mode 100644 index 00000000..ffffc575 --- /dev/null +++ b/misc/SelfTest.vcxproj.user @@ -0,0 +1,23 @@ + + + + + false + + + + + false + + + + + false + + + + + false + + + diff --git a/projects/CMakeLists.txt b/projects/CMakeLists.txt index d535eec0..f83d2bfb 100644 --- a/projects/CMakeLists.txt +++ b/projects/CMakeLists.txt @@ -1,5 +1,17 @@ include(MiscFunctions) +#### +# Temporary workaround for VS toolset changes in 2017 +# We need to disable property, but CMake doesn't support it +# until 3.13 (not yet released) +#### +if (MSVC) +configure_file(${CATCH_DIR}/misc/SelfTest.vcxproj.user + ${CMAKE_BINARY_DIR}/projects + COPYONLY) +endif(MSVC) #Temporary workaround + + # define the sources of the self test # Please keep these ordered alphabetically set(TEST_SOURCES