From a608e5d58155e600781b390a0fc15d5e045ddabc Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Tue, 11 Dec 2018 21:30:38 +0100 Subject: [PATCH] cmake: Check for TPARM_VARARGS --- cmake/ConfigureChecks.cmake | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) 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