Skip to content

Commit

Permalink
fix: fix checking for VCVARSALL_FILE existence
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Nov 28, 2021
1 parent 03c09d5 commit 340f9d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ cmake_minimum_required(VERSION 3.16)
# You can later set fine-grained standards for each target using `target_compile_features`
# set(CMAKE_CXX_STANDARD 17)
# Add ProjectOptions v0.11.0
# Add ProjectOptions v0.11.1
# https://github.com/aminya/ProjectOptions
include(FetchContent)
FetchContent_Declare(projectoptions URL https://github.com/aminya/ProjectOptions/archive/refs/tags/v0.11.0.zip)
FetchContent_Declare(projectoptions URL https://github.com/aminya/ProjectOptions/archive/refs/tags/v0.11.1.zip)
FetchContent_MakeAvailable(projectoptions)
include(${projectoptions_SOURCE_DIR}/Index.cmake)
Expand Down Expand Up @@ -139,10 +139,10 @@ cmake_minimum_required(VERSION 3.16)
# You can later set fine-grained standards for each target using `target_compile_features`
# set(CMAKE_CXX_STANDARD 17)
# Add ProjectOptions v0.11.0
# Add ProjectOptions v0.11.1
# https://github.com/aminya/ProjectOptions
include(FetchContent)
FetchContent_Declare(projectoptions URL https://github.com/aminya/ProjectOptions/archive/refs/tags/v0.11.0.zip)
FetchContent_Declare(projectoptions URL https://github.com/aminya/ProjectOptions/archive/refs/tags/v0.11.1.zip)
FetchContent_MakeAvailable(projectoptions)
include(${projectoptions_SOURCE_DIR}/Index.cmake)
Expand Down
3 changes: 1 addition & 2 deletions src/VCEnvironment.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ function(run_vcvarsall)
"${MSVC_DIR}/../../../../../../.."
PATH_SUFFIXES "VC/Auxiliary/Build" "Common7/Tools" "Tools")

if(VCVARSALL_FILE_FOUND)

if(EXISTS ${VCVARSALL_FILE})
# detect the architecture
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" CMAKE_SYSTEM_PROCESSOR_LOWER)
if(CMAKE_SYSTEM_PROCESSOR_LOWER STREQUAL x86 OR CMAKE_SYSTEM_PROCESSOR_LOWER MATCHES "^i[3456]86$")
Expand Down

0 comments on commit 340f9d9

Please sign in to comment.