From 7df86967f3185683374788319a8fb10d779a5a1d Mon Sep 17 00:00:00 2001 From: berryplus Date: Sat, 7 Sep 2019 17:42:33 +0900 Subject: [PATCH 1/3] =?UTF-8?q?tests1=E3=83=93=E3=83=AB=E3=83=89=E3=82=92?= =?UTF-8?q?=E9=AB=98=E9=80=9F=E5=8C=96=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. find-tools.batを呼ばないようにする 2. googletestのcmakeコンフィグを毎回呼ばないようにする その他 BuildDirの末尾に\が付いていたのを削除。 vcxcompat.propsを正しく読み込めていなかったのを修正。 --- tests/googletest.build.cmd | 26 ++++++------- tests/googletest.targets | 68 +++++++++++++++++----------------- tests/unittests/tests1.vcxproj | 9 +++-- 3 files changed, 51 insertions(+), 52 deletions(-) diff --git a/tests/googletest.build.cmd b/tests/googletest.build.cmd index 620e9e99b7..cf3a5b6fa3 100644 --- a/tests/googletest.build.cmd +++ b/tests/googletest.build.cmd @@ -5,25 +5,24 @@ set CONFIGURATION=%~3 set VCVARSALL_PATH=%4 set VCVARS_ARCH=%~5 -if not defined CMD_GIT call %~dp0..\tools\find-tools.bat -if not defined CMD_GIT ( - echo git.exe was not found. - endlocal && exit /b 1 -) - -if not exist "%~dp0googletest\CMakeLists.txt" ( - "%CMD_GIT%" submodule init %~dp0googletest || endlocal && exit /b 1 - "%CMD_GIT%" submodule update %~dp0googletest || endlocal && exit /b 1 -) - @rem call vcvasall.bat when we run in the Visual Studio IDE. if defined VCVARSALL_PATH ( call %VCVARSALL_PATH% %VCVARS_ARCH% || endlocal && exit /b 1 ) +if not exist CMakeCache.txt ( + call :run_cmake_configure +) + +cmake --build . --config %CONFIGURATION% || endlocal && exit /b 1 + +endlocal && exit /b 0 + +:run_cmake_configure where ninja.exe > NUL 2>&1 if not errorlevel 1 ( set GENERATOR=Ninja + set GENERATOR_OPTS=-DCMAKE_BUILD_TYPE=%CONFIGURATION% ) @rem find cl.exe in the PATH @@ -35,7 +34,7 @@ if not defined CMD_CL ( ) set CMD_CL=%CMD_CL:\=/% -cmake -G "%GENERATOR%" -DCMAKE_BUILD_TYPE=%CONFIGURATION% ^ +cmake -G "%GENERATOR%" %GENERATOR_OPTS% ^ "-DCMAKE_C_COMPILER=%CMD_CL%" ^ "-DCMAKE_CXX_COMPILER=%CMD_CL%" ^ -DBUILD_GMOCK=OFF ^ @@ -44,9 +43,8 @@ cmake -G "%GENERATOR%" -DCMAKE_BUILD_TYPE=%CONFIGURATION% ^ %SOURCE_DIR% ^ || endlocal && exit /b 1 -cmake --build . --config %CONFIGURATION% || endlocal && exit /b 1 +goto :EOF -endlocal && exit /b 0 :find_cl_exe for /f "usebackq delims=" %%a in (`where cl.exe`) do ( diff --git a/tests/googletest.targets b/tests/googletest.targets index 6938113374..05cfbb1c6c 100644 --- a/tests/googletest.targets +++ b/tests/googletest.targets @@ -1,64 +1,64 @@ $(MSBuildThisFileDirectory)googletest\ - $(MSBuildThisFileDirectory)build\$(Platform)\$(Configuration)\googletest\ + $(MSBuildThisFileDirectory)build\$(Platform)\$(Configuration)\googletest $(GoogleTestSourceDir)googletest\include;$(IncludePath) $(GoogleTestBuildDir)\lib;$(GoogleTestBuildDir)\lib\$(Configuration);$(LibraryPath) + d + _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;%(PreprocessorDefinitions) - + - gtestd.lib;%(AdditionalDependencies) - gtest_maind.lib;%(AdditionalDependencies) + gtest$(NameSuffix).lib;%(AdditionalDependencies) + gtest_main$(NameSuffix).lib;%(AdditionalDependencies) - - - gtest.lib;%(AdditionalDependencies) - gtest_main.lib;%(AdditionalDependencies) - - - - - - - - - - - - - - - + + + + + + + + + + + + + + x86 x86_amd64 amd64_x86 amd64 $([System.Text.RegularExpressions.Regex]::Replace('$(VisualStudioVersion)', '^(\d+).*', '$1')) - $([MSBuild]::Add($(NumVersion), 1)) + $([System.Text.RegularExpressions.Regex]::Replace('$(VisualStudioEdition)', '^.* (\d+).*', '$1')) Win64 + Visual Studio $(NumVersion) $(ProductLineVersion)$(GeneratorSuffix) - - - - - - + + + + + + + + + + - - - - + + diff --git a/tests/unittests/tests1.vcxproj b/tests/unittests/tests1.vcxproj index 41a3d9a79d..5af46545da 100644 --- a/tests/unittests/tests1.vcxproj +++ b/tests/unittests/tests1.vcxproj @@ -21,14 +21,15 @@ {701e3407-ec27-49f7-adc7-520cf2b4b438} Win32Proj - 10.0.17763.0 + + + + Application - v141 + false Unicode - - From 6c49f1e4b837d6b430dc8ee2276982d8b3c3ecab Mon Sep 17 00:00:00 2001 From: berryplus Date: Sun, 15 Sep 2019 20:54:41 +0900 Subject: [PATCH 2/3] =?UTF-8?q?Git=E3=81=8C=E8=A4=87=E6=95=B0=E3=83=91?= =?UTF-8?q?=E3=82=B9=E3=81=AB=E5=AD=98=E5=9C=A8=E3=81=99=E3=82=8B=E5=A0=B4?= =?UTF-8?q?=E5=90=88=E3=81=AE=E8=80=83=E6=85=AE=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 複数パスにgitがある場合、最初に見つかったものを使用する。 --- tests/googletest.targets | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/googletest.targets b/tests/googletest.targets index 05cfbb1c6c..5bd3a92c66 100644 --- a/tests/googletest.targets +++ b/tests/googletest.targets @@ -23,6 +23,9 @@ + + $([System.Text.RegularExpressions.Regex]::Replace('$(GitCmd)', '^([^;]+);.*', '$1')) + From 167ea855fae24d418cd9ce181fab7c37d01d246a Mon Sep 17 00:00:00 2001 From: berryplus Date: Sun, 15 Sep 2019 20:32:51 +0900 Subject: [PATCH 3/3] =?UTF-8?q?Windows10=20SDK=E3=81=AE=E3=83=90=E3=83=BC?= =?UTF-8?q?=E3=82=B8=E3=83=A7=E3=83=B3=E3=82=92=E6=8C=87=E5=AE=9A=E3=81=99?= =?UTF-8?q?=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vcx-props/vcxcompat.props | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vcx-props/vcxcompat.props b/vcx-props/vcxcompat.props index a1324f5c26..4716c13a17 100644 --- a/vcx-props/vcxcompat.props +++ b/vcx-props/vcxcompat.props @@ -1,5 +1,11 @@ + + 10.0.17763.0 + + + 10.0.18362.0 + v141