ENH: shift to using ADD_SUBDIRECTORY
This commit is contained in:
parent
2f42e93427
commit
2e4258efc1
|
@ -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)
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
PROJECT(Jump)
|
||||
|
||||
SET(CMAKE_IGNORE_DEPENDENCIES_ORDERING 1)
|
||||
SUBDIRS(Executable Library)
|
||||
ADD_SUBDIRECTORY(Executable)
|
||||
ADD_SUBDIRECTORY(Library)
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
SUBDIRS(Static Shared)
|
||||
ADD_SUBDIRECTORY(Static)
|
||||
ADD_SUBDIRECTORY(Shared)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue