summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2011-11-22 21:24:04 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2011-11-22 21:24:04 (GMT)
commit7db42fc2559ec2692c36cf25f781f50dd48b7f44 (patch)
tree179875903ac1a344e0f5dbbd70067fb623c7998b
parent7b1b13c8f005362914796e97551800c63bca393a (diff)
parentec358d17a77635a59aa09c5dbd7a6cd3b0cf000d (diff)
downloadCMake-7db42fc2559ec2692c36cf25f781f50dd48b7f44.zip
CMake-7db42fc2559ec2692c36cf25f781f50dd48b7f44.tar.gz
CMake-7db42fc2559ec2692c36cf25f781f50dd48b7f44.tar.bz2
Merge topic 'update-KWIML'
ec358d1 Merge branch 'upstream-kwiml' into update-KWIML b421c24 KWIML: Avoid MSVC linker warning about not using C++ runtime 5796f88 Merge branch 'upstream-kwiml' into update-KWIML ae7cf91 KWIML: Teach ABI.h about PGI compiler aaf3765 Merge branch 'upstream-kwiml' into update-KWIML 9ccd639 KWIML: Ignore _LONGLONG on MS compiler 8be93fc KWIML: Test header inclusion after system headers
-rw-r--r--Utilities/KWIML/ABI.h.in7
-rw-r--r--Utilities/KWIML/test/CMakeLists.txt2
-rw-r--r--Utilities/KWIML/test/test.c4
-rw-r--r--Utilities/KWIML/test/test_include_C.c22
-rw-r--r--Utilities/KWIML/test/test_include_CXX.cxx28
5 files changed, 62 insertions, 1 deletions
diff --git a/Utilities/KWIML/ABI.h.in b/Utilities/KWIML/ABI.h.in
index c4121ff..e95a4ff 100644
--- a/Utilities/KWIML/ABI.h.in
+++ b/Utilities/KWIML/ABI.h.in
@@ -148,6 +148,8 @@ suppression macro @KWIML@_ABI_NO_VERIFY was defined.
# define @KWIML@_ABI_CHAR_IS_SIGNED 1
# elif defined(_SGI_COMPILER_VERSION) /* SGI MIPSpro default */
# define @KWIML@_ABI_CHAR_IS_UNSIGNED 1
+# elif defined(__PGIC__) /* PGI default */
+# define @KWIML@_ABI_CHAR_IS_SIGNED 1
# elif defined(_MSC_VER) /* MSVC default */
# define @KWIML@_ABI_CHAR_IS_SIGNED 1
# elif defined(__WATCOMC__) /* Watcom default */
@@ -216,7 +218,8 @@ suppression macro @KWIML@_ABI_NO_VERIFY was defined.
# endif
#endif
#if !defined(@KWIML@_ABI_SIZEOF_LONG_LONG)
-# if defined(_LONGLONG) /* SGI, some GNU, perhaps others. */
+# if defined(_LONGLONG) /* SGI, some GNU, perhaps others. */ \
+ && !defined(_MSC_VER)
# define @KWIML@_ABI_SIZEOF_LONG_LONG 8
# elif defined(_LONG_LONG) /* IBM XL, perhaps others. */
# define @KWIML@_ABI_SIZEOF_LONG_LONG 8
@@ -230,6 +233,8 @@ suppression macro @KWIML@_ABI_NO_VERIFY was defined.
# define @KWIML@_ABI_SIZEOF_LONG_LONG 8
# elif defined(__HP_cc) || defined(__HP_aCC) /* HP */
# define @KWIML@_ABI_SIZEOF_LONG_LONG 8
+# elif defined(__PGIC__) /* PGI */
+# define @KWIML@_ABI_SIZEOF_LONG_LONG 8
# elif defined(__WATCOMC__) /* Watcom */
# define @KWIML@_ABI_SIZEOF_LONG_LONG 8
# elif defined(__INTEL_COMPILER) /* Intel */
diff --git a/Utilities/KWIML/test/CMakeLists.txt b/Utilities/KWIML/test/CMakeLists.txt
index febc994..a2359cc 100644
--- a/Utilities/KWIML/test/CMakeLists.txt
+++ b/Utilities/KWIML/test/CMakeLists.txt
@@ -35,6 +35,7 @@ if(KWIML_LANGUAGE_C)
list(APPEND test_srcs
test_ABI_C.c
test_INT_C.c
+ test_include_C.c
)
endif()
if(KWIML_LANGUAGE_CXX)
@@ -42,6 +43,7 @@ if(KWIML_LANGUAGE_CXX)
list(APPEND test_srcs
test_ABI_CXX.cxx
test_INT_CXX.cxx
+ test_include_CXX.cxx
)
endif()
diff --git a/Utilities/KWIML/test/test.c b/Utilities/KWIML/test/test.c
index d71a284..131c81f 100644
--- a/Utilities/KWIML/test/test.c
+++ b/Utilities/KWIML/test/test.c
@@ -16,6 +16,8 @@ extern int test_ABI_C(void);
extern int test_INT_C(void);
extern int test_ABI_CXX(void);
extern int test_INT_CXX(void);
+extern int test_include_C(void);
+extern int test_include_CXX(void);
#ifdef __cplusplus
} // extern "C"
#endif
@@ -26,10 +28,12 @@ int main(void)
#ifdef KWIML_LANGUAGE_C
result = test_ABI_C() && result;
result = test_INT_C() && result;
+ result = test_include_C() && result;
#endif
#ifdef KWIML_LANGUAGE_CXX
result = test_ABI_CXX() && result;
result = test_INT_CXX() && result;
+ result = test_include_CXX() && result;
#endif
return result? 0 : 1;
}
diff --git a/Utilities/KWIML/test/test_include_C.c b/Utilities/KWIML/test/test_include_C.c
new file mode 100644
index 0000000..fb3e4cf
--- /dev/null
+++ b/Utilities/KWIML/test/test_include_C.c
@@ -0,0 +1,22 @@
+/*============================================================================
+ Kitware Information Macro Library
+ Copyright 2010-2011 Kitware, Inc.
+
+ Distributed under the OSI-approved BSD License (the "License");
+ see accompanying file Copyright.txt for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even the
+ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License for more information.
+============================================================================*/
+#include <stdio.h>
+
+/* Test KWIML header inclusion after above system headers. */
+#include "test.h"
+#include KWIML_HEADER(ABI.h)
+#include KWIML_HEADER(INT.h)
+
+int test_include_C(void)
+{
+ return 1;
+}
diff --git a/Utilities/KWIML/test/test_include_CXX.cxx b/Utilities/KWIML/test/test_include_CXX.cxx
new file mode 100644
index 0000000..111311a
--- /dev/null
+++ b/Utilities/KWIML/test/test_include_CXX.cxx
@@ -0,0 +1,28 @@
+/*============================================================================
+ Kitware Information Macro Library
+ Copyright 2010-2011 Kitware, Inc.
+
+ Distributed under the OSI-approved BSD License (the "License");
+ see accompanying file Copyright.txt for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even the
+ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License for more information.
+============================================================================*/
+#include <string>
+
+#if defined(_MSC_VER) && defined(NDEBUG)
+// Use C++ runtime to avoid linker warning:
+// warning LNK4089: all references to 'MSVCP71.dll' discarded by /OPT:REF
+std::string test_include_CXX_use_stl_string;
+#endif
+
+/* Test KWIML header inclusion after above system headers. */
+#include "test.h"
+#include KWIML_HEADER(ABI.h)
+#include KWIML_HEADER(INT.h)
+
+extern "C" int test_include_CXX(void)
+{
+ return 1;
+}