From 7f857775e212436dbca623a4bfe37a20c6c98e0a Mon Sep 17 00:00:00 2001 From: "Daniele E. Domenichelli" Date: Mon, 17 Mar 2014 17:36:14 +0100 Subject: [PATCH] CheckTypeSize: Add unit test to cover the no-C case --- Tests/RunCMake/CheckModules/CheckTypeSizeOkNoC.cmake | 4 ++++ Tests/RunCMake/CheckModules/RunCMakeTest.cmake | 2 ++ 2 files changed, 6 insertions(+) create mode 100644 Tests/RunCMake/CheckModules/CheckTypeSizeOkNoC.cmake diff --git a/Tests/RunCMake/CheckModules/CheckTypeSizeOkNoC.cmake b/Tests/RunCMake/CheckModules/CheckTypeSizeOkNoC.cmake new file mode 100644 index 000000000..b2dcd7f9b --- /dev/null +++ b/Tests/RunCMake/CheckModules/CheckTypeSizeOkNoC.cmake @@ -0,0 +1,4 @@ +enable_language(CXX) +include(CheckTypeSize) +check_type_size(int SIZEOF_INT LANGUAGE CXX) +check_type_size(int SIZEOF_INT BUILTIN_TYPES_ONLY LANGUAGE CXX) diff --git a/Tests/RunCMake/CheckModules/RunCMakeTest.cmake b/Tests/RunCMake/CheckModules/RunCMakeTest.cmake index fda7ebff3..5b4e57edc 100644 --- a/Tests/RunCMake/CheckModules/RunCMakeTest.cmake +++ b/Tests/RunCMake/CheckModules/RunCMakeTest.cmake @@ -12,3 +12,5 @@ run_cmake(CheckTypeSizeUnknownLanguage) run_cmake(CheckTypeSizeMissingLanguage) run_cmake(CheckTypeSizeUnknownArgument) run_cmake(CheckTypeSizeMixedArgs) + +run_cmake(CheckTypeSizeOkNoC)