Hello
i just new in cmake in windows. I use gcc/gfortran migw from equation and intel openapi fortran c compiler.
I will try to connect the superlu that have cmakefiles.txt and multi-machine ifdef in slu_cnames.h header.
C preprocessor definition CDEFS in the header file SRC/slu_Cnames.h, we use macros to determine how C routines should be named so that they are callable by Fortran. -DAdd_: Fortran expects a C routine to have an underscore postfixed to the name; -DNoChange: Fortran expects a C routine name to be identical to that compiled by C; -DUpCase: Fortran expects a C routine name to be all uppercase.
The intel openapi use uppercase symbol for linking, the gcc use add underscore _ for linkng.
slu_cnames.h contain…
#ifndef __SUPERLU_CNAMES /* allow multiple inclusions */
#define __SUPERLU_CNAMES
#define ADD_ 0
#define ADD__ 1
#define NOCHANGE 2
#define UPCASE 3
#define OLD_CRAY 4
#define C_CALL 5
#ifdef UpCase
#define F77_CALL_C UPCASE
#endif
#ifdef NoChange
#define F77_CALL_C NOCHANGE
#endif
#ifdef Add_
#define F77_CALL_C ADD_
#endif
#ifdef Add__
#define F77_CALL_C ADD__
#endif
#ifdef _CRAY
#define F77_CALL_C OLD_CRAY
#endif
/* Default */
#ifndef F77_CALL_C
#define F77_CALL_C ADD_
#endif
#if (F77_CALL_C == ADD_)
/*
#endif
#if (F77_CALL_C == UPCASE)
/* BLAS */
#define sswap_ SSWAP
#define saxpy_ SAXPY
#define sasum_ SASUM
#endif
...
for example in gcc i will had no problem
for intel that use intel fortran and intel c i had to removed all ifdef except the UPPERCASE in Slu_cnames.h
Is there any clue to CMAKE to tell intel compiler o use macro UPCASE in header file?