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

Missing working ctest example #72

Closed
miroi opened this issue Aug 10, 2015 · 10 comments
Closed

Missing working ctest example #72

miroi opened this issue Aug 10, 2015 · 10 comments

Comments

@miroi
Copy link
Contributor

miroi commented Aug 10, 2015

As I am trying to adapt tests for https://github.com/miroi/mathlibs-tester, I am missing working ctest-autocmake example.

Is it worth for consideration ?

@bast
Copy link
Member

bast commented Aug 10, 2015

I don't understand - what exactly is missing and where?

@miroi
Copy link
Contributor Author

miroi commented Aug 10, 2015

autocmake lacks very ctest example, IMHO (and I can not set up it in another project as related issue...)

@bast
Copy link
Member

bast commented Aug 10, 2015

OK testing is very project-dependent. We could abstract one or two lines

include(CTest)
enable_testing()

but still the user has to write something. One thing that Autocmake cannot do much
about is help with targets since they are different for every project. But we can
help with everything else.

I think what you are missing is documentation on how to do this.
I will add some doc although it falls a bit into the first two FAQs here:
http://autocmake.readthedocs.org/en/latest/developers/faq.html#faq-for-developers

@miroi
Copy link
Contributor Author

miroi commented Aug 10, 2015

Well, I'd need one very simple running Ctest in autocmake. I can't set it up in another projekt, based on autocmake.

@bast
Copy link
Member

bast commented Aug 10, 2015

@miroi
Copy link
Contributor Author

miroi commented Aug 10, 2015

In this example a new test requires own target and libraries.
But in Autocmake we already have add_executable(example example.F90).

Plain add_test(${PROJECT_BINARY_DIR}/bin/example) is not working.

@miroi
Copy link
Contributor Author

miroi commented Aug 10, 2015

Well, maybe I should try the cmake/custom/test.cmake approach.

@bast
Copy link
Member

bast commented Aug 10, 2015

The add_test can test in principle any binary or script or command. It does not need to be a target. It creates a "make test" target.

@miroi
Copy link
Contributor Author

miroi commented Aug 10, 2015

I got the make test target. Even make test works after the target compilation. But the configuration is not working, claiming missing libraries, LAPACK/BLAS libraries not found for the project! .

@miroi
Copy link
Contributor Author

miroi commented Aug 10, 2015

Well, make VERBOSE=1 ExperimentalConfigure give error of LAPACK_FOUND=FALSE. Strange that when calling it as test, is does not find libraries, althogh the previous compilation works....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants