diff --git a/cmake/ConfigureChecks.cmake b/cmake/ConfigureChecks.cmake index 5182ba808..6b4f0b99f 100644 --- a/cmake/ConfigureChecks.cmake +++ b/cmake/ConfigureChecks.cmake @@ -115,10 +115,24 @@ int main () { " TPARM_TAKES_VARARGS ) -SET(CMAKE_REQUIRED_LIBRARIES) IF(NOT TPARM_TAKES_VARARGS) - SET(TPARM_SOLARIS_KLUDGE 1) + CHECK_CXX_SOURCE_COMPILES(" +${TPARM_INCLUDES} +#define TPARM_VARARGS + +int main () { + tparm( \"\" ); +} +" + TPARM_TAKES_VARARGS_WITH_VARARGS + ) + IF(NOT TPARM_TAKES_VARARGS) + SET(TPARM_SOLARIS_KLUDGE 1) + ELSE() + SET(TPARM_VARARGS 1) + ENDIF() ENDIF() +SET(CMAKE_REQUIRED_LIBRARIES) CHECK_CXX_SOURCE_COMPILES(" #include