Skip to content

Commit

Permalink
[windows] Fix root-config.bat for PowerShell (#17405)
Browse files Browse the repository at this point in the history
* [windows] Fix root-config.bat for PowerShell

Fix an issue with `root-config.bat` when used in PowerShell like:
`Invoke-Expression "cl test.cpp $(root-config --cflags --libs)"`
as reported on the Forum: https://root-forum.cern.ch/t/root-6-34-windows-compilation-w32pragma-issue-cea-43597/62630

* formatting
  • Loading branch information
bellenot authored Jan 11, 2025
1 parent 61dab63 commit 49d8308
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions config/root-config.bat.in
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ if "@BLDCFLAGS@"=="-MDd" (
set cflags=!cflags! -O2
set cxxflags=!cxxflags! -O2
)
rem add double-quotes to allow PowerShell usage like: Invoke-Expression "cl test.cpp $(root-config --cflags --libs)"
set cxxflags=!cxxflags:-FIw32pragma.h=-FI"w32pragma.h"!
set cxxflags=!cxxflags:-FIsehmap.h=-FI"sehmap.h"!

set rootglibs=libGui.lib
set rootevelibs=libEve.lib libEG.lib libGeom.lib libGed.lib libRGL.lib
Expand Down

0 comments on commit 49d8308

Please sign in to comment.