serge1 / ELFIO

ELFIO - ELF (Executable and Linkable Format) reader and producer implemented as a header only C++ library
http://serge1.github.io/ELFIO
MIT License
729 stars 158 forks source link

Setup CMake to have 'check' target like autoconf #52

Closed schultetwin1 closed 3 years ago

schultetwin1 commented 3 years ago

This setups the CMake build system to have the same make check functionality as the autoconf build system

serge1 commented 3 years ago

Hi Matt,

Thank you again for your submission! I have validated the solution. While pair

make clean make check

works perfectly, the pair

make clean make test

is not able to run test without 'make' produced first.

I think it is acceptable for meantime. Maybe remove target 'test' completely?

Serge

schultetwin1 commented 3 years ago

Not a problem!

Unfortunately, I don't know how to remove the test target completely. It seems to be auto generated by CMake. This issue of not building the tests before running them seems well known and documented as a CMake issue (https://gitlab.kitware.com/cmake/cmake/-/issues/8774).

I'd prefer to leave it as is, and just wait until CMake decides to fix this issue? Is that ok with you?

serge1 commented 3 years ago

Sure. In case it is a well known behavior, I am OK with it. Many thanks!