From 78b707fa092f4b6a1502db0882f49ef533d4636a Mon Sep 17 00:00:00 2001 From: Stefano Sinigardi Date: Fri, 22 Feb 2019 16:43:37 +0100 Subject: [PATCH 1/2] fallback enabled only not on windows, need to investigate better the failure anyway --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 76cc0b4c..401c74bd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -112,7 +112,9 @@ endif() if(ENABLE_CUDA) add_definitions(-DGPU) - include_directories("${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES}") + if(NOT WIN32) + include_directories("${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES}") + endif() if(CUDA_COMPUTE_MODEL VERSION_GREATER_EQUAL ${CUDA_COMPUTE_MODEL_75} AND CMAKE_CUDA_COMPILER_VERSION VERSION_LESS_EQUAL 9) message(STATUS "CUDA 10 is required for Compute Model 7.5 - Lowering settings to 7.0") set(CUDA_COMPUTE_MODEL ${CUDA_COMPUTE_MODEL_70}) From fd5312f9c8b5419f9ccad92cc90917f6e48fd185 Mon Sep 17 00:00:00 2001 From: Stefano Sinigardi Date: Fri, 22 Feb 2019 16:56:58 +0100 Subject: [PATCH 2/2] [build.ps1] fix wrong path, enable builds only if env variable is present --- build.ps1 | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/build.ps1 b/build.ps1 index 836998e1..708d9b65 100755 --- a/build.ps1 +++ b/build.ps1 @@ -16,23 +16,28 @@ if ((Get-Command "cl.exe" -ErrorAction SilentlyContinue) -eq $null) Write-Host "Visual Studio 2017 ${vstype} Command Prompt variables set.`n" -ForegroundColor Yellow } -# DEBUG -New-Item -Path .\build_win_debug -ItemType directory -Force -Set-Location build_win_debug -cmake -G "Visual Studio 15 2017" -T "host=x64" -A "x64" "-DCMAKE_TOOLCHAIN_FILE=$env:VCPKG_ROOT\scripts\buildsystems\vcpkg.cmake" "-DVCPKG_TARGET_TRIPLET=$env:VCPKG_DEFAULT_TRIPLET" "-DCMAKE_BUILD_TYPE=Debug" .. -cmake --build . --config Debug --parallel ${number_of_build_workers} -Set-Location .. +if (Test-Path env:VCPKG_ROOT) { + # DEBUG + New-Item -Path .\build_win_debug -ItemType directory -Force + Set-Location build_win_debug + cmake -G "Visual Studio 15 2017" -T "host=x64" -A "x64" "-DCMAKE_TOOLCHAIN_FILE=$env:VCPKG_ROOT\scripts\buildsystems\vcpkg.cmake" "-DVCPKG_TARGET_TRIPLET=$env:VCPKG_DEFAULT_TRIPLET" "-DCMAKE_BUILD_TYPE=Debug" .. + cmake --build . --config Debug --parallel ${number_of_build_workers} + Set-Location .. -# RELEASE -New-Item -Path .\build_win_release -ItemType directory -Force -Set-Location build_win_release -cmake -G "Visual Studio 15 2017" -T "host=x64" -A "x64" "-DCMAKE_TOOLCHAIN_FILE=$env:VCPKG_ROOT\scripts\buildsystems\vcpkg.cmake" "-DVCPKG_TARGET_TRIPLET=$env:VCPKG_DEFAULT_TRIPLET" "-DCMAKE_BUILD_TYPE=Release" .. -cmake --build . --config Release --parallel ${number_of_build_workers} -Set-Location .. + # RELEASE + New-Item -Path .\build_win_release -ItemType directory -Force + Set-Location build_win_release + cmake -G "Visual Studio 15 2017" -T "host=x64" -A "x64" "-DCMAKE_TOOLCHAIN_FILE=$env:VCPKG_ROOT\scripts\buildsystems\vcpkg.cmake" "-DVCPKG_TARGET_TRIPLET=$env:VCPKG_DEFAULT_TRIPLET" "-DCMAKE_BUILD_TYPE=Release" .. + cmake --build . --config Release --parallel ${number_of_build_workers} + Set-Location .. +} +else { + Write-Host "Skipping vcpkg-enabled builds because the VCPKG_ROOT environment variable is not defined`n" -ForegroundColor Yellow +} # USE LOCAL PTHREAD LIB, NO VCPKG: remember to use "vcpkg.exe integrate remove" in case you had enable user-wide vcpkg integration New-Item -Path .\build_win_release_cuda_int_libs -ItemType directory -Force -Set-Location build_win_release_cuda_custom_libs +Set-Location build_win_release_cuda_int_libs cmake -G "Visual Studio 15 2017" -T "host=x64" -A "x64" .. cmake --build . --config Release --parallel ${number_of_build_workers} Set-Location ..