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

CMakeLists should not know anything about ccache #249

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

CMakeLists should not know anything about ccache #249

wants to merge 1 commit into from

Conversation

jonesmz
Copy link
Contributor

@jonesmz jonesmz commented Apr 7, 2020

Support for CMAKE_C_COMPILER_LAUNCHER was added in CMake 3.4

@@ -112,6 +112,8 @@ build() {
mkdir -p ${BUILD_DIR}
cd ${BUILD_DIR}
cmake \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like to conform to current behaviour there should be check for the ccache existence. And it would be nice to allow a user to specify a launcher, e.g. maybe somebody wants to use distcc or something custom.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, this is a reasonable request.

I won't be able to get to this today, but sometime this week, probably.

@thed636
Copy link
Contributor

thed636 commented Apr 8, 2020

Hi Michael!

Thanks for the participation! It would be nice to hear from you why CMakeLists should not know anything about ccache.

@jonesmz
Copy link
Contributor Author

jonesmz commented Apr 8, 2020

I have ccache installed on my machine, but don't want the ozo examples to use it while being built.

Automatically discovering the availability of a program, and modifying the compilation process based on that automatic discovery causes surprises for the end-user of the code. It further makes it more difficult for linux distribution packagers, and people trying to consume the code via cmake include subdirectory statements.

@thed636
Copy link
Contributor

thed636 commented Apr 8, 2020

That's a good point!

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