dynalo
dynalo copied to clipboard
fix warnings and update cmake
- added a workaround on function pointer casting, since direct usage of
reinterpret_castresults in a warning. That prevents the usage of a package in the project that treats warnings as errors. - added
CLEAN_BUILDoption defaulted toOFF. IfON, the project will compile with all the warnings and treat them as errors. Works for MSVC and GNU. - modified tests:
- renamed test target from
all_teststoloader, since it is ambiguous andALL_TESTSis used by cmake - moved
enable_testingto the root CMakeLists.txt as it is required by documentation. - added option
BUILD_TESTSdefaulted toON - added test in cmake for
EXCLUDE_FROM_ALLproperty on directory. If tests are enabled, parent project's test will fail because it won't build executables for testing. If the property is detected to beTRUE, no tests will be built. - added check for input arguments (checking
argc) inloadertest. Also added try-catch block and return-1if test fails. - modified test to accept 1 argument as an absolute path to shared library. Since the test is now invoked with
$<TARGET_FILE:shared>which provides an absolute path to the binary, the test works without errors for shared library name.
- renamed test target from