[Cmake-commits] [cmake-commits] david.cole committed CMakeLists.txt 1.2 1.3 intentional_compile_error.cxx NONE 1.1 intentional_compile_warning.cxx NONE 1.1

cmake-commits at cmake.org cmake-commits at cmake.org
Thu Oct 15 12:35:56 EDT 2009


Update of /cvsroot/CMake/CMake/Tests/CTestTest/SmallAndFast
In directory public:/mounts/ram/cvs-serv5792/Tests/CTestTest/SmallAndFast

Modified Files:
	CMakeLists.txt 
Added Files:
	intentional_compile_error.cxx intentional_compile_warning.cxx 
Log Message:
Increase ctest coverage. Introduce optionally on intentional compile errors and warnings to the SmallAndFast project. Turn them on for the FailedSubmit tests to cover analyzing LABELS-related errors and warnings.


--- NEW FILE: intentional_compile_warning.cxx ---
#include <stdio.h>

int main(int argc, const char* argv[])
{
  unsigned int i = 0; // "i<argc" should produce a "signed/unsigned comparison" warning
  for (; i<argc; ++i)
  {
    fprintf(stdout, "%s\n", argv[i]);
  }
  return 0;
}

Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/CTestTest/SmallAndFast/CMakeLists.txt,v
retrieving revision 1.2
retrieving revision 1.3
diff -C 2 -d -r1.2 -r1.3
*** CMakeLists.txt	15 Oct 2009 15:51:13 -0000	1.2
--- CMakeLists.txt	15 Oct 2009 16:35:47 -0000	1.3
***************
*** 16,17 ****
--- 16,25 ----
  add_test(test2 echoargs 1 2)
  set_property(TEST test2 APPEND PROPERTY LABELS TestLabel 2ArgTest Everything)
+ 
+ if(SAF_INTENTIONAL_COMPILE_ERROR)
+   add_executable(ice intentional_compile_error.cxx)
+ endif()
+ 
+ if(SAF_INTENTIONAL_COMPILE_WARNING)
+   add_executable(icw intentional_compile_warning.cxx)
+ endif()

--- NEW FILE: intentional_compile_error.cxx ---
garbage - obviously this should not compile as is



More information about the Cmake-commits mailing list