BUG: Fix find_* search order with path suffixes
[cmake.git] / Source / cmCreateTestSourceList.h
blob9fdc254f16211448eca6ee4336e5f3954a2200d9
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmCreateTestSourceList.h,v $
5 Language: C++
6 Date: $Date: 2008-01-23 15:27:59 $
7 Version: $Revision: 1.16 $
9 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
10 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
17 #ifndef cmCreateTestSourceList_h
18 #define cmCreateTestSourceList_h
20 #include "cmCommand.h"
22 /** \class cmCreateTestSourceList
23 * \brief
27 class cmCreateTestSourceList : public cmCommand
29 public:
30 /**
31 * This is a virtual constructor for the command.
33 virtual cmCommand* Clone()
35 return new cmCreateTestSourceList;
38 /**
39 * This is called when the command is first encountered in
40 * the CMakeLists.txt file.
42 virtual bool InitialPass(std::vector<std::string> const& args,
43 cmExecutionStatus &status);
45 /**
46 * The name of the command as specified in CMakeList.txt.
48 virtual const char* GetName() {return "create_test_sourcelist";}
50 /**
51 * Succinct documentation.
53 virtual const char* GetTerseDocumentation()
55 return "Create a test driver and source list for building test programs.";
58 /**
59 * More documentation.
61 virtual const char* GetFullDocumentation()
63 return
64 " create_test_sourcelist(sourceListName driverName\n"
65 " test1 test2 test3\n"
66 " EXTRA_INCLUDE include.h\n"
67 " FUNCTION function)\n"
68 "A test driver is a program that links together many small tests into "
69 "a single executable. This is useful when building static executables "
70 "with large libraries to shrink the total required size. "
71 "The list of source files "
72 "needed to build the test driver will be in sourceListName. "
73 "DriverName is the name of the test driver program. The rest of "
74 "the arguments consist of a list of test source files, can be "
75 "semicolon separated. Each test source file should have a function in "
76 "it that is the same name as the file with no extension (foo.cxx "
77 "should have int foo(int, char*[]);) DriverName will be able to "
78 "call each of the "
79 "tests by name on the command line. If EXTRA_INCLUDE is specified, "
80 "then the next argument is included into the generated file. If "
81 "FUNCTION is specified, then the next argument is taken as a function "
82 "name that is passed a pointer to ac and av. This can be used to add "
83 "extra command line processing to each test. The cmake variable "
84 "CMAKE_TESTDRIVER_BEFORE_TESTMAIN can be set to have code that will be "
85 "placed directly before calling the test main function. "
86 "CMAKE_TESTDRIVER_AFTER_TESTMAIN can be set to have code that will be "
87 "placed directly after the call to the test main function.";
90 cmTypeMacro(cmCreateTestSourceList, cmCommand);
95 #endif