1 CMAKE_MINIMUM_REQUIRED(VERSION 1.5)
3 # configure the .h file
5 "${CMake_SOURCE_DIR}/Source/cmConfigure.cmake.h.in"
6 "${CMake_BINARY_DIR}/Source/cmConfigure.h"
9 # add the include path to find the .h
11 "${CMake_BINARY_DIR}/Source"
12 "${CMake_SOURCE_DIR}/Source"
15 # let cmake know it is supposed to use it
16 ADD_DEFINITIONS(-DCMAKE_BUILD_WITH_CMAKE)
19 # Sources for CMakeLib
22 cmBootstrapCommands.cxx
35 cmDependsFortranLexer.cxx
36 cmDependsFortranParser.cxx
37 cmDependsFortranParser.h
40 cmDependsJavaLexer.cxx
41 cmDependsJavaParser.cxx
42 cmDependsJavaParserHelper.cxx
43 cmDependsJavaParserHelper.h
47 cmGeneratedFileStream.cxx
51 cmGlobalUnixMakefileGenerator.cxx
52 cmGlobalUnixMakefileGenerator.h
58 cmLocalUnixMakefileGenerator2.cxx
63 cmOrderLinkDirectories.cxx
84 # Kdevelop only works on UNIX and not windows
87 cmGlobalKdevelopGenerator.cxx
88 cmLocalKdevelopGenerator.cxx)
90 # XCode only works on apple
94 cmGlobalXCodeGenerator.cxx
95 cmLocalXCodeGenerator.cxx
96 cmLocalXCodeGenerator.h)
103 cmGlobalBorlandMakefileGenerator.cxx
104 cmGlobalNMakeMakefileGenerator.cxx
105 cmGlobalVisualStudio6Generator.cxx
106 cmLocalVisualStudio6Generator.cxx
107 cmGlobalBorlandMakefileGenerator.h
108 cmGlobalNMakeMakefileGenerator.h
109 cmGlobalVisualStudio6Generator.h
110 cmLocalVisualStudio6Generator.h
111 cmWin32ProcessExecution.cxx
112 cmWin32ProcessExecution.h
116 cmGlobalVisualStudio71Generator.h
117 cmGlobalVisualStudio8Generator.h
118 cmGlobalVisualStudio7Generator.h
119 cmLocalVisualStudio7Generator.h
120 cmGlobalVisualStudio8Generator.cxx
121 cmGlobalVisualStudio71Generator.cxx
122 cmGlobalVisualStudio7Generator.cxx
123 cmLocalVisualStudio7Generator.cxx)
128 # create a library used by the command line and the GUI
129 ADD_LIBRARY(CMakeLib ${SRCS})
130 TARGET_LINK_LIBRARIES(CMakeLib cmsys ${CMAKE_EXPAT_LIBRARIES} cmzlib)
132 TARGET_LINK_LIBRARIES(CMakeLib ${CMAKE_DL_LIBS})
134 IF(CMAKE_BUILD_ON_VISUAL_STUDIO)
135 # On Visual Studio we need rpcrt4.lib for cmVisualStudio7 generator.
136 TARGET_LINK_LIBRARIES(CMakeLib rpcrt4.lib)
137 ENDIF(CMAKE_BUILD_ON_VISUAL_STUDIO)
143 "${CMAKE_SOURCE_DIR}/Source/CTest"
144 ${CMAKE_XMLRPC_INCLUDES}
147 # Sources for CTestLib
149 SET(CMTEST_SRCS cmCTest.cxx
150 CTest/cmCTestGenericHandler.cxx
151 CTest/cmCTestBuildHandler.cxx
152 CTest/cmCTestConfigureHandler.cxx
153 CTest/cmCTestCoverageHandler.cxx
154 CTest/cmCTestScriptHandler.cxx
155 CTest/cmCTestTestHandler.cxx
156 CTest/cmCTestUpdateHandler.cxx
157 CTest/cmCTestEmptyBinaryDirectoryCommand.cxx
158 CTest/cmCTestRunScriptCommand.cxx
159 CTest/cmCTestSleepCommand.cxx
160 CTest/cmCTestStartCommand.cxx
161 CTest/cmCTestUpdateCommand.cxx
162 CTest/cmCTestMemCheckHandler.cxx
163 CTest/cmCTestSubmit.cxx
167 ADD_LIBRARY(CTestLib ${CMTEST_SRCS})
168 TARGET_LINK_LIBRARIES(CTestLib CMakeLib ${CMAKE_CURL_LIBRARIES} ${CMAKE_XMLRPC_LIBRARIES})
170 # Build CMake executable
171 ADD_EXECUTABLE(cmake cmakemain.cxx)
172 TARGET_LINK_LIBRARIES(cmake CMakeLib)
173 ADD_EXECUTABLE(DumpDocumentation cmDumpDocumentation)
174 TARGET_LINK_LIBRARIES(DumpDocumentation CMakeLib)
176 # Build special executable for running programs on Windows 98
179 ADD_EXECUTABLE(cmw9xcom cmw9xcom.cxx)
180 TARGET_LINK_LIBRARIES(cmw9xcom CMakeLib)
184 # Build CTest executable
185 ADD_EXECUTABLE(ctest ctest.cxx)
186 TARGET_LINK_LIBRARIES(ctest CTestLib)
190 INCLUDE (${CMake_SOURCE_DIR}/Modules/FindCurses.cmake OPTIONAL)
192 INCLUDE(${CMake_SOURCE_DIR}/Source/CursesDialog/CMakeLists.txt)
193 ENDIF (CURSES_LIBRARY)
197 # MFC libraries are only available on Visual Studio
198 IF(CMAKE_BUILD_ON_VISUAL_STUDIO)
200 ENDIF(CMAKE_BUILD_ON_VISUAL_STUDIO)
203 OPTION(CMAKE_BUILD_WX_DIALOG "Build wxWidgets dialog for CMake" FALSE)
204 MARK_AS_ADVANCED(CMAKE_BUILD_WX_DIALOG)
205 IF(CMAKE_BUILD_WX_DIALOG)
207 ENDIF(CMAKE_BUILD_WX_DIALOG)
211 SET(MAKEPROGRAM ${CMAKE_MAKE_PROGRAM})
212 ENDIF (NOT DART_ROOT)
215 # This variable is set by cmake, however to
216 # test cmake we want to make sure that
217 # the ctest from this cmake is used for testing
218 # and not the ctest from the cmake building and testing
220 SET(CMAKE_CTEST_COMMAND "${EXECUTABLE_OUTPUT_PATH}/ctest")
222 # Should the long tests be run?
223 OPTION(CMAKE_RUN_LONG_TESTS "Should the long tests be run (such as Bootstrap)." ON)
224 MARK_AS_ADVANCED(CMAKE_RUN_LONG_TESTS)
226 ADD_TEST(CommandLineTest ${CMAKE_CTEST_COMMAND}
228 "${CMake_SOURCE_DIR}/Tests/CommandLineTest"
229 "${CMake_BINARY_DIR}/Tests/CommandLineTest"
231 --build-generator ${CMAKE_GENERATOR}
232 --build-makeprogram ${MAKEPROGRAM}
233 --build-project CommandLineTest
234 --test-command CommandLineTest)
236 ADD_TEST(CustomCommand ${CMAKE_CTEST_COMMAND}
238 "${CMake_SOURCE_DIR}/Tests/CustomCommand"
239 "${CMake_BINARY_DIR}/Tests/CustomCommand"
241 --build-generator ${CMAKE_GENERATOR}
242 --build-project CustomCommand
243 --build-makeprogram ${MAKEPROGRAM}
244 --build-exe-dir "${CMake_BINARY_DIR}/Tests/CustomCommand/bin"
245 --test-command CustomCommand
248 ADD_TEST(FindPackageTest ${CMAKE_CTEST_COMMAND}
250 "${CMake_SOURCE_DIR}/Tests/FindPackageTest"
251 "${CMake_BINARY_DIR}/Tests/FindPackageTest"
253 --build-generator ${CMAKE_GENERATOR}
254 --build-project FindPackageTest
255 --build-makeprogram ${MAKEPROGRAM}
256 --test-command FindPackageTest)
258 ADD_TEST(SystemInformation ${CMAKE_CTEST_COMMAND}
260 "${CMake_SOURCE_DIR}/Tests/SystemInformation"
261 "${CMake_BINARY_DIR}/Tests/SystemInformation"
263 --build-generator ${CMAKE_GENERATOR}
264 --build-project DumpInformation
265 --build-makeprogram ${MAKEPROGRAM}
266 --test-command DumpInformation)
268 ADD_TEST(StringFileTest ${CMAKE_CTEST_COMMAND}
270 "${CMake_SOURCE_DIR}/Tests/StringFileTest"
271 "${CMake_BINARY_DIR}/Tests/StringFileTest"
273 --build-generator ${CMAKE_GENERATOR}
274 --build-project StringFileTest
275 --build-makeprogram ${MAKEPROGRAM}
276 --test-command StringFileTest)
278 ADD_TEST(TryCompile ${CMAKE_CTEST_COMMAND}
280 "${CMake_SOURCE_DIR}/Tests/TryCompile"
281 "${CMake_BINARY_DIR}/Tests/TryCompile"
282 --build-generator ${CMAKE_GENERATOR}
283 --build-project TryCompile
284 --build-makeprogram ${MAKEPROGRAM}
286 --test-command TryCompile)
288 ADD_TEST(simple ${CMAKE_CTEST_COMMAND}
290 "${CMake_SOURCE_DIR}/Tests/Simple"
291 "${CMake_BINARY_DIR}/Tests/Simple"
292 --build-generator ${CMAKE_GENERATOR}
293 --build-project Simple
294 --build-makeprogram ${MAKEPROGRAM}
296 --test-command simple)
298 ADD_TEST(OutOfSource ${CMAKE_CTEST_COMMAND}
300 "${CMake_SOURCE_DIR}/Tests/OutOfSource"
301 "${CMake_BINARY_DIR}/Tests/OutOfSource"
302 --build-generator ${CMAKE_GENERATOR}
303 --build-project OutOfSource
304 --build-makeprogram ${MAKEPROGRAM}
307 "${CMake_BINARY_DIR}/Tests/OutOfSource/SubDir/OutOfSourceSubdir/simple")
309 ADD_TEST(PreOrder ${CMAKE_CTEST_COMMAND}
311 "${CMake_SOURCE_DIR}/Tests/PreOrder"
312 "${CMake_BINARY_DIR}/Tests/PreOrder"
313 --build-generator ${CMAKE_GENERATOR}
314 --build-project PreOrder
315 --build-makeprogram ${MAKEPROGRAM}
317 --test-command simple)
319 ADD_TEST(conly ${CMAKE_CTEST_COMMAND}
321 "${CMake_SOURCE_DIR}/Tests/COnly"
322 "${CMake_BINARY_DIR}/Tests/COnly"
323 --build-generator ${CMAKE_GENERATOR}
324 --build-project conly
325 --build-makeprogram ${MAKEPROGRAM}
327 --test-command conly)
329 SET(SimpleInstallInstallDir
330 "${CMake_BINARY_DIR}/Tests/SimpleInstall/InstallDirectory")
331 ADD_TEST(SimpleInstall ${CMAKE_CTEST_COMMAND}
333 "${CMake_SOURCE_DIR}/Tests/SimpleInstall"
334 "${CMake_BINARY_DIR}/Tests/SimpleInstall"
335 --build-generator ${CMAKE_GENERATOR}
336 --build-project TestSimpleInstall
337 --build-makeprogram ${MAKEPROGRAM}
340 "-DCMAKE_INSTALL_PREFIX:PATH=${SimpleInstallInstallDir}"
341 --test-command ${SimpleInstallInstallDir}/bin/SimpleInstall)
342 ADD_TEST(SimpleInstall-Stage2 ${CMAKE_CTEST_COMMAND}
344 "${CMake_SOURCE_DIR}/Tests/SimpleInstallS2"
345 "${CMake_BINARY_DIR}/Tests/SimpleInstallS2"
346 --build-generator ${CMAKE_GENERATOR}
347 --build-project TestSimpleInstall
348 --build-makeprogram ${MAKEPROGRAM}
351 "-DCMAKE_INSTALL_PREFIX:PATH=${SimpleInstallInstallDir}"
353 --test-command ${SimpleInstallInstallDir}/bin/SimpleInstallS2)
355 ADD_TEST(X11 ${CMAKE_CTEST_COMMAND}
357 "${CMake_SOURCE_DIR}/Tests/X11"
358 "${CMake_BINARY_DIR}/Tests/X11"
359 --build-generator ${CMAKE_GENERATOR}
360 --build-project UseX11
361 --build-makeprogram ${MAKEPROGRAM}
363 --test-command UseX11)
365 ADD_TEST(LoadedCommand ${CMAKE_CTEST_COMMAND}
367 "${CMake_SOURCE_DIR}/Tests/LoadCommand"
368 "${CMake_BINARY_DIR}/Tests/LoadCommand"
369 --build-generator ${CMAKE_GENERATOR}
370 --build-project LoadedCommand
371 --build-makeprogram ${MAKEPROGRAM}
373 --test-command LoadedCommand)
375 ADD_TEST(LoadedCommandOneConfig ${CMAKE_CTEST_COMMAND}
377 "${CMake_SOURCE_DIR}/Tests/LoadCommandOneConfig"
378 "${CMake_BINARY_DIR}/Tests/LoadCommandOneConfig"
379 --build-generator ${CMAKE_GENERATOR}
380 --build-project LoadedCommand
381 --build-makeprogram ${MAKEPROGRAM}
382 --test-command LoadedCommand
385 # Como does not seem to support shared libraries.
386 GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_CXX_COMPILER} NAME_WE)
387 IF(CMAKE_BASE_NAME MATCHES "^como$")
388 SET(COMPILER_IS_COMO 1)
389 ENDIF(CMAKE_BASE_NAME MATCHES "^como$")
390 IF(NOT COMPILER_IS_COMO)
391 ADD_TEST(complex ${CMAKE_CTEST_COMMAND}
393 "${CMake_SOURCE_DIR}/Tests/Complex"
394 "${CMake_BINARY_DIR}/Tests/Complex"
396 --build-generator ${CMAKE_GENERATOR}
397 --build-project complex
398 --build-makeprogram ${MAKEPROGRAM}
399 --build-exe-dir "${CMake_BINARY_DIR}/Tests/Complex/bin"
400 --test-command complex
403 ADD_TEST(complexOneConfig ${CMAKE_CTEST_COMMAND}
405 "${CMake_SOURCE_DIR}/Tests/ComplexOneConfig"
406 "${CMake_BINARY_DIR}/Tests/ComplexOneConfig"
407 --build-generator ${CMAKE_GENERATOR}
408 --build-project complex
409 --build-makeprogram ${MAKEPROGRAM}
410 --build-exe-dir "${CMake_BINARY_DIR}/Tests/ComplexOneConfig/bin"
411 --test-command complex)
413 ADD_TEST(complexRelativePaths ${CMAKE_CTEST_COMMAND}
415 "${CMake_SOURCE_DIR}/Tests/ComplexRelativePaths"
416 "${CMake_BINARY_DIR}/Tests/ComplexRelativePaths"
417 --build-generator ${CMAKE_GENERATOR}
418 --build-project complex
419 --build-makeprogram ${MAKEPROGRAM}
420 --build-exe-dir "${CMake_BINARY_DIR}/Tests/ComplexRelativePaths/bin"
421 --build-options -DCMAKE_USE_RELATIVE_PATHS:BOOL=ON
422 --test-command complex)
424 ENDIF(NOT COMPILER_IS_COMO)
426 ADD_TEST(Example ${CMAKE_CTEST_COMMAND}
428 "${CMake_SOURCE_DIR}/Example"
429 "${CMake_BINARY_DIR}/Example"
430 --build-generator ${CMAKE_GENERATOR}
431 --build-project HELLO
432 --build-makeprogram ${MAKEPROGRAM}
433 --build-exe-dir "${CMake_BINARY_DIR}/Example/Demo"
434 --test-command helloDemo
437 ADD_TEST(testing ${CMAKE_CTEST_COMMAND}
439 "${CMake_SOURCE_DIR}/Tests/Testing"
440 "${CMake_BINARY_DIR}/Tests/Testing"
441 --build-generator ${CMAKE_GENERATOR}
442 --build-project testing
443 --build-makeprogram ${MAKEPROGRAM}
444 --build-exe-dir "${CMake_BINARY_DIR}/Tests/Testing/bin"
445 --test-command testing
448 ADD_TEST(wrapping ${CMAKE_CTEST_COMMAND}
450 "${CMake_SOURCE_DIR}/Tests/Wrapping"
451 "${CMake_BINARY_DIR}/Tests/Wrapping"
452 --build-generator ${CMAKE_GENERATOR}
453 --build-project wrapping
454 --build-makeprogram ${MAKEPROGRAM}
455 --build-exe-dir "${CMake_BINARY_DIR}/Tests/Wrapping/bin"
456 --test-command wrapping
459 INCLUDE ( ${CMAKE_ROOT}/Modules/FindQt.cmake )
466 IF (QT_FOUND AND QT_UIC_EXECUTABLE)
467 ADD_TEST(qtwrapping ${CMAKE_CTEST_COMMAND}
469 "${CMake_SOURCE_DIR}/Tests/Wrapping"
470 "${CMake_BINARY_DIR}/Tests/Wrapping"
471 --build-generator ${CMAKE_GENERATOR}
472 --build-project Wrapping
473 --build-makeprogram ${MAKEPROGRAM}
474 --build-exe-dir "${CMake_BINARY_DIR}/Tests/Wrapping/bin"
475 --test-command qtwrapping
477 ENDIF (QT_FOUND AND QT_UIC_EXECUTABLE)
479 ADD_TEST(testdriver1 ${CMAKE_CTEST_COMMAND}
481 "${CMake_SOURCE_DIR}/Tests/TestDriver"
482 "${CMake_BINARY_DIR}/Tests/TestDriver"
483 --build-generator ${CMAKE_GENERATOR}
484 --build-makeprogram ${MAKEPROGRAM}
485 --build-exe-dir "${CMake_BINARY_DIR}/Tests/Wrapping/bin"
486 --build-project TestDriverTest
487 --test-command TestDriverTest test1
490 ADD_TEST(testdriver2 ${CMAKE_CTEST_COMMAND}
492 "${CMake_SOURCE_DIR}/Tests/TestDriver"
493 "${CMake_BINARY_DIR}/Tests/TestDriver"
494 --build-generator ${CMAKE_GENERATOR}
495 --build-makeprogram ${MAKEPROGRAM}
496 --build-exe-dir "${CMake_BINARY_DIR}/Tests/Wrapping/bin"
497 --build-project TestDriverTest
498 --test-command TestDriverTest test2
501 ADD_TEST(testdriver3 ${CMAKE_CTEST_COMMAND}
503 "${CMake_SOURCE_DIR}/Tests/TestDriver"
504 "${CMake_BINARY_DIR}/Tests/TestDriver"
505 --build-generator ${CMAKE_GENERATOR}
506 --build-makeprogram ${MAKEPROGRAM}
507 --build-exe-dir "${CMake_BINARY_DIR}/Tests/Wrapping/bin"
508 --build-project TestDriverTest
509 --test-command TestDriverTest subdir/test3
512 ADD_TEST(dependency_w_libout ${CMAKE_CTEST_COMMAND}
514 "${CMake_SOURCE_DIR}/Tests/Dependency"
515 "${CMake_BINARY_DIR}/Tests/Dependency/WithLibOut"
516 --build-exe-dir "${CMake_BINARY_DIR}/Tests/Dependency/WithLibOut/Exec"
517 --build-project Dependency
518 --build-generator ${CMAKE_GENERATOR}
519 --build-makeprogram ${MAKEPROGRAM}
521 -DLIBRARY_OUTPUT_PATH:PATH=${CMake_BINARY_DIR}/Tests/Dependency/WithLibOut/Lib
526 ADD_TEST(dependency_wo_lib_out ${CMAKE_CTEST_COMMAND}
528 "${CMake_SOURCE_DIR}/Tests/Dependency"
529 "${CMake_BINARY_DIR}/Tests/Dependency/WOLibOut"
530 --build-exe-dir "${CMake_BINARY_DIR}/Tests/Dependency/WOLibOut/Exec"
531 --build-generator ${CMAKE_GENERATOR}
532 --build-makeprogram ${MAKEPROGRAM}
533 --build-project Dependency
537 ADD_TEST(dependency2 ${CMAKE_CTEST_COMMAND}
539 "${CMake_SOURCE_DIR}/Tests/Dependency"
540 "${CMake_BINARY_DIR}/Tests/Dependency/WithLibOut"
541 --build-exe-dir "${CMake_BINARY_DIR}/Tests/Dependency/WithLibOut/Exec2"
542 --build-generator ${CMAKE_GENERATOR}
543 --build-makeprogram ${MAKEPROGRAM}
544 --build-project Dependency
546 -DLIBRARY_OUTPUT_PATH:PATH=${CMake_BINARY_DIR}/Tests/Dependency/WithLibOut/Lib
550 ADD_TEST(dependency3 ${CMAKE_CTEST_COMMAND}
552 "${CMake_SOURCE_DIR}/Tests/Dependency"
553 "${CMake_BINARY_DIR}/Tests/Dependency/WithLibOut"
554 --build-exe-dir "${CMake_BINARY_DIR}/Tests/Dependency/WithLibOut/Exec3"
555 --build-generator ${CMAKE_GENERATOR}
556 --build-makeprogram ${MAKEPROGRAM}
557 --build-project Dependency
559 -DLIBRARY_OUTPUT_PATH:PATH=${CMake_BINARY_DIR}/Tests/Dependency/WithLibOut/Lib
560 --test-command exec3)
562 ADD_TEST(dependency4 ${CMAKE_CTEST_COMMAND}
564 "${CMake_SOURCE_DIR}/Tests/Dependency"
565 "${CMake_BINARY_DIR}/Tests/Dependency/WithLibOut"
566 --build-exe-dir "${CMake_BINARY_DIR}/Tests/Dependency/WithLibOut/Exec4"
567 --build-generator ${CMAKE_GENERATOR}
568 --build-makeprogram ${MAKEPROGRAM}
569 --build-project Dependency
571 -DLIBRARY_OUTPUT_PATH:PATH=${CMake_BINARY_DIR}/Tests/Dependency/WithLibOut/Lib
575 ADD_TEST(JumpWithLibOut ${CMAKE_CTEST_COMMAND}
577 "${CMake_SOURCE_DIR}/Tests/Jump"
578 "${CMake_BINARY_DIR}/Tests/Jump/WithLibOut"
579 --build-exe-dir "${CMake_BINARY_DIR}/Tests/Jump/WithLibOut/Executable"
581 --build-generator ${CMAKE_GENERATOR}
582 --build-makeprogram ${MAKEPROGRAM}
584 -DLIBRARY_OUTPUT_PATH:PATH=${CMake_BINARY_DIR}/Tests/Jump/WithLibOut/Lib
585 --test-command jumpExecutable
588 ADD_TEST(JumpNoLibOut ${CMAKE_CTEST_COMMAND}
590 "${CMake_SOURCE_DIR}/Tests/Jump"
591 "${CMake_BINARY_DIR}/Tests/Jump/NoLibOut"
592 --build-exe-dir "${CMake_BINARY_DIR}/Tests/Jump/NoLibOut/Executable"
593 --build-run-dir "${CMake_BINARY_DIR}/Tests/Jump/NoLibOut/Executable"
595 --build-generator ${CMAKE_GENERATOR}
596 --build-makeprogram ${MAKEPROGRAM}
597 --test-command jumpExecutable
600 ADD_TEST(linkline ${CMAKE_CTEST_COMMAND}
602 "${CMake_SOURCE_DIR}/Tests/LinkLine"
603 "${CMake_BINARY_DIR}/Tests/LinkLine"
604 --build-exe-dir "${CMake_BINARY_DIR}/Tests/LinkLine"
605 --build-generator ${CMAKE_GENERATOR}
606 --build-makeprogram ${MAKEPROGRAM}
607 --build-project Linkline
611 ADD_TEST(linkorder1 ${CMAKE_CTEST_COMMAND}
613 "${CMake_SOURCE_DIR}/Tests/LinkLineOrder"
614 "${CMake_BINARY_DIR}/Tests/LinkLineOrder"
615 --build-generator ${CMAKE_GENERATOR}
616 --build-makeprogram ${MAKEPROGRAM}
617 --build-exe-dir "${CMake_BINARY_DIR}/Tests/LinkLineOrder"
618 --build-project LinkLineOrder
622 ADD_TEST(linkorder2 ${CMAKE_CTEST_COMMAND}
624 "${CMake_SOURCE_DIR}/Tests/LinkLineOrder"
625 "${CMake_BINARY_DIR}/Tests/LinkLineOrder"
626 --build-exe-dir "${CMake_BINARY_DIR}/Tests/LinkLineOrder"
627 --build-generator ${CMAKE_GENERATOR}
628 --build-makeprogram ${MAKEPROGRAM}
629 --build-project LinkLineOrder
633 ADD_TEST(ExternalOBJ ${CMAKE_CTEST_COMMAND}
635 "${CMake_SOURCE_DIR}/Tests/ExternalOBJ"
636 "${CMake_BINARY_DIR}/Tests/ExternalOBJ"
637 --build-generator ${CMAKE_GENERATOR}
638 --build-project ExternalOBJ
639 --build-makeprogram ${MAKEPROGRAM}
640 --build-exe-dir "${CMake_BINARY_DIR}/ExternalOBJ"
641 --test-command executable
644 ADD_TEST(curl ${CMAKE_CTEST_COMMAND}
646 "${CMake_SOURCE_DIR}/Source/CTest/Curl"
647 "${CMake_BINARY_DIR}/Tests/Curl"
648 --build-generator ${CMAKE_GENERATOR}
649 --build-makeprogram ${MAKEPROGRAM}
650 --build-project LIBCURL
651 --test-command LIBCURL)
653 ADD_TEST(kwsys ${CMAKE_CTEST_COMMAND}
655 "${CMake_SOURCE_DIR}/Source/kwsys"
656 "${CMake_BINARY_DIR}/Tests/kwsys"
657 --build-exe-dir "${CMake_BINARY_DIR}/Tests/kwsys"
658 --build-generator ${CMAKE_GENERATOR}
659 --build-makeprogram ${MAKEPROGRAM}
660 --build-project kwsys
665 ADD_TEST(SubDir ${CMAKE_CTEST_COMMAND}
667 "${CMake_SOURCE_DIR}/Tests/SubDir"
668 "${CMake_BINARY_DIR}/Tests/SubDir"
669 --build-exe-dir "${CMake_BINARY_DIR}/Tests/SubDir/Executable"
670 --build-generator ${CMAKE_GENERATOR}
671 --build-makeprogram ${MAKEPROGRAM}
672 --build-project SUBDIR
674 "${CMake_BINARY_DIR}/Tests/SubDir/ShouldBeHere"
675 "${CMake_BINARY_DIR}/Tests/SubDir/testfromsubdir.obj"
678 ADD_TEST(SubDir ${CMAKE_CTEST_COMMAND}
680 "${CMake_SOURCE_DIR}/Tests/SubDir"
681 "${CMake_BINARY_DIR}/Tests/SubDir"
682 --build-exe-dir "${CMake_BINARY_DIR}/Tests/SubDir/Executable"
683 --build-generator ${CMAKE_GENERATOR}
684 --build-makeprogram ${MAKEPROGRAM}
685 --build-project SUBDIR
687 "${CMake_BINARY_DIR}/Tests/SubDir/ShouldBeHere"
688 "${CMake_BINARY_DIR}/Tests/SubDir/testfromsubdir.o"
692 IF("${CMAKE_GENERATOR}" MATCHES "Makefile")
693 ADD_TEST(MakeClean ${CMAKE_CTEST_COMMAND}
695 "${CMake_SOURCE_DIR}/Tests/MakeClean"
696 "${CMake_BINARY_DIR}/Tests/MakeClean"
697 --build-generator ${CMAKE_GENERATOR}
698 --build-project MakeClean
699 --build-makeprogram ${MAKEPROGRAM}
700 --build-exe-dir "${CMake_BINARY_DIR}/MakeClean"
701 --test-command check_clean
703 ENDIF("${CMAKE_GENERATOR}" MATCHES "Makefile")
705 IF(${CMAKE_GENERATOR} MATCHES "Visual Studio")
706 ADD_TEST(VSExternalInclude ${CMAKE_CTEST_COMMAND}
708 "${CMake_SOURCE_DIR}/Tests/VSExternalInclude"
709 "${CMake_BINARY_DIR}/Tests/VSExternalInclude"
711 --build-generator ${CMAKE_GENERATOR}
712 --build-project VSExternalInclude
713 --build-makeprogram ${MAKEPROGRAM}
714 --test-command VSExternalInclude)
715 ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio")
717 IF (APPLE AND CMAKE_COMPILER_IS_GNUCXX)
718 ADD_TEST(objc++ ${CMAKE_CTEST_COMMAND}
720 "${CMake_SOURCE_DIR}/Tests/Objc++"
721 "${CMake_BINARY_DIR}/Tests/Objc++"
722 --build-generator ${CMAKE_GENERATOR}
723 --build-makeprogram ${MAKEPROGRAM}
724 --build-project objc++
725 --test-command objc++
727 ENDIF (APPLE AND CMAKE_COMPILER_IS_GNUCXX)
729 IF (CTEST_TEST_CTEST AND CMAKE_RUN_LONG_TESTS)
730 CONFIGURE_FILE("${CMake_SOURCE_DIR}/Tests/CTestTest/test.cmake.in"
731 "${CMake_BINARY_DIR}/Tests/CTestTest/test.cmake" @ONLY ESCAPE_QUOTES)
732 ADD_TEST(CTestTest ${CMAKE_CTEST_COMMAND}
733 -S "${CMake_BINARY_DIR}/Tests/CTestTest/test.cmake" -V
735 ENDIF (CTEST_TEST_CTEST AND CMAKE_RUN_LONG_TESTS)
737 IF("${CMAKE_GENERATOR}" MATCHES XCode)
738 SET(CMAKE_SKIP_BOOTSTRAP_TEST 1)
739 ENDIF("${CMAKE_GENERATOR}" MATCHES XCode)
740 IF(UNIX AND CMAKE_RUN_LONG_TESTS AND NOT CMAKE_SKIP_BOOTSTRAP_TEST)
741 ADD_TEST(BootstrapTest ${CMAKE_CTEST_COMMAND}
744 ${CMake_BINARY_DIR}/Tests/BootstrapTest
747 --build-makeprogram ${CMake_SOURCE_DIR}/bootstrap
748 --build-generator "${CMAKE_GENERATOR}"
749 --test-command ${CMake_BINARY_DIR}/Tests/BootstrapTest/Bootstrap.cmk/cmake)
750 ENDIF(UNIX AND CMAKE_RUN_LONG_TESTS AND NOT CMAKE_SKIP_BOOTSTRAP_TEST)
752 IF(CMAKE_GENERATOR MATCHES "Makefiles")
753 # see if we can find a fortran compiler on the machine
754 # if so, add the fortran test and see if it works.
755 SET(CMAKE_Fortran_COMPILER_LIST ifort ifc efc f95 pgf95
756 lf95 xlf95 fort gfortran f90 pgf90 xlf90
757 epcf90 f77 fort77 frt pgf77 xlf fl32 af77 g77 )
758 FIND_PROGRAM(CMAKE_Fortran_COMPILER_FULLPATH NAMES ${CMAKE_Fortran_COMPILER_LIST} )
759 MARK_AS_ADVANCED(CMAKE_Fortran_COMPILER_FULLPATH)
760 IF(CMAKE_Fortran_COMPILER_FULLPATH)
761 ADD_TEST(Fortran ${CMAKE_CTEST_COMMAND}
763 "${CMake_SOURCE_DIR}/Tests/Fortran"
764 "${CMake_BINARY_DIR}/Tests/Fortran"
765 --build-generator ${CMAKE_GENERATOR}
766 --build-project testf
767 --build-makeprogram ${MAKEPROGRAM}
769 --test-command testf)
770 ENDIF(CMAKE_Fortran_COMPILER_FULLPATH)
773 IF(JAVA_COMPILE AND JAVA_RUNTIME AND JAVA_ARCHIVE)
774 GET_FILENAME_COMPONENT(JNIPATH ${JAVA_COMPILE} PATH)
775 FIND_FILE(JNI_H jni.h
776 "${JNIPATH}/../include"
777 "${JNIPATH}/../java/include")
779 FILE(READ "${JNI_H}" JNI_FILE)
780 IF("${JNI_FILE}" MATCHES "JDK1_2")
781 ADD_TEST(Java ${CMAKE_CTEST_COMMAND}
783 "${CMake_SOURCE_DIR}/Tests/Java"
784 "${CMake_BINARY_DIR}/Tests/Java"
785 --build-generator ${CMAKE_GENERATOR}
786 --build-project hello
787 --build-makeprogram ${MAKEPROGRAM}
789 --build-run-dir "${CMake_BINARY_DIR}/Tests/Java/"
790 --test-command ${JAVA_RUNTIME} -classpath hello.jar HelloWorld)
791 ELSE("${JNI_FILE}" MATCHES "JDK1_2")
792 MESSAGE(STATUS "No Java Test because ${JNI_H} does not contain JDK1_2 define")
793 ENDIF("${JNI_FILE}" MATCHES "JDK1_2")
795 MESSAGE(STATUS "No Java Test because jni.h could not be found. tried:\n${JNIPATH}/../include and ${JNIPATH}/../java/include")
797 ENDIF(JAVA_COMPILE AND JAVA_RUNTIME AND JAVA_ARCHIVE)
798 ENDIF(CMAKE_GENERATOR MATCHES "Makefiles")
800 IF (CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE OR WXWINDOWS_INCLUDE_DIR)
801 # Will be set if the wxwindows gui is on
802 ADD_TEST(UseWX ${CMAKE_CTEST_COMMAND}
804 "${CMake_SOURCE_DIR}/Tests/UseWX"
805 "${CMake_BINARY_DIR}/Tests/UseWX"
806 --build-generator ${CMAKE_GENERATOR}
807 --build-makeprogram ${MAKEPROGRAM}
808 --build-exe-dir ${CMake_BINARY_DIR}/Tests/UseWX
809 --build-project UsewxWindows
810 --build-options -DCMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE:FILEPATH=${CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE}
813 ENDIF (CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE OR WXWINDOWS_INCLUDE_DIR)
816 STRING(COMPARE EQUAL "${CMAKE_INSTALL_PREFIX}" "${CMake_BINARY_DIR}/Tests/TestShellInstall/Prefix"
818 IF(PREFIX_IS_FOR_TEST)
820 ${CMake_SOURCE_DIR}/Tests/TestInstall.sh.in
821 ${CMake_BINARY_DIR}/Tests/TestShellInstall/TestInstall.sh
824 ADD_TEST(ShellInstall /bin/sh ${CMake_BINARY_DIR}/Tests/TestShellInstall/TestShellInstall.sh)
825 ENDIF(PREFIX_IS_FOR_TEST)
830 INCLUDE (${CMAKE_BINARY_DIR}/Source/LocalUserOptions.cmake OPTIONAL)
831 INCLUDE (${CMAKE_SOURCE_DIR}/Source/LocalUserOptions.cmake OPTIONAL)
833 INSTALL_TARGETS(/bin cmake)
834 INSTALL_TARGETS(/bin ctest)
835 INSTALL_FILES(${CMAKE_DATA_DIR}/include cmCPluginAPI.h)