From 2e4258efc16a805fb6cc1a42426046f0f015657b Mon Sep 17 00:00:00 2001 From: Ken Martin Date: Wed, 8 Jun 2005 12:26:32 -0400 Subject: [PATCH] ENH: shift to using ADD_SUBDIRECTORY --- Tests/Complex/CMakeLists.txt | 3 ++- Tests/Complex/Executable/CMakeLists.txt | 2 +- Tests/ComplexOneConfig/CMakeLists.txt | 3 ++- .../ComplexOneConfig/Executable/CMakeLists.txt | 2 +- Tests/ComplexRelativePaths/CMakeLists.txt | 3 ++- .../Executable/CMakeLists.txt | 2 +- Tests/Dependency/CMakeLists.txt | 18 +++++++++++++++--- Tests/Jump/CMakeLists.txt | 3 ++- Tests/Jump/Library/CMakeLists.txt | 3 ++- Tests/OutOfSource/SubDir/CMakeLists.txt | 3 ++- Tests/PreOrder/CMakeLists.txt | 2 +- Tests/SimpleInstall/CMakeLists.txt | 2 +- Tests/SimpleInstallS2/CMakeLists.txt | 2 +- Tests/Testing/CMakeLists.txt | 5 ++--- 14 files changed, 35 insertions(+), 18 deletions(-) diff --git a/Tests/Complex/CMakeLists.txt b/Tests/Complex/CMakeLists.txt index 80df627aa..d16d66eef 100644 --- a/Tests/Complex/CMakeLists.txt +++ b/Tests/Complex/CMakeLists.txt @@ -273,7 +273,8 @@ ENDIF(NOT STRING_REGEX_PASSED) # # Create the libs and the main exe # -SUBDIRS(Library Executable) +ADD_SUBDIRECTORY(Library) +ADD_SUBDIRECTORY(Executable) SUBDIR_DEPENDS(Executable Library) EXPORT_LIBRARY_DEPENDENCIES(${Complex_BINARY_DIR}/ComplexLibraryDepends.cmake) INCLUDE(${Complex_BINARY_DIR}/ComplexLibraryDepends.cmake OPTIONAL) diff --git a/Tests/Complex/Executable/CMakeLists.txt b/Tests/Complex/Executable/CMakeLists.txt index 55b02e11a..6c1deb5c7 100644 --- a/Tests/Complex/Executable/CMakeLists.txt +++ b/Tests/Complex/Executable/CMakeLists.txt @@ -65,7 +65,7 @@ ADD_CUSTOM_COMMAND( # has no side-effects on the current Makefile (duplicated source file # due to source list expansion done twice). # -SUBDIRS(Temp) +ADD_SUBDIRECTORY(Temp) # # Extra coverage.Not used. diff --git a/Tests/ComplexOneConfig/CMakeLists.txt b/Tests/ComplexOneConfig/CMakeLists.txt index 80df627aa..d16d66eef 100644 --- a/Tests/ComplexOneConfig/CMakeLists.txt +++ b/Tests/ComplexOneConfig/CMakeLists.txt @@ -273,7 +273,8 @@ ENDIF(NOT STRING_REGEX_PASSED) # # Create the libs and the main exe # -SUBDIRS(Library Executable) +ADD_SUBDIRECTORY(Library) +ADD_SUBDIRECTORY(Executable) SUBDIR_DEPENDS(Executable Library) EXPORT_LIBRARY_DEPENDENCIES(${Complex_BINARY_DIR}/ComplexLibraryDepends.cmake) INCLUDE(${Complex_BINARY_DIR}/ComplexLibraryDepends.cmake OPTIONAL) diff --git a/Tests/ComplexOneConfig/Executable/CMakeLists.txt b/Tests/ComplexOneConfig/Executable/CMakeLists.txt index 55b02e11a..6c1deb5c7 100644 --- a/Tests/ComplexOneConfig/Executable/CMakeLists.txt +++ b/Tests/ComplexOneConfig/Executable/CMakeLists.txt @@ -65,7 +65,7 @@ ADD_CUSTOM_COMMAND( # has no side-effects on the current Makefile (duplicated source file # due to source list expansion done twice). # -SUBDIRS(Temp) +ADD_SUBDIRECTORY(Temp) # # Extra coverage.Not used. diff --git a/Tests/ComplexRelativePaths/CMakeLists.txt b/Tests/ComplexRelativePaths/CMakeLists.txt index 80df627aa..d16d66eef 100644 --- a/Tests/ComplexRelativePaths/CMakeLists.txt +++ b/Tests/ComplexRelativePaths/CMakeLists.txt @@ -273,7 +273,8 @@ ENDIF(NOT STRING_REGEX_PASSED) # # Create the libs and the main exe # -SUBDIRS(Library Executable) +ADD_SUBDIRECTORY(Library) +ADD_SUBDIRECTORY(Executable) SUBDIR_DEPENDS(Executable Library) EXPORT_LIBRARY_DEPENDENCIES(${Complex_BINARY_DIR}/ComplexLibraryDepends.cmake) INCLUDE(${Complex_BINARY_DIR}/ComplexLibraryDepends.cmake OPTIONAL) diff --git a/Tests/ComplexRelativePaths/Executable/CMakeLists.txt b/Tests/ComplexRelativePaths/Executable/CMakeLists.txt index 55b02e11a..6c1deb5c7 100644 --- a/Tests/ComplexRelativePaths/Executable/CMakeLists.txt +++ b/Tests/ComplexRelativePaths/Executable/CMakeLists.txt @@ -65,7 +65,7 @@ ADD_CUSTOM_COMMAND( # has no side-effects on the current Makefile (duplicated source file # due to source list expansion done twice). # -SUBDIRS(Temp) +ADD_SUBDIRECTORY(Temp) # # Extra coverage.Not used. diff --git a/Tests/Dependency/CMakeLists.txt b/Tests/Dependency/CMakeLists.txt index 97eab83e9..49bf88ced 100644 --- a/Tests/Dependency/CMakeLists.txt +++ b/Tests/Dependency/CMakeLists.txt @@ -28,6 +28,18 @@ PROJECT( Dependency ) # Although SixB does not depend on Two, there is a dependency listed # in the corresponding CMakeLists.txt just because of commands used. -SUBDIRS( NoDepA NoDepB NoDepC ) -SUBDIRS( 1 Two Three Four Five Six Seven Eight ) -SUBDIRS( Exec Exec2 Exec3 Exec4 ) +ADD_SUBDIRECTORY(NoDepA) +ADD_SUBDIRECTORY(NoDepB) +ADD_SUBDIRECTORY(NoDepC) +ADD_SUBDIRECTORY(1) +ADD_SUBDIRECTORY(Two) +ADD_SUBDIRECTORY(Three) +ADD_SUBDIRECTORY(Four) +ADD_SUBDIRECTORY(Five) +ADD_SUBDIRECTORY(Six) +ADD_SUBDIRECTORY(Seven) +ADD_SUBDIRECTORY(Eight) +ADD_SUBDIRECTORY(Exec) +ADD_SUBDIRECTORY(Exec2) +ADD_SUBDIRECTORY(Exec3) +ADD_SUBDIRECTORY(Exec4) diff --git a/Tests/Jump/CMakeLists.txt b/Tests/Jump/CMakeLists.txt index 3a506aa48..18776a1eb 100644 --- a/Tests/Jump/CMakeLists.txt +++ b/Tests/Jump/CMakeLists.txt @@ -1,4 +1,5 @@ PROJECT(Jump) SET(CMAKE_IGNORE_DEPENDENCIES_ORDERING 1) -SUBDIRS(Executable Library) +ADD_SUBDIRECTORY(Executable) +ADD_SUBDIRECTORY(Library) diff --git a/Tests/Jump/Library/CMakeLists.txt b/Tests/Jump/Library/CMakeLists.txt index 9d45ea44b..2f78c501c 100644 --- a/Tests/Jump/Library/CMakeLists.txt +++ b/Tests/Jump/Library/CMakeLists.txt @@ -1 +1,2 @@ -SUBDIRS(Static Shared) +ADD_SUBDIRECTORY(Static) +ADD_SUBDIRECTORY(Shared) diff --git a/Tests/OutOfSource/SubDir/CMakeLists.txt b/Tests/OutOfSource/SubDir/CMakeLists.txt index b1d988d9b..02bb9b75c 100644 --- a/Tests/OutOfSource/SubDir/CMakeLists.txt +++ b/Tests/OutOfSource/SubDir/CMakeLists.txt @@ -1,3 +1,4 @@ PROJECT(ANOTHER_PROJ) # subdir to a sibling dir -SUBDIRS(${OutOfSource_SOURCE_DIR}/${KEN}OutOfSourceSubdir) +ADD_SUBDIRECTORY(OutOfSourceSubdir + ${OutOfSource_SOURCE_DIR}/${KEN}OutOfSourceSubdir) diff --git a/Tests/PreOrder/CMakeLists.txt b/Tests/PreOrder/CMakeLists.txt index a4a96fbed..dce1d920f 100644 --- a/Tests/PreOrder/CMakeLists.txt +++ b/Tests/PreOrder/CMakeLists.txt @@ -1,6 +1,6 @@ # a simple test case PROJECT (PreOrder) SET(CMAKE_IGNORE_DEPENDENCIES_ORDERING 1) -SUBDIRS(PREORDER Library) +ADD_SUBDIRECTORY(Library) ADD_EXECUTABLE (simple simple.cxx) TARGET_LINK_LIBRARIES(simple simpleLib) diff --git a/Tests/SimpleInstall/CMakeLists.txt b/Tests/SimpleInstall/CMakeLists.txt index 02c5c3cbd..9fe6848ff 100644 --- a/Tests/SimpleInstall/CMakeLists.txt +++ b/Tests/SimpleInstall/CMakeLists.txt @@ -43,7 +43,7 @@ IF(STAGE2) INSTALL_TARGETS(/bin SimpleInstallS2) ELSE(STAGE2) IF(CMAKE_GENERATOR MATCHES "Makefiles") - SUBDIRS(PREORDER TestSubDir) + ADD_SUBDIRECTORY(TestSubDir) ENDIF(CMAKE_GENERATOR MATCHES "Makefiles") # this is stage 1, so create libraries and modules and install everything diff --git a/Tests/SimpleInstallS2/CMakeLists.txt b/Tests/SimpleInstallS2/CMakeLists.txt index 02c5c3cbd..9fe6848ff 100644 --- a/Tests/SimpleInstallS2/CMakeLists.txt +++ b/Tests/SimpleInstallS2/CMakeLists.txt @@ -43,7 +43,7 @@ IF(STAGE2) INSTALL_TARGETS(/bin SimpleInstallS2) ELSE(STAGE2) IF(CMAKE_GENERATOR MATCHES "Makefiles") - SUBDIRS(PREORDER TestSubDir) + ADD_SUBDIRECTORY(TestSubDir) ENDIF(CMAKE_GENERATOR MATCHES "Makefiles") # this is stage 1, so create libraries and modules and install everything diff --git a/Tests/Testing/CMakeLists.txt b/Tests/Testing/CMakeLists.txt index ab755ace5..9d9cf9ddb 100644 --- a/Tests/Testing/CMakeLists.txt +++ b/Tests/Testing/CMakeLists.txt @@ -48,7 +48,6 @@ ADD_EXECUTABLE(testing testing.cxx) ADD_TEST(testing ${Testing_BINARY_DIR}/bin/testing) # -# Force subdirs -# (coverage) +# skip level test # -SUBDIRS(Sub/Sub2) +ADD_SUBDIRECTORY(Sub/Sub2)