Is there any __VERSION__ predefine for xTIMEcomposer that will yield something like "14.2.4"?
__VERSION__ yields "4.2.1 Compatible Clang 3.6.0" on xTIMEcomposer 14.2.4
Any xTIMEcomposer __VERSION__ like macro?
- aclassifier
- Respected Member
- Posts: 483
- Joined: Wed Apr 25, 2012 8:52 pm
- Contact:
Any xTIMEcomposer __VERSION__ like macro?
--
Øyvind Teig
Trondheim (Norway)
https://www.teigfam.net/oyvind/home/
Øyvind Teig
Trondheim (Norway)
https://www.teigfam.net/oyvind/home/
- infiniteimprobability
- XCore Legend
- Posts: 1126
- Joined: Thu May 27, 2010 10:08 am
- Contact:
- aclassifier
- Respected Member
- Posts: 483
- Joined: Wed Apr 25, 2012 8:52 pm
- Contact:
Thanks, but no! "14.3.1" from __XTIMECOMPOSER__ is on my wish list!
Code: Select all
void test(void)
{
const char version_str [] = __VERSION__;
unsigned xc_val = __XC__;
unsigned xcc_version_major_val = XCC_VERSION_MAJOR;
// unsigned xtimecomposer_str [] = __XTIMECOMPOSER__;
printf("__VERSION__=\"%s\", __XC__=%u, XCC_VERSION_MAJOR=%u\n", version_str, xc_val, xcc_version_major_val);
printf("__VERSION__=\"%s\", __XC__=%u, XCC_VERSION_MAJOR=%u,\n%s\n", __VERSION__, __XC__, XCC_VERSION_MAJOR,
"but xTIMEcomposer is \"Version: Community_14.2.4 (build 15898, Dec-20-2016)\"");
// PRINTS:
/*
__VERSION__="4.2.1 Compatible Clang 3.6.0 ", __XC__=1, XCC_VERSION_MAJOR=1402
__VERSION__="4.2.1 Compatible Clang 3.6.0 ", __XC__=1, XCC_VERSION_MAJOR=1402,
but xTIMEcomposer is "Version: Community_14.2.4 (build 15898, Dec-20-2016)"
*/
}
int main() {
par {
test();
}
return 0;
}
--
Øyvind Teig
Trondheim (Norway)
https://www.teigfam.net/oyvind/home/
Øyvind Teig
Trondheim (Norway)
https://www.teigfam.net/oyvind/home/
As a workaround you can generate a header file containing the version using a Makefile. See the attached example.
Code: Select all
$ xmake
$ xsim bin/main.xe
Community_14.2.4 (build 15898, Dec-20-2016)
- Attachments
-
- version.zip
- (1.69 KiB) Downloaded 320 times
- version.zip
- (1.69 KiB) Downloaded 320 times