ENH: Setup for testing as a stand-alone project.
This commit is contained in:
parent
6292558f36
commit
332f402191
|
@ -1,3 +1,8 @@
|
||||||
|
IF(NOT KWSYS_NAMESPACE)
|
||||||
|
SET(KWSYS_NAMESPACE "kwsys")
|
||||||
|
SET(KWSYS_DEFAULTS 1)
|
||||||
|
ENDIF(NOT KWSYS_NAMESPACE)
|
||||||
|
|
||||||
PROJECT(${KWSYS_NAMESPACE})
|
PROJECT(${KWSYS_NAMESPACE})
|
||||||
INCLUDE(${CMAKE_ROOT}/Modules/TestForANSIStreamHeaders.cmake)
|
INCLUDE(${CMAKE_ROOT}/Modules/TestForANSIStreamHeaders.cmake)
|
||||||
INCLUDE(${CMAKE_ROOT}/Modules/CheckIncludeFileCXX.cmake)
|
INCLUDE(${CMAKE_ROOT}/Modules/CheckIncludeFileCXX.cmake)
|
||||||
|
@ -45,3 +50,9 @@ IF(KWSYS_INCLUDE_INSTALL_DIR)
|
||||||
INSTALL_FILES(${KWSYS_INCLUDE_INSTALL_DIR}/${KWSYS_NAMESPACE}
|
INSTALL_FILES(${KWSYS_INCLUDE_INSTALL_DIR}/${KWSYS_NAMESPACE}
|
||||||
FILES ${KWSYS_INCLUDES})
|
FILES ${KWSYS_INCLUDES})
|
||||||
ENDIF(KWSYS_INCLUDE_INSTALL_DIR)
|
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)
|
||||||
|
|
|
@ -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.
|
|
|
@ -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.
|
|
@ -0,0 +1,7 @@
|
||||||
|
#include <kwsys/Directory.hxx>
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
kwsys::Directory();
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in New Issue