Skip to content

Commit

Permalink
trying MSVC flags
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb committed May 3, 2020
1 parent 832b643 commit 67387ac
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 83 deletions.
162 changes: 81 additions & 81 deletions .vsts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,24 @@ jobs:
strategy:
maxParallel: 7
matrix:
regular:
TASK: regular
sdist:
TASK: sdist
PYTHON_VERSION: 3.5
bdist:
TASK: bdist
PYTHON_VERSION: 3.7
inference:
TASK: if-else
mpi_source:
TASK: mpi
METHOD: source
PYTHON_VERSION: 2.7
gpu_source:
TASK: gpu
METHOD: source
PYTHON_VERSION: 3.6
# regular:
# TASK: regular
# sdist:
# TASK: sdist
# PYTHON_VERSION: 3.5
# bdist:
# TASK: bdist
# PYTHON_VERSION: 3.7
# inference:
# TASK: if-else
# mpi_source:
# TASK: mpi
# METHOD: source
# PYTHON_VERSION: 2.7
# gpu_source:
# TASK: gpu
# METHOD: source
# PYTHON_VERSION: 3.6
r_package:
TASK: r-package
steps:
Expand Down Expand Up @@ -78,14 +78,14 @@ jobs:
strategy:
maxParallel: 4
matrix:
regular:
TASK: regular
PYTHON_VERSION: 3.7
sdist:
TASK: sdist
PYTHON_VERSION: 3.5
bdist:
TASK: bdist
# regular:
# TASK: regular
# PYTHON_VERSION: 3.7
# sdist:
# TASK: sdist
# PYTHON_VERSION: 3.5
# bdist:
# TASK: bdist
r_package:
TASK: r-package
steps:
Expand Down Expand Up @@ -122,14 +122,14 @@ jobs:
r_package:
TASK: r-package
COMPILER: MSVC
regular:
TASK: regular
PYTHON_VERSION: 3.6
sdist:
TASK: sdist
PYTHON_VERSION: 2.7
bdist:
TASK: bdist
# regular:
# TASK: regular
# PYTHON_VERSION: 3.6
# sdist:
# TASK: sdist
# PYTHON_VERSION: 2.7
# bdist:
# TASK: bdist
steps:
- powershell: |
Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
Expand All @@ -146,50 +146,50 @@ jobs:
artifactName: PackageAssets
artifactType: container

###########################################
- job: Package
###########################################
dependsOn:
- Linux
- MacOS
- Windows
condition: and(succeeded(), not(startsWith(variables['Build.SourceBranch'], 'refs/pull/')))
pool:
vmImage: 'vs2017-win2016'
steps:
# Download all agent packages from all previous phases
- task: DownloadBuildArtifacts@0
displayName: Download package assets
inputs:
artifactName: PackageAssets
downloadPath: $(Build.SourcesDirectory)/binaries
- script: |
python %BUILD_SOURCESDIRECTORY%/.nuget/create_nuget.py %BUILD_SOURCESDIRECTORY%/binaries/PackageAssets
displayName: 'Create NuGet configuration files'
- task: NuGetCommand@2
inputs:
command: pack
packagesToPack: '$(Build.SourcesDirectory)/.nuget/*.nuspec'
packDestination: '$(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: NuGet
artifactType: container
- task: GitHubRelease@0
displayName: 'Create GitHub Release'
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
inputs:
gitHubConnection: guolinke
repositoryName: '$(Build.Repository.Name)'
action: 'create'
target: '$(Build.SourceVersion)'
tagSource: 'auto'
title: '$(Build.SourceBranchName)'
assets: |
$(Build.SourcesDirectory)/binaries/PackageAssets/*
$(Build.ArtifactStagingDirectory)/*.nupkg
assetUploadMode: 'delete'
isDraft: true
isPreRelease: false
addChangeLog: false
# ###########################################
# - job: Package
# ###########################################
# dependsOn:
# - Linux
# - MacOS
# - Windows
# condition: and(succeeded(), not(startsWith(variables['Build.SourceBranch'], 'refs/pull/')))
# pool:
# vmImage: 'vs2017-win2016'
# steps:
# # Download all agent packages from all previous phases
# - task: DownloadBuildArtifacts@0
# displayName: Download package assets
# inputs:
# artifactName: PackageAssets
# downloadPath: $(Build.SourcesDirectory)/binaries
# - script: |
# python %BUILD_SOURCESDIRECTORY%/.nuget/create_nuget.py %BUILD_SOURCESDIRECTORY%/binaries/PackageAssets
# displayName: 'Create NuGet configuration files'
# - task: NuGetCommand@2
# inputs:
# command: pack
# packagesToPack: '$(Build.SourcesDirectory)/.nuget/*.nuspec'
# packDestination: '$(Build.ArtifactStagingDirectory)'
# - task: PublishBuildArtifacts@1
# inputs:
# pathtoPublish: '$(Build.ArtifactStagingDirectory)'
# artifactName: NuGet
# artifactType: container
# - task: GitHubRelease@0
# displayName: 'Create GitHub Release'
# condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
# inputs:
# gitHubConnection: guolinke
# repositoryName: '$(Build.Repository.Name)'
# action: 'create'
# target: '$(Build.SourceVersion)'
# tagSource: 'auto'
# title: '$(Build.SourceBranchName)'
# assets: |
# $(Build.SourcesDirectory)/binaries/PackageAssets/*
# $(Build.ArtifactStagingDirectory)/*.nupkg
# assetUploadMode: 'delete'
# isDraft: true
# isPreRelease: false
# addChangeLog: false
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,9 @@ if(MSVC)
CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_RELWITHDEBINFO
)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /MP")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /MP /incremental")
if(USE_DEBUG)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Od")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Od /debug:fastlink")
else()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /O2 /Ob2 /Oi /Ot /Oy")
endif()
Expand All @@ -205,6 +205,8 @@ else()
endif()
endif(MSVC)

MESSAGE(STATUS "CMAKE_FXX_FLAGS: ${CMAKE_CXX_FLAGS}")

SET(LightGBM_HEADER_DIR ${PROJECT_SOURCE_DIR}/include)

SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR})
Expand Down

0 comments on commit 67387ac

Please sign in to comment.