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

CMake improvements #14

Merged
merged 2 commits into from
Jan 23, 2023
Merged

CMake improvements #14

merged 2 commits into from
Jan 23, 2023

Conversation

gavv
Copy link
Member

@gavv gavv commented Dec 2, 2022

  • tools and tests are created in EXECUTABLE_OUTPUT_PATH (except descr_stats, which have to be inside source dir)

  • EXECUTABLE_OUTPUT_PATH and LIBRARY_OUTPUT_PATH are explicitly marked CACHE

  • descr_stats is excluded from installation, because it is useful when it is located inside perf_eval dir; it is now the only binary that uses PROJECT_SOURCE_DIR as destination

  • eperftool, simple_server, simple_client are by default excluded by installation; new option INSTALL_DEVTOOLS is added; when it's enabled, those tools are installed into CMAKE_INSTALL_FULL_BINDIR

  • .h headers and .pc file are now installed too

  • minimum cmake version is set back to 2.6 to preserve compatibility with outdated environments (which are checked in roc CI)

  • -Ilib_advanced is added to .pc file

  • tests now work and are added to CI

Copy link
Contributor

@dvzrv dvzrv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good and will be an improvement to packaging this project!
I guess this closes #15

- name: Run tests
run: |
cd build
make test
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can do make -C build and drop the cd.
Alternatively: ctest --test-dir build --output-on-failure

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it's used to make it similar with other steps.

CMakeLists.txt Outdated Show resolved Hide resolved
if(CMAKE_MAJOR_VERSION LESS 3)
cmake_minimum_required(VERSION 2.6)
else()
cmake_minimum_required(VERSION 2.8.12)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reason to support a cmake version from 10 years ago? 👀

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's still used on one of the systems on which I'm testing roc (some old raspberry pi). While there's no big maintaining burden, I prefer to keep compatibility with older systems, because often people are too lazy to update them, like me :)

Co-authored-by: David Runge <dave@sleepmap.de>
@gavv gavv merged commit 4a7739f into main Jan 23, 2023
@gavv gavv deleted the cmake branch January 23, 2023 11:21
@gavv
Copy link
Member Author

gavv commented Jan 23, 2023

@dvzrv thanks for review!

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

Successfully merging this pull request may close these issues.

2 participants