move data, example and benchmarks to dedicated folders (data files are shared by example and tests). I've also added 2 CMake options to build examples and benchmarks: HMDF_EXAMPLES and HMDF_BENCHMARKS.
refactor CMakeLists to follow modern CMake & fix few issues:
no RPATH manipulation anymore.
no uninstall target anymore.
no hardcoded export compile commands anymore.
don't suggest CMAKE_BUILD_TYPE.
Don't obfuscate variables & targets behind PROJECT_NAME or LIBRARY_TARGET_NAME. CMakeLists with too many custom variables are very hard to read and understand, so keep it simple.
add DataFrame::DataFrame ALIAS target, so that users including DataFrame with add_subdirectory() can use this target, it's compliant with the imported target in the CMake config file.
set SOVERSION for the shared lib as well (I've put the major version, basically it should be the ABI version), not just VERSION.
fix pkgconfig file to also link pthread and rt on Linux like systems.
instead of using a big custom module file, rely on the built-in CMake macros to properly export target and generate CMake config & version file.
move CMake logic of test, example and benckmarks in the dedicated subdirectories.
add dataframe_tester_3 to the tests. Executable was built but not added to CTest.
mark the 2 tests failing with MSVC as DISABLED, so that they are known by CTest but skipped while running ctest command line.
during build, copy resource file in only one folder, it should work with single and multi-configuration generators.
rename ENABLE_TESTING to a qualified name: HMDF_TESTING.
disable the build of tests, example and benchmarks by default (but it's enabled in CI files of course). Indeed, it's usually better to set build options to the strict minimum for consumers (basically build & install the library).
And I've also removed 3 tests logs in test folder, I guess you don't want to track these files 😉
In this PR I propose to:
HMDF_EXAMPLES
andHMDF_BENCHMARKS
.CMAKE_BUILD_TYPE
.PROJECT_NAME
orLIBRARY_TARGET_NAME
. CMakeLists with too many custom variables are very hard to read and understand, so keep it simple.DataFrame::DataFrame
ALIAS target, so that users including DataFrame withadd_subdirectory()
can use this target, it's compliant with the imported target in the CMake config file.SOVERSION
for the shared lib as well (I've put the major version, basically it should be the ABI version), not justVERSION
.CXX_VISIBILITY hidden
andVISIBILITY_INLINES_HIDDEN ON
, since it leads to warnings at consume time for AppleClang at least, due to https://github.com/hosseinmoein/DataFrame/blob/31faa919a8a56d57fdce8fef177b4453485aff9d/include/DataFrame/Utils/DateTime.h#L382pthread
andrt
on Linux like systems.dataframe_tester_3
to the tests. Executable was built but not added to CTest.ENABLE_TESTING
to a qualified name:HMDF_TESTING
.And I've also removed 3 tests logs in test folder, I guess you don't want to track these files 😉