Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

utils/lstopo: don't build lstopo-win with MSVC #632

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions config/hwloc.m4
Expand Up @@ -1789,6 +1789,7 @@ AC_DEFUN([HWLOC_DO_AM_CONDITIONALS],[
AM_CONDITIONAL([HWLOC_BUILD_STANDALONE], [test "$hwloc_mode" = "standalone"])

AM_CONDITIONAL([HWLOC_HAVE_GCC], [test "x$GCC" = "xyes"])
AM_CONDITIONAL([HWLOC_HAVE_MSVC], [test "$hwloc_c_vendor" = "microsoft"])
AM_CONDITIONAL([HWLOC_HAVE_MS_LIB], [test "x$HWLOC_MS_LIB" != "x"])
AM_CONDITIONAL([HWLOC_HAVE_OPENAT], [test "x$hwloc_have_openat" = "xyes"])
AM_CONDITIONAL([HWLOC_HAVE_SCHED_SETAFFINITY],
Expand Down
10 changes: 7 additions & 3 deletions utils/lstopo/Makefile.am
@@ -1,4 +1,4 @@
# Copyright © 2009-2020 Inria. All rights reserved.
# Copyright © 2009-2023 Inria. All rights reserved.
# Copyright © 2009-2012, 2014 Université Bordeaux
# Copyright © 2009-2014 Cisco Systems, Inc. All rights reserved.
# Copyright © 2020 Hewlett Packard Enterprise. All rights reserved.
Expand Down Expand Up @@ -52,15 +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) -mwindows
lstopo_win_CFLAGS = $(lstopo_CFLAGS) += -mwindows
lstopo_win_LDADD = $(lstopo_LDADD)
endif

Expand Down