-
Notifications
You must be signed in to change notification settings - Fork 370
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
Have target/host triples "arch-vendor-os" as in autotools #326
Conversation
Many internal functions, e.g. memory_thisjob, require the target triples "arch-vendor-os" as they were supplied with autotools. The file GetTriple.cmake adds functions for retrieving these. The rest of this commit sets the appropriate defines in config.h.in
|
||
# Get os. | ||
if ( "${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows" ) | ||
set( os "win32" ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't just "win" be more correct on current versions of that OS?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not so sure how relevant this actually is, given that NEST is not officially supported on Windows ("we do not tests this regularly [building on Windows] and do not support NEST under Cygwin at present"), but the lines are only relevant, if the host system name is Windows
, then this will default to win32
. In other cases, the CMAKE_HOST_SYSTEM_NAME
will just be cast to lower case. Maybe on a 64bit Windows this will default to win64
- I have not tested this - or on MinGW this will default to mingw32
(as the autoconf counterpart).
This seems like a useful addition to me. See my comments above. 👍 once they are addressed. |
I can confirm that this works nicely with my machine (Debian 8), and our cluster (CentOS 7.1). I can't really comment on the code, so 👍 from me. :) |
if ( "${CMAKE_SYSTEM_NAME}" MATCHES "^Darwin.*") | ||
set( vendor "apple" ) | ||
else () | ||
set( vendor "pc" ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this set vendor to pc also for BlueGene and K?
@heplesser on juqueen this creates the following triples:
target triple looks a bit broken to me?! |
and on K:
this looks fine to me. |
@jakobj That target triple for BG/Q looks a bit strange since the first component is empty and the last part quite long. But all these triples label BG/Q and K as |
For NEST the relevant triple is the target triple, which is only different from the host triplet in the case of cross compiling. The target triplet for BG/Q is now:
For the K computer it is:
|
Many internal functions, e.g.
memory_thisjob
, require the target triples "arch-vendor-os" as they were supplied with autotools. The fileGetTriple.cmake
adds functions for retrieving these. The rest of this PR sets the appropriate defines inconfig.h.in
.I propose @jakobj and @jougs as reviewers.