Very basic stuff working on linux 32-bit with dmd and phobos2.
This commit is contained in:
parent
f23eee9828
commit
67f0225e42
152 changed files with 113 additions and 0 deletions
5
cmaked/CMakeDCompilerABI.d
Normal file
5
cmaked/CMakeDCompilerABI.d
Normal file
|
@ -0,0 +1,5 @@
|
|||
int main( string[] args )
|
||||
{
|
||||
int require = 0;
|
||||
return require;
|
||||
}
|
33
cmaked/CMakeDCompilerId.d.in
Normal file
33
cmaked/CMakeDCompilerId.d.in
Normal file
|
@ -0,0 +1,33 @@
|
|||
#elif defined(__dmd__)
|
||||
# define COMPILER_ID "DMD"
|
||||
|
||||
#elif defined(__gdc__)
|
||||
# define COMPILER_ID "gdc"
|
||||
|
||||
#else /* unknown compiler */
|
||||
# define COMPILER_ID ""
|
||||
#endif
|
||||
|
||||
/* Construct the string literal in pieces to prevent the source from
|
||||
getting matched. Store it in a pointer rather than an array
|
||||
because some compilers will just produce instructions to fill the
|
||||
array rather than assigning a pointer to a static array. */
|
||||
char* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
|
||||
|
||||
@CMAKE_C_COMPILER_ID_PLATFORM_CONTENT@
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef ID_VOID_MAIN
|
||||
void main() {}
|
||||
#else
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
int require = 0;
|
||||
require += info_compiler[argc];
|
||||
require += info_platform[argc];
|
||||
require += info_arch[argc];
|
||||
(void)argv;
|
||||
return require;
|
||||
}
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue