Skip to content

Commit

Permalink
Add extra location for visual studio checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Bram Thijssen committed Aug 24, 2023
1 parent 8b1d460 commit bb7517a
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/cellpop/Experiment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -810,8 +810,19 @@ bool Experiment::GenerateAndCompileSolverCode(const std::string& codegen_name)
int result = system(("cd " + output_folder + " & \"" + vcvarsfn + "\" & cmake -G \"Visual Studio 17 2022\" . & msbuild generated_derivatives.sln /p:Configuration=Release").c_str());
#endif
} else {
LOGERROR("Not sure where to find vcvars64.bat for compiling the code...");
return false;
vcvarsfn = "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Auxiliary\\Build\\vcvars64.bat";
FILE* file = fopen(vcvarsfn.c_str(), "r");
if (file) {
fclose(file);
#if BUILD_DEBUG
int result = system(("cd " + output_folder + " & \"" + vcvarsfn + "\" & cmake -G \"Visual Studio 17 2022\" . & msbuild generated_derivatives.sln /p:Configuration=Debug").c_str());
#else
int result = system(("cd " + output_folder + " & \"" + vcvarsfn + "\" & cmake -G \"Visual Studio 17 2022\" . & msbuild generated_derivatives.sln /p:Configuration=Release").c_str());
#endif
} else {
LOGERROR("Not sure where to find vcvars64.bat for compiling the code...");
return false;
}
}
}
}
Expand Down

0 comments on commit bb7517a

Please sign in to comment.