Skip to content
Snippets Groups Projects
Commit b1cfaf3f authored by Brad King's avatar Brad King
Browse files

ENH: Setup for testing as a stand-alone project.

parent 59f50bab
No related branches found
No related tags found
No related merge requests found
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)
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.
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.
#include <kwsys/Directory.hxx>
int main()
{
kwsys::Directory();
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment