diff options
author | Brad King <brad.king@kitware.com> | 2010-07-29 14:59:27 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2010-07-29 15:22:48 (GMT) |
commit | df1e00ff82c16bf01fdfc889ceea2d05205e14c6 (patch) | |
tree | c71d34a3771012a92f5ae9852f01de51333aa0c3 /Utilities/KWStyle | |
parent | 03b7eff0eacc2b80a85b949eb8031cb5e7a3d393 (diff) | |
download | CMake-df1e00ff82c16bf01fdfc889ceea2d05205e14c6.zip CMake-df1e00ff82c16bf01fdfc889ceea2d05205e14c6.tar.gz CMake-df1e00ff82c16bf01fdfc889ceea2d05205e14c6.tar.bz2 |
Refer to self with CMake_(SOURCE|BINARY)_DIR (#10046)
This is good practice, and is necessary to support building CMake as a
subdirectory of another project.
Diffstat (limited to 'Utilities/KWStyle')
-rw-r--r-- | Utilities/KWStyle/CMake.kws.xml.in | 2 | ||||
-rw-r--r-- | Utilities/KWStyle/CMakeFiles.txt.in | 24 | ||||
-rw-r--r-- | Utilities/KWStyle/CMakeLists.txt | 20 | ||||
-rw-r--r-- | Utilities/KWStyle/CMakeMoreChecks.kws.xml.in | 2 |
4 files changed, 24 insertions, 24 deletions
diff --git a/Utilities/KWStyle/CMake.kws.xml.in b/Utilities/KWStyle/CMake.kws.xml.in index 9c5efee..c2b4429 100644 --- a/Utilities/KWStyle/CMake.kws.xml.in +++ b/Utilities/KWStyle/CMake.kws.xml.in @@ -2,7 +2,7 @@ <Description> <LineLength>79</LineLength> <!-- -<Header>"@CMAKE_SOURCE_DIR@/Utilities/KWStyle/Headers",false,true</Header> +<Header>"@CMake_SOURCE_DIR@/Utilities/KWStyle/Headers",false,true</Header> <Functions> <regex>[A-Z]</regex> <length>100</length> diff --git a/Utilities/KWStyle/CMakeFiles.txt.in b/Utilities/KWStyle/CMakeFiles.txt.in index aa4ee74..a95aac6 100644 --- a/Utilities/KWStyle/CMakeFiles.txt.in +++ b/Utilities/KWStyle/CMakeFiles.txt.in @@ -1,15 +1,15 @@ -"@CMAKE_SOURCE_DIR@/Source/*.txx" -"@CMAKE_SOURCE_DIR@/Source/*.cxx" -"@CMAKE_SOURCE_DIR@/Source/*.h*" -"@CMAKE_SOURCE_DIR@/Source/CPack/*.txx" -"@CMAKE_SOURCE_DIR@/Source/CPack/*.cxx" -"@CMAKE_SOURCE_DIR@/Source/CPack/*.h*" -"@CMAKE_SOURCE_DIR@/Source/CTest/*.txx" -"@CMAKE_SOURCE_DIR@/Source/CTest/*.cxx" -"@CMAKE_SOURCE_DIR@/Source/CTest/*.h*" -"@CMAKE_SOURCE_DIR@/Source/CurseDialog/*.h*" -"@CMAKE_SOURCE_DIR@/Source/CurseDialog/*.cxx" -"@CMAKE_SOURCE_DIR@/Source/CurseDialog/*.txx" +"@CMake_SOURCE_DIR@/Source/*.txx" +"@CMake_SOURCE_DIR@/Source/*.cxx" +"@CMake_SOURCE_DIR@/Source/*.h*" +"@CMake_SOURCE_DIR@/Source/CPack/*.txx" +"@CMake_SOURCE_DIR@/Source/CPack/*.cxx" +"@CMake_SOURCE_DIR@/Source/CPack/*.h*" +"@CMake_SOURCE_DIR@/Source/CTest/*.txx" +"@CMake_SOURCE_DIR@/Source/CTest/*.cxx" +"@CMake_SOURCE_DIR@/Source/CTest/*.h*" +"@CMake_SOURCE_DIR@/Source/CurseDialog/*.h*" +"@CMake_SOURCE_DIR@/Source/CurseDialog/*.cxx" +"@CMake_SOURCE_DIR@/Source/CurseDialog/*.txx" -f (Lexer\.h) -f (Lexer\.cxx) -f (Parser\.cxx) diff --git a/Utilities/KWStyle/CMakeLists.txt b/Utilities/KWStyle/CMakeLists.txt index d8269c6..4803ffa 100644 --- a/Utilities/KWStyle/CMakeLists.txt +++ b/Utilities/KWStyle/CMakeLists.txt @@ -36,27 +36,27 @@ IF(CMAKE_USE_KWSTYLE) SET(KWSTYLE_ARGUMENTS -msvc ${KWSTYLE_ARGUMENTS}) ENDIF(KWSTYLE_USE_MSVC_FORMAT) - CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/Utilities/KWStyle/CMake.kws.xml.in - ${CMAKE_BINARY_DIR}/CMake.kws.xml) - CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/Utilities/KWStyle/CMakeMoreChecks.kws.xml.in - ${CMAKE_BINARY_DIR}/CMakeMoreChecks.kws.xml) + CONFIGURE_FILE(${CMake_SOURCE_DIR}/Utilities/KWStyle/CMake.kws.xml.in + ${CMake_BINARY_DIR}/CMake.kws.xml) + CONFIGURE_FILE(${CMake_SOURCE_DIR}/Utilities/KWStyle/CMakeMoreChecks.kws.xml.in + ${CMake_BINARY_DIR}/CMakeMoreChecks.kws.xml) - CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/Utilities/KWStyle/CMakeFiles.txt.in - ${CMAKE_BINARY_DIR}/CMakeKWSFiles.txt) + CONFIGURE_FILE(${CMake_SOURCE_DIR}/Utilities/KWStyle/CMakeFiles.txt.in + ${CMake_BINARY_DIR}/CMakeKWSFiles.txt) ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_BINARY_DIR}/KWStyleReport.txt + OUTPUT ${CMake_BINARY_DIR}/KWStyleReport.txt COMMAND ${KWSTYLE_EXECUTABLE} - ARGS -xml ${CMAKE_BINARY_DIR}/CMake.kws.xml -o ${CMAKE_SOURCE_DIR}/Utilities/KWStyle/CMakeOverwrite.txt -v ${KWSTYLE_ARGUMENTS} -D ${CMAKE_BINARY_DIR}/CMakeKWSFiles.txt + ARGS -xml ${CMake_BINARY_DIR}/CMake.kws.xml -o ${CMake_SOURCE_DIR}/Utilities/KWStyle/CMakeOverwrite.txt -v ${KWSTYLE_ARGUMENTS} -D ${CMake_BINARY_DIR}/CMakeKWSFiles.txt COMMENT "Coding Style Checker" ) ADD_CUSTOM_TARGET(MoreStyleChecks COMMAND ${KWSTYLE_EXECUTABLE} - -xml ${CMAKE_BINARY_DIR}/CMakeMoreChecks.kws.xml -html ${CMAKE_BINARY_DIR}/html -o ${CMAKE_SOURCE_DIR}/Utilities/KWStyle/CMakeOverwrite.txt -v ${KWSTYLE_ARGUMENTS} -D ${CMAKE_BINARY_DIR}/CMakeKWSFiles.txt + -xml ${CMake_BINARY_DIR}/CMakeMoreChecks.kws.xml -html ${CMake_BINARY_DIR}/html -o ${CMake_SOURCE_DIR}/Utilities/KWStyle/CMakeOverwrite.txt -v ${KWSTYLE_ARGUMENTS} -D ${CMake_BINARY_DIR}/CMakeKWSFiles.txt COMMENT "Coding Style Checker, more checks enabled" ) - ADD_CUSTOM_TARGET(StyleCheck DEPENDS ${CMAKE_BINARY_DIR}/KWStyleReport.txt) + ADD_CUSTOM_TARGET(StyleCheck DEPENDS ${CMake_BINARY_DIR}/KWStyleReport.txt) ENDIF(CMAKE_USE_KWSTYLE) diff --git a/Utilities/KWStyle/CMakeMoreChecks.kws.xml.in b/Utilities/KWStyle/CMakeMoreChecks.kws.xml.in index f47f8e8..b7078e0 100644 --- a/Utilities/KWStyle/CMakeMoreChecks.kws.xml.in +++ b/Utilities/KWStyle/CMakeMoreChecks.kws.xml.in @@ -2,7 +2,7 @@ <Description> <ErrorThreshold>10</ErrorThreshold> <LineLength>79</LineLength> - <Header>"@CMAKE_SOURCE_DIR@/Utilities/KWStyle/Headers",false,true</Header> + <Header>"@CMake_SOURCE_DIR@/Utilities/KWStyle/Headers",false,true</Header> <Functions> <regex>^(cm)?[A-Z]</regex> <length>200</length> |