-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
Add CMake build system #107
Conversation
To replicate the build in linux ubuntu/debian SRC_DIR=/home/sik/repos/matio
BUILD_DIR=/home/sik/Workspace/matio/build_linux
INSTALL_DIR=$BUILD_DIR/simulate_install_dir
cd $BUILD_DIR
rm $BUILD_DIR/* -Rf
cmake $SRC_DIR \
-DCMAKE_INSTALL_PREFIX=$INSTALL_DIR
cmake --build . -- -j 8
make install It works when hdf5 is installed using apt-get: To run it in windows @JohanMabille and I we tested only using gitbash and conda with the following lines: cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=%MINICONDA%/Library -DCMAKE_PREFIX_PATH=%MINICONDA%/Library/cmake ..
nmake matdump (be aware that the windows snipped might have some typo since I didn't copy paste it) |
I believe adding the tests is optional and agree that it is beyond the scope of this PR adding CMake support for the libmatio build. |
CMakeLists.txt
Outdated
@@ -0,0 +1,25 @@ | |||
# Autogenerated by auto2cmake on 2018-03-07 11:49:59 | |||
cmake_minimum_required(VERSION 3.9) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please support 3.7.2 (available in debian stretch)
I tested with 3.7.2 and it works
How to build a dynamic library ?
|
There are typos in CheckHeaderSTDC.cmake: Cheking -> Checking |
Also works with CMake 3.6.2 on Cygwin:
|
Any chance to use matio.rc for Win builds? |
Please do add yourself the Acknowledgements section of both README and README.md. |
Ok I see what the |
https://stackoverflow.com/q/6693100/8520615 might give some clues. |
What I meant was: sure that we can generate the `.rc` from Cmake (which is
what the stackoverflow link illustrates) or use the `.rc` to populate the
Cmake.
But the question is can we agree in a manner that we use to populate
autoconf, Cmake and visual? All at once?
…On Tue, Mar 12, 2019, 11:17 tbeu ***@***.***> wrote:
Is there any chance to have all this metadata in the same manner for
windows/linux/osx ?
https://stackoverflow.com/q/6693100/8520615 might give some clues.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#107 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AGt-4-ZKz9PSeYCSil62eQHINBwWhM_4ks5vV37AgaJpZM4bhWG9>
.
|
Even today, autoconf and VS version information are independent. |
@tbeu travis seems to not run in the PRs. Can you trigger it? |
Usually it did. Could it be that this is a draft PR? |
It says: Could not parse Syntax error? |
Travis now runs, but still some command error, see https://travis-ci.org/tbeu/matio/builds/510386199 for https://github.com/tbeu/matio/tree/cmake |
If it says "Could NOT find HDF5" (as in https://travis-ci.org/tbeu/matio/jobs/514751765#L1658) then |
it builds, now what it does not do is test properly. |
See your 5 point plan above and my #107 (comment). |
If CIs turn green, this should be ready to merge. We can take whatever is left out for subsequent PRs. @tbeu feel free to push any changes in the travis.yml |
Still not fixed. |
On Win, with HDF5 installed and properly detected, I always get using cmake-gui
Even if I deselect MAT73 (which means HDF5 dependency is not necessary) I get the above errors. |
On Cygwin, with HDF5 not installed, and MAT73 enabled (default), it fails to compile, since HAVE_HDF5 is set, but hdf5.h cannot be found. I would prefer if the default cmake config succeeds to configure and build. |
Still open. |
Happy anniversary, #107! How to move on? I can think of the following alternatives.
While 1. is very unlikely to happen, it would be my preferred option. |
I have (at least a partial one) an update with the "cheking' correction and most of the cmake changes. Plus a merge from origin/master (I hope). But I cannot push it here and my own fork refuses it too.... |
@papadop Thanks for your offer. I tried to look for the branch in your fork but did not see any recent commits. You can simply push to your repo and I will cherry-pick your commits afterwards. |
added missing definitions to matio_pubconf Add getopt=1 as target_compile_definition fixed getopt build and added MATIO_VERSION_STR definition Expose HAVE_HDF5 Fixed link with HDF5
I resolved the merge conflict with the Travis CI configuration and applied it again. Now the CMake build is running at Travis CI somehow, but I noticed other strange stings:
|
d4d4d70
to
212bde3
Compare
Closing now, since there is no more progress to expect. |
:-( |
1 similar comment
:-( |
It's sad to hear that the development is stopped. Autotools and vs-projects are really a pain. :-( |
Well, basically you just need to scroll up to see the details... |
Closes #53 #74 #75