On Wednesday 26 January 2011 19:07:57 Michael Jackson wrote: > I _think_ there are issues with generating a file that is later used by > CMake. I think. The other issue is that every time you run CMake (by > default) that file is going to be written, then configured by cmake which > will most likely mean a larger recompile than might be necessary. > > I don't see the problem here. Most projects just have a one-to-one > relationship between the tests that they perform such as looking for > include files, and the entries in their configuration file. > > So if you do a test looking for <sys/types.h> then you would also have an > entry in your config.h.in file like this: > > #cmakedefine01 HAVE_SYSTYPES_H @HAVE_SYSTYPES_H@ > > Yes, this has a large initial "coming up to speed" but once you have it > adding a few more tests is simple and fast. >
Thanks for the advice, Progress so far:- A decenT config.h file is generated as per the instructions you provided. here is the major parts of it:- ####################### /*-------------------------------------------------------------------------- * This file is autogenerated from config.h.in * during the cmake configuration of your project. If you need to make changes * edit the original file NOT THIS FILE. * -------------------------------------------------------------------------- */ #ifndef _CONFIGURATION_HEADER_GUARD_H_ #define _CONFIGURATION_HEADER_GUARD_H_ /* Disable deprecated functions and enums while building */ #define GSL_DISABLE_DEPRECATED 1 /* Define if you have inline with C99 behavior */ #define HAVE_C99_INLINE HAVE_C99_INLINE 0 /* Define to 1 if you have the declaration of `acosh', and to 0 if you don't. */ #define HAVE_DECL_ACOSH HAVE_DECL_ACOSH 1 /* Define to 1 if you have the declaration of `asinh', and to 0 if you don't. */ #define HAVE_DECL_ASINH HAVE_DECL_ASINH 1 /* Define to 1 if you have the declaration of `atanh', and to 0 if you don't. */ #define HAVE_DECL_ATANH HAVE_DECL_ATANH 1 /* Define to 1 if you have the declaration of `expm1', and to 0 if you don't. */ #define HAVE_DECL_EXPM1 HAVE_DECL_EXPM1 1 /* Define to 1 if you have the declaration of `feenableexcept', and to 0 if you don't. */ #define HAVE_DECL_FEENABLEEXCEPT HAVE_DECL_FEENABLEEXCEPT 1 /* Define to 1 if you have the declaration of `fesettrapenable', and to 0 if you don't. */ #define HAVE_DECL_FESETTRAPENABLE HAVE_DECL_FESETTRAPENABLE 0 /* Define to 1 if you have the declaration of `finite', and to 0 if you don't. */ #define HAVE_DECL_FINITE HAVE_DECL_FINITE 1 /* Define to 1 if you have the declaration of `frexp', and to 0 if you don't. */ #define HAVE_DECL_FREXP HAVE_DECL_FREXP 1 /* Define to 1 if you have the declaration of `hypot', and to 0 if you don't. */ #define HAVE_DECL_HYPOT HAVE_DECL_HYPOT 1 /* Define to 1 if you have the declaration of `isfinite', and to 0 if you don't. */ #define HAVE_DECL_ISFINITE HAVE_DECL_ISFINITE 1 /* Define to 1 if you have the declaration of `isinf', and to 0 if you don't. */ #define HAVE_DECL_ISINF HAVE_DECL_ISINF 1 /* Define to 1 if you have the declaration of `isnan', and to 0 if you don't. */ #define HAVE_DECL_ISNAN HAVE_DECL_ISNAN 1 /* Define to 1 if you have the declaration of `ldexp', and to 0 if you don't. */ #define HAVE_DECL_LDEXP HAVE_DECL_LDEXP 1 /* Define to 1 if you have the declaration of `log1p', and to 0 if you don't. */ #define HAVE_DECL_LOG1P HAVE_DECL_LOG1P 1 /* Define to 1 if you have the <dlfcn.h> header file. */ #define HAVE_DLFCN_H HAVE_DLFCN_H 1 /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ #define HAVE_DOPRNT HAVE_DOPRNT 0 /* Defined if you have ansi EXIT_SUCCESS and EXIT_FAILURE in stdlib.h */ #define HAVE_EXIT_SUCCESS_AND_FAILURE HAVE_EXIT_SUCCESS_AND_FAILURE 1 /* Defined on architectures with excess floating-point precision */ #define HAVE_EXTENDED_PRECISION_REGISTERS HAVE_EXTENDED_PRECISION_REGISTERS 1 /* Define if x86 processor has sse extensions. */ #define HAVE_FPU_X86_SSE HAVE_FPU_X86_SSE 1 /* Define to 1 if you have the <ieeefp.h> header file. */ #define HAVE_IEEEFP_H HAVE_IEEEFP_H 0 /* Define this if IEEE comparisons work correctly (e.g. NaN != NaN) */ #define HAVE_IEEE_COMPARISONS HAVE_IEEE_COMPARISONS 1 /* Define this if IEEE denormalized numbers are available */ #define HAVE_IEEE_DENORMALS HAVE_IEEE_DENORMALS 1 /* Define if you have inline */ #define HAVE_INLINE HAVE_INLINE 0 /* Define to 1 if you have the <inttypes.h> header file. */ #define HAVE_INTTYPES_H HAVE_INTTYPES_H 1 /* Define to 1 if you have the `m' library (-lm). */ #define HAVE_LIBM HAVE_LIBM 1 /* Define to 1 if you have the `memcpy' function. */ #define HAVE_MEMCPY HAVE_MEMCPY 1 /* Define to 1 if you have the `memmove' function. */ #define HAVE_MEMMOVE HAVE_MEMMOVE 1 /* Define to 1 if you have the <memory.h> header file. */ #define HAVE_MEMORY_H HAVE_MEMORY_H 1 /* Define this if printf can handle %Lf for long double */ #define HAVE_PRINTF_LONGDOUBLE HAVE_PRINTF_LONGDOUBLE 1 /* Define to 1 if you have the <stdint.h> header file. */ #define HAVE_STDINT_H HAVE_STDINT_H 1 /* Define to 1 if you have the <stdlib.h> header file. */ #define HAVE_STDLIB_H HAVE_STDLIB_H 1 /* Define to 1 if you have the `strdup' function. */ #define HAVE_STRDUP HAVE_STRDUP 1 /* Define to 1 if you have the <strings.h> header file. */ #define HAVE_STRINGS_H HAVE_STRINGS_H 1 /* Define to 1 if you have the <string.h> header file. */ #define HAVE_STRING_H HAVE_STRING_H 1 /* Define to 1 if you have the `strtol' function. */ #define HAVE_STRTOL HAVE_STRTOL 1 /* Define to 1 if you have the `strtoul' function. */ #define HAVE_STRTOUL HAVE_STRTOUL 1 /* Define to 1 if you have the <sys/stat.h> header file. */ #define HAVE_SYS_STAT_H HAVE_SYS_STAT_H 1 /* Define to 1 if you have the <sys/types.h> header file. */ #define HAVE_SYS_TYPES_H HAVE_SYS_TYPES_H 1 /* Define to 1 if you have the <unistd.h> header file. */ #define HAVE_UNISTD_H HAVE_UNISTD_H 1 /* Define to 1 if you have the `vprintf' function. */ #define HAVE_VPRINTF HAVE_VPRINTF 1 /* Define if you need to hide the static definitions of inline functions */ #define HIDE_INLINE_STATIC HIDE_INLINE_STATIC 0 /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR LT_OBJDIR 0 /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 ------- ------- /* Define to 1 if type `char' is unsigned and you are not using gcc. */ #ifndef __CHAR_UNSIGNED__ # undef __CHAR_UNSIGNED__ #endif /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #define inline 0 #endif /* Define to `unsigned int' if <sys/types.h> does not define. */ #define size_t 0 /* Define to empty if the keyword `volatile' does not work. Warning: valid code using `volatile' can become incorrect without. Disable with care. */ #define volatile 0 /* Define one of these if you have a known IEEE arithmetic interface */ ------ ------ #define HAVE_GNUX86_IEEE_INTERFACE HAVE_GNUX86_IEEE_INTERFACE 1 -------- #if HAVE_EXTENDED_PRECISION_REGISTERS #define GSL_COERCE_DBL(x) (gsl_coerce_double(x)) #else #define GSL_COERCE_DBL(x) (x) #endif ------ ----- #endif ################################ the bad news is there is a troublesome section (the last shown) therein leading to cmake errors shown below:- ----------- snippet from the cmake output ~TESTS/gsl-1.14/sys/minmax.c In file included from ~/sys/minmax.c:20: ~/build/config.h:16:1: warning: "HAVE_DECL_ACOSH" redefined <command-line>: warning: this is the location of the previous definition ~/build/config.h:20:1: warning: "HAVE_DECL_ASINH" redefined <command-line>: warning: this is the location of the previous definition ~/build/config.h:24:1: warning: "HAVE_DECL_ATANH" redefined <command-line>: warning: this is the location of the previous definition ~/build/config.h:28:1: warning: "HAVE_DECL_EXPM1" redefined <command-line>: warning: this is the location of the previous definition ~/build/config.h:32:1: warning: "HAVE_DECL_FEENABLEEXCEPT" redefined <command-line>: warning: this is the location of the previous definition ~/build/config.h:48:1: warning: "HAVE_DECL_HYPOT" redefined <command-line>: warning: this is the location of the previous definition ~/build/config.h:52:1: warning: "HAVE_DECL_ISFINITE" redefined <command-line>: warning: this is the location of the previous definition ~/build/config.h:68:1: warning: "HAVE_DECL_LOG1P" redefined <command-line>: warning: this is the location of the previous definition ~/build/config.h:77:1: warning: "HAVE_EXIT_SUCCESS_AND_FAILURE" redefined <command-line>: warning: this is the location of the previous definition ~/build/config.h:89:1: warning: "HAVE_IEEE_COMPARISONS" redefined <command-line>: warning: this is the location of the previous definition ~/build/config.h:92:1: warning: "HAVE_IEEE_DENORMALS" redefined <command-line>: warning: this is the location of the previous definition ~/build/config.h:113:1: warning: "HAVE_PRINTF_LONGDOUBLE" redefined <command-line>: warning: this is the location of the previous definition ~/build/config.h:200:1: warning: "inline" redefined <command-line>: warning: this is the location of the previous definition ~/build/config.h:245:5: error: missing binary operator before token "1" ############ line 245 is this line #if HAVE_EXTENDED_PRECISION_REGISTERS Si I am perplexed where this '1' came from or indeed which '1' is being referred to advice would be appreciaed. sincerely luxInteg _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
