diff options
-rw-r--r-- | Source/kwsys/CMakeLists.txt | 11 | ||||
-rw-r--r-- | Source/kwsys/README.itk | 24 | ||||
-rw-r--r-- | Source/kwsys/README.txt | 7 | ||||
-rw-r--r-- | Source/kwsys/test1.cxx | 7 |
4 files changed, 25 insertions, 24 deletions
diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt index f5df8e2..6edaf3f 100644 --- a/Source/kwsys/CMakeLists.txt +++ b/Source/kwsys/CMakeLists.txt @@ -1,3 +1,8 @@ +IF(NOT KWSYS_NAMESPACE) + SET(KWSYS_NAMESPACE "kwsys") + SET(KWSYS_DEFAULTS 1) +ENDIF(NOT KWSYS_NAMESPACE) + PROJECT(${KWSYS_NAMESPACE}) INCLUDE(${CMAKE_ROOT}/Modules/TestForANSIStreamHeaders.cmake) INCLUDE(${CMAKE_ROOT}/Modules/CheckIncludeFileCXX.cmake) @@ -45,3 +50,9 @@ IF(KWSYS_INCLUDE_INSTALL_DIR) INSTALL_FILES(${KWSYS_INCLUDE_INSTALL_DIR}/${KWSYS_NAMESPACE} FILES ${KWSYS_INCLUDES}) ENDIF(KWSYS_INCLUDE_INSTALL_DIR) + +IF(KWSYS_DEFAULTS) + INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR}/..) + ADD_EXECUTABLE(test1 test1.cxx) + TARGET_LINK_LIBRARIES(test1 ${KWSYS_NAMESPACE}) +ENDIF(KWSYS_DEFAULTS) diff --git a/Source/kwsys/README.itk b/Source/kwsys/README.itk deleted file mode 100644 index 30206d4..0000000 --- a/Source/kwsys/README.itk +++ /dev/null @@ -1,24 +0,0 @@ -KWSys provides a platform-independent API to many common system -features that are implemented differently on every platform. This -library is intended to be shared among many projects. - -How to use KWSys from ITK: - -#include <itkkwsys/SystemTools.hxx> - -bool MyIsDirectory(const char* fname) -{ - return itkkwsys::SystemTools::FileIsDirectory(fname); -} - -How to modify KWSys: - -When adding a method to an existing class, make no mention of ITK. -KWSys has no knowledge of ITK headers or libraries. Please also keep -in mind that KWSys must be able to build on more platforms and -compilers than ITK. Refer to existing code for conventions to ease -this task. - -If you want to add a class, please contact the ITK mailing list for -discussion. Please do not add a class without permission from -Kitware. diff --git a/Source/kwsys/README.txt b/Source/kwsys/README.txt new file mode 100644 index 0000000..4f439d1 --- /dev/null +++ b/Source/kwsys/README.txt @@ -0,0 +1,7 @@ +KWSys provides a platform-independent API to many common system +features that are implemented differently on every platform. This +library is intended to be shared among many projects. + +You are probably reading this file in the source tree of a surrounding +project. In that case, see "../README.kwsys" for details of using +KWSys in your project. diff --git a/Source/kwsys/test1.cxx b/Source/kwsys/test1.cxx new file mode 100644 index 0000000..e46f02c --- /dev/null +++ b/Source/kwsys/test1.cxx @@ -0,0 +1,7 @@ +#include <kwsys/Directory.hxx> + +int main() +{ + kwsys::Directory(); + return 0; +} |