Skip to content

Commit

Permalink
utils/lstopo: don't build lstopo-win with MSVC
Browse files Browse the repository at this point in the history
Clang can be used in "MSVC mode" to build hwloc using autotools.
That mode doesn't support -mwindows just like MSVC doesn't.
-mwindows is the only difference between lstopo-win and lstopo,
so just disable lstopo-win instead of building both identically.

Closes #631

Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
  • Loading branch information
bgoglin committed Oct 24, 2023
1 parent a248282 commit ca5d25a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions utils/lstopo/Makefile.am
Expand Up @@ -52,18 +52,19 @@ lstopo_CFLAGS = $(lstopo_no_graphics_CFLAGS) $(HWLOC_CAIRO_CFLAGS)
lstopo_LDADD += $(HWLOC_CAIRO_LIBS) $(HWLOC_X11_LIBS)
endif
if HWLOC_HAVE_WINDOWS
bin_PROGRAMS += lstopo lstopo-win
bin_PROGRAMS += lstopo
if !HWLOC_HAVE_MSVC
# only build lstopo-win if NOT building with MSVC (or Clang in MSVC mode) because it doesn't support -mwindows
bin_PROGRAMS += lstopo-win
endif
lstopo_SOURCES += lstopo-windows.c
lstopo_CPPFLAGS += -DLSTOPO_HAVE_GRAPHICS
if HWLOC_HAVE_USER32
lstopo_LDADD += -luser32
endif
lstopo_win_SOURCES = $(lstopo_SOURCES)
lstopo_win_CPPFLAGS = $(lstopo_CPPFLAGS)
lstopo_win_CFLAGS = $(lstopo_CFLAGS)
if !HWLOC_HAVE_MSVC
lstopo_win_CFLAGS += -mwindows
endif
lstopo_win_CFLAGS = $(lstopo_CFLAGS) += -mwindows
lstopo_win_LDADD = $(lstopo_LDADD)
endif

Expand Down

0 comments on commit ca5d25a

Please sign in to comment.