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

#5667: dont install std algorithm headers multiple times #5670

Merged

Conversation

nmm0
Copy link
Contributor

@nmm0 nmm0 commented Dec 8, 2022

Note that this will install them under <install_dir>/include/std_algorithms. Any code that depends on them being in <install_dir>/include will break.

Fixes #5667

Copy link
Member

@dalg24 dalg24 left a comment

Choose a reason for hiding this comment

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

Thanks for looking into this

@@ -534,7 +534,7 @@ ELSE()
CMAKE_PARSE_ARGUMENTS(PARSE
""
""
"HEADERS;SOURCES"
"HEADERS;SOURCES;NOINSTALLHEADERS"
Copy link
Member

Choose a reason for hiding this comment

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

I don't think that change is needed. Please undo.

Copy link
Contributor

Choose a reason for hiding this comment

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

Are the parsed arguments used at all?

Copy link
Contributor Author

@nmm0 nmm0 Dec 8, 2022

Choose a reason for hiding this comment

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

It is, sadly required because I need to pass it in to tribits, but our function will throw a cmake error on an unrecognized argument in non-tribits mode 🤷

The argument is not used in non-tribits mode. This is yet another thing we will have to strike when we don't ahve to support tribits.

Copy link
Member

Choose a reason for hiding this comment

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

Where is the error emitted from? I thought cmake_parse_arguments allowed for unrecognized arguments.

Copy link
Contributor Author

@nmm0 nmm0 Dec 8, 2022

Choose a reason for hiding this comment

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

Maybe not with multi value keyword args? The documentation doesn't seem to say. I get:

CMake Error at cmake/kokkos_tribits.cmake:18 (if):
  if given arguments:

    "NOINSTALLHEADERS" <all the headers here>

  Unknown arguments specified
Call Stack (most recent call first):
  cmake/kokkos_tribits.cmake:127 (VERIFY_EMPTY)
  cmake/kokkos_tribits.cmake:542 (KOKKOS_INTERNAL_ADD_LIBRARY_INSTALL)
  algorithms/src/CMakeLists.txt:26 (KOKKOS_ADD_INTERFACE_LIBRARY)

Copy link
Member

Choose a reason for hiding this comment

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

I suppose that is fine. Thanks for getting to the bottom of it

Copy link
Contributor

Choose a reason for hiding this comment

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

I still fail to see where the parsed arguments are used below. It seems that only NAME is relevant.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh I see, yes I think we could actually remove the parse arguments. I'm not 100% sure why it is there.

Copy link
Member

Choose a reason for hiding this comment

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

I'd prefer if we removed it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed it entirely

@fnrizzi
Copy link
Contributor

fnrizzi commented Dec 8, 2022

btw, this is not going to affect only the std algorithms but everything under algorithms since you are modifying the algorithm-level cmakefile. right?
i am surprised this was never reported in the past

@nmm0
Copy link
Contributor Author

nmm0 commented Dec 8, 2022

retest this please

@nmm0 nmm0 requested a review from dalg24 December 8, 2022 22:22
@nmm0
Copy link
Contributor Author

nmm0 commented Dec 8, 2022

retest this please

@dalg24
Copy link
Member

dalg24 commented Dec 8, 2022

There was no need to re-run. I would have ignored the Cuda timing based failure :/

@nmm0
Copy link
Contributor Author

nmm0 commented Dec 8, 2022

There was no need to re-run. I would have ignored the Cuda timing based failure :/

:_:

@dalg24 dalg24 merged commit 8303668 into kokkos:develop Dec 9, 2022
ndellingwood pushed a commit to ndellingwood/kokkos that referenced this pull request Dec 19, 2022
…s#5670)

* add ability to provide NOINSTALLHEADERS to kokkos tribits wrapper

* don't install std algorithm headers twice

* cmake: remove parse_arguments from KOKKOS_ADD_INTERFACE_LIBRARY

(cherry picked from commit 8303668)
@ndellingwood
Copy link
Contributor

Cherry-pick to 3.7.02 submitted with #5711

dalg24 added a commit that referenced this pull request Dec 20, 2022
[3.7.02] Dont install std algorithm headers multiple times (#5670)
@PhilMiller PhilMiller added this to the Tentative 4.0 Release milestone Jan 25, 2023
@nmm0 nmm0 mentioned this pull request Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

None yet

6 participants