Support CMake-only build and submoduling. #15
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This request has already been proposed in #2 and #7.
The main reason (as I understand) to use a
Makefile
as a preprocessor is to prepend two#define
lines tometis.h
, which then might be installed somewhere (currently in~/local
by default). As @karypis mentioned in #2, the attempt made by @zheng-da leaves the burden of defining these macros to the user of (the installed) METIS, since the installedmetis.h
, which is copied from the source directory, has commented out these two lines.My attempt is based on the
configure_file()
command, which sets the values ofIDXTYPEWIDTH
andREALTYPEWIDTH
in the configuration stage. The configuredmetis.h
, which contains the two#define
s, will then be used to build the targets in this project, and will be copied to${CMAKE_INSTALL_PREFIX}/include
in the installation stage. At the point of runningmake install
orninja install
(as mentioned by @gruenich in #7), my approach has the same effect as the currentMakefile
-driven one.