diff options
author | Brad King <brad.king@kitware.com> | 2003-06-30 12:48:31 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2003-06-30 12:48:31 (GMT) |
commit | a519a991145ac187ca8ccff77f20a569f1564a4d (patch) | |
tree | 2fa726961d1b18fa5f822cd921329a6bc3646668 /Source | |
parent | 0f1af706b5dcb42077c1831df35a8b0e03f26a20 (diff) | |
download | CMake-a519a991145ac187ca8ccff77f20a569f1564a4d.zip CMake-a519a991145ac187ca8ccff77f20a569f1564a4d.tar.gz CMake-a519a991145ac187ca8ccff77f20a569f1564a4d.tar.bz2 |
ENH: Using FOREACH to shorten enabling of C components.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/kwsys/CMakeLists.txt | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt index 4b4f73e..dfb9828 100644 --- a/Source/kwsys/CMakeLists.txt +++ b/Source/kwsys/CMakeLists.txt @@ -75,8 +75,9 @@ IF(NOT KWSYS_NAMESPACE) SET(KWSYS_STANDALONE 1) # Enable all components. - SET(KWSYS_USE_Process 1) + SET(KWSYS_USE_Base64 1) SET(KWSYS_USE_Directory 1) + SET(KWSYS_USE_Process 1) SET(KWSYS_USE_RegularExpression 1) SET(KWSYS_USE_SystemTools 1) ENDIF(NOT KWSYS_NAMESPACE) @@ -208,12 +209,11 @@ FOREACH(c Directory RegularExpression SystemTools) ENDFOREACH(c) # Add selected C components. -IF(KWSYS_USE_Process) - SET(KWSYS_H_FILES ${KWSYS_H_FILES} Process) -ENDIF(KWSYS_USE_Process) -IF(KWSYS_USE_Base64) - SET(KWSYS_H_FILES ${KWSYS_H_FILES} Base64) -ENDIF(KWSYS_USE_Base64) +FOREACH(c Process Base64) + IF(KWSYS_USE_${c}) + SET(KWSYS_H_FILES ${KWSYS_H_FILES} ${c}) + ENDIF(KWSYS_USE_${c}) +ENDFOREACH(c) #----------------------------------------------------------------------------- # Build a list of sources for the library based on components that are @@ -224,16 +224,17 @@ SET(KWSYS_SRCS) IF(KWSYS_USE_Process) IF(NOT UNIX) # Use the Windows implementation. We need the encoded forwarding executable. - SET(KWSYS_SRCS ProcessWin32.c ${CMAKE_CURRENT_BINARY_DIR}/${KWSYS_NAMESPACE}ProcessFwd9xEnc.c) + SET(KWSYS_SRCS ${KWSYS_SRCS} ProcessWin32.c + ${CMAKE_CURRENT_BINARY_DIR}/${KWSYS_NAMESPACE}ProcessFwd9xEnc.c) SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/${KWSYS_NAMESPACE}ProcessFwd9xEnc.c PROPERTIES GENERATED 1) ELSE(NOT UNIX) # Use the UNIX implementation. - SET(KWSYS_SRCS ProcessUNIX.c) + SET(KWSYS_SRCS ${KWSYS_SRCS} ProcessUNIX.c) ENDIF(NOT UNIX) ENDIF(KWSYS_USE_Process) -# Add proper sources for Base64 encoding +# Add sources for Base64 encoding. IF(KWSYS_USE_Base64) SET(KWSYS_SRCS ${KWSYS_SRCS} Base64.c) ENDIF(KWSYS_USE_Base64) |