- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'd like to make a Feature Request for a new directive #if exists ( #include "filename.h" ) #endif. Here is example: #if exists ( "immintrin.h" ) #include "immintrin.h" #endif The directive should verify that some file exists in a folder and if Yes should set a "condition-variable" to true. Isn't that a good thing? Please consider and thank you in advance. Best regards, Sergey
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sergey,
If you really think this is a useful new C/C++ language/preprocessor feature I would suggest you propose this to the C and/or C++ standard committees.
Although Intel has implemented some of its own language extensions, these are generally performance extensions to take advantage of Intel chips (like parallel features). And even then we try to get them standardized so users will be able to use them and still have portable code.
Judy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sergey,
Consider writing a Batch or Shell script that runs prior to compilation that creats a header file (header_exists.h) and which you include into your program.
echo // header_exists.h > header_exists.h
if exist immintrin.h echo _immintrin_exist_ > header_exists.h
...
Set your VS build properties to run the script before compilation.
In you application
#include "header_exists.h"
#if defined( _immintrin_exist_)
...
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
oops
>>if exist immintrin.h echo _immintrin_exist_ > header_exists.h
if exist immintrin.h echo #define _immintrin_exist_ > header_exists.h
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page