diff --git a/CMakeCPack.cmake b/CMakeCPack.cmake index c3c25f5605f..9ee56af5770 100644 --- a/CMakeCPack.cmake +++ b/CMakeCPack.cmake @@ -70,12 +70,12 @@ IF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") IF(NOT DEFINED CPACK_PACKAGE_FILE_NAME) # if the CPACK_PACKAGE_FILE_NAME is not defined by the cache - # default to source package - system, on cygwin system is not + # default to source package - system, on cygwin system is not # needed IF(CYGWIN) SET(CPACK_PACKAGE_FILE_NAME "${CPACK_SOURCE_PACKAGE_FILE_NAME}") ELSE(CYGWIN) - SET(CPACK_PACKAGE_FILE_NAME + SET(CPACK_PACKAGE_FILE_NAME "${CPACK_SOURCE_PACKAGE_FILE_NAME}-${CPACK_SYSTEM_NAME}") ENDIF(CYGWIN) ENDIF(NOT DEFINED CPACK_PACKAGE_FILE_NAME) @@ -102,9 +102,9 @@ IF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") SET(CPACK_CYGWIN_PATCH_NUMBER 1) # These files are required by the cmCPackCygwinSourceGenerator and the files # put into the release tar files. - SET(CPACK_CYGWIN_BUILD_SCRIPT + SET(CPACK_CYGWIN_BUILD_SCRIPT "${CMake_BINARY_DIR}/@CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@.sh") - SET(CPACK_CYGWIN_PATCH_FILE + SET(CPACK_CYGWIN_PATCH_FILE "${CMake_BINARY_DIR}/@CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@.patch") # include the sub directory cmake file for cygwin that # configures some files and adds some install targets diff --git a/CMakeCPackOptions.cmake.in b/CMakeCPackOptions.cmake.in index 69a15085135..28b6ec0468e 100644 --- a/CMakeCPackOptions.cmake.in +++ b/CMakeCPackOptions.cmake.in @@ -1,6 +1,6 @@ # This file is configured at cmake time, and loaded at cpack time. # To pass variables to cpack from cmake, they must be configured -# in this file. +# in this file. if(CPACK_GENERATOR MATCHES "NSIS") SET(CPACK_NSIS_INSTALL_ROOT "@CPACK_NSIS_INSTALL_ROOT@") @@ -45,9 +45,9 @@ if(CPACK_GENERATOR MATCHES "CygwinSource") endif(CPACK_GENERATOR MATCHES "CygwinSource") if("${CPACK_GENERATOR}" STREQUAL "PackageMaker") - if(CMAKE_PACKAGE_QTGUI) + if(CMAKE_PACKAGE_QTGUI) set(CPACK_PACKAGE_DEFAULT_LOCATION "/Applications") - else(CMAKE_PACKAGE_QTGUI) + else(CMAKE_PACKAGE_QTGUI) set(CPACK_PACKAGE_DEFAULT_LOCATION "/usr") - endif(CMAKE_PACKAGE_QTGUI) + endif(CMAKE_PACKAGE_QTGUI) endif("${CPACK_GENERATOR}" STREQUAL "PackageMaker") diff --git a/CMakeLists.txt b/CMakeLists.txt index 8522cad28a3..f8d17580dad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -114,11 +114,11 @@ MACRO(CMAKE_SETUP_TESTING) IF (NOT DART_ROOT) SET(MAKEPROGRAM ${CMAKE_MAKE_PROGRAM}) ENDIF (NOT DART_ROOT) - + IF(BUILD_TESTING) - SET(CMAKE_TEST_GENERATOR "" CACHE STRING + SET(CMAKE_TEST_GENERATOR "" CACHE STRING "Generator used when running tests") - SET(CMAKE_TEST_MAKEPROGRAM "" CACHE FILEPATH + SET(CMAKE_TEST_MAKEPROGRAM "" CACHE FILEPATH "Generator used when running tests") IF(NOT CMAKE_TEST_GENERATOR) SET(CMAKE_TEST_GENERATOR "${CMAKE_GENERATOR}") @@ -126,7 +126,7 @@ MACRO(CMAKE_SETUP_TESTING) ELSE(NOT CMAKE_TEST_GENERATOR) SET(CMAKE_TEST_DIFFERENT_GENERATOR TRUE) ENDIF(NOT CMAKE_TEST_GENERATOR) - + # Are we testing with the MSVC compiler? SET(CMAKE_TEST_MSVC 0) IF(MSVC AND NOT CMAKE_TEST_DIFFERENT_GENERATOR) @@ -138,14 +138,14 @@ MACRO(CMAKE_SETUP_TESTING) ENDIF("${CMAKE_TEST_GENERATOR}" MATCHES "NMake" OR "${CMAKE_TEST_GENERATOR}" MATCHES "Visual Studio") ENDIF(MSVC AND NOT CMAKE_TEST_DIFFERENT_GENERATOR) - + SET(CMAKE_TEST_SYSTEM_LIBRARIES 0) FOREACH(util CURL EXPAT XMLRPC ZLIB) IF(CMAKE_USE_SYSTEM_${util}) SET(CMAKE_TEST_SYSTEM_LIBRARIES 1) ENDIF(CMAKE_USE_SYSTEM_${util}) ENDFOREACH(util) - + # This variable is set by cmake, however to # test cmake we want to make sure that # the ctest from this cmake is used for testing @@ -169,7 +169,7 @@ MACRO(CMAKE_SETUP_TESTING) CONFIGURE_FILE(${CMake_SOURCE_DIR}/CTestCustom.ctest.in ${CMake_BINARY_DIR}/CTestCustom.ctest @ONLY) IF(BUILD_TESTING AND DART_ROOT) - CONFIGURE_FILE(${CMake_SOURCE_DIR}/CMakeLogo.gif + CONFIGURE_FILE(${CMake_SOURCE_DIR}/CMakeLogo.gif ${CMake_BINARY_DIR}/Testing/HTML/TestingResults/Icons/Logo.gif COPYONLY) ENDIF(BUILD_TESTING AND DART_ROOT) MARK_AS_ADVANCED(DART_ROOT) @@ -253,18 +253,18 @@ MACRO (CMAKE_BUILD_UTILITIES) ${CMake_BINARY_DIR}/Utilities ${CMake_SOURCE_DIR}/Utilities ) - + # check for the use of system libraries versus builtin ones # (a macro defined in this file) CMAKE_HANDLE_SYSTEM_LIBRARIES() - + #--------------------------------------------------------------------- # Build zlib library for Curl, CMake, and CTest. SET(CMAKE_ZLIB_HEADER "cm_zlib.h") IF(CMAKE_USE_SYSTEM_ZLIB) FIND_PACKAGE(ZLIB) IF(NOT ZLIB_FOUND) - MESSAGE(FATAL_ERROR + MESSAGE(FATAL_ERROR "CMAKE_USE_SYSTEM_ZLIB is ON but a zlib is not found!") ENDIF(NOT ZLIB_FOUND) SET(CMAKE_ZLIB_INCLUDES ${ZLIB_INCLUDE_DIR}) @@ -275,13 +275,13 @@ MACRO (CMAKE_BUILD_UTILITIES) ADD_SUBDIRECTORY(Utilities/cmzlib) CMAKE_SET_TARGET_FOLDER(cmzlib "Utilities/3rdParty") ENDIF(CMAKE_USE_SYSTEM_ZLIB) - + #--------------------------------------------------------------------- # Build Curl library for CTest. IF(CMAKE_USE_SYSTEM_CURL) FIND_PACKAGE(CURL) IF(NOT CURL_FOUND) - MESSAGE(FATAL_ERROR + MESSAGE(FATAL_ERROR "CMAKE_USE_SYSTEM_CURL is ON but a curl is not found!") ENDIF(NOT CURL_FOUND) SET(CMAKE_CURL_INCLUDES ${CURL_INCLUDE_DIRS}) @@ -306,7 +306,7 @@ MACRO (CMAKE_BUILD_UTILITIES) #--------------------------------------------------------------------- # Build Compress library for CTest. - SET(CMAKE_COMPRESS_INCLUDES + SET(CMAKE_COMPRESS_INCLUDES "${CMAKE_CURRENT_BINARY_DIR}/Utilities/cmcompress") SET(CMAKE_COMPRESS_LIBRARIES "cmcompress") ADD_SUBDIRECTORY(Utilities/cmcompress) @@ -314,7 +314,7 @@ MACRO (CMAKE_BUILD_UTILITIES) IF(CMAKE_USE_SYSTEM_BZIP2) FIND_PACKAGE(BZip2) ELSE() - SET(BZIP2_INCLUDE_DIR + SET(BZIP2_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Utilities/cmbzip2") SET(BZIP2_LIBRARIES cmbzip2) ADD_SUBDIRECTORY(Utilities/cmbzip2) @@ -364,7 +364,7 @@ MACRO (CMAKE_BUILD_UTILITIES) ADD_SUBDIRECTORY(Utilities/cmexpat) CMAKE_SET_TARGET_FOLDER(cmexpat "Utilities/3rdParty") ENDIF(CMAKE_USE_SYSTEM_EXPAT) - + #--------------------------------------------------------------------- # Build XMLRPC library for CMake and CTest. IF(CTEST_USE_XMLRPC) @@ -376,7 +376,7 @@ MACRO (CMAKE_BUILD_UTILITIES) SET(CMAKE_XMLRPC_INCLUDES ${XMLRPC_INCLUDE_DIRS}) SET(CMAKE_XMLRPC_LIBRARIES ${XMLRPC_LIBRARIES}) ENDIF(CTEST_USE_XMLRPC) - + #--------------------------------------------------------------------- # Use curses? IF (UNIX) @@ -454,7 +454,7 @@ SET_DIRECTORY_PROPERTIES(PROPERTIES # where to write the resulting executables and libraries SET(BUILD_SHARED_LIBS OFF) SET(EXECUTABLE_OUTPUT_PATH "" CACHE INTERNAL "No configurable exe dir.") -SET(LIBRARY_OUTPUT_PATH "" CACHE INTERNAL +SET(LIBRARY_OUTPUT_PATH "" CACHE INTERNAL "Where to put the libraries for CMake") # The CMake executables usually do not need any rpath to run in the build or @@ -511,12 +511,12 @@ IF("x${CMAKE_TESTS_CDASH_SERVER}" STREQUAL "x") SET(CMAKE_TESTS_CDASH_SERVER "http://www.cdash.org/CDash") ENDIF("x${CMAKE_TESTS_CDASH_SERVER}" STREQUAL "x") -# build the utilities (a macro defined in this file) +# build the utilities (a macro defined in this file) CMAKE_BUILD_UTILITIES() # On NetBSD ncurses is required, since curses doesn't have the wsyncup() # function. ncurses is installed via pkgsrc, so the library is in /usr/pkg/lib, -# which isn't in the default linker search path. So without RPATH ccmake +# which isn't in the default linker search path. So without RPATH ccmake # doesn't run and the build doesn't succeed since ccmake is executed for # generating the documentation. IF(BUILD_CursesDialog) @@ -539,10 +539,10 @@ IF(BUILD_QtDialog) IF(NOT "${ENDCH}" STREQUAL "/") SET(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/") ENDIF(NOT "${ENDCH}" STREQUAL "/") - SET(CMAKE_INSTALL_PREFIX + SET(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}${CMAKE_BUNDLE_NAME}.app/Contents") ENDIF(APPLE) - + SET(QT_NEED_RPATH FALSE) IF(NOT "${QT_LIBRARY_DIR}" STREQUAL "/lib" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/usr/lib" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/lib64" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/usr/lib64") SET(QT_NEED_RPATH TRUE) @@ -551,7 +551,7 @@ ENDIF(BUILD_QtDialog) # The same might be true on other systems for other libraries. -# Then only enable RPATH if we have are building at least with cmake 2.4, +# Then only enable RPATH if we have are building at least with cmake 2.4, # since this one has much better RPATH features than cmake 2.2. # The executables are then built with the RPATH for the libraries outside # the build tree, which is both the build and the install RPATH. @@ -583,7 +583,7 @@ CONFIGURE_FILE( "${CMAKE_CURRENT_BINARY_DIR}/DartLocal.conf" COPYONLY) -OPTION(CMAKE_STRICT +OPTION(CMAKE_STRICT "Perform strict testing to record property and variable access. Can be used to report any undefined properties or variables" OFF) MARK_AS_ADVANCED(CMAKE_STRICT) @@ -600,7 +600,7 @@ CMAKE_SET_TARGET_FOLDER(cmw9xcom "Utilities/Win9xCompat") CMAKE_SET_TARGET_FOLDER(documentation "Documentation") # add a test -ADD_TEST(SystemInformationNew "${CMAKE_CMAKE_COMMAND}" +ADD_TEST(SystemInformationNew "${CMAKE_CMAKE_COMMAND}" --system-information -G "${CMAKE_TEST_GENERATOR}" ) # Install license file as it requires. diff --git a/CTestConfig.cmake b/CTestConfig.cmake index 39032220e33..aaf551a8500 100644 --- a/CTestConfig.cmake +++ b/CTestConfig.cmake @@ -19,7 +19,7 @@ set(CTEST_DROP_SITE_CDASH TRUE) set(CTEST_CDASH_VERSION "1.6") set(CTEST_CDASH_QUERY_VERSION TRUE) -# use old trigger stuff so that cmake 2.4 and below will not +# use old trigger stuff so that cmake 2.4 and below will not # get errors on trigger -SET (TRIGGER_SITE +SET (TRIGGER_SITE "http://public.kitware.com/cgi-bin/Submit-CMake-TestingResults.cgi") diff --git a/CompileFlags.cmake b/CompileFlags.cmake index 3b455b96fc7..65f4c693cc7 100644 --- a/CompileFlags.cmake +++ b/CompileFlags.cmake @@ -27,7 +27,7 @@ ENDIF() # Disable deprecation warnings for standard C functions. # really only needed for newer versions of VS, but should -# not hurt other versions, and this will work into the +# not hurt other versions, and this will work into the # future IF(MSVC OR _INTEL_WINDOWS) ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE) @@ -56,9 +56,9 @@ ENDIF(CMAKE_SYSTEM MATCHES "OSF1-V.*") # use the ansi CXX compile flag for building cmake IF (CMAKE_ANSI_CXXFLAGS) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_ANSI_CXXFLAGS}") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_ANSI_CXXFLAGS}") ENDIF (CMAKE_ANSI_CXXFLAGS) IF (CMAKE_ANSI_CFLAGS) - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}") + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}") ENDIF (CMAKE_ANSI_CFLAGS) diff --git a/Docs/cmake-indent.vim b/Docs/cmake-indent.vim index f149873edbe..a26dd06a250 100644 --- a/Docs/cmake-indent.vim +++ b/Docs/cmake-indent.vim @@ -1,11 +1,11 @@ " ============================================================================= -" +" " Program: CMake - Cross-Platform Makefile Generator " Module: $RCSfile$ " Language: VIM " Date: $Date$ " Version: $Revision$ -" +" " ============================================================================= " Vim indent file diff --git a/Docs/cmake-mode.el b/Docs/cmake-mode.el index 95174551590..478bc7abe34 100644 --- a/Docs/cmake-mode.el +++ b/Docs/cmake-mode.el @@ -34,7 +34,7 @@ ;; cmake executable variable used to run cmake --help-command ;; on commands in cmake-mode ;; -;; cmake-command-help Written by James Bigler +;; cmake-command-help Written by James Bigler ;; (defcustom cmake-mode-cmake-executable "cmake" @@ -191,11 +191,11 @@ the indentation. Otherwise it retains the same position on the line" (setq save-point (point)) (goto-char (point-min)) (while (re-search-forward "^\\([ \t]*\\)\\(\\w+\\)\\([ \t]*(\\)" nil t) - (replace-match - (concat - (match-string 1) - (downcase (match-string 2)) - (match-string 3)) + (replace-match + (concat + (match-string 1) + (downcase (match-string 2)) + (match-string 3)) t)) (goto-char save-point) ) diff --git a/Docs/cmake-syntax.vim b/Docs/cmake-syntax.vim index 80b348eeff5..80395ab1acb 100644 --- a/Docs/cmake-syntax.vim +++ b/Docs/cmake-syntax.vim @@ -36,9 +36,9 @@ syn region cmakeVariableValue start=/\${/ end=/}/ \ contained oneline contains=CONTAINED,cmakeTodo syn region cmakeEnvironment start=/\$ENV{/ end=/}/ \ contained oneline contains=CONTAINED,cmakeTodo -syn region cmakeString start=/"/ end=/"/ +syn region cmakeString start=/"/ end=/"/ \ contains=CONTAINED,cmakeTodo,cmakeOperators -syn region cmakeArguments start=/(/ end=/)/ +syn region cmakeArguments start=/(/ end=/)/ \ contains=ALLBUT,cmakeArguments,cmakeTodo syn keyword cmakeSystemVariables \ WIN32 UNIX APPLE CYGWIN BORLAND MINGW MSVC MSVC_IDE MSVC60 MSVC70 MSVC71 MSVC80 MSVC90 @@ -49,11 +49,11 @@ syn keyword cmakeDeprecated ABSTRACT_FILES BUILD_NAME SOURCE_FILES SOURCE_FILES_ \ nextgroup=cmakeArguments " The keywords are generated as: cmake --help-command-list | tr "\n" " " -syn keyword cmakeStatement +syn keyword cmakeStatement \ ADD_CUSTOM_COMMAND ADD_CUSTOM_TARGET ADD_DEFINITIONS ADD_DEPENDENCIES ADD_EXECUTABLE ADD_LIBRARY ADD_SUBDIRECTORY ADD_TEST AUX_SOURCE_DIRECTORY BUILD_COMMAND BUILD_NAME CMAKE_MINIMUM_REQUIRED CONFIGURE_FILE CREATE_TEST_SOURCELIST ELSE ELSEIF ENABLE_LANGUAGE ENABLE_TESTING ENDFOREACH ENDFUNCTION ENDIF ENDMACRO ENDWHILE EXEC_PROGRAM EXECUTE_PROCESS EXPORT_LIBRARY_DEPENDENCIES FILE FIND_FILE FIND_LIBRARY FIND_PACKAGE FIND_PATH FIND_PROGRAM FLTK_WRAP_UI FOREACH FUNCTION GET_CMAKE_PROPERTY GET_DIRECTORY_PROPERTY GET_FILENAME_COMPONENT GET_SOURCE_FILE_PROPERTY GET_TARGET_PROPERTY GET_TEST_PROPERTY IF INCLUDE INCLUDE_DIRECTORIES INCLUDE_EXTERNAL_MSPROJECT INCLUDE_REGULAR_EXPRESSION INSTALL INSTALL_FILES INSTALL_PROGRAMS INSTALL_TARGETS LINK_DIRECTORIES LINK_LIBRARIES LIST LOAD_CACHE LOAD_COMMAND MACRO MAKE_DIRECTORY MARK_AS_ADVANCED MATH MESSAGE OPTION OUTPUT_REQUIRED_FILES PROJECT QT_WRAP_CPP QT_WRAP_UI REMOVE REMOVE_DEFINITIONS SEPARATE_ARGUMENTS SET SET_DIRECTORY_PROPERTIES SET_SOURCE_FILES_PROPERTIES SET_TARGET_PROPERTIES SET_TESTS_PROPERTIES SITE_NAME SOURCE_GROUP STRING SUBDIR_DEPENDS SUBDIRS TARGET_LINK_LIBRARIES TRY_COMPILE TRY_RUN UNSET USE_MANGLED_MESA UTILITY_SOURCE VARIABLE_REQUIRES VTK_MAKE_INSTANTIATOR VTK_WRAP_JAVA VTK_WRAP_PYTHON VTK_WRAP_TCL WHILE WRITE_FILE \ nextgroup=cmakeArguments -syn keyword cmakeTodo - \ TODO FIXME XXX +syn keyword cmakeTodo + \ TODO FIXME XXX \ contained " Define the default highlighting. diff --git a/Example/Demo/demo.cxx b/Example/Demo/demo.cxx index 31de0386c0c..815c8149e3c 100644 --- a/Example/Demo/demo.cxx +++ b/Example/Demo/demo.cxx @@ -5,6 +5,6 @@ extern Hello hello; int main() { hello.Print(); - + return 0; } diff --git a/Modules/CMakeAddNewLanguage.txt b/Modules/CMakeAddNewLanguage.txt index 203c39dfe25..6a30dd88b88 100644 --- a/Modules/CMakeAddNewLanguage.txt +++ b/Modules/CMakeAddNewLanguage.txt @@ -1,7 +1,7 @@ CMakeDetermine(LANG)Compiler.cmake -> this should find the compiler for LANG and configure CMake(LANG)Compiler.cmake.in CMake(LANG)Compiler.cmake.in -> used by CMakeDetermine(LANG)Compiler.cmake - This file is used to store compiler information and is copied down into try + This file is used to store compiler information and is copied down into try compile directories so that try compiles do not need to re-determine and test the LANG CMakeTest(LANG)Compiler.cmake -> test the compiler and set: diff --git a/Modules/CMakeBackwardCompatibilityC.cmake b/Modules/CMakeBackwardCompatibilityC.cmake index 00e568830d1..60dcb6c0835 100644 --- a/Modules/CMakeBackwardCompatibilityC.cmake +++ b/Modules/CMakeBackwardCompatibilityC.cmake @@ -67,7 +67,7 @@ IF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS) INCLUDE (FindThreads) - SET (CMAKE_THREAD_LIBS "${CMAKE_THREAD_LIBS_INIT}" CACHE STRING + SET (CMAKE_THREAD_LIBS "${CMAKE_THREAD_LIBS_INIT}" CACHE STRING "Thread library used.") SET (CMAKE_USE_PTHREADS "${CMAKE_USE_PTHREADS_INIT}" CACHE BOOL @@ -79,7 +79,7 @@ IF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS) SET (CMAKE_HP_PTHREADS ${CMAKE_HP_PTHREADS_INIT} CACHE BOOL "Use HP pthreads.") - SET (CMAKE_USE_SPROC ${CMAKE_USE_SPROC_INIT} CACHE BOOL + SET (CMAKE_USE_SPROC ${CMAKE_USE_SPROC_INIT} CACHE BOOL "Use sproc libs.") IF(__ERASE_CMAKE_TRY_COMPILE_OSX_ARCHITECTURES) diff --git a/Modules/CMakeBackwardCompatibilityCXX.cmake b/Modules/CMakeBackwardCompatibilityCXX.cmake index 707bbde5035..839c21d5af2 100644 --- a/Modules/CMakeBackwardCompatibilityCXX.cmake +++ b/Modules/CMakeBackwardCompatibilityCXX.cmake @@ -1,5 +1,5 @@ # - define a bunch of backwards compatibility variables -# CMAKE_ANSI_CXXFLAGS - flag for ansi c++ +# CMAKE_ANSI_CXXFLAGS - flag for ansi c++ # CMAKE_HAS_ANSI_STRING_STREAM - has # INCLUDE(TestForANSIStreamHeaders) # INCLUDE(CheckIncludeFileCXX) @@ -37,7 +37,7 @@ IF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS) # if the compiler liked the flag then set CMAKE_ANSI_CXXFLAGS # to the flag IF(CMAKE_CXX_ACCEPTS_FLAGS) - SET(CMAKE_ANSI_CXXFLAGS ${CMAKE_TRY_ANSI_CXX_FLAGS} CACHE INTERNAL + SET(CMAKE_ANSI_CXXFLAGS ${CMAKE_TRY_ANSI_CXX_FLAGS} CACHE INTERNAL "What flags are required by the c++ compiler to make it ansi." ) ENDIF(CMAKE_CXX_ACCEPTS_FLAGS) ENDIF( CMAKE_TRY_ANSI_CXX_FLAGS MATCHES ".+") diff --git a/Modules/CMakeCInformation.cmake b/Modules/CMakeCInformation.cmake index afac7a45268..fab58073143 100644 --- a/Modules/CMakeCInformation.cmake +++ b/Modules/CMakeCInformation.cmake @@ -57,7 +57,7 @@ IF(CMAKE_C_COMPILER_ID) OPTIONAL RESULT_VARIABLE _INCLUDED_FILE) ENDIF(CMAKE_C_COMPILER_ID) IF (NOT _INCLUDED_FILE) - INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} + INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE) ENDIF (NOT _INCLUDED_FILE) # We specify the compiler information in the system file for some @@ -76,7 +76,7 @@ IF(CMAKE_C_SIZEOF_DATA_PTR) ENDIF() # This should be included before the _INIT variables are -# used to initialize the cache. Since the rule variables +# used to initialize the cache. Since the rule variables # have if blocks on them, users can still define them here. # But, it should still be after the platform file so changes can # be made to those values. @@ -103,7 +103,7 @@ IF(NOT CMAKE_MODULE_EXISTS) ENDIF(NOT CMAKE_MODULE_EXISTS) SET(CMAKE_C_FLAGS_INIT "$ENV{CFLAGS} ${CMAKE_C_FLAGS_INIT}") -# avoid just having a space as the initial value for the cache +# avoid just having a space as the initial value for the cache IF(CMAKE_C_FLAGS_INIT STREQUAL " ") SET(CMAKE_C_FLAGS_INIT) ENDIF(CMAKE_C_FLAGS_INIT STREQUAL " ") @@ -113,7 +113,7 @@ SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS_INIT}" CACHE STRING IF(NOT CMAKE_NOT_USING_CONFIG_FLAGS) # default build type is none IF(NOT CMAKE_NO_BUILD_TYPE) - SET (CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE_INIT} CACHE STRING + SET (CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE_INIT} CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.") ENDIF(NOT CMAKE_NO_BUILD_TYPE) SET (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG_INIT}" CACHE STRING @@ -151,13 +151,13 @@ INCLUDE(CMakeCommonLanguageInclude) # # C compiler information -# +# # # # # Static library tools -# +# # diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake index 9dc9cbd3074..7d38c64b892 100644 --- a/Modules/CMakeCXXInformation.cmake +++ b/Modules/CMakeCXXInformation.cmake @@ -75,7 +75,7 @@ IF(CMAKE_CXX_SIZEOF_DATA_PTR) ENDIF() # This should be included before the _INIT variables are -# used to initialize the cache. Since the rule variables +# used to initialize the cache. Since the rule variables # have if blocks on them, users can still define them here. # But, it should still be after the platform file so changes can # be made to those values. @@ -121,7 +121,7 @@ IF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS) ENDIF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS) IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG) - SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG}) + SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG}) ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG) IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP) @@ -198,7 +198,7 @@ ENDFOREACH(type) # use _INIT variables so that this only happens the first time # and you can set these flags in the cmake cache SET(CMAKE_CXX_FLAGS_INIT "$ENV{CXXFLAGS} ${CMAKE_CXX_FLAGS_INIT}") -# avoid just having a space as the initial value for the cache +# avoid just having a space as the initial value for the cache IF(CMAKE_CXX_FLAGS_INIT STREQUAL " ") SET(CMAKE_CXX_FLAGS_INIT) ENDIF(CMAKE_CXX_FLAGS_INIT STREQUAL " ") @@ -241,13 +241,13 @@ INCLUDE(CMakeCommonLanguageInclude) # # CXX compiler information -# +# # # # # Static library tools -# +# # @@ -288,7 +288,7 @@ ENDIF(NOT CMAKE_CXX_LINK_EXECUTABLE) MARK_AS_ADVANCED( CMAKE_BUILD_TOOL -CMAKE_VERBOSE_MAKEFILE +CMAKE_VERBOSE_MAKEFILE CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO diff --git a/Modules/CMakeCommonLanguageInclude.cmake b/Modules/CMakeCommonLanguageInclude.cmake index a2929f1ead6..aa129de6843 100644 --- a/Modules/CMakeCommonLanguageInclude.cmake +++ b/Modules/CMakeCommonLanguageInclude.cmake @@ -23,10 +23,10 @@ SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS_INIT} $ENV{LDFLAGS}" IF(NOT CMAKE_NOT_USING_CONFIG_FLAGS) # default build type is none IF(NOT CMAKE_NO_BUILD_TYPE) - SET (CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE_INIT} CACHE STRING + SET (CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE_INIT} CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.") ENDIF(NOT CMAKE_NO_BUILD_TYPE) - + SET (CMAKE_EXE_LINKER_FLAGS_DEBUG ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT} CACHE STRING "Flags used by the linker during debug builds.") @@ -36,10 +36,10 @@ IF(NOT CMAKE_NOT_USING_CONFIG_FLAGS) SET (CMAKE_EXE_LINKER_FLAGS_RELEASE ${CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT} CACHE STRING "Flags used by the linker during release builds.") - SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO + SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO ${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT} CACHE STRING "Flags used by the linker during Release with Debug Info builds.") - + SET (CMAKE_SHARED_LINKER_FLAGS_DEBUG ${CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT} CACHE STRING "Flags used by the linker during debug builds.") @@ -50,7 +50,7 @@ IF(NOT CMAKE_NOT_USING_CONFIG_FLAGS) SET (CMAKE_SHARED_LINKER_FLAGS_RELEASE ${CMAKE_SHARED_LINKER_FLAGS_RELEASE_INIT} CACHE STRING "Flags used by the linker during release builds.") - SET (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO + SET (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO ${CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT} CACHE STRING "Flags used by the linker during Release with Debug Info builds.") @@ -64,7 +64,7 @@ IF(NOT CMAKE_NOT_USING_CONFIG_FLAGS) SET (CMAKE_MODULE_LINKER_FLAGS_RELEASE ${CMAKE_MODULE_LINKER_FLAGS_RELEASE_INIT} CACHE STRING "Flags used by the linker during release builds.") - SET (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO + SET (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO ${CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT} CACHE STRING "Flags used by the linker during Release with Debug Info builds.") @@ -77,13 +77,13 @@ SET (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS_INIT} $ENV{LDFLAGS}" SET (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS_INIT} $ENV{LDFLAGS}" CACHE STRING "Flags used by the linker during the creation of modules.") -SET(CMAKE_BUILD_TOOL ${CMAKE_MAKE_PROGRAM} CACHE INTERNAL +SET(CMAKE_BUILD_TOOL ${CMAKE_MAKE_PROGRAM} CACHE INTERNAL "What is the target build tool cmake is generating for.") MARK_AS_ADVANCED( CMAKE_BUILD_TOOL -CMAKE_VERBOSE_MAKEFILE +CMAKE_VERBOSE_MAKEFILE CMAKE_EXE_LINKER_FLAGS CMAKE_EXE_LINKER_FLAGS_DEBUG diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake index 45033c2a39a..766289ec3eb 100644 --- a/Modules/CMakeDetermineFortranCompiler.cmake +++ b/Modules/CMakeDetermineFortranCompiler.cmake @@ -15,7 +15,7 @@ # determine the compiler to use for Fortran programs # NOTE, a generator may set CMAKE_Fortran_COMPILER before # loading this file to force a compiler. -# use environment variable FC first if defined by user, next use +# use environment variable FC first if defined by user, next use # the cmake variable CMAKE_GENERATOR_FC which can be defined by a generator # as a default compiler @@ -34,12 +34,12 @@ IF(NOT CMAKE_Fortran_COMPILER) ENDIF(CMAKE_Fortran_FLAGS_ENV_INIT) IF(EXISTS ${CMAKE_Fortran_COMPILER_INIT}) ELSE(EXISTS ${CMAKE_Fortran_COMPILER_INIT}) - MESSAGE(FATAL_ERROR "Could not find compiler set in environment variable FC:\n$ENV{FC}.") + MESSAGE(FATAL_ERROR "Could not find compiler set in environment variable FC:\n$ENV{FC}.") ENDIF(EXISTS ${CMAKE_Fortran_COMPILER_INIT}) ENDIF($ENV{FC} MATCHES ".+") - + # next try prefer the compiler specified by the generator - IF(CMAKE_GENERATOR_FC) + IF(CMAKE_GENERATOR_FC) IF(NOT CMAKE_Fortran_COMPILER_INIT) SET(CMAKE_Fortran_COMPILER_INIT ${CMAKE_GENERATOR_FC}) ENDIF(NOT CMAKE_Fortran_COMPILER_INIT) @@ -64,7 +64,7 @@ IF(NOT CMAKE_Fortran_COMPILER) # ifc: Intel Fortran 95 compiler for Linux/x86 # efc: Intel Fortran 95 compiler for IA64 # - # The order is 95 or newer compilers first, then 90, + # The order is 95 or newer compilers first, then 90, # then 77 or older compilers, gnu is always last in the group, # so if you paid for a compiler it is picked by default. SET(CMAKE_Fortran_COMPILER_LIST @@ -88,7 +88,7 @@ IF(NOT CMAKE_Fortran_COMPILER) ELSE(NOT CMAKE_Fortran_COMPILER) # we only get here if CMAKE_Fortran_COMPILER was specified using -D or a pre-made CMakeCache.txt # (e.g. via ctest) or set in CMAKE_TOOLCHAIN_FILE - # if CMAKE_Fortran_COMPILER is a list of length 2, use the first item as + # if CMAKE_Fortran_COMPILER is a list of length 2, use the first item as # CMAKE_Fortran_COMPILER and the 2nd one as CMAKE_Fortran_COMPILER_ARG1 LIST(LENGTH CMAKE_Fortran_COMPILER _CMAKE_Fortran_COMPILER_LIST_LENGTH) @@ -97,9 +97,9 @@ ELSE(NOT CMAKE_Fortran_COMPILER) LIST(GET CMAKE_Fortran_COMPILER 0 CMAKE_Fortran_COMPILER) ENDIF("${_CMAKE_Fortran_COMPILER_LIST_LENGTH}" EQUAL 2) - # if a compiler was specified by the user but without path, + # if a compiler was specified by the user but without path, # now try to find it with the full path - # if it is found, force it into the cache, + # if it is found, force it into the cache, # if not, don't overwrite the setting (which was given by the user) with "NOTFOUND" # if the C compiler already had a path, reuse it for searching the CXX compiler GET_FILENAME_COMPONENT(_CMAKE_USER_Fortran_COMPILER_PATH "${CMAKE_Fortran_COMPILER}" PATH) @@ -113,7 +113,7 @@ ELSE(NOT CMAKE_Fortran_COMPILER) ENDIF(NOT _CMAKE_USER_Fortran_COMPILER_PATH) ENDIF(NOT CMAKE_Fortran_COMPILER) -MARK_AS_ADVANCED(CMAKE_Fortran_COMPILER) +MARK_AS_ADVANCED(CMAKE_Fortran_COMPILER) # Build a small source file to identify the compiler. IF(${CMAKE_GENERATOR} MATCHES "Visual Studio") diff --git a/Modules/CMakeDetermineJavaCompiler.cmake b/Modules/CMakeDetermineJavaCompiler.cmake index aefcaba3615..e899a1e603a 100644 --- a/Modules/CMakeDetermineJavaCompiler.cmake +++ b/Modules/CMakeDetermineJavaCompiler.cmake @@ -24,21 +24,21 @@ IF(NOT CMAKE_Java_COMPILER) SET(CMAKE_Java_COMPILER_ARG1 "${CMAKE_Java_FLAGS_ENV_INIT}" CACHE STRING "First argument to Java compiler") ENDIF(CMAKE_Java_FLAGS_ENV_INIT) IF(NOT EXISTS ${CMAKE_Java_COMPILER_INIT}) - MESSAGE(SEND_ERROR "Could not find compiler set in environment variable JAVA_COMPILER:\n$ENV{JAVA_COMPILER}.") + MESSAGE(SEND_ERROR "Could not find compiler set in environment variable JAVA_COMPILER:\n$ENV{JAVA_COMPILER}.") ENDIF(NOT EXISTS ${CMAKE_Java_COMPILER_INIT}) ENDIF($ENV{JAVA_COMPILER} MATCHES ".+") IF($ENV{JAVA_RUNTIME} MATCHES ".+") GET_FILENAME_COMPONENT(CMAKE_Java_RUNTIME_INIT $ENV{JAVA_RUNTIME} PROGRAM PROGRAM_ARGS CMAKE_Java_FLAGS_ENV_INIT) IF(NOT EXISTS ${CMAKE_Java_RUNTIME_INIT}) - MESSAGE(SEND_ERROR "Could not find compiler set in environment variable JAVA_RUNTIME:\n$ENV{JAVA_RUNTIME}.") + MESSAGE(SEND_ERROR "Could not find compiler set in environment variable JAVA_RUNTIME:\n$ENV{JAVA_RUNTIME}.") ENDIF(NOT EXISTS ${CMAKE_Java_RUNTIME_INIT}) ENDIF($ENV{JAVA_RUNTIME} MATCHES ".+") IF($ENV{JAVA_ARCHIVE} MATCHES ".+") GET_FILENAME_COMPONENT(CMAKE_Java_ARCHIVE_INIT $ENV{JAVA_ARCHIVE} PROGRAM PROGRAM_ARGS CMAKE_Java_FLAGS_ENV_INIT) IF(NOT EXISTS ${CMAKE_Java_ARCHIVE_INIT}) - MESSAGE(SEND_ERROR "Could not find compiler set in environment variable JAVA_ARCHIVE:\n$ENV{JAVA_ARCHIVE}.") + MESSAGE(SEND_ERROR "Could not find compiler set in environment variable JAVA_ARCHIVE:\n$ENV{JAVA_ARCHIVE}.") ENDIF(NOT EXISTS ${CMAKE_Java_ARCHIVE_INIT}) ENDIF($ENV{JAVA_ARCHIVE} MATCHES ".+") @@ -71,7 +71,7 @@ IF(NOT CMAKE_Java_COMPILER) FIND_PROGRAM(CMAKE_Java_COMPILER NAMES javac PATHS ${Java_BIN_PATH} - ) + ) ENDIF(CMAKE_Java_COMPILER_INIT) # if no runtime has been specified yet, then look for one @@ -81,7 +81,7 @@ IF(NOT CMAKE_Java_COMPILER) FIND_PROGRAM(CMAKE_Java_RUNTIME NAMES java PATHS ${Java_BIN_PATH} - ) + ) ENDIF(CMAKE_Java_RUNTIME_INIT) # if no archive has been specified yet, then look for one @@ -91,12 +91,12 @@ IF(NOT CMAKE_Java_COMPILER) FIND_PROGRAM(CMAKE_Java_ARCHIVE NAMES jar PATHS ${Java_BIN_PATH} - ) + ) ENDIF(CMAKE_Java_ARCHIVE_INIT) ENDIF(NOT CMAKE_Java_COMPILER) -MARK_AS_ADVANCED(CMAKE_Java_COMPILER) +MARK_AS_ADVANCED(CMAKE_Java_COMPILER) # configure variables set in this file for fast reload later on -CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeJavaCompiler.cmake.in +CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeJavaCompiler.cmake.in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeJavaCompiler.cmake IMMEDIATE @ONLY) SET(CMAKE_Java_COMPILER_ENV_VAR "JAVA_COMPILER") diff --git a/Modules/CMakeDetermineRCCompiler.cmake b/Modules/CMakeDetermineRCCompiler.cmake index 8e085af7aac..4662e3ad218 100644 --- a/Modules/CMakeDetermineRCCompiler.cmake +++ b/Modules/CMakeDetermineRCCompiler.cmake @@ -15,7 +15,7 @@ # determine the compiler to use for C programs # NOTE, a generator may set CMAKE_C_COMPILER before # loading this file to force a compiler. -# use environment variable CCC first if defined by user, next use +# use environment variable CCC first if defined by user, next use # the cmake variable CMAKE_GENERATOR_CC which can be defined by a generator # as a default compiler IF(NOT CMAKE_RC_COMPILER) @@ -27,12 +27,12 @@ IF(NOT CMAKE_RC_COMPILER) ENDIF(CMAKE_RC_FLAGS_ENV_INIT) IF(EXISTS ${CMAKE_RC_COMPILER_INIT}) ELSE(EXISTS ${CMAKE_RC_COMPILER_INIT}) - MESSAGE(FATAL_ERROR "Could not find compiler set in environment variable RC:\n$ENV{RC}.") + MESSAGE(FATAL_ERROR "Could not find compiler set in environment variable RC:\n$ENV{RC}.") ENDIF(EXISTS ${CMAKE_RC_COMPILER_INIT}) ENDIF($ENV{RC} MATCHES ".+") - + # next try prefer the compiler specified by the generator - IF(CMAKE_GENERATOR_RC) + IF(CMAKE_GENERATOR_RC) IF(NOT CMAKE_RC_COMPILER_INIT) SET(CMAKE_RC_COMPILER_INIT ${CMAKE_GENERATOR_RC}) ENDIF(NOT CMAKE_RC_COMPILER_INIT) @@ -52,7 +52,7 @@ IF(NOT CMAKE_RC_COMPILER) ENDIF(CMAKE_RC_COMPILER_INIT AND NOT CMAKE_RC_COMPILER) ENDIF(NOT CMAKE_RC_COMPILER) -MARK_AS_ADVANCED(CMAKE_RC_COMPILER) +MARK_AS_ADVANCED(CMAKE_RC_COMPILER) GET_FILENAME_COMPONENT(_CMAKE_RC_COMPILER_NAME_WE ${CMAKE_RC_COMPILER} NAME_WE) IF(_CMAKE_RC_COMPILER_NAME_WE STREQUAL "windres") @@ -62,6 +62,6 @@ ELSE() ENDIF() # configure variables set in this file for fast reload later on -CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeRCCompiler.cmake.in +CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeRCCompiler.cmake.in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeRCCompiler.cmake IMMEDIATE) SET(CMAKE_RC_COMPILER_ENV_VAR "RC") diff --git a/Modules/CMakeDetermineSystem.cmake b/Modules/CMakeDetermineSystem.cmake index 7ae37751793..c89ccd17d19 100644 --- a/Modules/CMakeDetermineSystem.cmake +++ b/Modules/CMakeDetermineSystem.cmake @@ -19,24 +19,24 @@ # # Expected uname -s output: # -# AIX AIX -# BSD/OS BSD/OS -# FreeBSD FreeBSD -# HP-UX HP-UX -# IRIX IRIX -# Linux Linux +# AIX AIX +# BSD/OS BSD/OS +# FreeBSD FreeBSD +# HP-UX HP-UX +# IRIX IRIX +# Linux Linux # GNU/kFreeBSD GNU/kFreeBSD -# NetBSD NetBSD -# OpenBSD OpenBSD -# OFS/1 (Digital Unix) OSF1 -# SCO OpenServer 5 SCO_SV -# SCO UnixWare 7 UnixWare -# SCO UnixWare (pre release 7) UNIX_SV -# SCO XENIX Xenix -# Solaris SunOS -# SunOS SunOS -# Tru64 Tru64 -# Ultrix ULTRIX +# NetBSD NetBSD +# OpenBSD OpenBSD +# OFS/1 (Digital Unix) OSF1 +# SCO OpenServer 5 SCO_SV +# SCO UnixWare 7 UnixWare +# SCO UnixWare (pre release 7) UNIX_SV +# SCO XENIX Xenix +# Solaris SunOS +# SunOS SunOS +# Tru64 Tru64 +# Ultrix ULTRIX # cygwin CYGWIN_NT-5.1 # MacOSX Darwin @@ -61,7 +61,7 @@ IF(CMAKE_HOST_UNIX) RETURN_VALUE val) ENDIF("${val}" GREATER 0) ENDIF() - # check the return of the last uname -m or -p + # check the return of the last uname -m or -p IF("${val}" GREATER 0) SET(CMAKE_HOST_SYSTEM_PROCESSOR "unknown") ENDIF("${val}" GREATER 0) @@ -79,7 +79,7 @@ ENDIF(CMAKE_HOST_UNIX) # if a toolchain file is used, the user wants to cross compile. # in this case read the toolchain file and keep the CMAKE_HOST_SYSTEM_* -# variables around so they can be used in CMakeLists.txt. +# variables around so they can be used in CMakeLists.txt. # In all other cases, the host and target platform are the same. IF(CMAKE_TOOLCHAIN_FILE) # at first try to load it as path relative to the directory from which cmake has been run @@ -92,7 +92,7 @@ IF(CMAKE_TOOLCHAIN_FILE) IF(_INCLUDED_TOOLCHAIN_FILE) SET(CMAKE_TOOLCHAIN_FILE "${_INCLUDED_TOOLCHAIN_FILE}" CACHE FILEPATH "The CMake toolchain file" FORCE) ELSE(_INCLUDED_TOOLCHAIN_FILE) - MESSAGE(FATAL_ERROR "Could not find toolchain file: ${CMAKE_TOOLCHAIN_FILE}") + MESSAGE(FATAL_ERROR "Could not find toolchain file: ${CMAKE_TOOLCHAIN_FILE}") SET(CMAKE_TOOLCHAIN_FILE "NOTFOUND" CACHE FILEPATH "The CMake toolchain file" FORCE) ENDIF(_INCLUDED_TOOLCHAIN_FILE) ENDIF(CMAKE_TOOLCHAIN_FILE) @@ -130,7 +130,7 @@ MACRO(ADJUST_CMAKE_SYSTEM_VARIABLES _PREFIX) SET(${_PREFIX}_NAME kFreeBSD) ENDIF(${_PREFIX}_NAME MATCHES kFreeBSD) - # fix for CYGWIN which has windows version in it + # fix for CYGWIN which has windows version in it IF(${_PREFIX}_NAME MATCHES CYGWIN) SET(${_PREFIX}_NAME CYGWIN) ENDIF(${_PREFIX}_NAME MATCHES CYGWIN) @@ -147,17 +147,17 @@ ENDMACRO(ADJUST_CMAKE_SYSTEM_VARIABLES _PREFIX) ADJUST_CMAKE_SYSTEM_VARIABLES(CMAKE_SYSTEM) ADJUST_CMAKE_SYSTEM_VARIABLES(CMAKE_HOST_SYSTEM) -# this file is also executed from cpack, then we don't need to generate these files +# this file is also executed from cpack, then we don't need to generate these files # in this case there is no CMAKE_BINARY_DIR IF(CMAKE_BINARY_DIR) # write entry to the log file IF(PRESET_CMAKE_SYSTEM_NAME) - FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "The target system is: ${CMAKE_SYSTEM_NAME} - ${CMAKE_SYSTEM_VERSION} - ${CMAKE_SYSTEM_PROCESSOR}\n") - FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "The host system is: ${CMAKE_HOST_SYSTEM_NAME} - ${CMAKE_HOST_SYSTEM_VERSION} - ${CMAKE_HOST_SYSTEM_PROCESSOR}\n") ELSE(PRESET_CMAKE_SYSTEM_NAME) - FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "The system is: ${CMAKE_SYSTEM_NAME} - ${CMAKE_SYSTEM_VERSION} - ${CMAKE_SYSTEM_PROCESSOR}\n") ENDIF(PRESET_CMAKE_SYSTEM_NAME) @@ -170,7 +170,7 @@ IF(CMAKE_BINARY_DIR) # configure variables set in this file for fast reload, the template file is defined at the top of this file CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeSystem.cmake.in - ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeSystem.cmake + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeSystem.cmake IMMEDIATE @ONLY) ENDIF(CMAKE_BINARY_DIR) diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake index 64ec403adb2..a5202f40277 100644 --- a/Modules/CMakeFindBinUtils.cmake +++ b/Modules/CMakeFindBinUtils.cmake @@ -1,13 +1,13 @@ # search for additional tools required for C/C++ (and other languages ?) # -# If the internal cmake variable _CMAKE_TOOLCHAIN_PREFIX is set, this is used +# If the internal cmake variable _CMAKE_TOOLCHAIN_PREFIX is set, this is used # as prefix for the tools (e.g. arm-elf-gcc etc.) # If the cmake variable _CMAKE_TOOLCHAIN_LOCATION is set, the compiler is -# searched only there. The other tools are at first searched there, then +# searched only there. The other tools are at first searched there, then # also in the default locations. # -# Sets the following variables: +# Sets the following variables: # CMAKE_AR # CMAKE_RANLIB # CMAKE_LINKER @@ -30,7 +30,7 @@ # License text for the above reference.) # if it's the MS C/CXX compiler, search for link -IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC" +IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC" OR "${CMAKE_C_COMPILER_ID}" MATCHES "MSVC" OR "${CMAKE_GENERATOR}" MATCHES "Visual Studio") @@ -39,7 +39,7 @@ IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC" MARK_AS_ADVANCED(CMAKE_LINKER) # in all other cases search for ar, ranlib, etc. -ELSE("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC" +ELSE("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC" OR "${CMAKE_C_COMPILER_ID}" MATCHES "MSVC" OR "${CMAKE_GENERATOR}" MATCHES "Visual Studio") @@ -58,7 +58,7 @@ ELSE("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC" MARK_AS_ADVANCED(CMAKE_AR CMAKE_RANLIB CMAKE_STRIP CMAKE_LINKER CMAKE_NM CMAKE_OBJDUMP CMAKE_OBJCOPY) -ENDIF("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC" +ENDIF("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC" OR "${CMAKE_C_COMPILER_ID}" MATCHES "MSVC" OR "${CMAKE_GENERATOR}" MATCHES "Visual Studio") diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake index d962f4cb558..b965e836894 100644 --- a/Modules/CMakeFortranInformation.cmake +++ b/Modules/CMakeFortranInformation.cmake @@ -52,7 +52,7 @@ IF(CMAKE_Fortran_SIZEOF_DATA_PTR) ENDIF() # This should be included before the _INIT variables are -# used to initialize the cache. Since the rule variables +# used to initialize the cache. Since the rule variables # have if blocks on them, users can still define them here. # But, it should still be after the platform file so changes can # be made to those values. @@ -70,7 +70,7 @@ IF(CMAKE_USER_MAKE_RULES_OVERRIDE_Fortran) ENDIF() -# Fortran needs cmake to do a requires step during its build process to +# Fortran needs cmake to do a requires step during its build process to # catch any modules SET(CMAKE_NEEDS_REQUIRES_STEP_Fortran_FLAG 1) @@ -102,7 +102,7 @@ IF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS) ENDIF() IF(NOT DEFINED CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG) - SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG}) + SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG}) ENDIF() IF(NOT DEFINED CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP) @@ -165,7 +165,7 @@ ENDIF(NOT CMAKE_INCLUDE_FLAG_SEP_Fortran) SET(CMAKE_VERBOSE_MAKEFILE FALSE CACHE BOOL "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make. This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo.") SET(CMAKE_Fortran_FLAGS_INIT "$ENV{FFLAGS} ${CMAKE_Fortran_FLAGS_INIT}") -# avoid just having a space as the initial value for the cache +# avoid just having a space as the initial value for the cache IF(CMAKE_Fortran_FLAGS_INIT STREQUAL " ") SET(CMAKE_Fortran_FLAGS_INIT) ENDIF(CMAKE_Fortran_FLAGS_INIT STREQUAL " ") diff --git a/Modules/CMakeJavaInformation.cmake b/Modules/CMakeJavaInformation.cmake index e192db1002d..7f812bd32c6 100644 --- a/Modules/CMakeJavaInformation.cmake +++ b/Modules/CMakeJavaInformation.cmake @@ -13,7 +13,7 @@ # License text for the above reference.) # This should be included before the _INIT variables are -# used to initialize the cache. Since the rule variables +# used to initialize the cache. Since the rule variables # have if blocks on them, users can still define them here. # But, it should still be after the platform file so changes can # be made to those values. diff --git a/Modules/CMakeMSYSFindMake.cmake b/Modules/CMakeMSYSFindMake.cmake index 95492a0b007..29dc2c0255c 100644 --- a/Modules/CMakeMSYSFindMake.cmake +++ b/Modules/CMakeMSYSFindMake.cmake @@ -12,8 +12,8 @@ # (To distribute this file outside of CMake, substitute the full # License text for the above reference.) -FIND_PROGRAM(CMAKE_MAKE_PROGRAM make - PATHS +FIND_PROGRAM(CMAKE_MAKE_PROGRAM make + PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MSYS-1.0_is1;Inno Setup: App Path]/bin" "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MinGW;InstallLocation]/bin" c:/msys/1.0/bin /msys/1.0/bin) diff --git a/Modules/CMakeMinGWFindMake.cmake b/Modules/CMakeMinGWFindMake.cmake index f760d74d48a..61ddb8c6cea 100644 --- a/Modules/CMakeMinGWFindMake.cmake +++ b/Modules/CMakeMinGWFindMake.cmake @@ -13,7 +13,7 @@ # License text for the above reference.) FIND_PROGRAM(CMAKE_MAKE_PROGRAM mingw32-make.exe PATHS - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MinGW;InstallLocation]/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MinGW;InstallLocation]/bin" c:/MinGW/bin /MinGW/bin) FIND_PROGRAM(CMAKE_SH sh.exe ) IF(CMAKE_SH) diff --git a/Modules/CMakePlatformId.h.in b/Modules/CMakePlatformId.h.in index 6341dca9a4c..4b360f77649 100644 --- a/Modules/CMakePlatformId.h.in +++ b/Modules/CMakePlatformId.h.in @@ -37,7 +37,7 @@ #elif defined(__HAIKU) || defined(__HAIKU__) || defined(_HAIKU) # define PLATFORM_ID "Haiku" -/* Haiku also defines __BEOS__ so we must +/* Haiku also defines __BEOS__ so we must put it prior to the check for __BEOS__ */ @@ -92,7 +92,7 @@ # define ARCHITECTURE_ID "IA64" # elif defined(_M_X64) || defined(_M_AMD64) -# define ARCHITECTURE_ID "x64" +# define ARCHITECTURE_ID "x64" # elif defined(_M_IX86) # define ARCHITECTURE_ID "X86" diff --git a/Modules/CMakeSystemSpecificInformation.cmake b/Modules/CMakeSystemSpecificInformation.cmake index faa9e3625ed..88b77489bf9 100644 --- a/Modules/CMakeSystemSpecificInformation.cmake +++ b/Modules/CMakeSystemSpecificInformation.cmake @@ -42,7 +42,7 @@ IF(NOT _INCLUDED_SYSTEM_INFO_FILE) IF(EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt) CONFIGURE_FILE(${CMAKE_BINARY_DIR}/CMakeCache.txt ${CMAKE_BINARY_DIR}/CopyOfCMakeCache.txt COPYONLY) - MESSAGE("Your CMakeCache.txt file was copied to CopyOfCMakeCache.txt. " + MESSAGE("Your CMakeCache.txt file was copied to CopyOfCMakeCache.txt. " "Please send that file to cmake@www.cmake.org.") ENDIF(EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt) ENDIF(NOT _INCLUDED_SYSTEM_INFO_FILE) diff --git a/Modules/CMakeTestCCompiler.cmake b/Modules/CMakeTestCCompiler.cmake index 779b2f0077d..5a86eb91787 100644 --- a/Modules/CMakeTestCCompiler.cmake +++ b/Modules/CMakeTestCCompiler.cmake @@ -33,7 +33,7 @@ IF(NOT CMAKE_C_COMPILER_WORKS) "int main(int argc, char* argv[])\n" "#endif\n" "{ (void)argv; return argc-1;}\n") - TRY_COMPILE(CMAKE_C_COMPILER_WORKS ${CMAKE_BINARY_DIR} + TRY_COMPILE(CMAKE_C_COMPILER_WORKS ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler.c OUTPUT_VARIABLE __CMAKE_C_COMPILER_OUTPUT) SET(C_TEST_WAS_RUN 1) diff --git a/Modules/CMakeTestCXXCompiler.cmake b/Modules/CMakeTestCXXCompiler.cmake index 87022e9f962..dadec1a65f4 100644 --- a/Modules/CMakeTestCXXCompiler.cmake +++ b/Modules/CMakeTestCXXCompiler.cmake @@ -21,12 +21,12 @@ INCLUDE(CMakeTestCompilerCommon) # any makefiles or projects. IF(NOT CMAKE_CXX_COMPILER_WORKS) PrintTestCompilerStatus("CXX" "") - FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCXXCompiler.cxx + FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCXXCompiler.cxx "#ifndef __cplusplus\n" "# error \"The CMAKE_CXX_COMPILER is set to a C compiler\"\n" "#endif\n" "int main(){return 0;}\n") - TRY_COMPILE(CMAKE_CXX_COMPILER_WORKS ${CMAKE_BINARY_DIR} + TRY_COMPILE(CMAKE_CXX_COMPILER_WORKS ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCXXCompiler.cxx OUTPUT_VARIABLE __CMAKE_CXX_COMPILER_OUTPUT) SET(CXX_TEST_WAS_RUN 1) diff --git a/Modules/CMakeTestFortranCompiler.cmake b/Modules/CMakeTestFortranCompiler.cmake index b4dcea634e4..b2fa16aef93 100644 --- a/Modules/CMakeTestFortranCompiler.cmake +++ b/Modules/CMakeTestFortranCompiler.cmake @@ -26,7 +26,7 @@ IF(NOT CMAKE_Fortran_COMPILER_WORKS) PRINT *, 'Hello' END ") - TRY_COMPILE(CMAKE_Fortran_COMPILER_WORKS ${CMAKE_BINARY_DIR} + TRY_COMPILE(CMAKE_Fortran_COMPILER_WORKS ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f OUTPUT_VARIABLE OUTPUT) SET(FORTRAN_TEST_WAS_RUN 1) diff --git a/Modules/CMakeVS6BackwardCompatibility.cmake b/Modules/CMakeVS6BackwardCompatibility.cmake index 438f64f6c85..c948ff4a010 100644 --- a/Modules/CMakeVS6BackwardCompatibility.cmake +++ b/Modules/CMakeVS6BackwardCompatibility.cmake @@ -20,7 +20,7 @@ SET (CMAKE_SIZEOF_CHAR 1 CACHE INTERNAL "Size of char data type") SET (CMAKE_SIZEOF_SHORT 2 CACHE INTERNAL "Size of short data type") SET (CMAKE_SIZEOF_FLOAT 4 CACHE INTERNAL "Size of float data type") SET (CMAKE_SIZEOF_DOUBLE 8 CACHE INTERNAL "Size of double data type") -SET (CMAKE_NO_ANSI_FOR_SCOPE 1 CACHE INTERNAL +SET (CMAKE_NO_ANSI_FOR_SCOPE 1 CACHE INTERNAL "Does the compiler support ansi for scope.") SET (CMAKE_USE_WIN32_THREADS TRUE CACHE BOOL "Use the win32 thread library.") SET (CMAKE_WORDS_BIGENDIAN 0 CACHE INTERNAL "endianness of bytes") diff --git a/Modules/CMakeVS7BackwardCompatibility.cmake b/Modules/CMakeVS7BackwardCompatibility.cmake index df0b3bb97e9..9743c27052c 100644 --- a/Modules/CMakeVS7BackwardCompatibility.cmake +++ b/Modules/CMakeVS7BackwardCompatibility.cmake @@ -20,7 +20,7 @@ SET (CMAKE_SIZEOF_CHAR 1 CACHE INTERNAL "Size of char data type") SET (CMAKE_SIZEOF_SHORT 2 CACHE INTERNAL "Size of short data type") SET (CMAKE_SIZEOF_FLOAT 4 CACHE INTERNAL "Size of float data type") SET (CMAKE_SIZEOF_DOUBLE 8 CACHE INTERNAL "Size of double data type") -SET (CMAKE_NO_ANSI_FOR_SCOPE 0 CACHE INTERNAL +SET (CMAKE_NO_ANSI_FOR_SCOPE 0 CACHE INTERNAL "Does the compiler support ansi for scope.") SET (CMAKE_USE_WIN32_THREADS TRUE CACHE BOOL "Use the win32 thread library.") SET (CMAKE_WORDS_BIGENDIAN 0 CACHE INTERNAL "endianness of bytes") diff --git a/Modules/CMakeVerifyManifest.cmake b/Modules/CMakeVerifyManifest.cmake index 75783691f6d..1d16e1881ed 100644 --- a/Modules/CMakeVerifyManifest.cmake +++ b/Modules/CMakeVerifyManifest.cmake @@ -4,7 +4,7 @@ # side by side manifests for a project match. To run this # script, cd to a directory and run the script with cmake -P. # On the command line you can pass in versions that are OK even -# if not found in the .manifest files. For example, +# if not found in the .manifest files. For example, # cmake -Dallow_versions=8.0.50608.0 -PCmakeVerifyManifest.cmake # could be used to allow an embeded manifest of 8.0.50608.0 # to be used in a project even if that version was not found @@ -40,7 +40,7 @@ function(crt_version file list_var) foreach(s ${strings}) set(has_match 1) string(REGEX - REPLACE ".*.*$" "\\1" + REPLACE ".*.*$" "\\1" version "${s}") if(NOT "${version}" STREQUAL "") list(APPEND version_list ${version}) @@ -61,14 +61,14 @@ endfunction(crt_version) set(fatal_error FALSE) # check_version: -# +# # test a file against the shipped manifest versions # for a directory function(check_version file manifest_versions) set(manifest_versions ${manifest_versions} ${allow_versions}) # collect versions for a given file crt_version(${file} file_versions) - # see if the versions + # see if the versions foreach(ver ${file_versions}) list(FIND manifest_versions "${ver}" found_version) if("${found_version}" EQUAL -1) diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake index 65759573112..b79960e02ad 100644 --- a/Modules/CPack.cmake +++ b/Modules/CPack.cmake @@ -187,7 +187,7 @@ # in CMake, so this change is compatible). ##end # -# The following CPack variables are specific to source packages, and +# The following CPack variables are specific to source packages, and # will not affect binary packages: # ##variable @@ -321,7 +321,7 @@ MACRO(cpack_encode_variables) SET(_CPACK_OTHER_VARIABLES_) GET_CMAKE_PROPERTY(res VARIABLES) FOREACH(var ${res}) - IF("xxx${var}" MATCHES "xxxCPACK") + IF("xxx${var}" MATCHES "xxxCPACK") SET(_CPACK_OTHER_VARIABLES_ "${_CPACK_OTHER_VARIABLES_}\nSET(${var} \"${${var}}\")") ENDIF("xxx${var}" MATCHES "xxxCPACK") @@ -440,7 +440,7 @@ if(NOT CPACK_GENERATOR) option(CPACK_BINARY_NSIS "Enable to build NSIS packages" ON) option(CPACK_BINARY_ZIP "Enable to build ZIP packages" OFF) endif(UNIX) - + cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_BUNDLE Bundle) cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_DRAGNDROP DragNDrop) cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_PACKAGEMAKER PackageMaker) @@ -454,7 +454,7 @@ if(NOT CPACK_GENERATOR) cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TBZ2 TBZ2) cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TZ TZ) cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_ZIP ZIP) - + endif(NOT CPACK_GENERATOR) # Provide options to choose source generators @@ -481,10 +481,10 @@ endif(NOT CPACK_SOURCE_GENERATOR) # mark the above options as advanced mark_as_advanced(CPACK_BINARY_CYGWIN CPACK_BINARY_PACKAGEMAKER CPACK_BINARY_OSXX11 - CPACK_BINARY_STGZ CPACK_BINARY_TGZ CPACK_BINARY_TBZ2 - CPACK_BINARY_DEB CPACK_BINARY_RPM CPACK_BINARY_TZ + CPACK_BINARY_STGZ CPACK_BINARY_TGZ CPACK_BINARY_TBZ2 + CPACK_BINARY_DEB CPACK_BINARY_RPM CPACK_BINARY_TZ CPACK_BINARY_NSIS CPACK_BINARY_ZIP CPACK_BINARY_BUNDLE - CPACK_SOURCE_CYGWIN CPACK_SOURCE_TBZ2 CPACK_SOURCE_TGZ + CPACK_SOURCE_CYGWIN CPACK_SOURCE_TBZ2 CPACK_SOURCE_TGZ CPACK_SOURCE_TZ CPACK_SOURCE_ZIP CPACK_BINARY_DRAGNDROP) # Set some other variables @@ -499,11 +499,11 @@ endif() # if the user has set CPACK_NSIS_DISPLAY # explicitly, then use that as the default # value of CPACK_NSIS_PACKAGE_NAME instead -# of CPACK_PACKAGE_INSTALL_DIRECTORY +# of CPACK_PACKAGE_INSTALL_DIRECTORY cpack_set_if_not_set(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}") if(CPACK_NSIS_DISPLAY_NAME_SET) - string(REPLACE "\\" "\\\\" + string(REPLACE "\\" "\\\\" _NSIS_DISPLAY_NAME_TMP "${CPACK_NSIS_DISPLAY_NAME}") cpack_set_if_not_set(CPACK_NSIS_PACKAGE_NAME "${_NSIS_DISPLAY_NAME_TMP}") else() diff --git a/Modules/CPackZIP.cmake b/Modules/CPackZIP.cmake index 99963cf9119..f80b43903cc 100644 --- a/Modules/CPackZIP.cmake +++ b/Modules/CPackZIP.cmake @@ -23,7 +23,7 @@ IF(ZIP_EXECUTABLE) ENDIF(ZIP_EXECUTABLE) IF(NOT ZIP_EXECUTABLE) - FIND_PROGRAM(ZIP_EXECUTABLE 7z PATHS "$ENV{ProgramFiles}/7-Zip") + FIND_PROGRAM(ZIP_EXECUTABLE 7z PATHS "$ENV{ProgramFiles}/7-Zip") IF(ZIP_EXECUTABLE) SET(CPACK_ZIP_COMMAND "\"${ZIP_EXECUTABLE}\" a -tzip \"\" @") SET(CPACK_ZIP_NEED_QUOTES TRUE) diff --git a/Modules/CTest.cmake b/Modules/CTest.cmake index ec9dbeb7913..a32baa223e7 100644 --- a/Modules/CTest.cmake +++ b/Modules/CTest.cmake @@ -61,7 +61,7 @@ OPTION(BUILD_TESTING "Build the testing tree." ON) # function to turn generator name into a version string -# like vs7 vs71 vs8 vs9 +# like vs7 vs71 vs8 vs9 FUNCTION(GET_VS_VERSION_STRING generator var) STRING(REGEX REPLACE "Visual Studio ([0-9][0-9]?)($|.*)" "\\1" NUMBER "${generator}") @@ -122,7 +122,7 @@ IF(BUILD_TESTING) SET_IF_NOT_SET (NIGHTLY_START_TIME "00:00:00 EDT") FIND_PROGRAM(CVSCOMMAND cvs ) - SET(CVS_UPDATE_OPTIONS "-d -A -P" CACHE STRING + SET(CVS_UPDATE_OPTIONS "-d -A -P" CACHE STRING "Options passed to the cvs update command.") FIND_PROGRAM(SVNCOMMAND svn) FIND_PROGRAM(BZRCOMMAND bzr) @@ -161,7 +161,7 @@ IF(BUILD_TESTING) SET(UPDATE_OPTIONS "${GIT_UPDATE_OPTIONS}") ENDIF() - SET(DART_TESTING_TIMEOUT 1500 CACHE STRING + SET(DART_TESTING_TIMEOUT 1500 CACHE STRING "Maximum time allowed before CTest will kill the test.") SET(CTEST_SUBMIT_RETRY_DELAY 5 CACHE STRING @@ -181,12 +181,12 @@ IF(BUILD_TESTING) FIND_PROGRAM(SLURM_SRUN_COMMAND srun DOC "Path to the SLURM srun executable" ) - SET(MEMORYCHECK_SUPPRESSIONS_FILE "" CACHE FILEPATH + SET(MEMORYCHECK_SUPPRESSIONS_FILE "" CACHE FILEPATH "File that contains suppressions for the memory checker") - FIND_PROGRAM(SCPCOMMAND scp DOC + FIND_PROGRAM(SCPCOMMAND scp DOC "Path to scp command, used by CTest for submitting results to a Dart server" ) - FIND_PROGRAM(COVERAGE_COMMAND gcov DOC + FIND_PROGRAM(COVERAGE_COMMAND gcov DOC "Path to the coverage program that CTest uses for performing coverage inspection" ) SET(COVERAGE_EXTRA_FLAGS "-l" CACHE STRING @@ -215,10 +215,10 @@ IF(BUILD_TESTING) SET(BUILD_NAME_SYSTEM_NAME "Win32") ENDIF(WIN32) IF(UNIX OR BORLAND) - GET_FILENAME_COMPONENT(DART_CXX_NAME + GET_FILENAME_COMPONENT(DART_CXX_NAME "${CMAKE_CXX_COMPILER}" ${DART_NAME_COMPONENT}) ELSE(UNIX OR BORLAND) - GET_FILENAME_COMPONENT(DART_CXX_NAME + GET_FILENAME_COMPONENT(DART_CXX_NAME "${CMAKE_BUILD_TOOL}" ${DART_NAME_COMPONENT}) ENDIF(UNIX OR BORLAND) IF(DART_CXX_NAME MATCHES "msdev") @@ -267,7 +267,7 @@ IF(BUILD_TESTING) DART_TESTING_TIMEOUT GITCOMMAND HGCOMMAND - MAKECOMMAND + MAKECOMMAND MEMORYCHECK_COMMAND MEMORYCHECK_SUPPRESSIONS_FILE PURIFYCOMMAND diff --git a/Modules/CTestScriptMode.cmake b/Modules/CTestScriptMode.cmake index e459c1d591d..42d3764cb87 100644 --- a/Modules/CTestScriptMode.cmake +++ b/Modules/CTestScriptMode.cmake @@ -14,7 +14,7 @@ # (To distribute this file outside of CMake, substitute the full # License text for the above reference.) -# Determine the current system, so this information can be used +# Determine the current system, so this information can be used # in ctest scripts include(CMakeDetermineSystem) diff --git a/Modules/CheckForPthreads.c b/Modules/CheckForPthreads.c index d8310785102..882dc21b7b6 100644 --- a/Modules/CheckForPthreads.c +++ b/Modules/CheckForPthreads.c @@ -15,7 +15,7 @@ int main(int ac, char*av[]){ pthread_t tid[2]; pthread_create(&tid[0], 0, runner, (void*)1); pthread_create(&tid[1], 0, runner, (void*)2); - + #if defined(__BEOS__) && !defined(__ZETA__) && !defined(__HAIKU__) // (no usleep on BeOS 5.) usleep(1); // for strange behavior on single-processor sun #endif diff --git a/Modules/CheckIncludeFile.cmake b/Modules/CheckIncludeFile.cmake index eb732d28b57..07a5ef82dfd 100644 --- a/Modules/CheckIncludeFile.cmake +++ b/Modules/CheckIncludeFile.cmake @@ -3,8 +3,8 @@ # - macro which checks the include file exists. # INCLUDE - name of include file # VARIABLE - variable to return result -# -# an optional third argument is the CFlags to add to the compile line +# +# an optional third argument is the CFlags to add to the compile line # or you can use CMAKE_REQUIRED_FLAGS # # The following variables may be set before calling this macro to @@ -49,10 +49,10 @@ MACRO(CHECK_INCLUDE_FILE INCLUDE VARIABLE) ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.c COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} - CMAKE_FLAGS + CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILE_FLAGS} "${CHECK_INCLUDE_FILE_C_INCLUDE_DIRS}" - OUTPUT_VARIABLE OUTPUT) + OUTPUT_VARIABLE OUTPUT) IF(${ARGC} EQUAL 3) SET(CMAKE_C_FLAGS ${CMAKE_C_FLAGS_SAVE}) @@ -61,14 +61,14 @@ MACRO(CHECK_INCLUDE_FILE INCLUDE VARIABLE) IF(${VARIABLE}) MESSAGE(STATUS "Looking for ${INCLUDE} - found") SET(${VARIABLE} 1 CACHE INTERNAL "Have include ${INCLUDE}") - FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the include file ${INCLUDE} " "exists passed with the following output:\n" "${OUTPUT}\n\n") ELSE(${VARIABLE}) MESSAGE(STATUS "Looking for ${INCLUDE} - not found") SET(${VARIABLE} "" CACHE INTERNAL "Have include ${INCLUDE}") - FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the include file ${INCLUDE} " "exists failed with the following output:\n" "${OUTPUT}\n\n") diff --git a/Modules/CheckIncludeFileCXX.cmake b/Modules/CheckIncludeFileCXX.cmake index c5d8f9aa2c7..f27d25340f7 100644 --- a/Modules/CheckIncludeFileCXX.cmake +++ b/Modules/CheckIncludeFileCXX.cmake @@ -3,8 +3,8 @@ # # INCLUDE - name of include file # VARIABLE - variable to return result -# -# An optional third argument is the CFlags to add to the compile line +# +# An optional third argument is the CFlags to add to the compile line # or you can use CMAKE_REQUIRED_FLAGS. # # The following variables may be set before calling this macro to @@ -49,10 +49,10 @@ MACRO(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE) ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.cxx COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} - CMAKE_FLAGS + CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILE_FLAGS} "${CHECK_INCLUDE_FILE_CXX_INCLUDE_DIRS}" - OUTPUT_VARIABLE OUTPUT) + OUTPUT_VARIABLE OUTPUT) IF(${ARGC} EQUAL 3) SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS_SAVE}) @@ -61,14 +61,14 @@ MACRO(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE) IF(${VARIABLE}) MESSAGE(STATUS "Looking for C++ include ${INCLUDE} - found") SET(${VARIABLE} 1 CACHE INTERNAL "Have include ${INCLUDE}") - FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the include file ${INCLUDE} " "exists passed with the following output:\n" "${OUTPUT}\n\n") ELSE(${VARIABLE}) MESSAGE(STATUS "Looking for C++ include ${INCLUDE} - not found") SET(${VARIABLE} "" CACHE INTERNAL "Have include ${INCLUDE}") - FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the include file ${INCLUDE} " "exists failed with the following output:\n" "${OUTPUT}\n\n") diff --git a/Modules/CheckIncludeFiles.cmake b/Modules/CheckIncludeFiles.cmake index a94644e6a18..6901fbc5dcf 100644 --- a/Modules/CheckIncludeFiles.cmake +++ b/Modules/CheckIncludeFiles.cmake @@ -59,21 +59,21 @@ MACRO(CHECK_INCLUDE_FILES INCLUDE VARIABLE) ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFiles.c COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} - CMAKE_FLAGS + CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILES_FLAGS} "${CHECK_INCLUDE_FILES_INCLUDE_DIRS}" OUTPUT_VARIABLE OUTPUT) IF(${VARIABLE}) MESSAGE(STATUS "Looking for ${_description} - found") SET(${VARIABLE} 1 CACHE INTERNAL "Have include ${INCLUDE}") - FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if files ${INCLUDE} " "exist passed with the following output:\n" "${OUTPUT}\n\n") ELSE(${VARIABLE}) MESSAGE(STATUS "Looking for ${_description} - not found.") SET(${VARIABLE} "" CACHE INTERNAL "Have includes ${INCLUDE}") - FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if files ${INCLUDE} " "exist failed with the following output:\n" "${OUTPUT}\nSource:\n${CMAKE_CONFIGURABLE_FILE_CONTENT}\n") diff --git a/Modules/Dart.cmake b/Modules/Dart.cmake index 870545471e7..e85f093ce09 100644 --- a/Modules/Dart.cmake +++ b/Modules/Dart.cmake @@ -48,14 +48,14 @@ IF(BUILD_TESTING) INCLUDE(CTest) SET(RUN_FROM_DART) - FIND_PROGRAM(COMPRESSIONCOMMAND NAMES gzip compress zip + FIND_PROGRAM(COMPRESSIONCOMMAND NAMES gzip compress zip DOC "Path to program used to compress files for transfer to the dart server") FIND_PROGRAM(GUNZIPCOMMAND gunzip DOC "Path to gunzip executable") FIND_PROGRAM(JAVACOMMAND java DOC "Path to java command, used by the Dart server to create html.") - OPTION(DART_VERBOSE_BUILD "Show the actual output of the build, or if off show a . for each 1024 bytes." + OPTION(DART_VERBOSE_BUILD "Show the actual output of the build, or if off show a . for each 1024 bytes." OFF) - OPTION(DART_BUILD_ERROR_REPORT_LIMIT "Limit of reported errors, -1 reports all." -1 ) - OPTION(DART_BUILD_WARNING_REPORT_LIMIT "Limit of reported warnings, -1 reports all." -1 ) + OPTION(DART_BUILD_ERROR_REPORT_LIMIT "Limit of reported errors, -1 reports all." -1 ) + OPTION(DART_BUILD_WARNING_REPORT_LIMIT "Limit of reported warnings, -1 reports all." -1 ) SET(VERBOSE_BUILD ${DART_VERBOSE_BUILD}) SET(BUILD_ERROR_REPORT_LIMIT ${DART_BUILD_ERROR_REPORT_LIMIT}) @@ -64,13 +64,13 @@ IF(BUILD_TESTING) MARK_AS_ADVANCED( COMPRESSIONCOMMAND - DART_BUILD_ERROR_REPORT_LIMIT - DART_BUILD_WARNING_REPORT_LIMIT + DART_BUILD_ERROR_REPORT_LIMIT + DART_BUILD_WARNING_REPORT_LIMIT DART_TESTING_TIMEOUT DART_VERBOSE_BUILD DELIVER_CONTINUOUS_EMAIL GUNZIPCOMMAND - JAVACOMMAND + JAVACOMMAND ) SET(HAVE_DART) @@ -80,7 +80,7 @@ IF(BUILD_TESTING) # # Section #2: - # + # # Make necessary directories and configure testing scripts # # find a tcl shell command @@ -112,7 +112,7 @@ IF(BUILD_TESTING) SET(DART_EXPERIMENTAL_NAME "${DART_EXPERIMENTAL_NAME}${PROJECT_NAME}") ENDIF(DART_EXPERIMENTAL_USE_PROJECT_NAME) ENDIF (HAVE_DART) - + SET(RUN_FROM_CTEST_OR_DART 1) INCLUDE(CTestTargets) SET(RUN_FROM_CTEST_OR_DART) diff --git a/Modules/Documentation.cmake b/Modules/Documentation.cmake index ffeb371cc61..aff78c94f55 100644 --- a/Modules/Documentation.cmake +++ b/Modules/Documentation.cmake @@ -33,10 +33,10 @@ IF (BUILD_DOCUMENTATION) FIND_PACKAGE(Perl) FIND_PACKAGE(Wget) - OPTION(DOCUMENTATION_HTML_HELP + OPTION(DOCUMENTATION_HTML_HELP "Build the HTML Help file (CHM)." OFF) - OPTION(DOCUMENTATION_HTML_TARZ + OPTION(DOCUMENTATION_HTML_TARZ "Build a compressed tar archive of the HTML doc." OFF) MARK_AS_ADVANCED( @@ -44,7 +44,7 @@ IF (BUILD_DOCUMENTATION) DOCUMENTATION_HTML_TARZ ) - # + # # The documentation process is controled by a batch file. # We will probably need bash to create the custom target # diff --git a/Modules/FindALSA.cmake b/Modules/FindALSA.cmake index 4a0b6930304..60b0f56e61e 100644 --- a/Modules/FindALSA.cmake +++ b/Modules/FindALSA.cmake @@ -40,7 +40,7 @@ if(ALSA_INCLUDE_DIR AND EXISTS "${ALSA_INCLUDE_DIR}/alsa/version.h") unset(alsa_version_str) endif() -# handle the QUIETLY and REQUIRED arguments and set ALSA_FOUND to TRUE if +# handle the QUIETLY and REQUIRED arguments and set ALSA_FOUND to TRUE if # all listed variables are TRUE include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(ALSA diff --git a/Modules/FindAVIFile.cmake b/Modules/FindAVIFile.cmake index 8b5b05ae339..a45ebf8b96e 100644 --- a/Modules/FindAVIFile.cmake +++ b/Modules/FindAVIFile.cmake @@ -1,5 +1,5 @@ # - Locate AVIFILE library and include paths -# AVIFILE (http://avifile.sourceforge.net/)is a set of libraries for +# AVIFILE (http://avifile.sourceforge.net/)is a set of libraries for # i386 machines # to use various AVI codecs. Support is limited beyond Linux. Windows # provides native AVI support, and so doesn't need this library. diff --git a/Modules/FindBZip2.cmake b/Modules/FindBZip2.cmake index ce7f2555dd2..75ab5000447 100644 --- a/Modules/FindBZip2.cmake +++ b/Modules/FindBZip2.cmake @@ -41,7 +41,7 @@ IF (BZIP2_INCLUDE_DIR AND EXISTS "${BZIP2_INCLUDE_DIR}/bzlib.h") STRING(REGEX REPLACE ".* bzip2/libbzip2 version ([0-9]+\\.[^ ]+) of [0-9]+ .*" "\\1" BZIP2_VERSION_STRING "${BZLIB_H}") ENDIF (BZIP2_INCLUDE_DIR AND EXISTS "${BZIP2_INCLUDE_DIR}/bzlib.h") -# handle the QUIETLY and REQUIRED arguments and set BZip2_FOUND to TRUE if +# handle the QUIETLY and REQUIRED arguments and set BZip2_FOUND to TRUE if # all listed variables are TRUE INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(BZip2 diff --git a/Modules/FindBullet.cmake b/Modules/FindBullet.cmake index c96755fa4ab..1c4a9dec40f 100644 --- a/Modules/FindBullet.cmake +++ b/Modules/FindBullet.cmake @@ -29,7 +29,7 @@ macro(_FIND_BULLET_LIBRARY _var) find_library(${_var} - NAMES + NAMES ${ARGN} HINTS ${BULLET_ROOT} @@ -68,7 +68,7 @@ _FIND_BULLET_LIBRARY(BULLET_SOFTBODY_LIBRARY BulletSoftBody) _FIND_BULLET_LIBRARY(BULLET_SOFTBODY_LIBRARY_DEBUG BulletSoftBody_Debug BulletSoftBody_d) -# handle the QUIETLY and REQUIRED arguments and set BULLET_FOUND to TRUE if +# handle the QUIETLY and REQUIRED arguments and set BULLET_FOUND to TRUE if # all listed variables are TRUE include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(Bullet DEFAULT_MSG diff --git a/Modules/FindCURL.cmake b/Modules/FindCURL.cmake index cc00d53f429..5f2181a99c4 100644 --- a/Modules/FindCURL.cmake +++ b/Modules/FindCURL.cmake @@ -25,7 +25,7 @@ FIND_PATH(CURL_INCLUDE_DIR NAMES curl/curl.h) MARK_AS_ADVANCED(CURL_INCLUDE_DIR) # Look for the library. -FIND_LIBRARY(CURL_LIBRARY NAMES +FIND_LIBRARY(CURL_LIBRARY NAMES curl # Windows MSVC prebuilts: curllib @@ -46,7 +46,7 @@ IF(CURL_INCLUDE_DIR) ENDFOREACH(_curl_version_header) ENDIF() -# handle the QUIETLY and REQUIRED arguments and set CURL_FOUND to TRUE if +# handle the QUIETLY and REQUIRED arguments and set CURL_FOUND to TRUE if # all listed variables are TRUE INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(CURL diff --git a/Modules/FindCVS.cmake b/Modules/FindCVS.cmake index 57680bd97e5..84bcaa19c73 100644 --- a/Modules/FindCVS.cmake +++ b/Modules/FindCVS.cmake @@ -24,31 +24,31 @@ get_filename_component( CVSNT_TypeLib_Win32 - "[HKEY_CLASSES_ROOT\\TypeLib\\{2BDF7A65-0BFE-4B1A-9205-9AB900C7D0DA}\\1.0\\0\\win32]" + "[HKEY_CLASSES_ROOT\\TypeLib\\{2BDF7A65-0BFE-4B1A-9205-9AB900C7D0DA}\\1.0\\0\\win32]" PATH) get_filename_component( CVSNT_Services_EventMessagePath - "[HKEY_LOCAL_MACHINE\\SYSTEM\\ControlSet001\\Services\\Eventlog\\Application\\cvsnt;EventMessageFile]" + "[HKEY_LOCAL_MACHINE\\SYSTEM\\ControlSet001\\Services\\Eventlog\\Application\\cvsnt;EventMessageFile]" PATH) # WinCVS (in case CVSNT was installed in the same directory) get_filename_component( WinCVS_Folder_Command - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\Folder\\shell\\wincvs\\command]" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\Folder\\shell\\wincvs\\command]" PATH) # TortoiseCVS (in case CVSNT was installed in the same directory) get_filename_component( TortoiseCVS_Folder_Command - "[HKEY_CLASSES_ROOT\\CVS\\shell\\open\\command]" + "[HKEY_CLASSES_ROOT\\CVS\\shell\\open\\command]" PATH) get_filename_component( TortoiseCVS_DefaultIcon - "[HKEY_CLASSES_ROOT\\CVS\\DefaultIcon]" + "[HKEY_CLASSES_ROOT\\CVS\\DefaultIcon]" PATH) find_program(CVS_EXECUTABLE cvs @@ -62,7 +62,7 @@ find_program(CVS_EXECUTABLE cvs ) mark_as_advanced(CVS_EXECUTABLE) -# Handle the QUIETLY and REQUIRED arguments and set CVS_FOUND to TRUE if +# Handle the QUIETLY and REQUIRED arguments and set CVS_FOUND to TRUE if # all listed variables are TRUE include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) diff --git a/Modules/FindCoin3D.cmake b/Modules/FindCoin3D.cmake index 8bfe97acc09..2b4c914f4a6 100644 --- a/Modules/FindCoin3D.cmake +++ b/Modules/FindCoin3D.cmake @@ -59,22 +59,22 @@ IF (WIN32) ELSE (WIN32) IF(APPLE) FIND_PATH(COIN3D_INCLUDE_DIRS Inventor/So.h - /Library/Frameworks/Inventor.framework/Headers + /Library/Frameworks/Inventor.framework/Headers ) FIND_LIBRARY(COIN3D_LIBRARIES Coin /Library/Frameworks/Inventor.framework/Libraries - ) + ) SET(COIN3D_LIBRARIES "-framework Coin3d" CACHE STRING "Coin3D library for OSX") ELSE(APPLE) FIND_PATH(COIN3D_INCLUDE_DIRS Inventor/So.h) - FIND_LIBRARY(COIN3D_LIBRARIES Coin) + FIND_LIBRARY(COIN3D_LIBRARIES Coin) ENDIF(APPLE) ENDIF (WIN32) -# handle the QUIETLY and REQUIRED arguments and set COIN3D_FOUND to TRUE if +# handle the QUIETLY and REQUIRED arguments and set COIN3D_FOUND to TRUE if # all listed variables are TRUE INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(Coin3D DEFAULT_MSG COIN3D_LIBRARIES COIN3D_INCLUDE_DIRS) diff --git a/Modules/FindCups.cmake b/Modules/FindCups.cmake index 3862f7ddff8..05d2c270ba6 100644 --- a/Modules/FindCups.cmake +++ b/Modules/FindCups.cmake @@ -5,7 +5,7 @@ # CUPS_INCLUDE_DIR - the Cups include directory # CUPS_LIBRARIES - Libraries needed to use Cups # CUPS_VERSION_STRING - version of Cups found (since CMake 2.8.8) -# Set CUPS_REQUIRE_IPP_DELETE_ATTRIBUTE to TRUE if you need a version which +# Set CUPS_REQUIRE_IPP_DELETE_ATTRIBUTE to TRUE if you need a version which # features this function (i.e. at least 1.1.19) #============================================================================= @@ -65,5 +65,5 @@ else (CUPS_REQUIRE_IPP_DELETE_ATTRIBUTE) REQUIRED_VARS CUPS_LIBRARIES CUPS_INCLUDE_DIR VERSION_VAR CUPS_VERSION_STRING) endif (CUPS_REQUIRE_IPP_DELETE_ATTRIBUTE) - + mark_as_advanced(CUPS_INCLUDE_DIR CUPS_LIBRARIES) diff --git a/Modules/FindCurses.cmake b/Modules/FindCurses.cmake index d1e13116d63..0ea5166d2af 100644 --- a/Modules/FindCurses.cmake +++ b/Modules/FindCurses.cmake @@ -9,7 +9,7 @@ # CURSES_HAVE_NCURSES_CURSES_H - true if ncurses/curses.h is available # CURSES_LIBRARY - set for backwards compatibility with 2.4 CMake # -# Set CURSES_NEED_NCURSES to TRUE before the FIND_PACKAGE() command if NCurses +# Set CURSES_NEED_NCURSES to TRUE before the FIND_PACKAGE() command if NCurses # functionality is required. #============================================================================= @@ -53,15 +53,15 @@ ENDIF() # some web pages also say that even with ncurses there is not always a ncurses.h: # http://osdir.com/ml/gnome.apps.mc.devel/2002-06/msg00029.html # So at first try ncurses.h, if not found, try to find curses.h under the same -# prefix as the library was found, if still not found, try curses.h with the +# prefix as the library was found, if still not found, try curses.h with the # default search paths. IF(CURSES_CURSES_LIBRARY AND CURSES_NEED_NCURSES) INCLUDE(CheckLibraryExists) - CHECK_LIBRARY_EXISTS("${CURSES_CURSES_LIBRARY}" + CHECK_LIBRARY_EXISTS("${CURSES_CURSES_LIBRARY}" wsyncup "" CURSES_CURSES_HAS_WSYNCUP) IF(CURSES_NCURSES_LIBRARY AND NOT CURSES_CURSES_HAS_WSYNCUP) - CHECK_LIBRARY_EXISTS("${CURSES_NCURSES_LIBRARY}" + CHECK_LIBRARY_EXISTS("${CURSES_NCURSES_LIBRARY}" wsyncup "" CURSES_NCURSES_HAS_WSYNCUP) IF( CURSES_NCURSES_HAS_WSYNCUP) SET(CURSES_USE_NCURSES TRUE) @@ -79,7 +79,7 @@ IF(NOT CURSES_USE_NCURSES) # for compatibility with older FindCurses.cmake this has to be in the cache # FORCE must not be used since this would break builds which preload a cache wqith these variables set - SET(CURSES_INCLUDE_PATH "${CURSES_CURSES_H_PATH}" + SET(CURSES_INCLUDE_PATH "${CURSES_CURSES_H_PATH}" CACHE FILEPATH "The curses include path") SET(CURSES_LIBRARY "${CURSES_CURSES_LIBRARY}" CACHE FILEPATH "The curses library") @@ -91,23 +91,23 @@ ELSE(NOT CURSES_USE_NCURSES) FIND_FILE(CURSES_HAVE_NCURSES_H ncurses.h) FIND_FILE(CURSES_HAVE_NCURSES_NCURSES_H ncurses/ncurses.h) FIND_FILE(CURSES_HAVE_NCURSES_CURSES_H ncurses/curses.h) - FIND_FILE(CURSES_HAVE_CURSES_H curses.h + FIND_FILE(CURSES_HAVE_CURSES_H curses.h HINTS "${_cursesParentDir}/include") - FIND_PATH(CURSES_NCURSES_INCLUDE_PATH ncurses.h ncurses/ncurses.h + FIND_PATH(CURSES_NCURSES_INCLUDE_PATH ncurses.h ncurses/ncurses.h ncurses/curses.h) FIND_PATH(CURSES_NCURSES_INCLUDE_PATH curses.h HINTS "${_cursesParentDir}/include") # for compatibility with older FindCurses.cmake this has to be in the cache # FORCE must not be used since this would break builds which preload - # however if the value of the variable has NOTFOUND in it, then + # however if the value of the variable has NOTFOUND in it, then # it is OK to force, and we need to force in order to have it work. # a cache wqith these variables set - # only put ncurses include and library into + # only put ncurses include and library into # variables if they are found IF(NOT CURSES_NCURSES_INCLUDE_PATH AND CURSES_HAVE_NCURSES_NCURSES_H) - GET_FILENAME_COMPONENT(CURSES_NCURSES_INCLUDE_PATH + GET_FILENAME_COMPONENT(CURSES_NCURSES_INCLUDE_PATH "${CURSES_HAVE_NCURSES_NCURSES_H}" PATH) ENDIF(NOT CURSES_NCURSES_INCLUDE_PATH AND CURSES_HAVE_NCURSES_NCURSES_H) IF(CURSES_NCURSES_INCLUDE_PATH AND CURSES_NCURSES_LIBRARY) @@ -115,13 +115,13 @@ ELSE(NOT CURSES_USE_NCURSES) IF(CURSES_INCLUDE_PATH MATCHES NOTFOUND) SET(FORCE_IT FORCE) ENDIF(CURSES_INCLUDE_PATH MATCHES NOTFOUND) - SET(CURSES_INCLUDE_PATH "${CURSES_NCURSES_INCLUDE_PATH}" + SET(CURSES_INCLUDE_PATH "${CURSES_NCURSES_INCLUDE_PATH}" CACHE FILEPATH "The curses include path" ${FORCE_IT}) SET( FORCE_IT) IF(CURSES_LIBRARY MATCHES NOTFOUND) SET(FORCE_IT FORCE) ENDIF(CURSES_LIBRARY MATCHES NOTFOUND) - SET(CURSES_LIBRARY "${CURSES_NCURSES_LIBRARY}" + SET(CURSES_LIBRARY "${CURSES_NCURSES_LIBRARY}" CACHE FILEPATH "The curses library" ${FORCE_IT}) ENDIF(CURSES_NCURSES_INCLUDE_PATH AND CURSES_NCURSES_LIBRARY) @@ -136,7 +136,7 @@ FIND_LIBRARY(CURSES_FORM_LIBRARY form ) # for compatibility with older FindCurses.cmake this has to be in the cache # FORCE must not be used since this would break builds which preload a cache # qith these variables set -SET(FORM_LIBRARY "${CURSES_FORM_LIBRARY}" +SET(FORM_LIBRARY "${CURSES_FORM_LIBRARY}" CACHE FILEPATH "The curses form library") # Need to provide the *_LIBRARIES @@ -153,7 +153,7 @@ ENDIF(CURSES_FORM_LIBRARY) # Proper name is *_INCLUDE_DIR SET(CURSES_INCLUDE_DIR ${CURSES_INCLUDE_PATH}) -# handle the QUIETLY and REQUIRED arguments and set CURSES_FOUND to TRUE if +# handle the QUIETLY and REQUIRED arguments and set CURSES_FOUND to TRUE if # all listed variables are TRUE INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(Curses DEFAULT_MSG diff --git a/Modules/FindCxxTest.cmake b/Modules/FindCxxTest.cmake index a4d15049316..4207961d043 100644 --- a/Modules/FindCxxTest.cmake +++ b/Modules/FindCxxTest.cmake @@ -49,7 +49,7 @@ # input_files_to_testgen The list of header files containing the # CxxTest::TestSuite's to be included in # this runner -# +# # #============== # Example Usage: # @@ -67,13 +67,13 @@ # 1. Invoke the testgen executable to autogenerate foo_test.cc in the # binary tree from "foo_test.h" in the current source directory. # 2. Create an executable and test called unittest_foo. -# +# # #============= # Example foo_test.h: # # #include -# -# class MyTestSuite : public CxxTest::TestSuite +# +# class MyTestSuite : public CxxTest::TestSuite # { # public: # void testAddition( void ) diff --git a/Modules/FindDart.cmake b/Modules/FindDart.cmake index f7c54df437c..caca4b868ee 100644 --- a/Modules/FindDart.cmake +++ b/Modules/FindDart.cmake @@ -16,14 +16,14 @@ # (To distribute this file outside of CMake, substitute the full # License text for the above reference.) -FIND_PATH(DART_ROOT README.INSTALL +FIND_PATH(DART_ROOT README.INSTALL $ENV{DART_ROOT} - ${PROJECT_SOURCE_DIR}/Dart - /usr/share/Dart - C:/Dart + ${PROJECT_SOURCE_DIR}/Dart + /usr/share/Dart + C:/Dart "$ENV{ProgramFiles}/Dart" - "C:/Program Files/Dart" - ${PROJECT_SOURCE_DIR}/../Dart + "C:/Program Files/Dart" + ${PROJECT_SOURCE_DIR}/../Dart [HKEY_LOCAL_MACHINE\\SOFTWARE\\Dart\\InstallPath] DOC "If you have Dart installed, where is it located?" ) diff --git a/Modules/FindDevIL.cmake b/Modules/FindDevIL.cmake index 4a0fbe0647b..ebfe2989814 100644 --- a/Modules/FindDevIL.cmake +++ b/Modules/FindDevIL.cmake @@ -38,7 +38,7 @@ INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) -FIND_PATH(IL_INCLUDE_DIR il.h +FIND_PATH(IL_INCLUDE_DIR il.h PATH_SUFFIXES include IL DOC "The path the the directory that contains il.h" ) @@ -69,6 +69,6 @@ FIND_LIBRARY(ILU_LIBRARIES #MESSAGE("ILU_LIBRARIES is ${ILU_LIBRARIES}") -FIND_PACKAGE_HANDLE_STANDARD_ARGS(IL DEFAULT_MSG - IL_LIBRARIES ILU_LIBRARIES +FIND_PACKAGE_HANDLE_STANDARD_ARGS(IL DEFAULT_MSG + IL_LIBRARIES ILU_LIBRARIES ILUT_LIBRARIES IL_INCLUDE_DIR) diff --git a/Modules/FindDoxygen.cmake b/Modules/FindDoxygen.cmake index 6cc9efb1824..a004d7b6519 100644 --- a/Modules/FindDoxygen.cmake +++ b/Modules/FindDoxygen.cmake @@ -39,13 +39,13 @@ ENDIF(Doxygen_FIND_QUIETLY) # ===== Rationale for OS X AppBundle mods below ===== # With the OS X GUI version, Doxygen likes to be installed to /Applications and -# it contains the doxygen executable in the bundle. In the versions I've -# seen, it is located in Resources, but in general, more often binaries are +# it contains the doxygen executable in the bundle. In the versions I've +# seen, it is located in Resources, but in general, more often binaries are # located in MacOS. # -# NOTE: The official Doxygen.app that is distributed for OS X uses non-standard +# NOTE: The official Doxygen.app that is distributed for OS X uses non-standard # conventions. Instead of the command-line "doxygen" tool being placed in -# Doxygen.app/Contents/MacOS, "Doxywizard" is placed there instead and +# Doxygen.app/Contents/MacOS, "Doxywizard" is placed there instead and # "doxygen" is placed in Contents/Resources. This is most likely done # so that something happens when people double-click on the Doxygen.app # package. Unfortunately, CMake gets confused by this as when it sees the @@ -59,7 +59,7 @@ if(APPLE) SET(CMAKE_FIND_APPBUNDLE "NEVER") endif() # FYI: -# In the older versions of OS X Doxygen, dot was included with the +# In the older versions of OS X Doxygen, dot was included with the # Doxygen bundle. But the new versions require you to download # Graphviz.app which contains "dot" in it's bundle. # ============== End OSX stuff ================ @@ -91,7 +91,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(Doxygen REQUIRED_VARS DOXYGEN_EXECUTABLE VERSI IF(NOT DOXYGEN_SKIP_DOT) FIND_PROGRAM(DOXYGEN_DOT_EXECUTABLE NAMES dot - PATHS + PATHS "$ENV{ProgramFiles}/Graphviz 2.21/bin" "C:/Program Files/Graphviz 2.21/bin" "$ENV{ProgramFiles}/ATT/Graphviz/bin" @@ -102,13 +102,13 @@ IF(NOT DOXYGEN_SKIP_DOT) /Applications/Doxygen.app/Contents/MacOS DOC "Graphviz Dot tool for using Doxygen" ) - + if(DOXYGEN_DOT_EXECUTABLE) set(DOXYGEN_DOT_FOUND TRUE) # The Doxyfile wants the path to Dot, not the entire path and executable get_filename_component(DOXYGEN_DOT_PATH "${DOXYGEN_DOT_EXECUTABLE}" PATH CACHE) endif() - + endif(NOT DOXYGEN_SKIP_DOT) # diff --git a/Modules/FindEXPAT.cmake b/Modules/FindEXPAT.cmake index 1bf074357a0..7a6dbbbd9aa 100644 --- a/Modules/FindEXPAT.cmake +++ b/Modules/FindEXPAT.cmake @@ -44,7 +44,7 @@ if (EXPAT_INCLUDE_DIR AND EXISTS "${EXPAT_INCLUDE_DIR}/expat.h") endforeach(VPART) endif (EXPAT_INCLUDE_DIR AND EXISTS "${EXPAT_INCLUDE_DIR}/expat.h") -# handle the QUIETLY and REQUIRED arguments and set EXPAT_FOUND to TRUE if +# handle the QUIETLY and REQUIRED arguments and set EXPAT_FOUND to TRUE if # all listed variables are TRUE INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(EXPAT diff --git a/Modules/FindFLTK.cmake b/Modules/FindFLTK.cmake index bdea95bdc46..8a656f62771 100644 --- a/Modules/FindFLTK.cmake +++ b/Modules/FindFLTK.cmake @@ -136,8 +136,8 @@ ENDIF(NOT FLTK_DIR) # Fluid IF(FLUID_COMMAND) SET(FLTK_FLUID_EXECUTABLE ${FLUID_COMMAND} CACHE FILEPATH "Fluid executable") - ELSE(FLUID_COMMAND) - FIND_PROGRAM(FLTK_FLUID_EXECUTABLE fluid PATHS + ELSE(FLUID_COMMAND) + FIND_PROGRAM(FLTK_FLUID_EXECUTABLE fluid PATHS ${FLTK_EXECUTABLE_DIRS} ${FLTK_EXECUTABLE_DIRS}/RelWithDebInfo ${FLTK_EXECUTABLE_DIRS}/Debug @@ -220,10 +220,10 @@ ENDIF(NOT FLTK_DIR) ${_FLTK_POSSIBLE_INCLUDE_DIRS} ) - FIND_PATH(FLTK_INCLUDE_DIR + FIND_PATH(FLTK_INCLUDE_DIR NAMES FL/Fl.h FL/Fl.H # fltk 1.1.9 has Fl.H (#8376) PATHS ${FLTK_INCLUDE_SEARCH_PATH}) - + # # Try to find FLTK library IF(UNIX) diff --git a/Modules/FindFLTK2.cmake b/Modules/FindFLTK2.cmake index 91647457968..c6a978807cc 100644 --- a/Modules/FindFLTK2.cmake +++ b/Modules/FindFLTK2.cmake @@ -122,10 +122,10 @@ IF(FLTK2_DIR) INCLUDE(${FLTK2_DIR}/FLTK2Config.cmake) # Fluid - IF(FLUID_COMMAND) + IF(FLUID_COMMAND) SET(FLTK2_FLUID_EXECUTABLE ${FLUID_COMMAND} CACHE FILEPATH "Fluid executable") - ELSE(FLUID_COMMAND) - FIND_PROGRAM(FLTK2_FLUID_EXECUTABLE fluid2 PATHS + ELSE(FLUID_COMMAND) + FIND_PROGRAM(FLTK2_FLUID_EXECUTABLE fluid2 PATHS ${FLTK2_EXECUTABLE_DIRS} ${FLTK2_EXECUTABLE_DIRS}/RelWithDebInfo ${FLTK2_EXECUTABLE_DIRS}/Debug @@ -136,7 +136,7 @@ IF(FLTK2_DIR) MARK_AS_ADVANCED(FLTK2_FLUID_EXECUTABLE) SET( FLTK_FLUID_EXECUTABLE ${FLTK2_FLUID_EXECUTABLE} ) - + SET(FLTK2_INCLUDE_DIR ${FLTK2_DIR}) @@ -201,7 +201,7 @@ IF(FLTK2_DIR) FIND_LIBRARY(FLTK2_BASE_LIBRARY NAMES fltk2 PATHS ${FLTK2_LIBRARY_SEARCH_PATH}) - FIND_LIBRARY(FLTK2_GL_LIBRARY NAMES fltk2_gl + FIND_LIBRARY(FLTK2_GL_LIBRARY NAMES fltk2_gl PATHS ${FLTK2_LIBRARY_SEARCH_PATH}) FIND_LIBRARY(FLTK2_IMAGES_LIBRARY NAMES fltk2_images PATHS ${FLTK2_LIBRARY_SEARCH_PATH}) diff --git a/Modules/FindGDAL.cmake b/Modules/FindGDAL.cmake index c31bef5caf8..3b42a33d410 100644 --- a/Modules/FindGDAL.cmake +++ b/Modules/FindGDAL.cmake @@ -28,12 +28,12 @@ # correspond to the ./configure --prefix=$GDAL_DIR # used in building gdal. # -# Created by Eric Wing. I'm not a gdal user, but OpenSceneGraph uses it +# Created by Eric Wing. I'm not a gdal user, but OpenSceneGraph uses it # for osgTerrain so I whipped this module together for completeness. # I actually don't know the conventions or where files are typically # placed in distros. # Any real gdal users are encouraged to correct this (but please don't -# break the OS X framework stuff when doing so which is what usually seems +# break the OS X framework stuff when doing so which is what usually seems # to happen). # This makes the presumption that you are include gdal.h like @@ -85,7 +85,7 @@ IF(UNIX) endif() endif() -FIND_LIBRARY(GDAL_LIBRARY +FIND_LIBRARY(GDAL_LIBRARY NAMES ${_gdal_lib} gdal gdal_i gdal1.5.0 gdal1.4.0 gdal1.3.2 GDAL HINTS $ENV{GDAL_DIR} diff --git a/Modules/FindGLUT.cmake b/Modules/FindGLUT.cmake index 82057792dd6..cfa13751628 100644 --- a/Modules/FindGLUT.cmake +++ b/Modules/FindGLUT.cmake @@ -21,7 +21,7 @@ # License text for the above reference.) IF (WIN32) - FIND_PATH( GLUT_INCLUDE_DIR NAMES GL/glut.h + FIND_PATH( GLUT_INCLUDE_DIR NAMES GL/glut.h PATHS ${GLUT_ROOT_PATH}/include ) FIND_LIBRARY( GLUT_glut_LIBRARY NAMES glut glut32 freeglut PATHS @@ -29,17 +29,17 @@ IF (WIN32) ${GLUT_ROOT_PATH}/Release ) ELSE (WIN32) - + IF (APPLE) # These values for Apple could probably do with improvement. FIND_PATH( GLUT_INCLUDE_DIR glut.h /System/Library/Frameworks/GLUT.framework/Versions/A/Headers ${OPENGL_LIBRARY_DIR} ) - SET(GLUT_glut_LIBRARY "-framework GLUT" CACHE STRING "GLUT library for OSX") + SET(GLUT_glut_LIBRARY "-framework GLUT" CACHE STRING "GLUT library for OSX") SET(GLUT_cocoa_LIBRARY "-framework Cocoa" CACHE STRING "Cocoa framework for OSX") ELSE (APPLE) - + FIND_PATH( GLUT_INCLUDE_DIR GL/glut.h /usr/include/GL /usr/openwin/share/include @@ -47,21 +47,21 @@ ELSE (WIN32) /opt/graphics/OpenGL/include /opt/graphics/OpenGL/contrib/libglut ) - + FIND_LIBRARY( GLUT_glut_LIBRARY glut /usr/openwin/lib ) - + FIND_LIBRARY( GLUT_Xi_LIBRARY Xi /usr/openwin/lib ) - + FIND_LIBRARY( GLUT_Xmu_LIBRARY Xmu /usr/openwin/lib ) - + ENDIF (APPLE) - + ENDIF (WIN32) INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) @@ -76,7 +76,7 @@ IF (GLUT_FOUND) ${GLUT_Xi_LIBRARY} ${GLUT_cocoa_LIBRARY} ) - + #The following deprecated settings are for backwards compatibility with CMake1.4 SET (GLUT_LIBRARY ${GLUT_LIBRARIES}) SET (GLUT_INCLUDE_PATH ${GLUT_INCLUDE_DIR}) diff --git a/Modules/FindGTK.cmake b/Modules/FindGTK.cmake index e9cc62f20f7..3fa75a64037 100644 --- a/Modules/FindGTK.cmake +++ b/Modules/FindGTK.cmake @@ -89,11 +89,11 @@ IF(UNIX) /opt/gnome/lib ) - FIND_LIBRARY( GTK_Xi_LIBRARY - NAMES Xi - PATHS /usr/openwin/lib - /opt/gnome/lib - ) + FIND_LIBRARY( GTK_Xi_LIBRARY + NAMES Xi + PATHS /usr/openwin/lib + /opt/gnome/lib + ) FIND_LIBRARY( GTK_gthread_LIBRARY NAMES gthread gthread12 diff --git a/Modules/FindGTK2.cmake b/Modules/FindGTK2.cmake index 5fe52134ac7..f734b3b5934 100644 --- a/Modules/FindGTK2.cmake +++ b/Modules/FindGTK2.cmake @@ -119,7 +119,7 @@ function(_GTK2_GET_VERSION _OUT_major _OUT_minor _OUT_micro _gtkversion_hdr) string(REGEX REPLACE ".*#define GTK_MAJOR_VERSION[ \t]+\\(([0-9]+)\\).*" "\\1" ${_OUT_major} "${_contents}") string(REGEX REPLACE ".*#define GTK_MINOR_VERSION[ \t]+\\(([0-9]+)\\).*" "\\1" ${_OUT_minor} "${_contents}") string(REGEX REPLACE ".*#define GTK_MICRO_VERSION[ \t]+\\(([0-9]+)\\).*" "\\1" ${_OUT_micro} "${_contents}") - + if(NOT ${_OUT_major} MATCHES "[0-9]+") message(FATAL_ERROR "Version parsing failed for GTK2_MAJOR_VERSION!") endif() @@ -269,7 +269,7 @@ function(_GTK2_FIND_LIBRARY _var _lib _expand_vc _append_version) set(_lib_list ${_library}) set(_libd_list ${_library_d}) endif() - + if(GTK2_DEBUG) message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] " "library list = ${_lib_list} and library debug list = ${_libd_list}") @@ -301,7 +301,7 @@ function(_GTK2_FIND_LIBRARY _var _lib _expand_vc _append_version) "While searching for ${_var}, our proposed library list is ${_lib_list}") endif() - find_library(${_var} + find_library(${_var} NAMES ${_lib_list} PATHS /opt/gnome/lib @@ -403,8 +403,8 @@ if(GTK2_FIND_VERSION) else() message(FATAL_ERROR "GTK2 version check failed. Version ${GTK2_VERSION} was found, at least version ${GTK2_FIND_VERSION} is required") endif() - endif() - + endif() + # If the version check fails, exit out of the module here return() endif() @@ -423,7 +423,7 @@ foreach(_GTK2_component ${GTK2_FIND_COMPONENTS}) _GTK2_FIND_INCLUDE_DIR(GTK2_GLIB_INCLUDE_DIR glib.h) _GTK2_FIND_INCLUDE_DIR(GTK2_GLIBCONFIG_INCLUDE_DIR glibconfig.h) _GTK2_FIND_LIBRARY (GTK2_GLIB_LIBRARY glib false true) - + _GTK2_FIND_INCLUDE_DIR(GTK2_GOBJECT_INCLUDE_DIR gobject/gobject.h) _GTK2_FIND_LIBRARY (GTK2_GOBJECT_LIBRARY gobject false true) @@ -490,7 +490,7 @@ foreach(_GTK2_component ${GTK2_FIND_COMPONENTS}) _GTK2_FIND_INCLUDE_DIR(GTK2_GLADE_INCLUDE_DIR glade/glade.h) _GTK2_FIND_LIBRARY (GTK2_GLADE_LIBRARY glade false true) - + elseif(_GTK2_component STREQUAL "glademm") _GTK2_FIND_INCLUDE_DIR(GTK2_GLADEMM_INCLUDE_DIR libglademm.h) diff --git a/Modules/FindGnuTLS.cmake b/Modules/FindGnuTLS.cmake index 02f29648aaa..617f58f2685 100644 --- a/Modules/FindGnuTLS.cmake +++ b/Modules/FindGnuTLS.cmake @@ -55,7 +55,7 @@ FIND_LIBRARY(GNUTLS_LIBRARY NAMES gnutls libgnutls MARK_AS_ADVANCED(GNUTLS_INCLUDE_DIR GNUTLS_LIBRARY) -# handle the QUIETLY and REQUIRED arguments and set GNUTLS_FOUND to TRUE if +# handle the QUIETLY and REQUIRED arguments and set GNUTLS_FOUND to TRUE if # all listed variables are TRUE INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(GnuTLS diff --git a/Modules/FindGnuplot.cmake b/Modules/FindGnuplot.cmake index b8dc3f49a68..d5730476d2d 100644 --- a/Modules/FindGnuplot.cmake +++ b/Modules/FindGnuplot.cmake @@ -24,7 +24,7 @@ INCLUDE(FindCygwin) FIND_PROGRAM(GNUPLOT_EXECUTABLE - NAMES + NAMES gnuplot pgnuplot wgnupl32 @@ -46,7 +46,7 @@ ENDIF() # for compatibility SET(GNUPLOT ${GNUPLOT_EXECUTABLE}) -# handle the QUIETLY and REQUIRED arguments and set GNUPLOT_FOUND to TRUE if +# handle the QUIETLY and REQUIRED arguments and set GNUPLOT_FOUND to TRUE if # all listed variables are TRUE INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(Gnuplot diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake index bc606389bd3..33599becff7 100644 --- a/Modules/FindHDF5.cmake +++ b/Modules/FindHDF5.cmake @@ -25,7 +25,7 @@ # In addition to finding the includes and libraries required to compile an HDF5 # client application, this module also makes an effort to find tools that come # with the HDF5 distribution that may be useful for regression testing. -# +# # This module will define the following variables: # HDF5_INCLUDE_DIRS - Location of the hdf5 includes # HDF5_INCLUDE_DIR - Location of the hdf5 includes (deprecated) @@ -64,7 +64,7 @@ include(SelectLibraryConfigurations) include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) # List of the valid HDF5 components -set( HDF5_VALID_COMPONENTS +set( HDF5_VALID_COMPONENTS C CXX Fortran @@ -110,10 +110,10 @@ find_program( HDF5_Fortran_COMPILER_EXECUTABLE DOC "HDF5 Fortran Wrapper compiler. Used only to detect HDF5 compile flags." ) mark_as_advanced( HDF5_Fortran_COMPILER_EXECUTABLE ) -find_program( HDF5_DIFF_EXECUTABLE +find_program( HDF5_DIFF_EXECUTABLE NAMES h5diff HINTS ENV HDF5_ROOT - PATH_SUFFIXES bin Bin + PATH_SUFFIXES bin Bin DOC "HDF5 file differencing tool." ) mark_as_advanced( HDF5_DIFF_EXECUTABLE ) @@ -121,7 +121,7 @@ mark_as_advanced( HDF5_DIFF_EXECUTABLE ) # return_value argument, the text output is stored to the output variable. macro( _HDF5_invoke_compiler language output return_value ) if( HDF5_${language}_COMPILER_EXECUTABLE ) - exec_program( ${HDF5_${language}_COMPILER_EXECUTABLE} + exec_program( ${HDF5_${language}_COMPILER_EXECUTABLE} ARGS -show OUTPUT_VARIABLE ${output} RETURN_VALUE ${return_value} @@ -129,14 +129,14 @@ macro( _HDF5_invoke_compiler language output return_value ) if( ${${return_value}} EQUAL 0 ) # do nothing else() - message( STATUS + message( STATUS "Unable to determine HDF5 ${language} flags from HDF5 wrapper." ) endif() endif() endmacro() # Parse a compile line for definitions, includes, library paths, and libraries. -macro( _HDF5_parse_compile_line +macro( _HDF5_parse_compile_line compile_line_var include_paths definitions @@ -144,7 +144,7 @@ macro( _HDF5_parse_compile_line libraries ) # Match the include paths - string( REGEX MATCHALL "-I([^\" ]+)" include_path_flags + string( REGEX MATCHALL "-I([^\" ]+)" include_path_flags "${${compile_line_var}}" ) foreach( IPATH ${include_path_flags} ) @@ -163,7 +163,7 @@ macro( _HDF5_parse_compile_line string( REGEX MATCHALL "-L([^\" ]+|\"[^\"]+\")" library_path_flags "${${compile_line_var}}" ) - + foreach( LPATH ${library_path_flags} ) string( REGEX REPLACE "^-L" "" LPATH ${LPATH} ) string( REGEX REPLACE "//" "/" LPATH ${LPATH} ) @@ -219,7 +219,7 @@ if( NOT HDF5_FOUND ) ${HDF5_C_LIBRARY_NAMES_INIT} ) set( HDF5_Fortran_HL_LIBRARY_NAMES_INIT hdf5hl_fortran ${HDF5_Fortran_LIBRARY_NAMES_INIT} ) - + foreach( LANGUAGE ${HDF5_LANGUAGE_BINDINGS} ) if( HDF5_${LANGUAGE}_COMPILE_LINE ) _HDF5_parse_compile_line( HDF5_${LANGUAGE}_COMPILE_LINE @@ -228,7 +228,7 @@ if( NOT HDF5_FOUND ) HDF5_${LANGUAGE}_LIBRARY_DIRS HDF5_${LANGUAGE}_LIBRARY_NAMES ) - + # take a guess that the includes may be in the 'include' sibling # directory of a library directory. foreach( dir ${HDF5_${LANGUAGE}_LIBRARY_DIRS} ) @@ -238,7 +238,7 @@ if( NOT HDF5_FOUND ) # set the definitions for the language bindings. list( APPEND HDF5_DEFINITIONS ${HDF5_${LANGUAGE}_DEFINITIONS} ) - + # find the HDF5 include directories if(${LANGUAGE} MATCHES "Fortran.*") set(HDF5_INCLUDE_FILENAME hdf5.mod) @@ -251,7 +251,7 @@ if( NOT HDF5_FOUND ) ${HDF5_${LANGUAGE}_INCLUDE_FLAGS} ENV HDF5_ROOT - PATHS + PATHS $ENV{HOME}/.local/include PATH_SUFFIXES include @@ -259,11 +259,11 @@ if( NOT HDF5_FOUND ) ) mark_as_advanced( HDF5_${LANGUAGE}_INCLUDE_DIR ) list( APPEND HDF5_INCLUDE_DIRS ${HDF5_${LANGUAGE}_INCLUDE_DIR} ) - - set( HDF5_${LANGUAGE}_LIBRARY_NAMES - ${HDF5_${LANGUAGE}_LIBRARY_NAMES_INIT} + + set( HDF5_${LANGUAGE}_LIBRARY_NAMES + ${HDF5_${LANGUAGE}_LIBRARY_NAMES_INIT} ${HDF5_${LANGUAGE}_LIBRARY_NAMES} ) - + # find the HDF5 libraries foreach( LIB ${HDF5_${LANGUAGE}_LIBRARY_NAMES} ) if( UNIX AND HDF5_USE_STATIC_LIBRARIES ) @@ -278,15 +278,15 @@ if( NOT HDF5_FOUND ) set( THIS_LIBRARY_SEARCH_DEBUG ${LIB}d ) set( THIS_LIBRARY_SEARCH_RELEASE ${LIB} ) endif() - find_library( HDF5_${LIB}_LIBRARY_DEBUG - NAMES ${THIS_LIBRARY_SEARCH_DEBUG} - HINTS ${HDF5_${LANGUAGE}_LIBRARY_DIRS} - ENV HDF5_ROOT + find_library( HDF5_${LIB}_LIBRARY_DEBUG + NAMES ${THIS_LIBRARY_SEARCH_DEBUG} + HINTS ${HDF5_${LANGUAGE}_LIBRARY_DIRS} + ENV HDF5_ROOT PATH_SUFFIXES lib Lib ) find_library( HDF5_${LIB}_LIBRARY_RELEASE - NAMES ${THIS_LIBRARY_SEARCH_RELEASE} - HINTS ${HDF5_${LANGUAGE}_LIBRARY_DIRS} - ENV HDF5_ROOT + NAMES ${THIS_LIBRARY_SEARCH_RELEASE} + HINTS ${HDF5_${LANGUAGE}_LIBRARY_DIRS} + ENV HDF5_ROOT PATH_SUFFIXES lib Lib ) select_library_configurations( HDF5_${LIB} ) # even though we adjusted the individual library names in @@ -297,16 +297,16 @@ if( NOT HDF5_FOUND ) # up by the selection macro above) because it may specify debug and # optimized variants for a particular library, but a list of # libraries is allowed to specify debug and optimized only once. - list( APPEND HDF5_${LANGUAGE}_LIBRARIES_DEBUG + list( APPEND HDF5_${LANGUAGE}_LIBRARIES_DEBUG ${HDF5_${LIB}_LIBRARY_DEBUG} ) - list( APPEND HDF5_${LANGUAGE}_LIBRARIES_RELEASE + list( APPEND HDF5_${LANGUAGE}_LIBRARIES_RELEASE ${HDF5_${LIB}_LIBRARY_RELEASE} ) endforeach() list( APPEND HDF5_LIBRARY_DIRS ${HDF5_${LANGUAGE}_LIBRARY_DIRS} ) - + # Append the libraries for this language binding to the list of all # required libraries. - list( APPEND HDF5_LIBRARIES_DEBUG + list( APPEND HDF5_LIBRARIES_DEBUG ${HDF5_${LANGUAGE}_LIBRARIES_DEBUG} ) list( APPEND HDF5_LIBRARIES_RELEASE ${HDF5_${LANGUAGE}_LIBRARIES_RELEASE} ) @@ -358,7 +358,7 @@ if( NOT HDF5_FOUND ) set( HDF5_IS_PARALLEL FALSE ) foreach( _dir IN LISTS HDF5_INCLUDE_DIRS ) if( EXISTS "${_dir}/H5pubconf.h" ) - file( STRINGS "${_dir}/H5pubconf.h" + file( STRINGS "${_dir}/H5pubconf.h" HDF5_HAVE_PARALLEL_DEFINE REGEX "HAVE_PARALLEL 1" ) if( HDF5_HAVE_PARALLEL_DEFINE ) @@ -378,8 +378,8 @@ if( NOT HDF5_FOUND ) endif() -find_package_handle_standard_args( HDF5 DEFAULT_MSG - HDF5_LIBRARIES +find_package_handle_standard_args( HDF5 DEFAULT_MSG + HDF5_LIBRARIES HDF5_INCLUDE_DIRS ) diff --git a/Modules/FindHSPELL.cmake b/Modules/FindHSPELL.cmake index ca5709b62ea..79bfc81bb54 100644 --- a/Modules/FindHSPELL.cmake +++ b/Modules/FindHSPELL.cmake @@ -35,7 +35,7 @@ IF (HSPELL_INCLUDE_DIR) SET(HSPELL_VERSION_STRING "${HSPELL_VERSION_MAJOR}.${HSPELL_VERSION_MINOR}") ENDIF() -# handle the QUIETLY and REQUIRED arguments and set HSPELL_FOUND to TRUE if +# handle the QUIETLY and REQUIRED arguments and set HSPELL_FOUND to TRUE if # all listed variables are TRUE INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(HSPELL diff --git a/Modules/FindHTMLHelp.cmake b/Modules/FindHTMLHelp.cmake index 4455b079707..00de82afd14 100644 --- a/Modules/FindHTMLHelp.cmake +++ b/Modules/FindHTMLHelp.cmake @@ -24,20 +24,20 @@ IF(WIN32) hhc "[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]" "$ENV{ProgramFiles}/HTML Help Workshop" - "C:/Program Files/HTML Help Workshop" + "C:/Program Files/HTML Help Workshop" ) GET_FILENAME_COMPONENT(HTML_HELP_COMPILER_PATH "${HTML_HELP_COMPILER}" PATH) - FIND_PATH(HTML_HELP_INCLUDE_PATH - htmlhelp.h + FIND_PATH(HTML_HELP_INCLUDE_PATH + htmlhelp.h "${HTML_HELP_COMPILER_PATH}/include" "[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]/include" "$ENV{ProgramFiles}/HTML Help Workshop/include" - "C:/Program Files/HTML Help Workshop/include" + "C:/Program Files/HTML Help Workshop/include" ) - FIND_LIBRARY(HTML_HELP_LIBRARY + FIND_LIBRARY(HTML_HELP_LIBRARY htmlhelp "${HTML_HELP_COMPILER_PATH}/lib" "[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]/lib" diff --git a/Modules/FindITK.cmake b/Modules/FindITK.cmake index a3ca9989917..5b598d23009 100644 --- a/Modules/FindITK.cmake +++ b/Modules/FindITK.cmake @@ -7,16 +7,16 @@ # that can be included to set the include directories, library directories, # and preprocessor macros. In addition to the variables read from # ITKConfig.cmake, this find module also defines -# ITK_DIR - The directory containing ITKConfig.cmake. -# This is either the root of the build tree, -# or the lib/InsightToolkit directory. +# ITK_DIR - The directory containing ITKConfig.cmake. +# This is either the root of the build tree, +# or the lib/InsightToolkit directory. # This is the only cache entry. -# -# ITK_FOUND - Whether ITK was found. If this is true, +# +# ITK_FOUND - Whether ITK was found. If this is true, # ITK_DIR is okay. # -# USE_ITK_FILE - The full path to the UseITK.cmake file. -# This is provided for backward +# USE_ITK_FILE - The full path to the UseITK.cmake file. +# This is provided for backward # compatability. Use ITK_USE_FILE # instead. diff --git a/Modules/FindJNI.cmake b/Modules/FindJNI.cmake index d49b44a552b..f93b454a477 100644 --- a/Modules/FindJNI.cmake +++ b/Modules/FindJNI.cmake @@ -2,7 +2,7 @@ # This module finds if Java is installed and determines where the # include files and libraries are. It also determines what the name of # the library is. This code sets the following variables: -# +# # JNI_INCLUDE_DIRS = the include dirs to use # JNI_LIBRARIES = the libraries to use # JNI_FOUND = TRUE if JNI headers and libraries were found. @@ -138,7 +138,7 @@ SET(JAVA_AWT_INCLUDE_DIRECTORIES "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.3;JavaHome]/include" "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\${java_install_version};JavaHome]/include" ${_JAVA_HOME}/include - /usr/include + /usr/include /usr/local/include /usr/lib/java/include /usr/local/lib/java/include @@ -162,9 +162,9 @@ FOREACH(JAVA_PROG "${JAVA_RUNTIME}" "${JAVA_COMPILE}" "${JAVA_ARCHIVE}") SET(JAVA_AWT_INCLUDE_DIRECTORIES ${JAVA_AWT_INCLUDE_DIRECTORIES} "${jpath}/${JAVA_INC_PATH}") ENDIF(EXISTS ${jpath}/${JAVA_INC_PATH}) ENDFOREACH(JAVA_INC_PATH) - FOREACH(JAVA_LIB_PATH - ../lib ../jre/lib ../jre/lib/i386 - ../java/lib ../java/jre/lib ../java/jre/lib/i386 + FOREACH(JAVA_LIB_PATH + ../lib ../jre/lib ../jre/lib/i386 + ../java/lib ../java/jre/lib ../java/jre/lib/i386 ../share/java/lib ../share/java/jre/lib ../share/java/jre/lib/i386) IF(EXISTS ${jpath}/${JAVA_LIB_PATH}) SET(JAVA_AWT_LIBRARY_DIRECTORIES ${JAVA_AWT_LIBRARY_DIRECTORIES} "${jpath}/${JAVA_LIB_PATH}") @@ -209,7 +209,7 @@ IF(APPLE) ) ENDIF(JAVA_HAVE_FRAMEWORK) ELSE(APPLE) - FIND_LIBRARY(JAVA_AWT_LIBRARY jawt + FIND_LIBRARY(JAVA_AWT_LIBRARY jawt PATHS ${JAVA_AWT_LIBRARY_DIRECTORIES} ) FIND_LIBRARY(JAVA_JVM_LIBRARY NAMES jvm JavaVM @@ -217,12 +217,12 @@ ELSE(APPLE) ) ENDIF(APPLE) -# add in the include path -FIND_PATH(JAVA_INCLUDE_PATH jni.h +# add in the include path +FIND_PATH(JAVA_INCLUDE_PATH jni.h ${JAVA_AWT_INCLUDE_DIRECTORIES} ) -FIND_PATH(JAVA_INCLUDE_PATH2 jni_md.h +FIND_PATH(JAVA_INCLUDE_PATH2 jni_md.h ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH}/win32 ${JAVA_INCLUDE_PATH}/linux diff --git a/Modules/FindJPEG.cmake b/Modules/FindJPEG.cmake index 349e7e175e5..0b5db408901 100644 --- a/Modules/FindJPEG.cmake +++ b/Modules/FindJPEG.cmake @@ -25,7 +25,7 @@ FIND_PATH(JPEG_INCLUDE_DIR jpeglib.h) SET(JPEG_NAMES ${JPEG_NAMES} jpeg) FIND_LIBRARY(JPEG_LIBRARY NAMES ${JPEG_NAMES} ) -# handle the QUIETLY and REQUIRED arguments and set JPEG_FOUND to TRUE if +# handle the QUIETLY and REQUIRED arguments and set JPEG_FOUND to TRUE if # all listed variables are TRUE INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(JPEG DEFAULT_MSG JPEG_LIBRARY JPEG_INCLUDE_DIR) diff --git a/Modules/FindJasper.cmake b/Modules/FindJasper.cmake index 6dc7e4db7a0..b6178449b60 100644 --- a/Modules/FindJasper.cmake +++ b/Modules/FindJasper.cmake @@ -39,7 +39,7 @@ IF (JASPER_INCLUDE_DIR AND EXISTS "${JASPER_INCLUDE_DIR}/jasper/jas_config.h") STRING(REGEX REPLACE "^#define[\t ]+JAS_VERSION[\t ]+\"([^\"]+)\".*" "\\1" JASPER_VERSION_STRING "${jasper_version_str}") ENDIF (JASPER_INCLUDE_DIR AND EXISTS "${JASPER_INCLUDE_DIR}/jasper/jas_config.h") -# handle the QUIETLY and REQUIRED arguments and set JASPER_FOUND to TRUE if +# handle the QUIETLY and REQUIRED arguments and set JASPER_FOUND to TRUE if # all listed variables are TRUE INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(Jasper diff --git a/Modules/FindJava.cmake b/Modules/FindJava.cmake index 345702122a0..2e50ecac207 100644 --- a/Modules/FindJava.cmake +++ b/Modules/FindJava.cmake @@ -23,7 +23,7 @@ # Java_VERSION_STRING = 1.5.0_17 # and # Java_VERSION = 1.5.0.17 -# +# # another example is the Java OEM, with: # Java_VERSION_STRING = 1.6.0-oem # and @@ -102,7 +102,7 @@ IF(Java_JAVA_EXECUTABLE) ENDIF() ELSE() # extract major/minor version and patch level from "java -version" output - # Tested on linux using + # Tested on linux using # 1. Sun / Sun OEM # 2. OpenJDK 1.6 # 3. GCJ 1.5 diff --git a/Modules/FindKDE3.cmake b/Modules/FindKDE3.cmake index ca3dae646e5..65a559fa78c 100644 --- a/Modules/FindKDE3.cmake +++ b/Modules/FindKDE3.cmake @@ -101,7 +101,7 @@ SET(QT_MT_REQUIRED TRUE) IF(KDE3_FIND_REQUIRED) SET(_REQ_STRING_KDE3 "REQUIRED") ENDIF(KDE3_FIND_REQUIRED) - + FIND_PACKAGE(Qt3 ${_REQ_STRING_KDE3}) FIND_PACKAGE(X11 ${_REQ_STRING_KDE3}) diff --git a/Modules/FindKDE4.cmake b/Modules/FindKDE4.cmake index ed4f270b0c3..fb933282818 100644 --- a/Modules/FindKDE4.cmake +++ b/Modules/FindKDE4.cmake @@ -38,14 +38,14 @@ ENDIF(QT_QT_LIBRARY) FILE(TO_CMAKE_PATH "$ENV{KDEDIRS}" _KDEDIRS) # when cross compiling, searching kde4-config in order to run it later on -# doesn't make a lot of sense. We'll have to do something about this. +# doesn't make a lot of sense. We'll have to do something about this. # Searching always in the target environment ? Then we get at least the correct one, # still it can't be used to run it. Alex # For KDE4 kde-config has been renamed to kde4-config FIND_PROGRAM(KDE4_KDECONFIG_EXECUTABLE NAMES kde4-config # the suffix must be used since KDEDIRS can be a list of directories which don't have bin/ appended - PATH_SUFFIXES bin + PATH_SUFFIXES bin HINTS ${CMAKE_INSTALL_PREFIX} ${_KDEDIRS} diff --git a/Modules/FindLATEX.cmake b/Modules/FindLATEX.cmake index 950daca5a9d..7997ae9c8f2 100644 --- a/Modules/FindLATEX.cmake +++ b/Modules/FindLATEX.cmake @@ -1,14 +1,14 @@ # - Find Latex # This module finds if Latex is installed and determines where the # executables are. This code sets the following variables: -# +# # LATEX_COMPILER: path to the LaTeX compiler # PDFLATEX_COMPILER: path to the PdfLaTeX compiler # BIBTEX_COMPILER: path to the BibTeX compiler # MAKEINDEX_COMPILER: path to the MakeIndex compiler # DVIPS_CONVERTER: path to the DVIPS converter # PS2PDF_CONVERTER: path to the PS2PDF converter -# LATEX2HTML_CONVERTER: path to the LaTeX2Html converter +# LATEX2HTML_CONVERTER: path to the LaTeX2Html converter # #============================================================================= @@ -30,7 +30,7 @@ IF (WIN32) FIND_PATH(MIKTEX_BINARY_PATH mpm.exe "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MiK\\MiKTeX\\CurrentVersion\\MiKTeX;Install Root]/miktex/bin" - DOC + DOC "Path to the MikTex binary directory." ) MARK_AS_ADVANCED(MIKTEX_BINARY_PATH) diff --git a/Modules/FindLibXml2.cmake b/Modules/FindLibXml2.cmake index 48a549806f4..4fc5d88b1c8 100644 --- a/Modules/FindLibXml2.cmake +++ b/Modules/FindLibXml2.cmake @@ -56,7 +56,7 @@ ELSEIF(LIBXML2_INCLUDE_DIR AND EXISTS "${LIBXML2_INCLUDE_DIR}/libxml/xmlversion. UNSET(libxml2_version_str) ENDIF() -# handle the QUIETLY and REQUIRED arguments and set LIBXML2_FOUND to TRUE if +# handle the QUIETLY and REQUIRED arguments and set LIBXML2_FOUND to TRUE if # all listed variables are TRUE INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 diff --git a/Modules/FindLua50.cmake b/Modules/FindLua50.cmake index 9a5cc1703ce..5196cf758f9 100644 --- a/Modules/FindLua50.cmake +++ b/Modules/FindLua50.cmake @@ -1,6 +1,6 @@ # Locate Lua library # This module defines -# LUA50_FOUND, if false, do not try to link to Lua +# LUA50_FOUND, if false, do not try to link to Lua # LUA_LIBRARIES, both lua and lualib # LUA_INCLUDE_DIR, where to find lua.h and lualib.h (and probably lauxlib.h) # @@ -37,7 +37,7 @@ FIND_PATH(LUA_INCLUDE_DIR lua.h /opt ) -FIND_LIBRARY(LUA_LIBRARY_lua +FIND_LIBRARY(LUA_LIBRARY_lua NAMES lua50 lua5.0 lua-5.0 lua5 lua HINTS $ENV{LUA_DIR} @@ -56,7 +56,7 @@ FIND_LIBRARY(LUA_LIBRARY_lua IF(${LUA_LIBRARY_lua} MATCHES "framework") SET( LUA_LIBRARIES "${LUA_LIBRARY_lua}" CACHE STRING "Lua framework") ELSE(${LUA_LIBRARY_lua} MATCHES "framework") - FIND_LIBRARY(LUA_LIBRARY_lualib + FIND_LIBRARY(LUA_LIBRARY_lualib NAMES lualib50 lualib5.0 lualib5 lualib HINTS $ENV{LUALIB_DIR} @@ -82,7 +82,7 @@ ENDIF(${LUA_LIBRARY_lua} MATCHES "framework") INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) -# handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE if +# handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE if # all listed variables are TRUE FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua50 DEFAULT_MSG LUA_LIBRARIES LUA_INCLUDE_DIR) diff --git a/Modules/FindLua51.cmake b/Modules/FindLua51.cmake index e111d362434..468b5d4fc7a 100644 --- a/Modules/FindLua51.cmake +++ b/Modules/FindLua51.cmake @@ -1,6 +1,6 @@ # Locate Lua library # This module defines -# LUA51_FOUND, if false, do not try to link to Lua +# LUA51_FOUND, if false, do not try to link to Lua # LUA_LIBRARIES # LUA_INCLUDE_DIR, where to find lua.h # LUA_VERSION_STRING, the version of Lua found (since CMake 2.8.8) @@ -38,7 +38,7 @@ FIND_PATH(LUA_INCLUDE_DIR lua.h /opt ) -FIND_LIBRARY(LUA_LIBRARY +FIND_LIBRARY(LUA_LIBRARY NAMES lua51 lua5.1 lua-5.1 lua HINTS $ENV{LUA_DIR} @@ -71,7 +71,7 @@ IF(LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/lua.h") ENDIF() INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) -# handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE if +# handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE if # all listed variables are TRUE FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua51 REQUIRED_VARS LUA_LIBRARIES LUA_INCLUDE_DIR diff --git a/Modules/FindMPEG.cmake b/Modules/FindMPEG.cmake index cf4ef58f8eb..545e0490cb4 100644 --- a/Modules/FindMPEG.cmake +++ b/Modules/FindMPEG.cmake @@ -32,7 +32,7 @@ FIND_LIBRARY( MPEG_vo_LIBRARY vo /usr/local/livid/mpeg2dec/libvo/.libs ) -# handle the QUIETLY and REQUIRED arguments and set MPEG2_FOUND to TRUE if +# handle the QUIETLY and REQUIRED arguments and set MPEG2_FOUND to TRUE if # all listed variables are TRUE INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(MPEG DEFAULT_MSG MPEG_INCLUDE_DIR MPEG_mpeg2_LIBRARY MPEG_vo_LIBRARY) diff --git a/Modules/FindMPEG2.cmake b/Modules/FindMPEG2.cmake index fab37cf549a..5456e20b6b3 100644 --- a/Modules/FindMPEG2.cmake +++ b/Modules/FindMPEG2.cmake @@ -20,7 +20,7 @@ # (To distribute this file outside of CMake, substitute the full # License text for the above reference.) -FIND_PATH(MPEG2_INCLUDE_DIR +FIND_PATH(MPEG2_INCLUDE_DIR NAMES mpeg2.h mpeg2dec/mpeg2.h PATHS /usr/local/livid ) @@ -34,13 +34,13 @@ FIND_LIBRARY( MPEG2_vo_LIBRARY vo ) -# handle the QUIETLY and REQUIRED arguments and set MPEG2_FOUND to TRUE if +# handle the QUIETLY and REQUIRED arguments and set MPEG2_FOUND to TRUE if # all listed variables are TRUE INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(MPEG2 DEFAULT_MSG MPEG2_mpeg2_LIBRARY MPEG2_INCLUDE_DIR) IF(MPEG2_FOUND) - SET( MPEG2_LIBRARIES ${MPEG2_mpeg2_LIBRARY} + SET( MPEG2_LIBRARIES ${MPEG2_mpeg2_LIBRARY} ${MPEG2_vo_LIBRARY}) #some native mpeg2 installations will depend diff --git a/Modules/FindMotif.cmake b/Modules/FindMotif.cmake index e35411272a9..57da1c1e965 100644 --- a/Modules/FindMotif.cmake +++ b/Modules/FindMotif.cmake @@ -32,7 +32,7 @@ IF(UNIX) ENDIF(UNIX) -# handle the QUIETLY and REQUIRED arguments and set MOTIF_FOUND to TRUE if +# handle the QUIETLY and REQUIRED arguments and set MOTIF_FOUND to TRUE if # all listed variables are TRUE INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(Motif DEFAULT_MSG MOTIF_LIBRARIES MOTIF_INCLUDE_DIR) diff --git a/Modules/FindOpenAL.cmake b/Modules/FindOpenAL.cmake index cb3ce481302..fdac4551804 100644 --- a/Modules/FindOpenAL.cmake +++ b/Modules/FindOpenAL.cmake @@ -1,7 +1,7 @@ # Locate OpenAL # This module defines # OPENAL_LIBRARY -# OPENAL_FOUND, if false, do not try to link to OpenAL +# OPENAL_FOUND, if false, do not try to link to OpenAL # OPENAL_INCLUDE_DIR, where to find the headers # # $OPENALDIR is an environment variable that would @@ -25,31 +25,31 @@ # This makes the presumption that you are include al.h like # #include "al.h" -# and not +# and not # #include # The reason for this is that the latter is not entirely portable. -# Windows/Creative Labs does not by default put their headers in AL/ and +# Windows/Creative Labs does not by default put their headers in AL/ and # OS X uses the convention . -# -# For Windows, Creative Labs seems to have added a registry key for their +# +# For Windows, Creative Labs seems to have added a registry key for their # OpenAL 1.1 installer. I have added that key to the list of search paths, -# however, the key looks like it could be a little fragile depending on +# however, the key looks like it could be a little fragile depending on # if they decide to change the 1.00.0000 number for bug fix releases. # Also, they seem to have laid down groundwork for multiple library platforms # which puts the library in an extra subdirectory. Currently there is only -# Win32 and I have hardcoded that here. This may need to be adjusted as +# Win32 and I have hardcoded that here. This may need to be adjusted as # platforms are introduced. # The OpenAL 1.0 installer doesn't seem to have a useful key I can use. # I do not know if the Nvidia OpenAL SDK has a registry key. -# -# For OS X, remember that OpenAL was added by Apple in 10.4 (Tiger). -# To support the framework, I originally wrote special framework detection +# +# For OS X, remember that OpenAL was added by Apple in 10.4 (Tiger). +# To support the framework, I originally wrote special framework detection # code in this module which I have now removed with CMake's introduction # of native support for frameworks. -# In addition, OpenAL is open source, and it is possible to compile on Panther. -# Furthermore, due to bugs in the initial OpenAL release, and the +# In addition, OpenAL is open source, and it is possible to compile on Panther. +# Furthermore, due to bugs in the initial OpenAL release, and the # transition to OpenAL 1.1, it is common to need to override the built-in -# framework. +# framework. # Per my request, CMake should search for frameworks first in # the following order: # ~/Library/Frameworks/OpenAL.framework/Headers @@ -57,7 +57,7 @@ # /System/Library/Frameworks/OpenAL.framework/Headers # # On OS X, this will prefer the Framework version (if found) over others. -# People will have to manually change the cache values of +# People will have to manually change the cache values of # OPENAL_LIBRARY to override this selection or set the CMake environment # CMAKE_INCLUDE_PATH to modify the search paths. @@ -75,7 +75,7 @@ FIND_PATH(OPENAL_INCLUDE_DIR al.h [HKEY_LOCAL_MACHINE\\SOFTWARE\\Creative\ Labs\\OpenAL\ 1.1\ Software\ Development\ Kit\\1.00.0000;InstallDir] ) -FIND_LIBRARY(OPENAL_LIBRARY +FIND_LIBRARY(OPENAL_LIBRARY NAMES OpenAL al openal OpenAL32 HINTS $ENV{OPENALDIR} diff --git a/Modules/FindOpenGL.cmake b/Modules/FindOpenGL.cmake index 98d8808c0fb..322972a59f1 100644 --- a/Modules/FindOpenGL.cmake +++ b/Modules/FindOpenGL.cmake @@ -1,18 +1,18 @@ # - Try to find OpenGL # Once done this will define -# +# # OPENGL_FOUND - system has OpenGL # OPENGL_XMESA_FOUND - system has XMESA # OPENGL_GLU_FOUND - system has GLU # OPENGL_INCLUDE_DIR - the GL include directory # OPENGL_LIBRARIES - Link these to use OpenGL and GLU -# +# # If you want to use just GL you can use these values # OPENGL_gl_LIBRARY - Path to OpenGL Library # OPENGL_glu_LIBRARY - Path to GLU Library -# +# # On OSX default to using the framework version of opengl -# People will have to change the cache values of OPENGL_glu_LIBRARY +# People will have to change the cache values of OPENGL_glu_LIBRARY # and OPENGL_gl_LIBRARY to use OpenGL with X11 on OSX #============================================================================= @@ -63,7 +63,7 @@ ELSE (WIN32) IF(CMAKE_SIZEOF_VOID_P EQUAL 4) SET(HPUX_IA_OPENGL_LIB_PATH /opt/graphics/OpenGL/lib/hpux32/) ELSE(CMAKE_SIZEOF_VOID_P EQUAL 4) - SET(HPUX_IA_OPENGL_LIB_PATH + SET(HPUX_IA_OPENGL_LIB_PATH /opt/graphics/OpenGL/lib/hpux64/ /opt/graphics/OpenGL/lib/pa20_64) ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 4) @@ -97,7 +97,7 @@ ELSE (WIN32) ) # On Unix OpenGL most certainly always requires X11. - # Feel free to tighten up these conditions if you don't + # Feel free to tighten up these conditions if you don't # think this is always true. # It's not true on OSX. diff --git a/Modules/FindOpenMP.cmake b/Modules/FindOpenMP.cmake index b96a2ecfb9b..87c9d032da0 100644 --- a/Modules/FindOpenMP.cmake +++ b/Modules/FindOpenMP.cmake @@ -75,12 +75,12 @@ function(_OPENMP_FLAG_CANDIDATES LANG) endfunction(_OPENMP_FLAG_CANDIDATES) # sample openmp source code to test -set(OpenMP_C_TEST_SOURCE +set(OpenMP_C_TEST_SOURCE " #include -int main() { +int main() { #ifdef _OPENMP - return 0; + return 0; #else breaks_on_purpose #endif diff --git a/Modules/FindOpenSceneGraph.cmake b/Modules/FindOpenSceneGraph.cmake index 52f931689d1..9dd2c28f0c6 100644 --- a/Modules/FindOpenSceneGraph.cmake +++ b/Modules/FindOpenSceneGraph.cmake @@ -14,7 +14,7 @@ # # OpenSceneGraph_DEBUG - Enable debugging output # -# OpenSceneGraph_MARK_AS_ADVANCED - Mark cache variables as advanced +# OpenSceneGraph_MARK_AS_ADVANCED - Mark cache variables as advanced # automatically # # The following environment variables are also respected for finding the OSG @@ -96,12 +96,12 @@ if(OSG_INCLUDE_DIR) message(STATUS "[ FindOpenSceneGraph.cmake:${CMAKE_CURRENT_LIST_LINE} ] " "Detected OSG_INCLUDE_DIR = ${OSG_INCLUDE_DIR}") endif() - + set(_osg_Version_file "${OSG_INCLUDE_DIR}/osg/Version") if("${OSG_INCLUDE_DIR}" MATCHES "\\.framework$" AND NOT EXISTS "${_osg_Version_file}") set(_osg_Version_file "${OSG_INCLUDE_DIR}/Headers/Version") endif() - + if(EXISTS "${_osg_Version_file}") file(READ "${_osg_Version_file}" _osg_Version_contents) else() @@ -149,7 +149,7 @@ if(OpenSceneGraph_FIND_VERSION AND OPENSCENEGRAPH_VERSION) endif() else() # version is too low - if(NOT OPENSCENEGRAPH_VERSION VERSION_EQUAL ${OpenSceneGraph_FIND_VERSION} AND + if(NOT OPENSCENEGRAPH_VERSION VERSION_EQUAL ${OpenSceneGraph_FIND_VERSION} AND NOT OPENSCENEGRAPH_VERSION VERSION_GREATER ${OpenSceneGraph_FIND_VERSION}) set(_osg_version_not_high_enough TRUE) endif() @@ -182,7 +182,7 @@ endforeach() if(OPENSCENEGRAPH_INCLUDE_DIR) list(REMOVE_DUPLICATES OPENSCENEGRAPH_INCLUDE_DIR) endif() - + # # Inform the users with an error message based on # what version they have vs. what version was @@ -221,7 +221,7 @@ else() set(_osg_missing_message "${_osg_missing_message} ${_osg_module}") endif() endforeach() - + if(_osg_missing_nodekit_fail) message(FATAL_ERROR "ERROR: Missing the following osg " "libraries: ${_osg_missing_message}.\n" diff --git a/Modules/FindOpenThreads.cmake b/Modules/FindOpenThreads.cmake index 6b81fbe3a90..4f6e920c2a5 100644 --- a/Modules/FindOpenThreads.cmake +++ b/Modules/FindOpenThreads.cmake @@ -1,10 +1,10 @@ -# OpenThreads is a C++ based threading library. Its largest userbase +# OpenThreads is a C++ based threading library. Its largest userbase # seems to OpenSceneGraph so you might notice I accept OSGDIR as an # environment path. -# I consider this part of the Findosg* suite used to find OpenSceneGraph +# I consider this part of the Findosg* suite used to find OpenSceneGraph # components. # Each component is separate and you must opt in to each module. -# +# # Locate OpenThreads # This module defines # OPENTHREADS_LIBRARY @@ -34,8 +34,8 @@ # #include # To make it easier for one-step automated configuration/builds, -# we leverage environmental paths. This is preferable -# to the -DVAR=value switches because it insulates the +# we leverage environmental paths. This is preferable +# to the -DVAR=value switches because it insulates the # users from changes we may make in this script. # It also offers a little more flexibility than setting # the CMAKE_*_PATH since we can target specific components. @@ -71,8 +71,8 @@ find_path(OPENTHREADS_INCLUDE_DIR OpenThreads/Thread ) -find_library(OPENTHREADS_LIBRARY - NAMES OpenThreads OpenThreadsWin32 +find_library(OPENTHREADS_LIBRARY + NAMES OpenThreads OpenThreadsWin32 HINTS $ENV{OPENTHREADS_LIBRARY_DIR} $ENV{OPENTHREADS_DIR} @@ -90,7 +90,7 @@ find_library(OPENTHREADS_LIBRARY PATH_SUFFIXES lib64 lib ) -find_library(OPENTHREADS_LIBRARY_DEBUG +find_library(OPENTHREADS_LIBRARY_DEBUG NAMES OpenThreadsd OpenThreadsWin32d HINTS $ENV{OPENTHREADS_DEBUG_LIBRARY_DIR} diff --git a/Modules/FindPHP4.cmake b/Modules/FindPHP4.cmake index 6c2965a7a5a..abdabe144ec 100644 --- a/Modules/FindPHP4.cmake +++ b/Modules/FindPHP4.cmake @@ -52,7 +52,7 @@ MARK_AS_ADVANCED( IF(APPLE) # this is a hack for now - SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS + SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "${CMAKE_SHARED_MODULE_CREATE_C_FLAGS} -Wl,-flat_namespace") FOREACH(symbol __efree @@ -76,7 +76,7 @@ IF(APPLE) _zend_wrong_param_count _zval_used_for_init ) - SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS + SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "${CMAKE_SHARED_MODULE_CREATE_C_FLAGS},-U,${symbol}") ENDFOREACH(symbol) ENDIF(APPLE) diff --git a/Modules/FindPerl.cmake b/Modules/FindPerl.cmake index ae686df7512..bedb839d1c7 100644 --- a/Modules/FindPerl.cmake +++ b/Modules/FindPerl.cmake @@ -26,11 +26,11 @@ SET(PERL_POSSIBLE_BIN_PATHS IF(WIN32) GET_FILENAME_COMPONENT( - ActivePerl_CurrentVersion - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActivePerl;CurrentVersion]" + ActivePerl_CurrentVersion + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActivePerl;CurrentVersion]" NAME) SET(PERL_POSSIBLE_BIN_PATHS ${PERL_POSSIBLE_BIN_PATHS} - "C:/Perl/bin" + "C:/Perl/bin" [HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActivePerl\\${ActivePerl_CurrentVersion}]/bin ) ENDIF(WIN32) @@ -73,7 +73,7 @@ ENDIF(PERL_EXECUTABLE) # Deprecated settings for compatibility with CMake1.4 SET(PERL ${PERL_EXECUTABLE}) -# handle the QUIETLY and REQUIRED arguments and set PERL_FOUND to TRUE if +# handle the QUIETLY and REQUIRED arguments and set PERL_FOUND to TRUE if # all listed variables are TRUE INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(Perl diff --git a/Modules/FindPerlLibs.cmake b/Modules/FindPerlLibs.cmake index b2ffd3cf6a0..3db67acc4e9 100644 --- a/Modules/FindPerlLibs.cmake +++ b/Modules/FindPerlLibs.cmake @@ -236,7 +236,7 @@ if (PERL_EXECUTABLE) endif (PERL_EXECUTABLE) -# handle the QUIETLY and REQUIRED arguments and set PERLLIBS_FOUND to TRUE if +# handle the QUIETLY and REQUIRED arguments and set PERLLIBS_FOUND to TRUE if # all listed variables are TRUE include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) find_package_handle_standard_args(PerlLibs REQUIRED_VARS PERL_LIBRARY PERL_INCLUDE_PATH diff --git a/Modules/FindPhysFS.cmake b/Modules/FindPhysFS.cmake index 2e3ac1400c0..45f9d2e6f9f 100644 --- a/Modules/FindPhysFS.cmake +++ b/Modules/FindPhysFS.cmake @@ -8,7 +8,7 @@ # correspond to the ./configure --prefix=$PHYSFSDIR # used in building PHYSFS. # -# Created by Eric Wing. +# Created by Eric Wing. #============================================================================= # Copyright 2005-2009 Kitware, Inc. @@ -36,7 +36,7 @@ FIND_PATH(PHYSFS_INCLUDE_DIR physfs.h /opt ) -FIND_LIBRARY(PHYSFS_LIBRARY +FIND_LIBRARY(PHYSFS_LIBRARY NAMES physfs HINTS $ENV{PHYSFSDIR} diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake index 39d3a76abd8..99b2c1fe2d1 100644 --- a/Modules/FindPkgConfig.cmake +++ b/Modules/FindPkgConfig.cmake @@ -156,7 +156,7 @@ endmacro(_pkgconfig_invoke_dyn) macro(_pkgconfig_parse_options _result _is_req _is_silent) set(${_is_req} 0) set(${_is_silent} 0) - + foreach(_pkg ${ARGN}) if (_pkg STREQUAL "REQUIRED") set(${_is_req} 1) @@ -207,7 +207,7 @@ macro(_pkg_check_modules_internal _is_required _is_silent _prefix) message(STATUS "checking for modules '${_pkg_check_modules_list}'") endif(_pkg_check_modules_cnt EQUAL 1) endif(NOT ${_is_silent}) - + set(_pkg_check_modules_packages) set(_pkg_check_modules_failed) @@ -234,14 +234,14 @@ macro(_pkg_check_modules_internal _is_required _is_silent _prefix) if (_pkg_check_modules_pkg_op STREQUAL "=") list(APPEND _pkg_check_modules_exist_query --exact-version) endif(_pkg_check_modules_pkg_op STREQUAL "=") - + if (_pkg_check_modules_pkg_op STREQUAL "<=") list(APPEND _pkg_check_modules_exist_query --max-version) endif(_pkg_check_modules_pkg_op STREQUAL "<=") # create the final query which is of the format: # * --atleast-version - # * --exact-version + # * --exact-version # * --max-version # * --exists if (_pkg_check_modules_pkg_op) @@ -281,7 +281,7 @@ macro(_pkg_check_modules_internal _is_required _is_silent _prefix) else(_pkg_check_modules_failed) # when we are here, we checked whether requested modules # exist. Now, go through them and set variables - + _pkgconfig_set(${_prefix}_FOUND 1) list(LENGTH _pkg_check_modules_packages pkg_count) @@ -293,7 +293,7 @@ macro(_pkg_check_modules_internal _is_required _is_silent _prefix) else(pkg_count EQUAL 1) set(_pkg_check_prefix "${_prefix}_${_pkg_check_modules_pkg}") endif(pkg_count EQUAL 1) - + _pkgconfig_invoke(${_pkg_check_modules_pkg} "${_pkg_check_prefix}" VERSION "" --modversion ) _pkgconfig_invoke(${_pkg_check_modules_pkg} "${_pkg_check_prefix}" PREFIX "" --variable=prefix ) _pkgconfig_invoke(${_pkg_check_modules_pkg} "${_pkg_check_prefix}" INCLUDEDIR "" --variable=includedir ) @@ -363,9 +363,9 @@ macro(pkg_search_module _prefix _module0) message(SEND_ERROR "None of the required '${_pkg_modules_alt}' found") endif(${_pkg_is_required}) endif(NOT ${_prefix}_FOUND) - + _pkgconfig_set(__pkg_config_checked_${_prefix} ${PKG_CONFIG_VERSION}) - endif(NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION} OR NOT ${_prefix}_FOUND) + endif(NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION} OR NOT ${_prefix}_FOUND) endmacro(pkg_search_module) ### Local Variables: diff --git a/Modules/FindProducer.cmake b/Modules/FindProducer.cmake index 26c804ac1c0..f7840c5d151 100644 --- a/Modules/FindProducer.cmake +++ b/Modules/FindProducer.cmake @@ -1,18 +1,18 @@ # Though Producer isn't directly part of OpenSceneGraph, its primary user -# is OSG so I consider this part of the Findosg* suite used to find +# is OSG so I consider this part of the Findosg* suite used to find # OpenSceneGraph components. You'll notice that I accept OSGDIR as an # environment path. -# -# Each component is separate and you must opt in to each module. You must -# also opt into OpenGL (and OpenThreads?) as these -# modules won't do it for you. This is to allow you control over your own +# +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL (and OpenThreads?) as these +# modules won't do it for you. This is to allow you control over your own # system piece by piece in case you need to opt out of certain components # or change the Find behavior for a particular module (perhaps because the # default FindOpenGL.cmake module doesn't work with your system as an # example). # If you want to use a more convenient module that includes everything, # use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. -# +# # Locate Producer # This module defines # PRODUCER_LIBRARY @@ -59,7 +59,7 @@ FIND_PATH(PRODUCER_INCLUDE_DIR Producer/CameraGroup [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include ) -FIND_LIBRARY(PRODUCER_LIBRARY +FIND_LIBRARY(PRODUCER_LIBRARY NAMES Producer HINTS $ENV{PRODUCER_DIR} diff --git a/Modules/FindProtobuf.cmake b/Modules/FindProtobuf.cmake index 1e1e4930109..c8616cc51f8 100644 --- a/Modules/FindProtobuf.cmake +++ b/Modules/FindProtobuf.cmake @@ -109,7 +109,7 @@ function(PROTOBUF_GENERATE_CPP SRCS HDRS) foreach(FIL ${ARGN}) get_filename_component(ABS_FIL ${FIL} ABSOLUTE) get_filename_component(FIL_WE ${FIL} NAME_WE) - + list(APPEND ${SRCS} "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.cc") list(APPEND ${HDRS} "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.h") diff --git a/Modules/FindQt.cmake b/Modules/FindQt.cmake index 2b8dfd7fb8a..5a1f6fc38b1 100644 --- a/Modules/FindQt.cmake +++ b/Modules/FindQt.cmake @@ -4,13 +4,13 @@ # If multiple versions of QT are found on the machine, then # The user must set the option DESIRED_QT_VERSION to the version # they want to use. If only one version of qt is found on the machine, -# then the DESIRED_QT_VERSION is set to that version and the +# then the DESIRED_QT_VERSION is set to that version and the # matching FindQt3 or FindQt4 module is included. # Once the user sets DESIRED_QT_VERSION, then the FindQt3 or FindQt4 module # is included. # -# QT_REQUIRED if this is set to TRUE then if CMake can -# not find QT4 or QT3 an error is raised +# QT_REQUIRED if this is set to TRUE then if CMake can +# not find QT4 or QT3 an error is raised # and a message is sent to the user. # # DESIRED_QT_VERSION OPTION is created @@ -72,7 +72,7 @@ ENDIF(QT_QMAKE_EXECUTABLE_FINDQT) IF(QT_QMAKE_EXECUTABLE_FINDQT) EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE_FINDQT} - ARGS "-query QT_INSTALL_HEADERS" + ARGS "-query QT_INSTALL_HEADERS" OUTPUT_VARIABLE qt_headers ) ENDIF(QT_QMAKE_EXECUTABLE_FINDQT) @@ -94,7 +94,7 @@ IF(QT4_QGLOBAL_H_FILE) ENDIF(QT4_QGLOBAL_H_FILE) FIND_FILE( QT3_QGLOBAL_H_FILE qglobal.h - "${QT_SEARCH_PATH}/Qt/include" + "${QT_SEARCH_PATH}/Qt/include" "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/include/Qt" "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/include/Qt" "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/include/Qt" diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake index d157dabaac7..e3eb1e69b3f 100644 --- a/Modules/FindQt4.cmake +++ b/Modules/FindQt4.cmake @@ -2,8 +2,8 @@ # This module can be used to find Qt4. # The most important issue is that the Qt4 qmake is available via the system path. # This qmake is then used to detect basically everything else. -# This module defines a number of key variables and macros. -# The variable QT_USE_FILE is set which is the path to a CMake file that can be included +# This module defines a number of key variables and macros. +# The variable QT_USE_FILE is set which is the path to a CMake file that can be included # to compile Qt 4 applications and libraries. It sets up the compilation # environment for include directories, preprocessor defines and populates a # QT_LIBRARIES variable. @@ -15,10 +15,10 @@ # target_link_libraries(myexe ${QT_LIBRARIES}) # # The minimum required version can be specified using the standard find_package()-syntax -# (see example above). +# (see example above). # For compatibility with older versions of FindQt4.cmake it is also possible to -# set the variable QT_MIN_VERSION to the minimum required version of Qt4 before the -# find_package(Qt4) command. +# set the variable QT_MIN_VERSION to the minimum required version of Qt4 before the +# find_package(Qt4) command. # If both are used, the version used in the find_package() command overrides the # one from QT_MIN_VERSION. # @@ -53,26 +53,26 @@ # QT_USE_QTSCRIPTTOOLS # QT_USE_QTDECLARATIVE # -# QT_USE_IMPORTED_TARGETS +# QT_USE_IMPORTED_TARGETS # If this variable is set to TRUE, FindQt4.cmake will create imported -# library targets for the various Qt libraries and set the +# library targets for the various Qt libraries and set the # library variables like QT_QTCORE_LIBRARY to point at these imported -# targets instead of the library file on disk. This provides much better -# handling of the release and debug versions of the Qt libraries and is +# targets instead of the library file on disk. This provides much better +# handling of the release and debug versions of the Qt libraries and is # also always backwards compatible, except for the case that dependencies -# of libraries are exported, these will then also list the names of the +# of libraries are exported, these will then also list the names of the # imported targets as dependency and not the file location on disk. This # is much more flexible, but requires that FindQt4.cmake is executed before # such an exported dependency file is processed. # # There are also some files that need processing by some Qt tools such as moc # and uic. Listed below are macros that may be used to process those files. -# +# # macro QT4_WRAP_CPP(outfiles inputfile ... OPTIONS ...) # create moc code from a list of files containing Qt class with # the Q_OBJECT declaration. Per-directory preprocessor definitions # are also added. Options may be given to moc, such as those found -# when executing "moc -help". +# when executing "moc -help". # # macro QT4_WRAP_UI(outfiles inputfile ... OPTIONS ...) # create code from a list of Qt designer ui files. @@ -92,13 +92,13 @@ # macro QT4_AUTOMOC(sourcefile1 sourcefile2 ... ) # This macro is still experimental. # It can be used to have moc automatically handled. -# So if you have the files foo.h and foo.cpp, and in foo.h a +# So if you have the files foo.h and foo.cpp, and in foo.h a # a class uses the Q_OBJECT macro, moc has to run on it. If you don't # want to use QT4_WRAP_CPP() (which is reliable and mature), you can insert # #include "foo.moc" # in foo.cpp and then give foo.cpp as argument to QT4_AUTOMOC(). This will the # scan all listed files at cmake-time for such included moc files and if it finds -# them cause a rule to be generated to run moc at build time on the +# them cause a rule to be generated to run moc at build time on the # accompanying header file foo.h. # If a source file has the SKIP_AUTOMOC property set it will be ignored by this macro. # @@ -106,7 +106,7 @@ # # macro QT4_ADD_DBUS_INTERFACE(outfiles interface basename) # Create a the interface header and implementation files with the -# given basename from the given interface xml file and add it to +# given basename from the given interface xml file and add it to # the list of sources. # # You can pass additional parameters to the qdbusxml2cpp call by setting @@ -136,19 +136,19 @@ # # macro QT4_GENERATE_DBUS_INTERFACE( header [interfacename] OPTIONS ...) # generate the xml interface file from the given header. -# If the optional argument interfacename is omitted, the name of the +# If the optional argument interfacename is omitted, the name of the # interface file is constructed from the basename of the header with # the suffix .xml appended. # Options may be given to qdbuscpp2xml, such as those found when executing "qdbuscpp2xml --help" # -# macro QT4_CREATE_TRANSLATION( qm_files directories ... sources ... +# macro QT4_CREATE_TRANSLATION( qm_files directories ... sources ... # ts_files ... OPTIONS ...) # out: qm_files # in: directories sources ts_files # options: flags to pass to lupdate, such as -extensions to specify # extensions for a directory scan. # generates commands to create .ts (vie lupdate) and .qm -# (via lrelease) - files from directories and/or sources. The ts files are +# (via lrelease) - files from directories and/or sources. The ts files are # created and/or updated in the source tree (unless given with full paths). # The qm files are generated in the build tree. # Updating the translations can be done by adding the qm_files @@ -211,41 +211,41 @@ # The QT_USE_FILE will also define QT_DEBUG and QT_NO_DEBUG # to fit your current build type. Those are not contained # in QT_DEFINITIONS. -# -# QT_INCLUDES List of paths to all include directories of +# +# QT_INCLUDES List of paths to all include directories of # Qt4 QT_INCLUDE_DIR and QT_QTCORE_INCLUDE_DIR are # always in this variable even if NOTFOUND, # all other INCLUDE_DIRS are # only added if they are found. # You do not need to use this if you include QT_USE_FILE. -# +# # # Include directories for the Qt modules are listed here. # You do not need to use these variables if you include QT_USE_FILE. # # QT_INCLUDE_DIR Path to "include" of Qt4 -# QT_QT3SUPPORT_INCLUDE_DIR Path to "include/Qt3Support" -# QT_QTASSISTANT_INCLUDE_DIR Path to "include/QtAssistant" +# QT_QT3SUPPORT_INCLUDE_DIR Path to "include/Qt3Support" +# QT_QTASSISTANT_INCLUDE_DIR Path to "include/QtAssistant" # QT_QTASSISTANTCLIENT_INCLUDE_DIR Path to "include/QtAssistant" # QT_QAXCONTAINER_INCLUDE_DIR Path to "include/ActiveQt" (Windows only) # QT_QAXSERVER_INCLUDE_DIR Path to "include/ActiveQt" (Windows only) -# QT_QTCORE_INCLUDE_DIR Path to "include/QtCore" +# QT_QTCORE_INCLUDE_DIR Path to "include/QtCore" # QT_QTDBUS_INCLUDE_DIR Path to "include/QtDBus" -# QT_QTDESIGNER_INCLUDE_DIR Path to "include/QtDesigner" +# QT_QTDESIGNER_INCLUDE_DIR Path to "include/QtDesigner" # QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR Path to "include/QtDesigner" -# QT_QTGUI_INCLUDE_DIR Path to "include/QtGui" +# QT_QTGUI_INCLUDE_DIR Path to "include/QtGui" # QT_QTHELP_INCLUDE_DIR Path to "include/QtHelp" -# QT_QTMOTIF_INCLUDE_DIR Path to "include/QtMotif" -# QT_QTMULTIMEDIA_INCLUDE_DIR Path to "include/QtMultimedia" -# QT_QTNETWORK_INCLUDE_DIR Path to "include/QtNetwork" -# QT_QTNSPLUGIN_INCLUDE_DIR Path to "include/QtNsPlugin" -# QT_QTOPENGL_INCLUDE_DIR Path to "include/QtOpenGL" +# QT_QTMOTIF_INCLUDE_DIR Path to "include/QtMotif" +# QT_QTMULTIMEDIA_INCLUDE_DIR Path to "include/QtMultimedia" +# QT_QTNETWORK_INCLUDE_DIR Path to "include/QtNetwork" +# QT_QTNSPLUGIN_INCLUDE_DIR Path to "include/QtNsPlugin" +# QT_QTOPENGL_INCLUDE_DIR Path to "include/QtOpenGL" # QT_QTSCRIPT_INCLUDE_DIR Path to "include/QtScript" -# QT_QTSQL_INCLUDE_DIR Path to "include/QtSql" +# QT_QTSQL_INCLUDE_DIR Path to "include/QtSql" # QT_QTSVG_INCLUDE_DIR Path to "include/QtSvg" # QT_QTTEST_INCLUDE_DIR Path to "include/QtTest" # QT_QTWEBKIT_INCLUDE_DIR Path to "include/QtWebKit" -# QT_QTXML_INCLUDE_DIR Path to "include/QtXml" +# QT_QTXML_INCLUDE_DIR Path to "include/QtXml" # QT_QTXMLPATTERNS_INCLUDE_DIR Path to "include/QtXmlPatterns" # QT_PHONON_INCLUDE_DIR Path to "include/phonon" # QT_QTSCRIPTTOOLS_INCLUDE_DIR Path to "include/QtScriptTools" @@ -292,7 +292,7 @@ # QT_QTMAIN_LIBRARY The qtmain library for Windows # QT_PHONON_LIBRARY The phonon library # QT_QTSCRIPTTOOLS_LIBRARY The QtScriptTools library -# +# # The QtDeclarative library: QT_QTDECLARATIVE_LIBRARY # # also defined, but NOT for general use are @@ -307,17 +307,17 @@ # QT_QCOLLECTIONGENERATOR_EXECUTABLE Where to find the qcollectiongenerator tool. # QT_DESIGNER_EXECUTABLE Where to find the Qt designer tool. # QT_LINGUIST_EXECUTABLE Where to find the Qt linguist tool. -# # -# These are around for backwards compatibility +# +# These are around for backwards compatibility # they will be set # QT_WRAP_CPP Set true if QT_MOC_EXECUTABLE is found # QT_WRAP_UI Set true if QT_UIC_EXECUTABLE is found -# +# # These variables do _NOT_ have any effect anymore (compared to FindQt.cmake) # QT_MT_REQUIRED Qt4 is now always multithreaded -# -# These variables are set to "" Because Qt structure changed +# +# These variables are set to "" Because Qt structure changed # (They make no sense in Qt4) # QT_QT_LIBRARY Qt-Library is now split @@ -340,12 +340,12 @@ IF( Qt4_FIND_COMPONENTS ) STRING( TOUPPER ${component} _COMPONENT ) SET( QT_USE_${_COMPONENT} 1 ) ENDFOREACH( component ) - + # To make sure we don't use QtCore or QtGui when not in COMPONENTS IF(NOT QT_USE_QTCORE) SET( QT_DONT_USE_QTCORE 1 ) ENDIF(NOT QT_USE_QTCORE) - + IF(NOT QT_USE_QTGUI) SET( QT_DONT_USE_QTGUI 1 ) ENDIF(NOT QT_USE_QTGUI) @@ -765,7 +765,7 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION) QtHelp QtWebKit QtXmlPatterns phonon QtNetwork QtMultimedia QtNsPlugin QtOpenGL QtSql QtXml QtDesigner QtDBus QtScriptTools QtDeclarative) - + IF(Q_WS_X11) SET(QT_MODULES ${QT_MODULES} QtMotif) ENDIF(Q_WS_X11) @@ -840,7 +840,7 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION) ${QT_LIBRARY_DIR}/QtDesigner.framework/Headers NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH ) - + # Set QT_QTASSISTANT_INCLUDE_DIR FIND_PATH(QT_QTASSISTANT_INCLUDE_DIR QtAssistant PATHS @@ -848,7 +848,7 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION) ${QT_LIBRARY_DIR}/QtAssistant.framework/Headers NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH ) - + # Set QT_QTASSISTANTCLIENT_INCLUDE_DIR FIND_PATH(QT_QTASSISTANTCLIENT_INCLUDE_DIR QAssistantClient PATHS @@ -866,11 +866,11 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION) # find the libraries FOREACH(QT_MODULE ${QT_MODULES}) STRING(TOUPPER ${QT_MODULE} _upper_qt_module) - FIND_LIBRARY(QT_${_upper_qt_module}_LIBRARY_RELEASE + FIND_LIBRARY(QT_${_upper_qt_module}_LIBRARY_RELEASE NAMES ${QT_MODULE}${QT_LIBINFIX} ${QT_MODULE}${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH ) - FIND_LIBRARY(QT_${_upper_qt_module}_LIBRARY_DEBUG + FIND_LIBRARY(QT_${_upper_qt_module}_LIBRARY_DEBUG NAMES ${QT_MODULE}${QT_LIBINFIX}_debug ${QT_MODULE}${QT_LIBINFIX}d ${QT_MODULE}${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH ) @@ -891,11 +891,11 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION) FIND_LIBRARY(QT_QTMAIN_LIBRARY_RELEASE NAMES qtmain${QT_LIBINFIX} PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) FIND_LIBRARY(QT_QTMAIN_LIBRARY_DEBUG NAMES qtmain${QT_LIBINFIX}d PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) ENDIF(Q_WS_WIN) - + # Set QT_QTASSISTANTCLIENT_LIBRARY FIND_LIBRARY(QT_QTASSISTANTCLIENT_LIBRARY_RELEASE NAMES QtAssistantClient${QT_LIBINFIX} QtAssistantClient${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) FIND_LIBRARY(QT_QTASSISTANTCLIENT_LIBRARY_DEBUG NAMES QtAssistantClient${QT_LIBINFIX}_debug QtAssistantClient${QT_LIBINFIX}d QtAssistantClient${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) - + # Set QT_QTASSISTANT_LIBRARY FIND_LIBRARY(QT_QTASSISTANT_LIBRARY_RELEASE NAMES QtAssistantClient${QT_LIBINFIX} QtAssistantClient${QT_LIBINFIX}4 QtAssistant${QT_LIBINFIX} QtAssistant${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) FIND_LIBRARY(QT_QTASSISTANT_LIBRARY_DEBUG NAMES QtAssistantClient${QT_LIBINFIX}_debug QtAssistantClient${QT_LIBINFIX}d QtAssistantClient${QT_LIBINFIX}d4 QtAssistant${QT_LIBINFIX}_debug QtAssistant${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) @@ -915,7 +915,7 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION) ############################################ - # Set QT_xyz_LIBRARY variable and add + # Set QT_xyz_LIBRARY variable and add # library include path to QT_INCLUDES _QT4_ADJUST_LIB_VARS(QtCore) @@ -938,7 +938,7 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION) ####################################### # - # Check the executables of Qt + # Check the executables of Qt # ( moc, uic, rcc ) # ####################################### @@ -957,7 +957,7 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION) SET(QT_DESIGNER_EXECUTABLE NOTFOUND) SET(QT_LINGUIST_EXECUTABLE NOTFOUND) ENDIF(QT_QMAKE_CHANGED) - + FIND_PROGRAM(QT_MOC_EXECUTABLE NAMES moc-qt4 moc PATHS ${QT_BINARY_DIR} @@ -976,19 +976,19 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION) NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH ) - FIND_PROGRAM(QT_RCC_EXECUTABLE + FIND_PROGRAM(QT_RCC_EXECUTABLE NAMES rcc PATHS ${QT_BINARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH ) - FIND_PROGRAM(QT_DBUSCPP2XML_EXECUTABLE + FIND_PROGRAM(QT_DBUSCPP2XML_EXECUTABLE NAMES qdbuscpp2xml PATHS ${QT_BINARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH ) - FIND_PROGRAM(QT_DBUSXML2CPP_EXECUTABLE + FIND_PROGRAM(QT_DBUSXML2CPP_EXECUTABLE NAMES qdbusxml2cpp PATHS ${QT_BINARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH @@ -1043,10 +1043,10 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION) # get the directory of the current file, used later on in the file GET_FILENAME_COMPONENT( _qt4_current_dir "${CMAKE_CURRENT_LIST_FILE}" PATH) - + ############################################### # - # configuration/system dependent settings + # configuration/system dependent settings # ############################################### diff --git a/Modules/FindQuickTime.cmake b/Modules/FindQuickTime.cmake index 038c2dd654d..ccbcb31874e 100644 --- a/Modules/FindQuickTime.cmake +++ b/Modules/FindQuickTime.cmake @@ -1,13 +1,13 @@ # Locate QuickTime # This module defines # QUICKTIME_LIBRARY -# QUICKTIME_FOUND, if false, do not try to link to gdal +# QUICKTIME_FOUND, if false, do not try to link to gdal # QUICKTIME_INCLUDE_DIR, where to find the headers # # $QUICKTIME_DIR is an environment variable that would # correspond to the ./configure --prefix=$QUICKTIME_DIR # -# Created by Eric Wing. +# Created by Eric Wing. #============================================================================= # Copyright 2007-2009 Kitware, Inc. diff --git a/Modules/FindSDL.cmake b/Modules/FindSDL.cmake index 1c04726ea9a..363591f0c26 100644 --- a/Modules/FindSDL.cmake +++ b/Modules/FindSDL.cmake @@ -6,22 +6,22 @@ # # This module responds to the the flag: # SDL_BUILDING_LIBRARY -# If this is defined, then no SDL_main will be linked in because +# If this is defined, then no SDL_main will be linked in because # only applications need main(). # Otherwise, it is assumed you are building an application and this # module will attempt to locate and set the the proper link flags # as part of the returned SDL_LIBRARY variable. # -# Don't forget to include SDLmain.h and SDLmain.m your project for the +# Don't forget to include SDLmain.h and SDLmain.m your project for the # OS X framework based version. (Other versions link to -lSDLmain which -# this module will try to find on your behalf.) Also for OS X, this +# this module will try to find on your behalf.) Also for OS X, this # module will automatically add the -framework Cocoa on your behalf. # # # Additional Note: If you see an empty SDL_LIBRARY_TEMP in your configuration -# and no SDL_LIBRARY, it means CMake did not find your SDL library -# (SDL.dll, libsdl.so, SDL.framework, etc). -# Set SDL_LIBRARY_TEMP to point to your SDL library, and configure again. +# and no SDL_LIBRARY, it means CMake did not find your SDL library +# (SDL.dll, libsdl.so, SDL.framework, etc). +# Set SDL_LIBRARY_TEMP to point to your SDL library, and configure again. # Similarly, if you see an empty SDLMAIN_LIBRARY, you should set this value # as appropriate. These values are used to generate the final SDL_LIBRARY # variable, but when these values are unset, SDL_LIBRARY does not get created. @@ -32,18 +32,18 @@ # used in building SDL. # l.e.galup 9-20-02 # -# Modified by Eric Wing. +# Modified by Eric Wing. # Added code to assist with automated building by using environmental variables # and providing a more controlled/consistent search behavior. -# Added new modifications to recognize OS X frameworks and -# additional Unix paths (FreeBSD, etc). +# Added new modifications to recognize OS X frameworks and +# additional Unix paths (FreeBSD, etc). # Also corrected the header search path to follow "proper" SDL guidelines. # Added a search for SDLmain which is needed by some platforms. # Added a search for threads which is needed by some platforms. # Added needed compile switches for MinGW. # # On OSX, this will prefer the Framework version (if found) over others. -# People will have to manually change the cache values of +# People will have to manually change the cache values of # SDL_LIBRARY to override this selection or set the CMake environment # CMAKE_INCLUDE_PATH to modify the search paths. # @@ -84,7 +84,7 @@ FIND_PATH(SDL_INCLUDE_DIR SDL.h # SDL-1.1 is the name used by FreeBSD ports... # don't confuse it for the version number. -FIND_LIBRARY(SDL_LIBRARY_TEMP +FIND_LIBRARY(SDL_LIBRARY_TEMP NAMES SDL SDL-1.1 HINTS $ENV{SDLDIR} @@ -98,11 +98,11 @@ FIND_LIBRARY(SDL_LIBRARY_TEMP IF(NOT SDL_BUILDING_LIBRARY) IF(NOT ${SDL_INCLUDE_DIR} MATCHES ".framework") - # Non-OS X framework versions expect you to also dynamically link to - # SDLmain. This is mainly for Windows and OS X. Other (Unix) platforms + # Non-OS X framework versions expect you to also dynamically link to + # SDLmain. This is mainly for Windows and OS X. Other (Unix) platforms # seem to provide SDLmain for compatibility even though they don't # necessarily need it. - FIND_LIBRARY(SDLMAIN_LIBRARY + FIND_LIBRARY(SDLMAIN_LIBRARY NAMES SDLmain SDLmain-1.1 HINTS $ENV{SDLDIR} @@ -117,8 +117,8 @@ IF(NOT SDL_BUILDING_LIBRARY) ENDIF(NOT SDL_BUILDING_LIBRARY) # SDL may require threads on your system. -# The Apple build may not need an explicit flag because one of the -# frameworks may already provide it. +# The Apple build may not need an explicit flag because one of the +# frameworks may already provide it. # But for non-OSX systems, I will use the CMake Threads package. IF(NOT APPLE) FIND_PACKAGE(Threads) @@ -140,15 +140,15 @@ IF(SDL_LIBRARY_TEMP) ENDIF(NOT SDL_BUILDING_LIBRARY) # For OS X, SDL uses Cocoa as a backend so it must link to Cocoa. - # CMake doesn't display the -framework Cocoa string in the UI even + # CMake doesn't display the -framework Cocoa string in the UI even # though it actually is there if I modify a pre-used variable. # I think it has something to do with the CACHE STRING. - # So I use a temporary variable until the end so I can set the + # So I use a temporary variable until the end so I can set the # "real" variable in one-shot. IF(APPLE) SET(SDL_LIBRARY_TEMP ${SDL_LIBRARY_TEMP} "-framework Cocoa") ENDIF(APPLE) - + # For threads, as mentioned Apple doesn't need this. # In fact, there seems to be a problem if I used the Threads package # and try using this line, so I'm just skipping it entirely for OS X. diff --git a/Modules/FindSDL_image.cmake b/Modules/FindSDL_image.cmake index f215bda4792..7128f67fb02 100644 --- a/Modules/FindSDL_image.cmake +++ b/Modules/FindSDL_image.cmake @@ -8,8 +8,8 @@ # correspond to the ./configure --prefix=$SDLDIR # used in building SDL. # -# Created by Eric Wing. This was influenced by the FindSDL.cmake -# module, but with modifications to recognize OS X frameworks and +# Created by Eric Wing. This was influenced by the FindSDL.cmake +# module, but with modifications to recognize OS X frameworks and # additional Unix paths (FreeBSD, etc). #============================================================================= @@ -44,12 +44,12 @@ FIND_PATH(SDLIMAGE_INCLUDE_DIR SDL_image.h /opt/local/include/SDL # DarwinPorts /opt/local/include /opt/csw/include/SDL # Blastwave - /opt/csw/include + /opt/csw/include /opt/include/SDL /opt/include ) -FIND_LIBRARY(SDLIMAGE_LIBRARY +FIND_LIBRARY(SDLIMAGE_LIBRARY NAMES SDL_image HINTS $ENV{SDLIMAGEDIR} diff --git a/Modules/FindSDL_mixer.cmake b/Modules/FindSDL_mixer.cmake index 7cc1a6b098a..e8da6407a29 100644 --- a/Modules/FindSDL_mixer.cmake +++ b/Modules/FindSDL_mixer.cmake @@ -8,8 +8,8 @@ # correspond to the ./configure --prefix=$SDLDIR # used in building SDL. # -# Created by Eric Wing. This was influenced by the FindSDL.cmake -# module, but with modifications to recognize OS X frameworks and +# Created by Eric Wing. This was influenced by the FindSDL.cmake +# module, but with modifications to recognize OS X frameworks and # additional Unix paths (FreeBSD, etc). #============================================================================= @@ -44,12 +44,12 @@ FIND_PATH(SDLMIXER_INCLUDE_DIR SDL_mixer.h /opt/local/include/SDL # DarwinPorts /opt/local/include /opt/csw/include/SDL # Blastwave - /opt/csw/include + /opt/csw/include /opt/include/SDL /opt/include ) -FIND_LIBRARY(SDLMIXER_LIBRARY +FIND_LIBRARY(SDLMIXER_LIBRARY NAMES SDL_mixer HINTS $ENV{SDLMIXERDIR} diff --git a/Modules/FindSDL_net.cmake b/Modules/FindSDL_net.cmake index ca1de7977bf..f1bd0919e20 100644 --- a/Modules/FindSDL_net.cmake +++ b/Modules/FindSDL_net.cmake @@ -8,8 +8,8 @@ # correspond to the ./configure --prefix=$SDLDIR # used in building SDL. # -# Created by Eric Wing. This was influenced by the FindSDL.cmake -# module, but with modifications to recognize OS X frameworks and +# Created by Eric Wing. This was influenced by the FindSDL.cmake +# module, but with modifications to recognize OS X frameworks and # additional Unix paths (FreeBSD, etc). #============================================================================= @@ -44,11 +44,11 @@ FIND_PATH(SDLNET_INCLUDE_DIR SDL_net.h /opt/local/include/SDL # DarwinPorts /opt/local/include /opt/csw/include/SDL # Blastwave - /opt/csw/include + /opt/csw/include /opt/include/SDL /opt/include ) -FIND_LIBRARY(SDLNET_LIBRARY +FIND_LIBRARY(SDLNET_LIBRARY NAMES SDL_net HINTS $ENV{SDLNETDIR} diff --git a/Modules/FindSDL_sound.cmake b/Modules/FindSDL_sound.cmake index 35294a5e4fd..963a811f543 100644 --- a/Modules/FindSDL_sound.cmake +++ b/Modules/FindSDL_sound.cmake @@ -1,18 +1,18 @@ # Locates the SDL_sound library -# This module depends on SDL being found and +# This module depends on SDL being found and # must be called AFTER FindSDL.cmake is called. # This module defines # SDL_SOUND_INCLUDE_DIR, where to find SDL_sound.h # SDL_SOUND_FOUND, if false, do not try to link to SDL -# SDL_SOUND_LIBRARIES, this contains the list of libraries that you need +# SDL_SOUND_LIBRARIES, this contains the list of libraries that you need # to link against. This is a read-only variable and is marked INTERNAL. # SDL_SOUND_EXTRAS, this is an optional variable for you to add your own # flags to SDL_SOUND_LIBRARIES. This is prepended to SDL_SOUND_LIBRARIES. # This is available mostly for cases this module failed to anticipate for # and you must add additional flags. This is marked as ADVANCED. - + # # This module also defines (but you shouldn't need to use directly) # SDL_SOUND_LIBRARY, the name of just the SDL_sound library you would link @@ -26,32 +26,32 @@ # FLAC_LIBRARY # SPEEX_LIBRARY # -# Typically, you should not use these variables directly, and you should use -# SDL_SOUND_LIBRARIES which contains SDL_SOUND_LIBRARY and the other audio libraries -# (if needed) to successfully compile on your system . +# Typically, you should not use these variables directly, and you should use +# SDL_SOUND_LIBRARIES which contains SDL_SOUND_LIBRARY and the other audio libraries +# (if needed) to successfully compile on your system . # -# Created by Eric Wing. +# Created by Eric Wing. # This module is a bit more complicated than the other FindSDL* family modules. # The reason is that SDL_sound can be compiled in a large variety of different ways # which are independent of platform. SDL_sound may dynamically link against other 3rd # party libraries to get additional codec support, such as Ogg Vorbis, SMPEG, ModPlug, -# MikMod, FLAC, Speex, and potentially others. -# Under some circumstances which I don't fully understand, +# MikMod, FLAC, Speex, and potentially others. +# Under some circumstances which I don't fully understand, # there seems to be a requirement -# that dependent libraries of libraries you use must also be explicitly -# linked against in order to successfully compile. SDL_sound does not currently +# that dependent libraries of libraries you use must also be explicitly +# linked against in order to successfully compile. SDL_sound does not currently # have any system in place to know how it was compiled. -# So this CMake module does the hard work in trying to discover which 3rd party +# So this CMake module does the hard work in trying to discover which 3rd party # libraries are required for building (if any). # This module uses a brute force approach to create a test program that uses SDL_sound, -# and then tries to build it. If the build fails, it parses the error output for +# and then tries to build it. If the build fails, it parses the error output for # known symbol names to figure out which libraries are needed. # # Responds to the $SDLDIR and $SDLSOUNDDIR environmental variable that would # correspond to the ./configure --prefix=$SDLDIR used in building SDL. # # On OSX, this will prefer the Framework version (if found) over others. -# People will have to manually change the cache values of +# People will have to manually change the cache values of # SDL_LIBRARY to override this selectionor set the CMake environment # CMAKE_INCLUDE_PATH to modify the search paths. # @@ -91,12 +91,12 @@ FIND_PATH(SDL_SOUND_INCLUDE_DIR SDL_sound.h /opt/local/include/SDL # DarwinPorts /opt/local/include /opt/csw/include/SDL # Blastwave - /opt/csw/include + /opt/csw/include /opt/include/SDL /opt/include ) -FIND_LIBRARY(SDL_SOUND_LIBRARY +FIND_LIBRARY(SDL_SOUND_LIBRARY NAMES SDL_sound HINTS $ENV{SDLSOUNDDIR}/lib @@ -116,7 +116,7 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY) # for the :STRING syntax if I have multiple values contained in a # single variable. This is a problem for the SDL_LIBRARY variable # because it does just that. When I feed this variable to the command, - # only the first value gets the appropriate modifier (e.g. -I) and + # only the first value gets the appropriate modifier (e.g. -I) and # the rest get dropped. # To get multiple single variables to work, I must separate them with a "\;" # I could go back and modify the FindSDL.cmake module, but that's kind of painful. @@ -125,12 +125,12 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY) # Instead, it was suggested on the mailing list to write a temporary CMakeLists.txt # with a temporary test project and invoke that with TRY_COMPILE. # See message thread "Figuring out dependencies for a library in order to build" - # 2005-07-16 - # TRY_COMPILE( + # 2005-07-16 + # TRY_COMPILE( # MY_RESULT # ${CMAKE_BINARY_DIR} # ${PROJECT_SOURCE_DIR}/DetermineSoundLibs.c - # CMAKE_FLAGS + # CMAKE_FLAGS # -DINCLUDE_DIRECTORIES:STRING=${SDL_INCLUDE_DIR}\;${SDL_SOUND_INCLUDE_DIR} # -DLINK_LIBRARIES:STRING=${SDL_SOUND_LIBRARY}\;${SDL_LIBRARY} # OUTPUT_VARIABLE MY_OUTPUT @@ -149,25 +149,25 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY) SDL_Init(0); Sound_Init(); - + /* This doesn't actually have to work, but Init() is a no-op * for some of the decoders, so this should force more symbols * to be pulled in. */ sample = Sound_NewSampleFromFile(argv[1], &desired, 4096); - + Sound_Quit(); SDL_Quit(); return 0; }" ) - # Calling + # Calling # TARGET_LINK_LIBRARIES(DetermineSoundLibs "${SDL_SOUND_LIBRARY} ${SDL_LIBRARY}) # causes problems when SDL_LIBRARY looks like # /Library/Frameworks/SDL.framework;-framework Cocoa # The ;-framework Cocoa seems to be confusing CMake once the OS X - # framework support was added. I was told that breaking up the list + # framework support was added. I was told that breaking up the list # would fix the problem. SET(TMP_TRY_LIBS) FOREACH(lib ${SDL_SOUND_LIBRARY} ${SDL_LIBRARY}) @@ -175,10 +175,10 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY) ENDFOREACH(lib) # MESSAGE("TMP_TRY_LIBS ${TMP_TRY_LIBS}") - + # Write the CMakeLists.txt and test project # Weird, this is still sketchy. If I don't quote the variables - # in the TARGET_LINK_LIBRARIES, I seem to loose everything + # in the TARGET_LINK_LIBRARIES, I seem to loose everything # in the SDL_LIBRARY string after the "-framework". # But if I quote the stuff in INCLUDE_DIRECTORIES, it doesn't work. FILE(WRITE ${PROJECT_BINARY_DIR}/CMakeTmp/CMakeLists.txt @@ -188,25 +188,25 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY) TARGET_LINK_LIBRARIES(DetermineSoundLibs ${TMP_TRY_LIBS})" ) - TRY_COMPILE( + TRY_COMPILE( MY_RESULT ${PROJECT_BINARY_DIR}/CMakeTmp ${PROJECT_BINARY_DIR}/CMakeTmp DetermineSoundLibs OUTPUT_VARIABLE MY_OUTPUT ) - + # MESSAGE("${MY_RESULT}") # MESSAGE(${MY_OUTPUT}) - + IF(NOT MY_RESULT) - + # I expect that MPGLIB, VOC, WAV, AIFF, and SHN are compiled in statically. # I think Timidity is also compiled in statically. # I've never had to explcitly link against Quicktime, so I'll skip that for now. - + SET(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARY}) - + # Find MikMod IF("${MY_OUTPUT}" MATCHES "MikMod_") FIND_LIBRARY(MIKMOD_LIBRARY @@ -222,12 +222,12 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY) /opt/local/lib /opt/csw/lib /opt/lib - ) + ) IF(MIKMOD_LIBRARY) SET(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${MIKMOD_LIBRARY}) ENDIF(MIKMOD_LIBRARY) ENDIF("${MY_OUTPUT}" MATCHES "MikMod_") - + # Find ModPlug IF("${MY_OUTPUT}" MATCHES "MODPLUG_") FIND_LIBRARY(MODPLUG_LIBRARY @@ -249,7 +249,7 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY) ENDIF(MODPLUG_LIBRARY) ENDIF("${MY_OUTPUT}" MATCHES "MODPLUG_") - + # Find Ogg and Vorbis IF("${MY_OUTPUT}" MATCHES "ov_") FIND_LIBRARY(VORBIS_LIBRARY @@ -271,7 +271,7 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY) IF(VORBIS_LIBRARY) SET(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${VORBIS_LIBRARY}) ENDIF(VORBIS_LIBRARY) - + FIND_LIBRARY(OGG_LIBRARY NAMES ogg Ogg OGG PATHS @@ -292,8 +292,8 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY) SET(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${OGG_LIBRARY}) ENDIF(OGG_LIBRARY) ENDIF("${MY_OUTPUT}" MATCHES "ov_") - - + + # Find SMPEG IF("${MY_OUTPUT}" MATCHES "SMPEG_") FIND_LIBRARY(SMPEG_LIBRARY @@ -314,8 +314,8 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY) SET(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${SMPEG_LIBRARY}) ENDIF(SMPEG_LIBRARY) ENDIF("${MY_OUTPUT}" MATCHES "SMPEG_") - - + + # Find FLAC IF("${MY_OUTPUT}" MATCHES "FLAC_") FIND_LIBRARY(FLAC_LIBRARY @@ -336,8 +336,8 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY) SET(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${FLAC_LIBRARY}) ENDIF(FLAC_LIBRARY) ENDIF("${MY_OUTPUT}" MATCHES "FLAC_") - - + + # Hmmm...Speex seems to depend on Ogg. This might be a problem if # the TRY_COMPILE attempt gets blocked at SPEEX before it can pull # in the Ogg symbols. I'm not sure if I should duplicate the ogg stuff @@ -360,7 +360,7 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY) IF(SPEEX_LIBRARY) SET(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${SPEEX_LIBRARY}) ENDIF(SPEEX_LIBRARY) - + # Find OGG (needed for Speex) # We might have already found Ogg for Vorbis, so skip it if so. IF(NOT OGG_LIBRARY) @@ -387,7 +387,7 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY) ENDIF(OGG_LIBRARY) ENDIF(NOT OGG_LIBRARY) ENDIF("${MY_OUTPUT}" MATCHES "speex_") - + ELSE(NOT MY_RESULT) SET(SDL_SOUND_LIBRARIES "${SDL_SOUND_EXTRAS} ${SDL_SOUND_LIBRARY}" CACHE INTERNAL "SDL_sound and dependent libraries") ENDIF(NOT MY_RESULT) diff --git a/Modules/FindSDL_ttf.cmake b/Modules/FindSDL_ttf.cmake index 184b6c3f5c7..8bba2130f2f 100644 --- a/Modules/FindSDL_ttf.cmake +++ b/Modules/FindSDL_ttf.cmake @@ -8,8 +8,8 @@ # correspond to the ./configure --prefix=$SDLDIR # used in building SDL. # -# Created by Eric Wing. This was influenced by the FindSDL.cmake -# module, but with modifications to recognize OS X frameworks and +# Created by Eric Wing. This was influenced by the FindSDL.cmake +# module, but with modifications to recognize OS X frameworks and # additional Unix paths (FreeBSD, etc). #============================================================================= @@ -44,12 +44,12 @@ FIND_PATH(SDLTTF_INCLUDE_DIR SDL_ttf.h /opt/local/include/SDL # DarwinPorts /opt/local/include /opt/csw/include/SDL # Blastwave - /opt/csw/include + /opt/csw/include /opt/include/SDL /opt/include ) -FIND_LIBRARY(SDLTTF_LIBRARY +FIND_LIBRARY(SDLTTF_LIBRARY NAMES SDL_ttf HINTS $ENV{SDLTTFDIR} diff --git a/Modules/FindSWIG.cmake b/Modules/FindSWIG.cmake index 2e34eb1b459..d11d1e47bb5 100644 --- a/Modules/FindSWIG.cmake +++ b/Modules/FindSWIG.cmake @@ -35,7 +35,7 @@ IF(SWIG_EXECUTABLE) ERROR_VARIABLE SWIG_swiglib_error RESULT_VARIABLE SWIG_swiglib_result) - IF(SWIG_swiglib_result) + IF(SWIG_swiglib_result) IF(SWIG_FIND_REQUIRED) MESSAGE(SEND_ERROR "Command \"${SWIG_EXECUTABLE} -swiglib\" failed with output:\n${SWIG_swiglib_error}") ELSE(SWIG_FIND_REQUIRED) diff --git a/Modules/FindSelfPackers.cmake b/Modules/FindSelfPackers.cmake index d9dc25c26ff..d13b0c4ddc5 100644 --- a/Modules/FindSelfPackers.cmake +++ b/Modules/FindSelfPackers.cmake @@ -24,7 +24,7 @@ FIND_PROGRAM(SELF_PACKER_FOR_EXECUTABLE upx ${CYGWIN_INSTALL_PATH}/bin /bin - /usr/bin + /usr/bin /usr/local/bin /sbin ) @@ -33,7 +33,7 @@ FIND_PROGRAM(SELF_PACKER_FOR_SHARED_LIB upx ${CYGWIN_INSTALL_PATH}/bin /bin - /usr/bin + /usr/bin /usr/local/bin /sbin ) @@ -47,18 +47,18 @@ MARK_AS_ADVANCED( # Set flags # IF (SELF_PACKER_FOR_EXECUTABLE MATCHES "upx") - SET (SELF_PACKER_FOR_EXECUTABLE_FLAGS "-q" CACHE STRING + SET (SELF_PACKER_FOR_EXECUTABLE_FLAGS "-q" CACHE STRING "Flags for the executable self-packer.") ELSE (SELF_PACKER_FOR_EXECUTABLE MATCHES "upx") - SET (SELF_PACKER_FOR_EXECUTABLE_FLAGS "" CACHE STRING + SET (SELF_PACKER_FOR_EXECUTABLE_FLAGS "" CACHE STRING "Flags for the executable self-packer.") ENDIF (SELF_PACKER_FOR_EXECUTABLE MATCHES "upx") IF (SELF_PACKER_FOR_SHARED_LIB MATCHES "upx") - SET (SELF_PACKER_FOR_SHARED_LIB_FLAGS "-q" CACHE STRING + SET (SELF_PACKER_FOR_SHARED_LIB_FLAGS "-q" CACHE STRING "Flags for the shared lib self-packer.") ELSE (SELF_PACKER_FOR_SHARED_LIB MATCHES "upx") - SET (SELF_PACKER_FOR_SHARED_LIB_FLAGS "" CACHE STRING + SET (SELF_PACKER_FOR_SHARED_LIB_FLAGS "" CACHE STRING "Flags for the shared lib self-packer.") ENDIF (SELF_PACKER_FOR_SHARED_LIB MATCHES "upx") diff --git a/Modules/FindSquish.cmake b/Modules/FindSquish.cmake index 48d195a1e1f..3b69b07f743 100644 --- a/Modules/FindSquish.cmake +++ b/Modules/FindSquish.cmake @@ -79,7 +79,7 @@ IF(SQUISH_INSTALL_DIR) # find the server program IF(NOT SQUISH_SERVER_EXECUTABLE) FIND_PROGRAM(SQUISH_SERVER_EXECUTABLE ${SQUISH_INSTALL_DIR}/bin/squishserver DOC "The ${SQUISH_SERVER_EXECUTABLE_STRING}") - ENDIF(NOT SQUISH_SERVER_EXECUTABLE) + ENDIF(NOT SQUISH_SERVER_EXECUTABLE) ELSE(SQUISH_INSTALL_DIR) SET(SQUISH_INSTALL_DIR_FOUND 0) @@ -88,14 +88,14 @@ ENDIF(SQUISH_INSTALL_DIR) # record if executables are set IF(SQUISH_CLIENT_EXECUTABLE) SET(SQUISH_CLIENT_EXECUTABLE_FOUND 1) -ELSE(SQUISH_CLIENT_EXECUTABLE) - SET(SQUISH_CLIENT_EXECUTABLE_FOUND 0) +ELSE(SQUISH_CLIENT_EXECUTABLE) + SET(SQUISH_CLIENT_EXECUTABLE_FOUND 0) ENDIF(SQUISH_CLIENT_EXECUTABLE) IF(SQUISH_SERVER_EXECUTABLE) SET(SQUISH_SERVER_EXECUTABLE_FOUND 1) -ELSE(SQUISH_SERVER_EXECUTABLE) - SET(SQUISH_SERVER_EXECUTABLE_FOUND 0) +ELSE(SQUISH_SERVER_EXECUTABLE) + SET(SQUISH_SERVER_EXECUTABLE_FOUND 0) ENDIF(SQUISH_SERVER_EXECUTABLE) # record if Squish was found @@ -122,4 +122,4 @@ MACRO(SQUISH_ADD_TEST testName testAUT testCase envVars testWraper) PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED;ERROR;FATAL" ) ENDMACRO(SQUISH_ADD_TEST) - + diff --git a/Modules/FindTCL.cmake b/Modules/FindTCL.cmake index 7f6d3a7ee5f..763b5ef54c4 100644 --- a/Modules/FindTCL.cmake +++ b/Modules/FindTCL.cmake @@ -18,11 +18,11 @@ # - The stub libraries are now found in FindTclStub.cmake # => they were only useful for people writing Tcl/Tk extensions. # - TCL_LIBRARY_DEBUG and TK_LIBRARY_DEBUG were removed. -# => these libs are not packaged by default with Tcl/Tk distributions. +# => these libs are not packaged by default with Tcl/Tk distributions. # Even when Tcl/Tk is built from source, several flavors of debug libs # are created and there is no real reason to pick a single one -# specifically (say, amongst tcl84g, tcl84gs, or tcl84sgx). -# Let's leave that choice to the user by allowing him to assign +# specifically (say, amongst tcl84g, tcl84gs, or tcl84sgx). +# Let's leave that choice to the user by allowing him to assign # TCL_LIBRARY to any Tcl library, debug or not. # - TK_INTERNAL_PATH was removed. # => this ended up being only a Win32 variable, and there is a lot of @@ -59,7 +59,7 @@ ENDIF(TCLSH_VERSION_STRING) GET_FILENAME_COMPONENT(TK_WISH_PATH "${TK_WISH}" PATH) GET_FILENAME_COMPONENT(TK_WISH_PATH_PARENT "${TK_WISH_PATH}" PATH) -STRING(REGEX REPLACE +STRING(REGEX REPLACE "^.*wish([0-9]\\.*[0-9]).*$" "\\1" TK_WISH_VERSION "${TK_WISH}") GET_FILENAME_COMPONENT(TCL_INCLUDE_PATH_PARENT "${TCL_INCLUDE_PATH}" PATH) @@ -67,12 +67,12 @@ GET_FILENAME_COMPONENT(TK_INCLUDE_PATH_PARENT "${TK_INCLUDE_PATH}" PATH) GET_FILENAME_COMPONENT(TCL_LIBRARY_PATH "${TCL_LIBRARY}" PATH) GET_FILENAME_COMPONENT(TCL_LIBRARY_PATH_PARENT "${TCL_LIBRARY_PATH}" PATH) -STRING(REGEX REPLACE +STRING(REGEX REPLACE "^.*tcl([0-9]\\.*[0-9]).*$" "\\1" TCL_LIBRARY_VERSION "${TCL_LIBRARY}") GET_FILENAME_COMPONENT(TK_LIBRARY_PATH "${TK_LIBRARY}" PATH) GET_FILENAME_COMPONENT(TK_LIBRARY_PATH_PARENT "${TK_LIBRARY_PATH}" PATH) -STRING(REGEX REPLACE +STRING(REGEX REPLACE "^.*tk([0-9]\\.*[0-9]).*$" "\\1" TK_LIBRARY_VERSION "${TK_LIBRARY}") SET(TCLTK_POSSIBLE_LIB_PATHS @@ -86,8 +86,8 @@ SET(TCLTK_POSSIBLE_LIB_PATHS IF(WIN32) GET_FILENAME_COMPONENT( - ActiveTcl_CurrentVersion - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl;CurrentVersion]" + ActiveTcl_CurrentVersion + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl;CurrentVersion]" NAME) SET(TCLTK_POSSIBLE_LIB_PATHS ${TCLTK_POSSIBLE_LIB_PATHS} "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\${ActiveTcl_CurrentVersion}]/lib" @@ -98,33 +98,33 @@ IF(WIN32) "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.2;Root]/lib" "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.0;Root]/lib" "$ENV{ProgramFiles}/Tcl/Lib" - "C:/Program Files/Tcl/lib" - "C:/Tcl/lib" + "C:/Program Files/Tcl/lib" + "C:/Tcl/lib" ) ENDIF(WIN32) FIND_LIBRARY(TCL_LIBRARY - NAMES - tcl + NAMES + tcl tcl${TCL_LIBRARY_VERSION} tcl${TCL_TCLSH_VERSION} tcl${TK_WISH_VERSION} - tcl86 tcl8.6 - tcl85 tcl8.5 - tcl84 tcl8.4 - tcl83 tcl8.3 - tcl82 tcl8.2 + tcl86 tcl8.6 + tcl85 tcl8.5 + tcl84 tcl8.4 + tcl83 tcl8.3 + tcl82 tcl8.2 tcl80 tcl8.0 PATHS ${TCLTK_POSSIBLE_LIB_PATHS} ) -FIND_LIBRARY(TK_LIBRARY - NAMES +FIND_LIBRARY(TK_LIBRARY + NAMES tk tk${TK_LIBRARY_VERSION} tk${TCL_TCLSH_VERSION} tk${TK_WISH_VERSION} tk86 tk8.6 - tk85 tk8.5 - tk84 tk8.4 - tk83 tk8.3 - tk82 tk8.2 + tk85 tk8.5 + tk84 tk8.4 + tk83 tk8.3 + tk82 tk8.2 tk80 tk8.0 PATHS ${TCLTK_POSSIBLE_LIB_PATHS} ) @@ -156,8 +156,8 @@ SET(TCLTK_POSSIBLE_INCLUDE_PATHS "${TK_LIBRARY_PATH_PARENT}/include" "${TCL_INCLUDE_PATH}" "${TK_INCLUDE_PATH}" - ${TCL_FRAMEWORK_INCLUDES} - ${TK_FRAMEWORK_INCLUDES} + ${TCL_FRAMEWORK_INCLUDES} + ${TK_FRAMEWORK_INCLUDES} "${TCL_TCLSH_PATH_PARENT}/include" "${TK_WISH_PATH_PARENT}/include" /usr/include/tcl${TK_LIBRARY_VERSION} @@ -185,17 +185,17 @@ IF(WIN32) ) ENDIF(WIN32) -FIND_PATH(TCL_INCLUDE_PATH +FIND_PATH(TCL_INCLUDE_PATH NAMES tcl.h HINTS ${TCLTK_POSSIBLE_INCLUDE_PATHS} ) -FIND_PATH(TK_INCLUDE_PATH +FIND_PATH(TK_INCLUDE_PATH NAMES tk.h HINTS ${TCLTK_POSSIBLE_INCLUDE_PATHS} ) -# handle the QUIETLY and REQUIRED arguments and set TCL_FOUND to TRUE if +# handle the QUIETLY and REQUIRED arguments and set TCL_FOUND to TRUE if # all listed variables are TRUE INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) diff --git a/Modules/FindTIFF.cmake b/Modules/FindTIFF.cmake index 16f9e238aae..be410fd03d5 100644 --- a/Modules/FindTIFF.cmake +++ b/Modules/FindTIFF.cmake @@ -34,7 +34,7 @@ IF(TIFF_INCLUDE_DIR AND EXISTS "${TIFF_INCLUDE_DIR}/tiffvers.h") UNSET(tiff_version_str) ENDIF() -# handle the QUIETLY and REQUIRED arguments and set TIFF_FOUND to TRUE if +# handle the QUIETLY and REQUIRED arguments and set TIFF_FOUND to TRUE if # all listed variables are TRUE INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(TIFF diff --git a/Modules/FindTclStub.cmake b/Modules/FindTclStub.cmake index 79d14aeb450..1e83508117a 100644 --- a/Modules/FindTclStub.cmake +++ b/Modules/FindTclStub.cmake @@ -14,11 +14,11 @@ # who are not necessarily Tcl/Tk gurus/developpers, some variables were # moved or removed. Changes compared to CMake 2.4 are: # - TCL_STUB_LIBRARY_DEBUG and TK_STUB_LIBRARY_DEBUG were removed. -# => these libs are not packaged by default with Tcl/Tk distributions. +# => these libs are not packaged by default with Tcl/Tk distributions. # Even when Tcl/Tk is built from source, several flavors of debug libs # are created and there is no real reason to pick a single one -# specifically (say, amongst tclstub84g, tclstub84gs, or tclstub84sgx). -# Let's leave that choice to the user by allowing him to assign +# specifically (say, amongst tclstub84g, tclstub84gs, or tclstub84sgx). +# Let's leave that choice to the user by allowing him to assign # TCL_STUB_LIBRARY to any Tcl library, debug or not. #============================================================================= @@ -38,12 +38,12 @@ INCLUDE(FindTCL) GET_FILENAME_COMPONENT(TCL_TCLSH_PATH "${TCL_TCLSH}" PATH) GET_FILENAME_COMPONENT(TCL_TCLSH_PATH_PARENT "${TCL_TCLSH_PATH}" PATH) -STRING(REGEX REPLACE +STRING(REGEX REPLACE "^.*tclsh([0-9]\\.*[0-9]).*$" "\\1" TCL_TCLSH_VERSION "${TCL_TCLSH}") GET_FILENAME_COMPONENT(TK_WISH_PATH "${TK_WISH}" PATH) GET_FILENAME_COMPONENT(TK_WISH_PATH_PARENT "${TK_WISH_PATH}" PATH) -STRING(REGEX REPLACE +STRING(REGEX REPLACE "^.*wish([0-9]\\.*[0-9]).*$" "\\1" TK_WISH_VERSION "${TK_WISH}") GET_FILENAME_COMPONENT(TCL_INCLUDE_PATH_PARENT "${TCL_INCLUDE_PATH}" PATH) @@ -51,12 +51,12 @@ GET_FILENAME_COMPONENT(TK_INCLUDE_PATH_PARENT "${TK_INCLUDE_PATH}" PATH) GET_FILENAME_COMPONENT(TCL_LIBRARY_PATH "${TCL_LIBRARY}" PATH) GET_FILENAME_COMPONENT(TCL_LIBRARY_PATH_PARENT "${TCL_LIBRARY_PATH}" PATH) -STRING(REGEX REPLACE +STRING(REGEX REPLACE "^.*tcl([0-9]\\.*[0-9]).*$" "\\1" TCL_LIBRARY_VERSION "${TCL_LIBRARY}") GET_FILENAME_COMPONENT(TK_LIBRARY_PATH "${TK_LIBRARY}" PATH) GET_FILENAME_COMPONENT(TK_LIBRARY_PATH_PARENT "${TK_LIBRARY_PATH}" PATH) -STRING(REGEX REPLACE +STRING(REGEX REPLACE "^.*tk([0-9]\\.*[0-9]).*$" "\\1" TK_LIBRARY_VERSION "${TK_LIBRARY}") SET(TCLTK_POSSIBLE_LIB_PATHS @@ -70,8 +70,8 @@ SET(TCLTK_POSSIBLE_LIB_PATHS IF(WIN32) GET_FILENAME_COMPONENT( - ActiveTcl_CurrentVersion - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl;CurrentVersion]" + ActiveTcl_CurrentVersion + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl;CurrentVersion]" NAME) SET(TCLTK_POSSIBLE_LIB_PATHS ${TCLTK_POSSIBLE_LIB_PATHS} "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\${ActiveTcl_CurrentVersion}]/lib" @@ -82,45 +82,45 @@ IF(WIN32) "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.2;Root]/lib" "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.0;Root]/lib" "$ENV{ProgramFiles}/Tcl/Lib" - "C:/Program Files/Tcl/lib" - "C:/Tcl/lib" + "C:/Program Files/Tcl/lib" + "C:/Tcl/lib" ) ENDIF(WIN32) FIND_LIBRARY(TCL_STUB_LIBRARY - NAMES - tclstub + NAMES + tclstub tclstub${TK_LIBRARY_VERSION} tclstub${TCL_TCLSH_VERSION} tclstub${TK_WISH_VERSION} tclstub86 tclstub8.6 - tclstub85 tclstub8.5 - tclstub84 tclstub8.4 - tclstub83 tclstub8.3 - tclstub82 tclstub8.2 + tclstub85 tclstub8.5 + tclstub84 tclstub8.4 + tclstub83 tclstub8.3 + tclstub82 tclstub8.2 tclstub80 tclstub8.0 PATHS ${TCLTK_POSSIBLE_LIB_PATHS} ) -FIND_LIBRARY(TK_STUB_LIBRARY - NAMES - tkstub +FIND_LIBRARY(TK_STUB_LIBRARY + NAMES + tkstub tkstub${TCL_LIBRARY_VERSION} tkstub${TCL_TCLSH_VERSION} tkstub${TK_WISH_VERSION} tkstub86 tkstub8.6 - tkstub85 tkstub8.5 - tkstub84 tkstub8.4 - tkstub83 tkstub8.3 - tkstub82 tkstub8.2 + tkstub85 tkstub8.5 + tkstub84 tkstub8.4 + tkstub83 tkstub8.3 + tkstub82 tkstub8.2 tkstub80 tkstub8.0 PATHS ${TCLTK_POSSIBLE_LIB_PATHS} ) -FIND_LIBRARY(TTK_STUB_LIBRARY - NAMES - ttkstub +FIND_LIBRARY(TTK_STUB_LIBRARY + NAMES + ttkstub ttkstub${TCL_LIBRARY_VERSION} ttkstub${TCL_TCLSH_VERSION} ttkstub${TK_WISH_VERSION} ttkstub88 ttkstub8.8 ttkstub87 ttkstub8.7 ttkstub86 ttkstub8.6 - ttkstub85 ttkstub8.5 + ttkstub85 ttkstub8.5 PATHS ${TCLTK_POSSIBLE_LIB_PATHS} ) diff --git a/Modules/FindTclsh.cmake b/Modules/FindTclsh.cmake index a45f285288d..fdeafffaf9b 100644 --- a/Modules/FindTclsh.cmake +++ b/Modules/FindTclsh.cmake @@ -26,7 +26,7 @@ ENDIF(CYGWIN) GET_FILENAME_COMPONENT(TK_WISH_PATH "${TK_WISH}" PATH) GET_FILENAME_COMPONENT(TK_WISH_PATH_PARENT "${TK_WISH_PATH}" PATH) -STRING(REGEX REPLACE +STRING(REGEX REPLACE "^.*wish([0-9]\\.*[0-9]).*$" "\\1" TK_WISH_VERSION "${TK_WISH}") GET_FILENAME_COMPONENT(TCL_INCLUDE_PATH_PARENT "${TCL_INCLUDE_PATH}" PATH) @@ -34,12 +34,12 @@ GET_FILENAME_COMPONENT(TK_INCLUDE_PATH_PARENT "${TK_INCLUDE_PATH}" PATH) GET_FILENAME_COMPONENT(TCL_LIBRARY_PATH "${TCL_LIBRARY}" PATH) GET_FILENAME_COMPONENT(TCL_LIBRARY_PATH_PARENT "${TCL_LIBRARY_PATH}" PATH) -STRING(REGEX REPLACE +STRING(REGEX REPLACE "^.*tcl([0-9]\\.*[0-9]).*$" "\\1" TCL_LIBRARY_VERSION "${TCL_LIBRARY}") GET_FILENAME_COMPONENT(TK_LIBRARY_PATH "${TK_LIBRARY}" PATH) GET_FILENAME_COMPONENT(TK_LIBRARY_PATH_PARENT "${TK_LIBRARY_PATH}" PATH) -STRING(REGEX REPLACE +STRING(REGEX REPLACE "^.*tk([0-9]\\.*[0-9]).*$" "\\1" TK_LIBRARY_VERSION "${TK_LIBRARY}") SET(TCLTK_POSSIBLE_BIN_PATHS @@ -52,8 +52,8 @@ SET(TCLTK_POSSIBLE_BIN_PATHS IF(WIN32) GET_FILENAME_COMPONENT( - ActiveTcl_CurrentVersion - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl;CurrentVersion]" + ActiveTcl_CurrentVersion + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl;CurrentVersion]" NAME) SET(TCLTK_POSSIBLE_BIN_PATHS ${TCLTK_POSSIBLE_BIN_PATHS} "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\${ActiveTcl_CurrentVersion}]/bin" @@ -90,7 +90,7 @@ IF(TCL_TCLSH) OUTPUT_STRIP_TRAILING_WHITESPACE) ENDIF(TCL_TCLSH) -# handle the QUIETLY and REQUIRED arguments and set TIFF_FOUND to TRUE if +# handle the QUIETLY and REQUIRED arguments and set TIFF_FOUND to TRUE if # all listed variables are TRUE INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(Tclsh diff --git a/Modules/FindThreads.cmake b/Modules/FindThreads.cmake index 21614fb66d0..bb1ba3c9f7a 100644 --- a/Modules/FindThreads.cmake +++ b/Modules/FindThreads.cmake @@ -98,14 +98,14 @@ ELSE() MESSAGE(STATUS "Check if compiler accepts -pthread - yes") ELSE() MESSAGE(STATUS "Check if compiler accepts -pthread - no") - FILE(APPEND - ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + FILE(APPEND + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if compiler accepts -pthread returned ${THREADS_PTHREAD_ARG} instead of 2. The compiler had the following output:\n${OUTPUT}\n\n") ENDIF() ELSE() MESSAGE(STATUS "Check if compiler accepts -pthread - no") - FILE(APPEND - ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + FILE(APPEND + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if compiler accepts -pthread failed with the following output:\n${OUTPUT}\n\n") ENDIF() diff --git a/Modules/FindUnixCommands.cmake b/Modules/FindUnixCommands.cmake index 9c0264d22a3..4ada05c47fc 100644 --- a/Modules/FindUnixCommands.cmake +++ b/Modules/FindUnixCommands.cmake @@ -21,7 +21,7 @@ FIND_PROGRAM(BASH bash ${CYGWIN_INSTALL_PATH}/bin /bin - /usr/bin + /usr/bin /usr/local/bin /sbin ) @@ -33,7 +33,7 @@ FIND_PROGRAM(CP cp ${CYGWIN_INSTALL_PATH}/bin /bin - /usr/bin + /usr/bin /usr/local/bin /sbin ) @@ -45,7 +45,7 @@ FIND_PROGRAM(GZIP gzip ${CYGWIN_INSTALL_PATH}/bin /bin - /usr/bin + /usr/bin /usr/local/bin /sbin ) @@ -57,7 +57,7 @@ FIND_PROGRAM(MV mv ${CYGWIN_INSTALL_PATH}/bin /bin - /usr/bin + /usr/bin /usr/local/bin /sbin ) @@ -69,7 +69,7 @@ FIND_PROGRAM(RM rm ${CYGWIN_INSTALL_PATH}/bin /bin - /usr/bin + /usr/bin /usr/local/bin /sbin ) @@ -78,13 +78,13 @@ MARK_AS_ADVANCED( ) FIND_PROGRAM(TAR - NAMES - tar + NAMES + tar gtar PATH ${CYGWIN_INSTALL_PATH}/bin /bin - /usr/bin + /usr/bin /usr/local/bin /sbin ) diff --git a/Modules/FindVTK.cmake b/Modules/FindVTK.cmake index 6b1772fa48f..fbdac7f8fbb 100644 --- a/Modules/FindVTK.cmake +++ b/Modules/FindVTK.cmake @@ -4,26 +4,26 @@ # VTK_FOUND - Set to true when VTK is found. # VTK_USE_FILE - CMake file to use VTK. # VTK_MAJOR_VERSION - The VTK major version number. -# VTK_MINOR_VERSION - The VTK minor version number +# VTK_MINOR_VERSION - The VTK minor version number # (odd non-release). -# VTK_BUILD_VERSION - The VTK patch level +# VTK_BUILD_VERSION - The VTK patch level # (meaningless for odd minor). # VTK_INCLUDE_DIRS - Include directories for VTK # VTK_LIBRARY_DIRS - Link directories for VTK libraries -# VTK_KITS - List of VTK kits, in CAPS +# VTK_KITS - List of VTK kits, in CAPS # (COMMON,IO,) etc. # VTK_LANGUAGES - List of wrapped languages, in CAPS # (TCL, PYHTON,) etc. # The following cache entries must be set by the user to locate VTK: -# VTK_DIR - The directory containing VTKConfig.cmake. +# VTK_DIR - The directory containing VTKConfig.cmake. # This is either the root of the build tree, -# or the lib/vtk directory. This is the +# or the lib/vtk directory. This is the # only cache entry. # The following variables are set for backward compatibility and # should not be used in new code: # USE_VTK_FILE - The full path to the UseVTK.cmake file. -# This is provided for backward -# compatibility. Use VTK_USE_FILE +# This is provided for backward +# compatibility. Use VTK_USE_FILE # instead. # diff --git a/Modules/FindWget.cmake b/Modules/FindWget.cmake index c94132c2756..ee4057dfd27 100644 --- a/Modules/FindWget.cmake +++ b/Modules/FindWget.cmake @@ -1,5 +1,5 @@ # - Find wget -# This module looks for wget. This module defines the +# This module looks for wget. This module defines the # following values: # WGET_EXECUTABLE: the full path to the wget tool. # WGET_FOUND: True if wget has been found. @@ -24,7 +24,7 @@ FIND_PROGRAM(WGET_EXECUTABLE ${CYGWIN_INSTALL_PATH}/bin ) -# handle the QUIETLY and REQUIRED arguments and set WGET_FOUND to TRUE if +# handle the QUIETLY and REQUIRED arguments and set WGET_FOUND to TRUE if # all listed variables are TRUE INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(Wget DEFAULT_MSG WGET_EXECUTABLE) diff --git a/Modules/FindWish.cmake b/Modules/FindWish.cmake index a4960cd17f9..8a1cd8d362f 100644 --- a/Modules/FindWish.cmake +++ b/Modules/FindWish.cmake @@ -26,7 +26,7 @@ ENDIF(UNIX) GET_FILENAME_COMPONENT(TCL_TCLSH_PATH "${TCL_TCLSH}" PATH) GET_FILENAME_COMPONENT(TCL_TCLSH_PATH_PARENT "${TCL_TCLSH_PATH}" PATH) -STRING(REGEX REPLACE +STRING(REGEX REPLACE "^.*tclsh([0-9]\\.*[0-9]).*$" "\\1" TCL_TCLSH_VERSION "${TCL_TCLSH}") GET_FILENAME_COMPONENT(TCL_INCLUDE_PATH_PARENT "${TCL_INCLUDE_PATH}" PATH) @@ -34,12 +34,12 @@ GET_FILENAME_COMPONENT(TK_INCLUDE_PATH_PARENT "${TK_INCLUDE_PATH}" PATH) GET_FILENAME_COMPONENT(TCL_LIBRARY_PATH "${TCL_LIBRARY}" PATH) GET_FILENAME_COMPONENT(TCL_LIBRARY_PATH_PARENT "${TCL_LIBRARY_PATH}" PATH) -STRING(REGEX REPLACE +STRING(REGEX REPLACE "^.*tcl([0-9]\\.*[0-9]).*$" "\\1" TCL_LIBRARY_VERSION "${TCL_LIBRARY}") GET_FILENAME_COMPONENT(TK_LIBRARY_PATH "${TK_LIBRARY}" PATH) GET_FILENAME_COMPONENT(TK_LIBRARY_PATH_PARENT "${TK_LIBRARY_PATH}" PATH) -STRING(REGEX REPLACE +STRING(REGEX REPLACE "^.*tk([0-9]\\.*[0-9]).*$" "\\1" TK_LIBRARY_VERSION "${TK_LIBRARY}") SET(TCLTK_POSSIBLE_BIN_PATHS @@ -52,8 +52,8 @@ SET(TCLTK_POSSIBLE_BIN_PATHS IF(WIN32) GET_FILENAME_COMPONENT( - ActiveTcl_CurrentVersion - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl;CurrentVersion]" + ActiveTcl_CurrentVersion + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl;CurrentVersion]" NAME) SET(TCLTK_POSSIBLE_BIN_PATHS ${TCLTK_POSSIBLE_BIN_PATHS} "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\${ActiveTcl_CurrentVersion}]/bin" @@ -67,13 +67,13 @@ IF(WIN32) ENDIF(WIN32) SET(TK_WISH_NAMES - wish + wish wish${TCL_LIBRARY_VERSION} wish${TK_LIBRARY_VERSION} wish${TCL_TCLSH_VERSION} wish86 wish8.6 - wish85 wish8.5 - wish84 wish8.4 - wish83 wish8.3 - wish82 wish8.2 + wish85 wish8.5 + wish84 wish8.4 + wish83 wish8.3 + wish82 wish8.2 wish80 wish8.0 ) diff --git a/Modules/FindZLIB.cmake b/Modules/FindZLIB.cmake index 166e2918169..e42b5a416fe 100644 --- a/Modules/FindZLIB.cmake +++ b/Modules/FindZLIB.cmake @@ -79,7 +79,7 @@ IF(ZLIB_INCLUDE_DIR AND EXISTS "${ZLIB_INCLUDE_DIR}/zlib.h") SET(ZLIB_PATCH_VERSION "${ZLIB_VERSION_PATCH}") ENDIF() -# handle the QUIETLY and REQUIRED arguments and set ZLIB_FOUND to TRUE if +# handle the QUIETLY and REQUIRED arguments and set ZLIB_FOUND to TRUE if # all listed variables are TRUE INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB REQUIRED_VARS ZLIB_LIBRARY ZLIB_INCLUDE_DIR diff --git a/Modules/Findosg.cmake b/Modules/Findosg.cmake index 0106372e3fe..fb7421e8595 100644 --- a/Modules/Findosg.cmake +++ b/Modules/Findosg.cmake @@ -3,16 +3,16 @@ # introduced in CMake 2.6.3 and not use this Find module directly. # # This is part of the Findosg* suite used to find OpenSceneGraph components. -# Each component is separate and you must opt in to each module. You must -# also opt into OpenGL and OpenThreads (and Producer if needed) as these -# modules won't do it for you. This is to allow you control over your own +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own # system piece by piece in case you need to opt out of certain components # or change the Find behavior for a particular module (perhaps because the # default FindOpenGL.cmake module doesn't work with your system as an # example). # If you want to use a more convenient module that includes everything, # use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. -# +# # Locate osg # This module defines # diff --git a/Modules/FindosgAnimation.cmake b/Modules/FindosgAnimation.cmake index b9b44a0810b..1c8eb5068f6 100644 --- a/Modules/FindosgAnimation.cmake +++ b/Modules/FindosgAnimation.cmake @@ -1,14 +1,14 @@ # This is part of the Findosg* suite used to find OpenSceneGraph components. -# Each component is separate and you must opt in to each module. You must -# also opt into OpenGL and OpenThreads (and Producer if needed) as these -# modules won't do it for you. This is to allow you control over your own +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own # system piece by piece in case you need to opt out of certain components # or change the Find behavior for a particular module (perhaps because the # default FindOpenGL.cmake module doesn't work with your system as an # example). # If you want to use a more convenient module that includes everything, # use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. -# +# # Locate osgAnimation # This module defines # diff --git a/Modules/FindosgDB.cmake b/Modules/FindosgDB.cmake index eabdde72d7c..76272aa67e5 100644 --- a/Modules/FindosgDB.cmake +++ b/Modules/FindosgDB.cmake @@ -1,14 +1,14 @@ # This is part of the Findosg* suite used to find OpenSceneGraph components. -# Each component is separate and you must opt in to each module. You must -# also opt into OpenGL and OpenThreads (and Producer if needed) as these -# modules won't do it for you. This is to allow you control over your own +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own # system piece by piece in case you need to opt out of certain components # or change the Find behavior for a particular module (perhaps because the # default FindOpenGL.cmake module doesn't work with your system as an # example). # If you want to use a more convenient module that includes everything, # use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. -# +# # Locate osgDB # This module defines # diff --git a/Modules/FindosgFX.cmake b/Modules/FindosgFX.cmake index 81d5af5a2fe..331475093a5 100644 --- a/Modules/FindosgFX.cmake +++ b/Modules/FindosgFX.cmake @@ -1,14 +1,14 @@ # This is part of the Findosg* suite used to find OpenSceneGraph components. -# Each component is separate and you must opt in to each module. You must -# also opt into OpenGL and OpenThreads (and Producer if needed) as these -# modules won't do it for you. This is to allow you control over your own +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own # system piece by piece in case you need to opt out of certain components # or change the Find behavior for a particular module (perhaps because the # default FindOpenGL.cmake module doesn't work with your system as an # example). # If you want to use a more convenient module that includes everything, # use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. -# +# # Locate osgFX # This module defines # diff --git a/Modules/FindosgGA.cmake b/Modules/FindosgGA.cmake index a4fe79b0d6a..fd9317d5efc 100644 --- a/Modules/FindosgGA.cmake +++ b/Modules/FindosgGA.cmake @@ -1,14 +1,14 @@ # This is part of the Findosg* suite used to find OpenSceneGraph components. -# Each component is separate and you must opt in to each module. You must -# also opt into OpenGL and OpenThreads (and Producer if needed) as these -# modules won't do it for you. This is to allow you control over your own +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own # system piece by piece in case you need to opt out of certain components # or change the Find behavior for a particular module (perhaps because the # default FindOpenGL.cmake module doesn't work with your system as an # example). # If you want to use a more convenient module that includes everything, # use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. -# +# # Locate osgGA # This module defines # diff --git a/Modules/FindosgIntrospection.cmake b/Modules/FindosgIntrospection.cmake index 24e6ed5857a..2394c0592be 100644 --- a/Modules/FindosgIntrospection.cmake +++ b/Modules/FindosgIntrospection.cmake @@ -1,14 +1,14 @@ # This is part of the Findosg* suite used to find OpenSceneGraph components. -# Each component is separate and you must opt in to each module. You must -# also opt into OpenGL and OpenThreads (and Producer if needed) as these -# modules won't do it for you. This is to allow you control over your own +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own # system piece by piece in case you need to opt out of certain components # or change the Find behavior for a particular module (perhaps because the # default FindOpenGL.cmake module doesn't work with your system as an # example). # If you want to use a more convenient module that includes everything, # use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. -# +# # Locate osgINTROSPECTION # This module defines # diff --git a/Modules/FindosgManipulator.cmake b/Modules/FindosgManipulator.cmake index f71b5fd5cf4..9e5857083a1 100644 --- a/Modules/FindosgManipulator.cmake +++ b/Modules/FindosgManipulator.cmake @@ -1,14 +1,14 @@ # This is part of the Findosg* suite used to find OpenSceneGraph components. -# Each component is separate and you must opt in to each module. You must -# also opt into OpenGL and OpenThreads (and Producer if needed) as these -# modules won't do it for you. This is to allow you control over your own +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own # system piece by piece in case you need to opt out of certain components # or change the Find behavior for a particular module (perhaps because the # default FindOpenGL.cmake module doesn't work with your system as an # example). # If you want to use a more convenient module that includes everything, # use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. -# +# # Locate osgManipulator # This module defines # diff --git a/Modules/FindosgParticle.cmake b/Modules/FindosgParticle.cmake index f23a83fddce..2f93389ff79 100644 --- a/Modules/FindosgParticle.cmake +++ b/Modules/FindosgParticle.cmake @@ -1,14 +1,14 @@ # This is part of the Findosg* suite used to find OpenSceneGraph components. -# Each component is separate and you must opt in to each module. You must -# also opt into OpenGL and OpenThreads (and Producer if needed) as these -# modules won't do it for you. This is to allow you control over your own +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own # system piece by piece in case you need to opt out of certain components # or change the Find behavior for a particular module (perhaps because the # default FindOpenGL.cmake module doesn't work with your system as an # example). # If you want to use a more convenient module that includes everything, # use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. -# +# # Locate osgParticle # This module defines # diff --git a/Modules/FindosgProducer.cmake b/Modules/FindosgProducer.cmake index 51f609064ce..2c3800b5473 100644 --- a/Modules/FindosgProducer.cmake +++ b/Modules/FindosgProducer.cmake @@ -1,14 +1,14 @@ # This is part of the Findosg* suite used to find OpenSceneGraph components. -# Each component is separate and you must opt in to each module. You must -# also opt into OpenGL and OpenThreads (and Producer if needed) as these -# modules won't do it for you. This is to allow you control over your own +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own # system piece by piece in case you need to opt out of certain components # or change the Find behavior for a particular module (perhaps because the # default FindOpenGL.cmake module doesn't work with your system as an # example). # If you want to use a more convenient module that includes everything, # use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. -# +# # Locate osgProducer # This module defines # diff --git a/Modules/FindosgShadow.cmake b/Modules/FindosgShadow.cmake index 278f8ae9e86..ca87b561116 100644 --- a/Modules/FindosgShadow.cmake +++ b/Modules/FindosgShadow.cmake @@ -1,14 +1,14 @@ # This is part of the Findosg* suite used to find OpenSceneGraph components. -# Each component is separate and you must opt in to each module. You must -# also opt into OpenGL and OpenThreads (and Producer if needed) as these -# modules won't do it for you. This is to allow you control over your own +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own # system piece by piece in case you need to opt out of certain components # or change the Find behavior for a particular module (perhaps because the # default FindOpenGL.cmake module doesn't work with your system as an # example). # If you want to use a more convenient module that includes everything, # use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. -# +# # Locate osgShadow # This module defines # diff --git a/Modules/FindosgSim.cmake b/Modules/FindosgSim.cmake index 15daf64fe8e..2fc5105d194 100644 --- a/Modules/FindosgSim.cmake +++ b/Modules/FindosgSim.cmake @@ -1,14 +1,14 @@ # This is part of the Findosg* suite used to find OpenSceneGraph components. -# Each component is separate and you must opt in to each module. You must -# also opt into OpenGL and OpenThreads (and Producer if needed) as these -# modules won't do it for you. This is to allow you control over your own +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own # system piece by piece in case you need to opt out of certain components # or change the Find behavior for a particular module (perhaps because the # default FindOpenGL.cmake module doesn't work with your system as an # example). # If you want to use a more convenient module that includes everything, # use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. -# +# # Locate osgSim # This module defines # diff --git a/Modules/FindosgTerrain.cmake b/Modules/FindosgTerrain.cmake index fbf373e5922..eafd8fbc0a2 100644 --- a/Modules/FindosgTerrain.cmake +++ b/Modules/FindosgTerrain.cmake @@ -1,14 +1,14 @@ # This is part of the Findosg* suite used to find OpenSceneGraph components. -# Each component is separate and you must opt in to each module. You must -# also opt into OpenGL and OpenThreads (and Producer if needed) as these -# modules won't do it for you. This is to allow you control over your own +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own # system piece by piece in case you need to opt out of certain components # or change the Find behavior for a particular module (perhaps because the # default FindOpenGL.cmake module doesn't work with your system as an # example). # If you want to use a more convenient module that includes everything, # use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. -# +# # Locate osgTerrain # This module defines # diff --git a/Modules/FindosgText.cmake b/Modules/FindosgText.cmake index 22f825f549b..57655b196e4 100644 --- a/Modules/FindosgText.cmake +++ b/Modules/FindosgText.cmake @@ -1,14 +1,14 @@ # This is part of the Findosg* suite used to find OpenSceneGraph components. -# Each component is separate and you must opt in to each module. You must -# also opt into OpenGL and OpenThreads (and Producer if needed) as these -# modules won't do it for you. This is to allow you control over your own +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own # system piece by piece in case you need to opt out of certain components # or change the Find behavior for a particular module (perhaps because the # default FindOpenGL.cmake module doesn't work with your system as an # example). # If you want to use a more convenient module that includes everything, # use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. -# +# # Locate osgText # This module defines # diff --git a/Modules/FindosgUtil.cmake b/Modules/FindosgUtil.cmake index 05a74df846a..eeabc34af86 100644 --- a/Modules/FindosgUtil.cmake +++ b/Modules/FindosgUtil.cmake @@ -1,14 +1,14 @@ # This is part of the Findosg* suite used to find OpenSceneGraph components. -# Each component is separate and you must opt in to each module. You must -# also opt into OpenGL and OpenThreads (and Producer if needed) as these -# modules won't do it for you. This is to allow you control over your own +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own # system piece by piece in case you need to opt out of certain components # or change the Find behavior for a particular module (perhaps because the # default FindOpenGL.cmake module doesn't work with your system as an # example). # If you want to use a more convenient module that includes everything, # use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. -# +# # Locate osgUtil # This module defines # diff --git a/Modules/FindosgViewer.cmake b/Modules/FindosgViewer.cmake index 650dbd7ef03..2afd7619502 100644 --- a/Modules/FindosgViewer.cmake +++ b/Modules/FindosgViewer.cmake @@ -1,14 +1,14 @@ # This is part of the Findosg* suite used to find OpenSceneGraph components. -# Each component is separate and you must opt in to each module. You must -# also opt into OpenGL and OpenThreads (and Producer if needed) as these -# modules won't do it for you. This is to allow you control over your own +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own # system piece by piece in case you need to opt out of certain components # or change the Find behavior for a particular module (perhaps because the # default FindOpenGL.cmake module doesn't work with your system as an # example). # If you want to use a more convenient module that includes everything, # use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. -# +# # Locate osgViewer # This module defines # diff --git a/Modules/FindosgVolume.cmake b/Modules/FindosgVolume.cmake index 3ad7edc246b..1fa6764a7a2 100644 --- a/Modules/FindosgVolume.cmake +++ b/Modules/FindosgVolume.cmake @@ -1,14 +1,14 @@ # This is part of the Findosg* suite used to find OpenSceneGraph components. -# Each component is separate and you must opt in to each module. You must -# also opt into OpenGL and OpenThreads (and Producer if needed) as these -# modules won't do it for you. This is to allow you control over your own +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own # system piece by piece in case you need to opt out of certain components # or change the Find behavior for a particular module (perhaps because the # default FindOpenGL.cmake module doesn't work with your system as an # example). # If you want to use a more convenient module that includes everything, # use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. -# +# # Locate osgVolume # This module defines # diff --git a/Modules/FindosgWidget.cmake b/Modules/FindosgWidget.cmake index 206a8b7f57b..1a51e601436 100644 --- a/Modules/FindosgWidget.cmake +++ b/Modules/FindosgWidget.cmake @@ -1,14 +1,14 @@ # This is part of the Findosg* suite used to find OpenSceneGraph components. -# Each component is separate and you must opt in to each module. You must -# also opt into OpenGL and OpenThreads (and Producer if needed) as these -# modules won't do it for you. This is to allow you control over your own +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own # system piece by piece in case you need to opt out of certain components # or change the Find behavior for a particular module (perhaps because the # default FindOpenGL.cmake module doesn't work with your system as an # example). # If you want to use a more convenient module that includes everything, # use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. -# +# # Locate osgWidget # This module defines # diff --git a/Modules/Findosg_functions.cmake b/Modules/Findosg_functions.cmake index ab836ff9f13..3a40a09979e 100644 --- a/Modules/Findosg_functions.cmake +++ b/Modules/Findosg_functions.cmake @@ -85,7 +85,7 @@ function(OSG_FIND_LIBRARY module library) set(${module_uc}_LIBRARIES ${${module_uc}_LIBRARY} PARENT_SCOPE) else() # They really have a FOO_LIBRARY_DEBUG - set(${module_uc}_LIBRARIES + set(${module_uc}_LIBRARIES optimized ${${module_uc}_LIBRARY} debug ${${module_uc}_LIBRARY_DEBUG} PARENT_SCOPE diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake index 865a6c5d114..bf45dc61640 100644 --- a/Modules/FindwxWidgets.cmake +++ b/Modules/FindwxWidgets.cmake @@ -3,9 +3,9 @@ # configuration to use. wxWidgets is a modular library. To specify the # modules that you will use, you need to name them as components to # the package: -# +# # FIND_PACKAGE(wxWidgets COMPONENTS core base ...) -# +# # There are two search branches: a windows style and a unix style. For # windows, the following variables are searched for and set to # defaults in case of multiple choices. Change them if the defaults @@ -22,7 +22,7 @@ # - Set to TRUE to exclude linking of # commonly required libs (e.g., png tiff # jpeg zlib regex expat). -# +# # For unix style it uses the wx-config utility. You can select between # debug/release, unicode/ansi, universal/non-universal, and # static/shared in the QtDialog or ccmake interfaces by turning ON/OFF @@ -140,7 +140,7 @@ # FIXME: This and all the DBG_MSG calls should be removed after the # module stabilizes. -# +# # Helper macro to control the debugging output globally. There are # two versions for controlling how verbose your output should be. MACRO(DBG_MSG _MSG) @@ -418,7 +418,7 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32") #------------------------------------------------------------------- # Look for an installation tree. - FIND_PATH(wxWidgets_ROOT_DIR + FIND_PATH(wxWidgets_ROOT_DIR NAMES include/wx/wx.h PATHS $ENV{wxWidgets_ROOT_DIR} @@ -427,7 +427,7 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32") C:/ D:/ $ENV{ProgramFiles} - PATH_SUFFIXES + PATH_SUFFIXES wxWidgets-2.9.4 wxWidgets-2.9.3 wxWidgets-2.9.2 @@ -680,7 +680,7 @@ ELSE(wxWidgets_FIND_STYLE STREQUAL "win32") ENDIF(_wx_result_yes EQUAL 0 AND _wx_result_no EQUAL 0) ENDMACRO(WX_CONFIG_SELECT_QUERY_BOOL) - # + # # Set wxWidgets_SELECT_OPTIONS to wx-config options for selecting # among multiple builds. # @@ -845,12 +845,12 @@ FIND_PROGRAM(wxWidgets_wxrc_EXECUTABLE wxrc ${wxWidgets_ROOT_DIR}/utils/wxrc/vc_msw ) -# +# # WX_SPLIT_ARGUMENTS_ON( ...) -# +# # Sets and to contain arguments to the left and right, # respectively, of . -# +# # Example usage: # FUNCTION(WXWIDGETS_ADD_RESOURCES outfiles) # WX_SPLIT_ARGUMENTS_ON(OPTIONS wxrc_files wxrc_options ${ARGN}) @@ -858,7 +858,7 @@ FIND_PROGRAM(wxWidgets_wxrc_EXECUTABLE wxrc # ENDFUNCTION(WXWIDGETS_ADD_RESOURCES) # # WXWIDGETS_ADD_RESOURCES(sources ${xrc_files} OPTIONS -e -o file.C) -# +# # NOTE: This is a generic piece of code that should be renamed to # SPLIT_ARGUMENTS_ON and put in a file serving the same purpose as # FindPackageStandardArgs.cmake. At the time of this writing @@ -929,13 +929,13 @@ FUNCTION(WX_GET_DEPENDENCIES_FROM_XML SET(${_depends} ${${_depends}} PARENT_SCOPE) ENDFUNCTION(WX_GET_DEPENDENCIES_FROM_XML) -# +# # WXWIDGETS_ADD_RESOURCES( # OPTIONS [NO_CPP_CODE]) -# +# # Adds a custom command for resource file compilation of the # and appends the output files to . -# +# # Example usages: # WXWIDGETS_ADD_RESOURCES(sources xrc/main_frame.xrc) # WXWIDGETS_ADD_RESOURCES(sources ${xrc_files} OPTIONS -e -o altname.cxx) @@ -986,7 +986,7 @@ FUNCTION(WXWIDGETS_ADD_RESOURCES _outfiles) # # Parse options. - # + # # If NO_CPP_CODE option specified, then produce .xrs file rather # than a .cpp file (i.e., don't add the default --cpp-code option). LIST(FIND rc_options NO_CPP_CODE index) @@ -1015,7 +1015,7 @@ FUNCTION(WXWIDGETS_ADD_RESOURCES _outfiles) ENDIF(outfile_opt) #STRING(REGEX REPLACE "--output=[^;]*;?" "" rc_options "${rc_options}") #STRING(REGEX REPLACE ";$" "" rc_options "${rc_options}") - + IF(NOT IS_ABSOLUTE "${outfile}") SET(outfile "${CMAKE_CURRENT_BINARY_DIR}/${outfile}") ENDIF(NOT IS_ABSOLUTE "${outfile}") diff --git a/Modules/MacroAddFileDependencies.cmake b/Modules/MacroAddFileDependencies.cmake index 527447b801c..36a217a2b50 100644 --- a/Modules/MacroAddFileDependencies.cmake +++ b/Modules/MacroAddFileDependencies.cmake @@ -2,7 +2,7 @@ # Using the macro MACRO_ADD_FILE_DEPENDENCIES() is discouraged. There are usually # better ways to specify the correct dependencies. # -# MACRO_ADD_FILE_DEPENDENCIES(<_file> depend_files...) is just a convenience +# MACRO_ADD_FILE_DEPENDENCIES(<_file> depend_files...) is just a convenience # wrapper around the OBJECT_DEPENDS source file property. You can just # use SET_PROPERTY(SOURCE APPEND PROPERTY OBJECT_DEPENDS depend_files) instead. diff --git a/Modules/NSIS.template.in b/Modules/NSIS.template.in index 43f72f6aa72..7adfe1481a1 100644 --- a/Modules/NSIS.template.in +++ b/Modules/NSIS.template.in @@ -37,7 +37,7 @@ ;Set compression SetCompressor @CPACK_NSIS_COMPRESSOR@ -@CPACK_NSIS_DEFINES@ +@CPACK_NSIS_DEFINES@ !include Sections.nsh @@ -71,7 +71,7 @@ Var AR_RegFlags ; This macro reads component installed flag from the registry and ;changes checked state of the section on the components page. ;Input: section index constant name specified in Section command. - + ClearErrors ;Reading component status from registry ReadRegDWORD $AR_RegFlags HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@\Components\${SecName}" "Installed" @@ -86,20 +86,20 @@ Var AR_RegFlags ; Note whether this component was installed before !insertmacro StoreVar ${SecName}_was_installed $AR_RegFlags IntOp $R0 $AR_RegFlags & $AR_RegFlags - + ;Writing modified flags SectionSetFlags ${${SecName}} $AR_SecFlags - + "default_${SecName}:" !insertmacro LoadSectionSelectedIntoVar ${SecName} ${SecName}_selected !macroend - + !macro FinishSection SecName ; This macro reads section flag set by user and removes the section ;if it is not selected. ;Then it writes component installed flag to registry ;Input: section index constant name specified in Section command. - + SectionGetFlags ${${SecName}} $AR_SecFlags ;Reading section flags ;Checking lowest bit: IntOp $AR_SecFlags $AR_SecFlags & ${SF_SELECTED} @@ -110,20 +110,20 @@ Var AR_RegFlags WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@\Components\${SecName}" \ "Installed" 0 Goto "exit_${SecName}" - + "leave_${SecName}:" ;Section is selected: WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@\Components\${SecName}" \ "Installed" 1 - + "exit_${SecName}:" !macroend - + !macro RemoveSection SecName ; This macro is used to call section's Remove_... macro ;from the uninstaller. ;Input: section index constant name specified in Section command. - + !insertmacro "Remove_${${SecName}}" !macroend @@ -132,18 +132,18 @@ Var AR_RegFlags !insertmacro LoadVar ${SecName}_selected SectionGetFlags ${${SecName}} $R1 IntOp $R1 $R1 & ${SF_SELECTED} ;Turn off all other bits - + ; See if the status has changed: IntCmp $R0 $R1 "${SecName}_unchanged" !insertmacro LoadSectionSelectedIntoVar ${SecName} ${SecName}_selected - + IntCmp $R1 ${SF_SELECTED} "${SecName}_was_selected" !insertmacro "Deselect_required_by_${SecName}" goto "${SecName}_unchanged" - + "${SecName}_was_selected:" !insertmacro "Select_${SecName}_depends" - + "${SecName}_unchanged:" !macroend ;--- End of Add/Remove macros --- @@ -153,7 +153,7 @@ Var AR_RegFlags !define MUI_HEADERIMAGE !define MUI_ABORTWARNING - + ;-------------------------------- ; path functions @@ -168,7 +168,7 @@ Var AR_RegFlags !include "WinMessages.NSH" !verbose 4 ;==================================================== -; get_NT_environment +; get_NT_environment ; Returns: the selected environment ; Output : head of the stack ;==================================================== @@ -198,22 +198,22 @@ FunctionEnd !define WriteEnvStr_RegKey 'HKCU "Environment"' !endif !endif - + ; AddToPath - Adds the given dir to the search path. ; Input - head of the stack ; Note - Win9x systems requires reboot - + Function AddToPath Exch $0 Push $1 Push $2 Push $3 - + # don't add if the path doesn't exist IfFileExists "$0\*.*" "" AddToPath_done - + ReadEnvStr $1 PATH - ; if the path is too long for a NSIS variable NSIS will return a 0 + ; if the path is too long for a NSIS variable NSIS will return a 0 ; length string. If we find that, then warn and skip any path ; modification as it will trash the existing path. StrLen $2 $1 @@ -243,7 +243,7 @@ Function AddToPath Call StrStr Pop $2 StrCmp $2 "" "" AddToPath_done - + Call IsNT Pop $1 StrCmp $1 1 AddToPath_NT @@ -258,7 +258,7 @@ Function AddToPath FileClose $1 SetRebootFlag true Goto AddToPath_done - + AddToPath_NT: StrCmp $ADD_TO_PATH_ALL_USERS "1" ReadAllKey ReadRegStr $1 ${NT_current_env} "PATH" @@ -279,7 +279,7 @@ Function AddToPath WriteRegExpandStr ${NT_all_env} "PATH" $0 DoSend: SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000 - + AddToPath_done: Pop $3 Pop $2 @@ -287,10 +287,10 @@ Function AddToPath Pop $0 FunctionEnd - + ; RemoveFromPath - Remove a given dir from the path ; Input: head of the stack - + Function un.RemoveFromPath Exch $0 Push $1 @@ -299,9 +299,9 @@ Function un.RemoveFromPath Push $4 Push $5 Push $6 - + IntFmt $6 "%c" 26 # DOS EOF - + Call un.IsNT Pop $1 StrCmp $1 1 unRemoveFromPath_NT @@ -313,7 +313,7 @@ Function un.RemoveFromPath GetFullPathName /SHORT $0 $0 StrCpy $0 "SET PATH=%PATH%;$0" Goto unRemoveFromPath_dosLoop - + unRemoveFromPath_dosLoop: FileRead $1 $3 StrCpy $5 $3 1 -1 # read last char @@ -328,7 +328,7 @@ Function un.RemoveFromPath unRemoveFromPath_dosLoopRemoveLine: SetRebootFlag true Goto unRemoveFromPath_dosLoop - + unRemoveFromPath_dosLoopEnd: FileClose $2 FileClose $1 @@ -337,7 +337,7 @@ Function un.RemoveFromPath CopyFiles /SILENT $4 "$1\autoexec.bat" Delete $4 Goto unRemoveFromPath_done - + unRemoveFromPath_NT: StrCmp $ADD_TO_PATH_ALL_USERS "1" unReadAllKey ReadRegStr $1 ${NT_current_env} "PATH" @@ -361,11 +361,11 @@ Function un.RemoveFromPath StrCpy $5 $1 -$4 # $5 is now the part before the path to remove StrCpy $6 $2 "" $3 # $6 is now the part after the path to remove StrCpy $3 $5$6 - + StrCpy $5 $3 1 -1 # copy last char StrCmp $5 ";" 0 +2 # if last char == ; StrCpy $3 $3 -1 # remove last char - + StrCmp $ADD_TO_PATH_ALL_USERS "1" unWriteAllKey WriteRegExpandStr ${NT_current_env} "PATH" $3 Goto unDoSend @@ -373,7 +373,7 @@ Function un.RemoveFromPath WriteRegExpandStr ${NT_all_env} "PATH" $3 unDoSend: SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000 - + unRemoveFromPath_done: Pop $6 Pop $5 @@ -383,7 +383,7 @@ Function un.RemoveFromPath Pop $1 Pop $0 FunctionEnd - + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Uninstall sutff ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -391,7 +391,7 @@ FunctionEnd ########################################### # Utility Functions # ########################################### - + ;==================================================== ; IsNT - Returns 1 if the current system is NT, 0 ; otherwise. @@ -405,7 +405,7 @@ FunctionEnd ; Call IsNT ; Pop $R0 ; ($R0 at this point is 1 or 0) - + !macro IsNT un Function ${un}IsNT Push $0 @@ -415,7 +415,7 @@ Function ${un}IsNT Pop $0 Push 0 Return - + IsNT_yes: ; NT!!! Pop $0 @@ -424,7 +424,7 @@ FunctionEnd !macroend !insertmacro IsNT "" !insertmacro IsNT "un." - + ; StrStr ; input, top of stack = string to search for ; top of stack-1 = string to search in @@ -437,7 +437,7 @@ FunctionEnd ; Call StrStr ; Pop $R0 ; ($R0 at this point is "ass string") - + !macro StrStr un Function ${un}StrStr Exch $R1 ; st=haystack,old$R1, $R1=needle @@ -516,7 +516,7 @@ Function DownloadFile try_again: NSISdl::download "$1/$0" "$INSTDIR\$0" - + Pop $1 StrCmp $1 "success" success StrCmp $1 "Cancelled" cancel @@ -549,10 +549,10 @@ FunctionEnd !insertmacro MUI_PAGE_LICENSE "@CPACK_RESOURCE_FILE_LICENSE@" Page custom InstallOptionsPage !insertmacro MUI_PAGE_DIRECTORY - + ;Start Menu Folder Page Configuration - !define MUI_STARTMENUPAGE_REGISTRY_ROOT "SHCTX" - !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" + !define MUI_STARTMENUPAGE_REGISTRY_ROOT "SHCTX" + !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder" !insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER @@ -639,10 +639,10 @@ Section "-Core installation" SetOutPath "$INSTDIR" @CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS@ @CPACK_NSIS_FULL_INSTALL@ - + ;Store installation folder WriteRegStr SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "" $INSTDIR - + ;Create uninstaller WriteUninstaller "$INSTDIR\Uninstall.exe" Push "DisplayName" @@ -660,7 +660,7 @@ Section "-Core installation" Push "NoRepair" Push "1" Call ConditionalAddToRegisty - + !ifdef CPACK_NSIS_ADD_REMOVE ;Create add/remove functionality Push "ModifyPath" @@ -671,7 +671,7 @@ Section "-Core installation" Push "1" Call ConditionalAddToRegisty !endif - + ; Optional registration Push "DisplayIcon" Push "$INSTDIR\@CPACK_NSIS_INSTALLED_ICON_NAME@" @@ -687,7 +687,7 @@ Section "-Core installation" Call ConditionalAddToRegisty !insertmacro MUI_INSTALLOPTIONS_READ $INSTALL_DESKTOP "NSIS.InstallOptions.ini" "Field 5" "State" !insertmacro MUI_STARTMENU_WRITE_BEGIN Application - + ;Create shortcuts CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER" @CPACK_NSIS_CREATE_ICONS@ @@ -725,7 +725,7 @@ SectionEnd Section "-Add to path" Push $INSTDIR\bin StrCmp "@CPACK_NSIS_MODIFY_PATH@" "ON" 0 doNotAddToPath - StrCmp $DO_NOT_ADD_TO_PATH "1" doNotAddToPath 0 + StrCmp $DO_NOT_ADD_TO_PATH "1" doNotAddToPath 0 Call AddToPath doNotAddToPath: SectionEnd @@ -756,12 +756,12 @@ Function un.onInit SetShellVarContext all ;MessageBox MB_OK 'User "$0" is in the Power Users group' Goto done - + noLM: ;Get installation folder from registry if available done: - + FunctionEnd ;--- Add/Remove callback functions: --- @@ -770,25 +770,25 @@ FunctionEnd ;List all of your components in following manner here. @CPACK_NSIS_COMPONENT_SECTION_LIST@ !macroend - + Section -FinishComponents ;Removes unselected components and writes component status to registry !insertmacro SectionList "FinishSection" - -!ifdef CPACK_NSIS_ADD_REMOVE + +!ifdef CPACK_NSIS_ADD_REMOVE ; Get the name of the installer executable System::Call 'kernel32::GetModuleFileNameA(i 0, t .R0, i 1024) i r1' StrCpy $R3 $R0 - + ; Strip off the last 13 characters, to see if we have AddRemove.exe StrLen $R1 $R0 IntOp $R1 $R0 - 13 StrCpy $R2 $R0 13 $R1 StrCmp $R2 "AddRemove.exe" addremove_installed - + ; We're not running AddRemove.exe, so install it CopyFiles $R3 $INSTDIR\AddRemove.exe - + addremove_installed: !endif SectionEnd @@ -825,7 +825,7 @@ Section "Uninstall" @CPACK_NSIS_DELETE_FILES@ @CPACK_NSIS_DELETE_DIRECTORIES@ -!ifdef CPACK_NSIS_ADD_REMOVE +!ifdef CPACK_NSIS_ADD_REMOVE ;Remove the add/remove program Delete "$INSTDIR\AddRemove.exe" !endif @@ -842,23 +842,23 @@ Section "Uninstall" ; Removes all optional components !insertmacro SectionList "RemoveSection" - + !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP - + Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk" @CPACK_NSIS_DELETE_ICONS@ @CPACK_NSIS_DELETE_ICONS_EXTRA@ - + ;Delete empty start menu parent diretories StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP" - + startMenuDeleteLoop: ClearErrors RMDir $MUI_TEMP GetFullPathName $MUI_TEMP "$MUI_TEMP\.." - + IfErrors startMenuDeleteLoopDone - + StrCmp "$MUI_TEMP" "$SMPROGRAMS" startMenuDeleteLoopDone startMenuDeleteLoop startMenuDeleteLoopDone: @@ -867,17 +867,17 @@ Section "Uninstall" StrCpy $MUI_TEMP "$START_MENU" Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk" @CPACK_NSIS_DELETE_ICONS_EXTRA@ - + ;Delete empty start menu parent diretories StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP" - + secondStartMenuDeleteLoop: ClearErrors RMDir $MUI_TEMP GetFullPathName $MUI_TEMP "$MUI_TEMP\.." - + IfErrors secondStartMenuDeleteLoopDone - + StrCmp "$MUI_TEMP" "$SMPROGRAMS" secondStartMenuDeleteLoopDone secondStartMenuDeleteLoop secondStartMenuDeleteLoopDone: @@ -925,14 +925,14 @@ inst: ; Reads components status for registry !insertmacro SectionList "InitSection" - ; check to see if /D has been used to change - ; the install directory by comparing it to the + ; check to see if /D has been used to change + ; the install directory by comparing it to the ; install directory that is expected to be the ; default StrCpy $IS_DEFAULT_INSTALLDIR 0 StrCmp "$INSTDIR" "@CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@" 0 +2 StrCpy $IS_DEFAULT_INSTALLDIR 1 - + StrCpy $SV_ALLUSERS "JustMe" ; if default install dir then change the default ; if it is installed for JustMe @@ -955,7 +955,7 @@ inst: ;MessageBox MB_OK 'User "$0" is in the Power Users group' StrCpy $SV_ALLUSERS "AllUsers" Goto done - + noLM: StrCpy $SV_ALLUSERS "AllUsers" ;Get installation folder from registry if available diff --git a/Modules/Platform/BlueGeneL.cmake b/Modules/Platform/BlueGeneL.cmake index 7794a26cf6f..4021147e755 100644 --- a/Modules/Platform/BlueGeneL.cmake +++ b/Modules/Platform/BlueGeneL.cmake @@ -1,7 +1,7 @@ -#the compute nodes on BlueGene/L don't support shared libs +#the compute nodes on BlueGene/L don't support shared libs SET_PROPERTY(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE) -SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic +SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "") # -shared SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "") # -rpath diff --git a/Modules/Platform/Catamount.cmake b/Modules/Platform/Catamount.cmake index 01493fc21b9..cf672c9ceb0 100644 --- a/Modules/Platform/Catamount.cmake +++ b/Modules/Platform/Catamount.cmake @@ -1,7 +1,7 @@ -#Catamount, which runs on the compute nodes of Cray machines, e.g. RedStorm, doesn't support shared libs +#Catamount, which runs on the compute nodes of Cray machines, e.g. RedStorm, doesn't support shared libs SET_PROPERTY(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE) -SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic +SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "") # -shared SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "") # -rpath diff --git a/Modules/Platform/Darwin-icc.cmake b/Modules/Platform/Darwin-icc.cmake index b592e5f55c2..621905c4108 100644 --- a/Modules/Platform/Darwin-icc.cmake +++ b/Modules/Platform/Darwin-icc.cmake @@ -100,7 +100,7 @@ SET(CMAKE_Fortran_CREATE_SHARED_MODULE " -o ") -# We can use $ENV{INTEL_LICENSE_FILE} to try and get at the installation location for ICC. +# We can use $ENV{INTEL_LICENSE_FILE} to try and get at the installation location for ICC. # We also need to consider to use cce (which is the 64bit compiler) and not JUST the 32bit compiler. # I have no idea what the best way to do that would be. diff --git a/Modules/Platform/Generic-ADSP-C.cmake b/Modules/Platform/Generic-ADSP-C.cmake index f0644687f03..d35307bc7f6 100644 --- a/Modules/Platform/Generic-ADSP-C.cmake +++ b/Modules/Platform/Generic-ADSP-C.cmake @@ -9,7 +9,7 @@ SET(CMAKE_C_FLAGS_MINSIZEREL_INIT "") SET(CMAKE_C_FLAGS_RELEASE_INIT "") SET(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "") -SET(CMAKE_C_CREATE_STATIC_LIBRARY +SET(CMAKE_C_CREATE_STATIC_LIBRARY " -build-lib -proc ${ADSP_PROCESSOR} -si-revision ${ADSP_PROCESSOR_SILICIUM_REVISION} -o ") SET(CMAKE_C_LINK_EXECUTABLE diff --git a/Modules/Platform/Generic-ADSP-CXX.cmake b/Modules/Platform/Generic-ADSP-CXX.cmake index 21daa81c959..42d3d56aca9 100644 --- a/Modules/Platform/Generic-ADSP-CXX.cmake +++ b/Modules/Platform/Generic-ADSP-CXX.cmake @@ -7,7 +7,7 @@ SET(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "") SET(CMAKE_CXX_FLAGS_RELEASE_INIT "") SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "") -SET(CMAKE_CXX_CREATE_STATIC_LIBRARY +SET(CMAKE_CXX_CREATE_STATIC_LIBRARY " -build-lib -proc ${ADSP_PROCESSOR} -si-revision ${ADSP_PROCESSOR_SILICIUM_REVISION} -o ") SET(CMAKE_CXX_LINK_EXECUTABLE diff --git a/Modules/Platform/Generic-ADSP-Common.cmake b/Modules/Platform/Generic-ADSP-Common.cmake index 10fb34e0006..14b92e95adb 100644 --- a/Modules/Platform/Generic-ADSP-Common.cmake +++ b/Modules/Platform/Generic-ADSP-Common.cmake @@ -14,7 +14,7 @@ IF(NOT ADSP) SET(CMAKE_SHARED_LIBRARY_SUFFIX "") SET(CMAKE_EXECUTABLE_SUFFIX ".dxe") - # if ADSP_PROCESSOR has not been set, but CMAKE_SYSTEM_PROCESSOR has, + # if ADSP_PROCESSOR has not been set, but CMAKE_SYSTEM_PROCESSOR has, # assume that this is the processor name to use for the compiler IF(CMAKE_SYSTEM_PROCESSOR AND NOT ADSP_PROCESSOR) SET(ADSP_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR}) diff --git a/Modules/Platform/Generic-SDCC-C.cmake b/Modules/Platform/Generic-SDCC-C.cmake index ac81c356026..6c36445d75d 100644 --- a/Modules/Platform/Generic-SDCC-C.cmake +++ b/Modules/Platform/Generic-SDCC-C.cmake @@ -20,8 +20,8 @@ SET(CMAKE_DL_LIBS "") SET(CMAKE_C_OUTPUT_EXTENSION ".rel") # find sdcclib as CMAKE_AR -# since cmake may already have searched for "ar", sdcclib has to -# be searched with a different variable name (SDCCLIB_EXECUTABLE) +# since cmake may already have searched for "ar", sdcclib has to +# be searched with a different variable name (SDCCLIB_EXECUTABLE) # and must then be forced into the cache GET_FILENAME_COMPONENT(SDCC_LOCATION "${CMAKE_C_COMPILER}" PATH) FIND_PROGRAM(SDCCLIB_EXECUTABLE sdcclib PATHS "${SDCC_LOCATION}" NO_DEFAULT_PATH) diff --git a/Modules/Platform/Generic.cmake b/Modules/Platform/Generic.cmake index a4e2ec6c1e0..e6f8b2b1ea0 100644 --- a/Modules/Platform/Generic.cmake +++ b/Modules/Platform/Generic.cmake @@ -2,7 +2,7 @@ # operating system, typically embedded platforms. # It is used when CMAKE_SYSTEM_NAME is set to "Generic" # -# It is intentionally empty, since nothing is known +# It is intentionally empty, since nothing is known # about the platform. So everything has to be specified # in the system/compiler files ${CMAKE_SYSTEM_NAME}-.cmake # and/or ${CMAKE_SYSTEM_NAME}--${CMAKE_SYSTEM_PROCESSOR}.cmake diff --git a/Modules/Platform/IRIX64.cmake b/Modules/Platform/IRIX64.cmake index b60a7f2977e..09fa99884eb 100644 --- a/Modules/Platform/IRIX64.cmake +++ b/Modules/Platform/IRIX64.cmake @@ -11,7 +11,7 @@ IF(NOT CMAKE_COMPILER_IS_GNUCC) SET(CMAKE_EXE_LINKER_FLAGS_INIT "") SET(CMAKE_SHARED_LINKER_FLAGS_INIT "") SET(CMAKE_MODULE_LINKER_FLAGS_INIT "") - + # If no -o32, -n32, or -64 flag is given, set a reasonable default. IF("$ENV{CFLAGS} $ENV{CXXFLAGS} $ENV{LDFLAGS}" MATCHES "-([no]32|64)") ELSE("$ENV{CFLAGS} $ENV{CXXFLAGS} $ENV{LDFLAGS}" MATCHES "-([no]32|64)") @@ -21,7 +21,7 @@ IF(NOT CMAKE_COMPILER_IS_GNUCC) SET(CMAKE_FILE_SELF "${CMAKE_FILE_SELF}" CACHE INTERNAL "Output of file command on ${CMAKE_COMMAND}.") ENDIF(CMAKE_FILE_SELF MATCHES "^CMAKE_FILE_SELF$") - + # Set initial flags to match cmake executable. IF(CMAKE_FILE_SELF MATCHES " 64-bit ") SET(CMAKE_C_FLAGS_INIT "-64") @@ -32,7 +32,7 @@ IF(NOT CMAKE_COMPILER_IS_GNUCC) SET(CMAKE_MODULE_LINKER_FLAGS_INIT "-64") ENDIF(CMAKE_FILE_SELF MATCHES " 64-bit ") ENDIF("$ENV{CFLAGS} $ENV{CXXFLAGS} $ENV{LDFLAGS}" MATCHES "-([no]32|64)") - + # Set remaining defaults. SET(CMAKE_CXX_CREATE_STATIC_LIBRARY " -ar -o ") diff --git a/Modules/Platform/OSF1.cmake b/Modules/Platform/OSF1.cmake index 49a30e971eb..3017a07c8cf 100644 --- a/Modules/Platform/OSF1.cmake +++ b/Modules/Platform/OSF1.cmake @@ -2,7 +2,7 @@ SET(CMAKE_DL_LIBS "") IF(CMAKE_SYSTEM MATCHES "OSF1-1.[012]") ENDIF(CMAKE_SYSTEM MATCHES "OSF1-1.[012]") -IF(CMAKE_SYSTEM MATCHES "OSF1-1.*") +IF(CMAKE_SYSTEM MATCHES "OSF1-1.*") # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2 SET(CMAKE_C_COMPILE_OPTIONS_PIC "-fpic") SET(CMAKE_C_COMPILE_OPTIONS_PIE "-fpie") @@ -15,12 +15,12 @@ ENDIF(CMAKE_SYSTEM MATCHES "OSF1-1.*") IF(CMAKE_SYSTEM MATCHES "OSF1-V.*") SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -Wl,-expect_unresolved,\\*") # -shared IF(CMAKE_COMPILER_IS_GNUCXX) - SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-Wl,-rpath,") + SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-Wl,-rpath,") ELSE(CMAKE_COMPILER_IS_GNUCXX) SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-rpath ") ENDIF(CMAKE_COMPILER_IS_GNUCXX) IF(CMAKE_COMPILER_IS_GNUCC) - SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") + SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") ELSE(CMAKE_COMPILER_IS_GNUCC) SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-rpath ") ENDIF(CMAKE_COMPILER_IS_GNUCC) @@ -30,7 +30,7 @@ ENDIF(CMAKE_SYSTEM MATCHES "OSF1-V.*") SET(CMAKE_MAKE_INCLUDE_FROM_ROOT 1) # include $(CMAKE_BINARY_DIR)/... IF(CMAKE_COMPILER_IS_GNUCXX) - # include the gcc flags + # include the gcc flags ELSE (CMAKE_COMPILER_IS_GNUCXX) # use default OSF compiler flags SET (CMAKE_C_FLAGS_INIT "") diff --git a/Modules/Platform/SunOS.cmake b/Modules/Platform/SunOS.cmake index de287aa7086..39cb48cd7da 100644 --- a/Modules/Platform/SunOS.cmake +++ b/Modules/Platform/SunOS.cmake @@ -4,7 +4,7 @@ IF(CMAKE_SYSTEM MATCHES "SunOS-4.*") SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-PIC") SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -Wl,-r") SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-R") - SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") + SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") ENDIF(CMAKE_SYSTEM MATCHES "SunOS-4.*") IF(CMAKE_COMPILER_IS_GNUCXX) diff --git a/Modules/Platform/ULTRIX.cmake b/Modules/Platform/ULTRIX.cmake index 4d0cf755d2f..154d7e6ac4c 100644 --- a/Modules/Platform/ULTRIX.cmake +++ b/Modules/Platform/ULTRIX.cmake @@ -1,5 +1,5 @@ SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-G 0") -SET(CMAKE_SHARED_LIBRARY_SUFFIX "..o") +SET(CMAKE_SHARED_LIBRARY_SUFFIX "..o") SET(CMAKE_DL_LIBS "") SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,-D,08000000") INCLUDE(Platform/UnixPaths) diff --git a/Modules/Platform/UnixPaths.cmake b/Modules/Platform/UnixPaths.cmake index 5ee7ddbd671..6aef1118031 100644 --- a/Modules/Platform/UnixPaths.cmake +++ b/Modules/Platform/UnixPaths.cmake @@ -52,7 +52,7 @@ LIST(APPEND CMAKE_SYSTEM_INCLUDE_PATH # Other /usr/pkg/include - /opt/csw/include /opt/include + /opt/csw/include /opt/include /usr/openwin/include ) @@ -65,7 +65,7 @@ LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH # Other /usr/pkg/lib - /opt/csw/lib /opt/lib + /opt/csw/lib /opt/lib /usr/openwin/lib ) diff --git a/Modules/Platform/Windows-Intel.cmake b/Modules/Platform/Windows-Intel.cmake index 2a54a981b48..16b3c814b6e 100644 --- a/Modules/Platform/Windows-Intel.cmake +++ b/Modules/Platform/Windows-Intel.cmake @@ -64,14 +64,14 @@ SET (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_RELW INCLUDE("${CMAKE_PLATFORM_ROOT_BIN}/CMakeIntelInformation.cmake" OPTIONAL) IF(NOT _INTEL_XILINK_TEST_RUN) - EXECUTE_PROCESS(COMMAND xilink /? + EXECUTE_PROCESS(COMMAND xilink /? ERROR_VARIABLE _XILINK_ERR OUTPUT_VARIABLE _XILINK_HELP) IF(_XILINK_HELP MATCHES MANIFEST) SET(_INTEL_COMPILER_SUPPORTS_MANIFEST 1) ENDIF(_XILINK_HELP MATCHES MANIFEST) IF(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeIntelInformation.cmake") - FILE(WRITE ${CMAKE_PLATFORM_ROOT_BIN}/CMakeIntelInformation.cmake + FILE(WRITE ${CMAKE_PLATFORM_ROOT_BIN}/CMakeIntelInformation.cmake " SET(_INTEL_XILINK_TEST_RUN 1) SET(_INTEL_COMPILER_SUPPORTS_MANIFEST ${_INTEL_COMPILER_SUPPORTS_MANIFEST}) diff --git a/Modules/Platform/Windows-cl.cmake b/Modules/Platform/Windows-cl.cmake index be6abb690d1..34b11253e6c 100644 --- a/Modules/Platform/Windows-cl.cmake +++ b/Modules/Platform/Windows-cl.cmake @@ -15,7 +15,7 @@ IF(CMAKE_GENERATOR MATCHES "Visual Studio 6") ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 6") IF(NOT CMAKE_NO_BUILD_TYPE AND CMAKE_GENERATOR MATCHES "Visual Studio") SET (CMAKE_NO_BUILD_TYPE 1) - SET (CMAKE_CONFIGURATION_TYPES "Debug;Release;MinSizeRel;RelWithDebInfo" CACHE STRING + SET (CMAKE_CONFIGURATION_TYPES "Debug;Release;MinSizeRel;RelWithDebInfo" CACHE STRING "Semicolon separated list of supported configuration types, only supports Debug, Release, MinSizeRel, and RelWithDebInfo, anything else will be ignored.") MARK_AS_ADVANCED(CMAKE_CONFIGURATION_TYPES) ENDIF(NOT CMAKE_NO_BUILD_TYPE AND CMAKE_GENERATOR MATCHES "Visual Studio") @@ -49,13 +49,13 @@ IF(CMAKE_GENERATOR MATCHES "Makefiles" OR CMAKE_GENERATOR MATCHES "Ninja") IF (NOT CMAKE_C_COMPILER) SET(CMAKE_TEST_COMPILER ${CMAKE_CXX_COMPILER}) ENDIF(NOT CMAKE_C_COMPILER) - EXEC_PROGRAM(${CMAKE_TEST_COMPILER} - ARGS /nologo -EP \"${testNmakeCLVersionFile}\" - OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT + EXEC_PROGRAM(${CMAKE_TEST_COMPILER} + ARGS /nologo -EP \"${testNmakeCLVersionFile}\" + OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT RETURN_VALUE CMAKE_COMPILER_RETURN ) IF(NOT CMAKE_COMPILER_RETURN) - FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining the version of compiler passed with the following output:\n" "${CMAKE_COMPILER_OUTPUT}\n\n") STRING(REGEX REPLACE "\n" " " compilerVersion "${CMAKE_COMPILER_OUTPUT}") @@ -92,7 +92,7 @@ IF(CMAKE_GENERATOR MATCHES "Makefiles" OR CMAKE_GENERATOR MATCHES "Ninja") SET(MSVC_VERSION "${compilerVersion}") ELSE(NOT CMAKE_COMPILER_RETURN) MESSAGE(STATUS "Check for CL compiler version - failed") - FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining the version of compiler failed with the following output:\n" "${CMAKE_COMPILER_OUTPUT}\n\n") ENDIF(NOT CMAKE_COMPILER_RETURN) @@ -107,17 +107,17 @@ IF(CMAKE_GENERATOR MATCHES "Makefiles" OR CMAKE_GENERATOR MATCHES "Ninja") EXEC_PROGRAM(${CMAKE_TEST_COMPILER} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp2 ARGS /nologo /MD /EHsc \"${testForFreeVCFile}\" - OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT + OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT RETURN_VALUE CMAKE_COMPILER_RETURN ) IF(CMAKE_COMPILER_RETURN) - FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if this is a free VC compiler failed with the following output:\n" "${CMAKE_COMPILER_OUTPUT}\n\n") MESSAGE(STATUS "Check if this is a free VC compiler - yes") SET(CMAKE_USING_VC_FREE_TOOLS 1) ELSE(CMAKE_COMPILER_RETURN) - FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if this is a free VC compiler passed with the following output:\n" "${CMAKE_COMPILER_OUTPUT}\n\n") MESSAGE(STATUS "Check if this is a free VC compiler - no") @@ -243,11 +243,11 @@ SET (CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL_INIT ${CMAKE_EXE_LINKER_FLAGS_MINSIZER # save computed information for this platform IF(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCPlatform.cmake") - CONFIGURE_FILE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake.in + CONFIGURE_FILE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake.in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCPlatform.cmake IMMEDIATE) ENDIF(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCPlatform.cmake") IF(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake") - CONFIGURE_FILE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake.in + CONFIGURE_FILE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake.in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXPlatform.cmake IMMEDIATE) ENDIF(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake") diff --git a/Modules/Platform/gas.cmake b/Modules/Platform/gas.cmake index c34aef17a5b..b9d2a65821a 100644 --- a/Modules/Platform/gas.cmake +++ b/Modules/Platform/gas.cmake @@ -6,7 +6,7 @@ ENDIF(UNIX) SET(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT " -o ") -SET(CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY +SET(CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY " cr " " ") diff --git a/Modules/Qt4ConfigDependentSettings.cmake b/Modules/Qt4ConfigDependentSettings.cmake index 10af3bc95f6..665d2747e53 100644 --- a/Modules/Qt4ConfigDependentSettings.cmake +++ b/Modules/Qt4ConfigDependentSettings.cmake @@ -16,7 +16,7 @@ ############################################### # -# configuration/system dependent settings +# configuration/system dependent settings # ############################################### diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake index 68f3c8085d5..27a8ee878a9 100644 --- a/Modules/Qt4Macros.cmake +++ b/Modules/Qt4Macros.cmake @@ -29,13 +29,13 @@ MACRO (QT4_EXTRACT_OPTIONS _qt4_files _qt4_options) IF ("${_currentArg}" STREQUAL "OPTIONS") SET(_QT4_DOING_OPTIONS TRUE) ELSE ("${_currentArg}" STREQUAL "OPTIONS") - IF(_QT4_DOING_OPTIONS) + IF(_QT4_DOING_OPTIONS) LIST(APPEND ${_qt4_options} "${_currentArg}") ELSE(_QT4_DOING_OPTIONS) LIST(APPEND ${_qt4_files} "${_currentArg}") ENDIF(_QT4_DOING_OPTIONS) ENDIF ("${_currentArg}" STREQUAL "OPTIONS") - ENDFOREACH(_currentArg) + ENDFOREACH(_currentArg) ENDMACRO (QT4_EXTRACT_OPTIONS) @@ -54,9 +54,9 @@ MACRO (QT4_MAKE_OUTPUT_FILE infile prefix ext outfile ) ELSE(_infileLength GREATER _binlength) FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile}) ENDIF(_infileLength GREATER _binlength) - IF(WIN32 AND rel MATCHES "^[a-zA-Z]:") # absolute path + IF(WIN32 AND rel MATCHES "^[a-zA-Z]:") # absolute path STRING(REGEX REPLACE "^([a-zA-Z]):(.*)$" "\\1_\\2" rel "${rel}") - ENDIF(WIN32 AND rel MATCHES "^[a-zA-Z]:") + ENDIF(WIN32 AND rel MATCHES "^[a-zA-Z]:") SET(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${rel}") STRING(REPLACE ".." "__" _outfile ${_outfile}) GET_FILENAME_COMPONENT(outpath ${_outfile} PATH) diff --git a/Modules/SelectLibraryConfigurations.cmake b/Modules/SelectLibraryConfigurations.cmake index dbff4876b10..e4df3eb973c 100644 --- a/Modules/SelectLibraryConfigurations.cmake +++ b/Modules/SelectLibraryConfigurations.cmake @@ -6,7 +6,7 @@ # basename_LIBRARY_RELEASE is defined, basename_LIBRARY, basename_LIBRARY_DEBUG, # and basename_LIBRARY_RELEASE will be set to the release value. If only # basename_LIBRARY_DEBUG is defined, then basename_LIBRARY, -# basename_LIBRARY_DEBUG and basename_LIBRARY_RELEASE will take the debug value. +# basename_LIBRARY_DEBUG and basename_LIBRARY_RELEASE will take the debug value. # # If the generator supports configuration types, then basename_LIBRARY and # basename_LIBRARIES will be set with debug and optimized flags specifying the @@ -69,14 +69,14 @@ macro( select_library_configurations basename ) endif( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE ) endif() - set( ${basename}_LIBRARY ${${basename}_LIBRARY} CACHE FILEPATH + set( ${basename}_LIBRARY ${${basename}_LIBRARY} CACHE FILEPATH "The ${basename} library" ) if( ${basename}_LIBRARY ) set( ${basename}_FOUND TRUE ) endif( ${basename}_LIBRARY ) - mark_as_advanced( ${basename}_LIBRARY + mark_as_advanced( ${basename}_LIBRARY ${basename}_LIBRARY_RELEASE ${basename}_LIBRARY_DEBUG ) diff --git a/Modules/SystemInformation.cmake b/Modules/SystemInformation.cmake index d4f22331d16..443c7aa8490 100644 --- a/Modules/SystemInformation.cmake +++ b/Modules/SystemInformation.cmake @@ -23,33 +23,33 @@ SET_DIRECTORY_PROPERTIES(PROPERTIES INCLUDE_DIRECTORIES "${DumpInformation_BINAR CONFIGURE_FILE("${CMAKE_ROOT}/Modules/SystemInformation.in" "${RESULT_FILE}") -FILE(APPEND "${RESULT_FILE}" +FILE(APPEND "${RESULT_FILE}" "\n=================================================================\n") -FILE(APPEND "${RESULT_FILE}" +FILE(APPEND "${RESULT_FILE}" "=== VARIABLES\n") -FILE(APPEND "${RESULT_FILE}" +FILE(APPEND "${RESULT_FILE}" "=================================================================\n") GET_CMAKE_PROPERTY(res VARIABLES) FOREACH(var ${res}) FILE(APPEND "${RESULT_FILE}" "${var} \"${${var}}\"\n") ENDFOREACH(var ${res}) -FILE(APPEND "${RESULT_FILE}" +FILE(APPEND "${RESULT_FILE}" "\n=================================================================\n") -FILE(APPEND "${RESULT_FILE}" +FILE(APPEND "${RESULT_FILE}" "=== COMMANDS\n") -FILE(APPEND "${RESULT_FILE}" +FILE(APPEND "${RESULT_FILE}" "=================================================================\n") GET_CMAKE_PROPERTY(res COMMANDS) FOREACH(var ${res}) FILE(APPEND "${RESULT_FILE}" "${var}\n") ENDFOREACH(var ${res}) -FILE(APPEND "${RESULT_FILE}" +FILE(APPEND "${RESULT_FILE}" "\n=================================================================\n") -FILE(APPEND "${RESULT_FILE}" +FILE(APPEND "${RESULT_FILE}" "=== MACROS\n") -FILE(APPEND "${RESULT_FILE}" +FILE(APPEND "${RESULT_FILE}" "=================================================================\n") FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/AllMacros.txt "") GET_CMAKE_PROPERTY(res MACROS) @@ -57,11 +57,11 @@ FOREACH(var ${res}) FILE(APPEND "${RESULT_FILE}" "${var}\n") ENDFOREACH(var ${res}) -FILE(APPEND "${RESULT_FILE}" +FILE(APPEND "${RESULT_FILE}" "\n=================================================================\n") -FILE(APPEND "${RESULT_FILE}" +FILE(APPEND "${RESULT_FILE}" "=== OTHER\n") -FILE(APPEND "${RESULT_FILE}" +FILE(APPEND "${RESULT_FILE}" "=================================================================\n") GET_DIRECTORY_PROPERTY(res INCLUDE_DIRECTORIES) FOREACH(var ${res}) @@ -80,13 +80,13 @@ FILE(APPEND "${RESULT_FILE}" "INCLUDE_REGULAR_EXPRESSION: ${res}\n") # binary tree MACRO(DUMP_FILE THE_FILE) IF (EXISTS "${THE_FILE}") - FILE(APPEND "${RESULT_FILE}" + FILE(APPEND "${RESULT_FILE}" "\n=================================================================\n") - FILE(APPEND "${RESULT_FILE}" + FILE(APPEND "${RESULT_FILE}" "=== ${THE_FILE}\n") - FILE(APPEND "${RESULT_FILE}" + FILE(APPEND "${RESULT_FILE}" "=================================================================\n") - + FILE(READ "${THE_FILE}" FILE_CONTENTS LIMIT 50000) FILE(APPEND "${RESULT_FILE}" "${FILE_CONTENTS}") ENDIF (EXISTS "${THE_FILE}") diff --git a/Modules/TestBigEndian.cmake b/Modules/TestBigEndian.cmake index 9960602105b..bca7979df7a 100644 --- a/Modules/TestBigEndian.cmake +++ b/Modules/TestBigEndian.cmake @@ -21,7 +21,7 @@ MACRO(TEST_BIG_ENDIAN VARIABLE) IF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$") MESSAGE(STATUS "Check if the system is big endian") MESSAGE(STATUS "Searching 16 bit integer") - + INCLUDE(CheckTypeSize) CHECK_TYPE_SIZE("unsigned short" CMAKE_SIZEOF_UNSIGNED_SHORT) @@ -35,7 +35,7 @@ MACRO(TEST_BIG_ENDIAN VARIABLE) SET(CMAKE_16BIT_TYPE "unsigned int") ELSE(CMAKE_SIZEOF_UNSIGNED_INT) - + CHECK_TYPE_SIZE("unsigned long" CMAKE_SIZEOF_UNSIGNED_LONG) IF(CMAKE_SIZEOF_UNSIGNED_LONG) MESSAGE(STATUS "Using unsigned long") @@ -43,16 +43,16 @@ MACRO(TEST_BIG_ENDIAN VARIABLE) ELSE(CMAKE_SIZEOF_UNSIGNED_LONG) MESSAGE(FATAL_ERROR "no suitable type found") ENDIF(CMAKE_SIZEOF_UNSIGNED_LONG) - + ENDIF(CMAKE_SIZEOF_UNSIGNED_INT) - + ENDIF(CMAKE_SIZEOF_UNSIGNED_SHORT EQUAL 2) - - CONFIGURE_FILE("${CMAKE_ROOT}/Modules/TestEndianess.c.in" + + CONFIGURE_FILE("${CMAKE_ROOT}/Modules/TestEndianess.c.in" "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/TestEndianess.c" IMMEDIATE @ONLY) - + FILE(READ "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/TestEndianess.c" TEST_ENDIANESS_FILE_CONTENT) @@ -96,10 +96,10 @@ MACRO(TEST_BIG_ENDIAN VARIABLE) IF(NOT CMAKE_TEST_ENDIANESS_STRINGS_BE AND NOT CMAKE_TEST_ENDIANESS_STRINGS_LE) MESSAGE(SEND_ERROR "TEST_BIG_ENDIAN found no result!") ENDIF(NOT CMAKE_TEST_ENDIANESS_STRINGS_BE AND NOT CMAKE_TEST_ENDIANESS_STRINGS_LE) - + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the system is big endian passed with the following output:\n${OUTPUT}\nTestEndianess.c:\n${TEST_ENDIANESS_FILE_CONTENT}\n\n") - + ELSE(HAVE_${VARIABLE}) MESSAGE(STATUS "Check if the system is big endian - failed") FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log diff --git a/Modules/TestCXXAcceptsFlag.cmake b/Modules/TestCXXAcceptsFlag.cmake index 52d0cf3e6e9..0d945bbdc9b 100644 --- a/Modules/TestCXXAcceptsFlag.cmake +++ b/Modules/TestCXXAcceptsFlag.cmake @@ -27,7 +27,7 @@ MACRO(CHECK_CXX_ACCEPTS_FLAG FLAGS VARIABLE) ${CMAKE_BINARY_DIR} ${CMAKE_ROOT}/Modules/DummyCXXFile.cxx CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${FLAGS} - OUTPUT_VARIABLE OUTPUT) + OUTPUT_VARIABLE OUTPUT) IF(${VARIABLE}) MESSAGE(STATUS "Checking to see if CXX compiler accepts flag ${FLAGS} - yes") FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log diff --git a/Modules/TestForANSIForScope.cmake b/Modules/TestForANSIForScope.cmake index ae2acef7eb9..a60719e1a9b 100644 --- a/Modules/TestForANSIForScope.cmake +++ b/Modules/TestForANSIForScope.cmake @@ -18,19 +18,19 @@ IF("CMAKE_ANSI_FOR_SCOPE" MATCHES "^CMAKE_ANSI_FOR_SCOPE$") MESSAGE(STATUS "Check for ANSI scope") - TRY_COMPILE(CMAKE_ANSI_FOR_SCOPE ${CMAKE_BINARY_DIR} + TRY_COMPILE(CMAKE_ANSI_FOR_SCOPE ${CMAKE_BINARY_DIR} ${CMAKE_ROOT}/Modules/TestForAnsiForScope.cxx OUTPUT_VARIABLE OUTPUT) IF (CMAKE_ANSI_FOR_SCOPE) MESSAGE(STATUS "Check for ANSI scope - found") - SET (CMAKE_NO_ANSI_FOR_SCOPE 0 CACHE INTERNAL + SET (CMAKE_NO_ANSI_FOR_SCOPE 0 CACHE INTERNAL "Does the compiler support ansi for scope.") FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the CXX compiler understands ansi for scopes passed with " "the following output:\n${OUTPUT}\n\n") ELSE (CMAKE_ANSI_FOR_SCOPE) MESSAGE(STATUS "Check for ANSI scope - not found") - SET (CMAKE_NO_ANSI_FOR_SCOPE 1 CACHE INTERNAL + SET (CMAKE_NO_ANSI_FOR_SCOPE 1 CACHE INTERNAL "Does the compiler support ansi for scope.") FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the CXX compiler understands ansi for scopes failed with " diff --git a/Modules/TestForANSIStreamHeaders.cmake b/Modules/TestForANSIStreamHeaders.cmake index 19c1ab2f22a..b542b74813e 100644 --- a/Modules/TestForANSIStreamHeaders.cmake +++ b/Modules/TestForANSIStreamHeaders.cmake @@ -21,10 +21,10 @@ INCLUDE(CheckIncludeFileCXX) IF(NOT CMAKE_NO_ANSI_STREAM_HEADERS) CHECK_INCLUDE_FILE_CXX(iostream CMAKE_ANSI_STREAM_HEADERS) IF (CMAKE_ANSI_STREAM_HEADERS) - SET (CMAKE_NO_ANSI_STREAM_HEADERS 0 CACHE INTERNAL + SET (CMAKE_NO_ANSI_STREAM_HEADERS 0 CACHE INTERNAL "Does the compiler support headers like iostream.") - ELSE (CMAKE_ANSI_STREAM_HEADERS) - SET (CMAKE_NO_ANSI_STREAM_HEADERS 1 CACHE INTERNAL + ELSE (CMAKE_ANSI_STREAM_HEADERS) + SET (CMAKE_NO_ANSI_STREAM_HEADERS 1 CACHE INTERNAL "Does the compiler support headers like iostream.") ENDIF (CMAKE_ANSI_STREAM_HEADERS) diff --git a/Modules/TestForAnsiForScope.cxx b/Modules/TestForAnsiForScope.cxx index f2ec7607722..e8807ab4aa2 100644 --- a/Modules/TestForAnsiForScope.cxx +++ b/Modules/TestForAnsiForScope.cxx @@ -1,5 +1,5 @@ int main(int, char*[]) -{ +{ int i; for(int i=0; i < 1; ++i); (void)i; diff --git a/Modules/TestForSSTREAM.cmake b/Modules/TestForSSTREAM.cmake index 8dd53e744d2..30ff3bcb947 100644 --- a/Modules/TestForSSTREAM.cmake +++ b/Modules/TestForSSTREAM.cmake @@ -18,19 +18,19 @@ IF("CMAKE_HAS_ANSI_STRING_STREAM" MATCHES "^CMAKE_HAS_ANSI_STRING_STREAM$") MESSAGE(STATUS "Check for sstream") - TRY_COMPILE(CMAKE_HAS_ANSI_STRING_STREAM ${CMAKE_BINARY_DIR} + TRY_COMPILE(CMAKE_HAS_ANSI_STRING_STREAM ${CMAKE_BINARY_DIR} ${CMAKE_ROOT}/Modules/TestForSSTREAM.cxx OUTPUT_VARIABLE OUTPUT) IF (CMAKE_HAS_ANSI_STRING_STREAM) MESSAGE(STATUS "Check for sstream - found") - SET (CMAKE_NO_ANSI_STRING_STREAM 0 CACHE INTERNAL + SET (CMAKE_NO_ANSI_STRING_STREAM 0 CACHE INTERNAL "Does the compiler support sstream") FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the CXX compiler has sstream passed with " "the following output:\n${OUTPUT}\n\n") ELSE (CMAKE_HAS_ANSI_STRING_STREAM) MESSAGE(STATUS "Check for sstream - not found") - SET (CMAKE_NO_ANSI_STRING_STREAM 1 CACHE INTERNAL + SET (CMAKE_NO_ANSI_STRING_STREAM 1 CACHE INTERNAL "Does the compiler support sstream") FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the CXX compiler has sstream failed with " diff --git a/Modules/TestForSSTREAM.cxx b/Modules/TestForSSTREAM.cxx index af4a4bbef9c..1c939da2390 100644 --- a/Modules/TestForSSTREAM.cxx +++ b/Modules/TestForSSTREAM.cxx @@ -1,6 +1,6 @@ #include int main(int, char*[]) -{ +{ std::ostringstream os; os << "12345"; if(os.str().size() == 5) diff --git a/Modules/TestForSTDNamespace.cmake b/Modules/TestForSTDNamespace.cmake index 932d6e994f4..65e0de04464 100644 --- a/Modules/TestForSTDNamespace.cmake +++ b/Modules/TestForSTDNamespace.cmake @@ -18,19 +18,19 @@ IF("CMAKE_STD_NAMESPACE" MATCHES "^CMAKE_STD_NAMESPACE$") MESSAGE(STATUS "Check for STD namespace") - TRY_COMPILE(CMAKE_STD_NAMESPACE ${CMAKE_BINARY_DIR} + TRY_COMPILE(CMAKE_STD_NAMESPACE ${CMAKE_BINARY_DIR} ${CMAKE_ROOT}/Modules/TestForSTDNamespace.cxx OUTPUT_VARIABLE OUTPUT) IF (CMAKE_STD_NAMESPACE) MESSAGE(STATUS "Check for STD namespace - found") - SET (CMAKE_NO_STD_NAMESPACE 0 CACHE INTERNAL + SET (CMAKE_NO_STD_NAMESPACE 0 CACHE INTERNAL "Does the compiler support std::.") FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the CXX compiler has std namespace passed with " "the following output:\n${OUTPUT}\n\n") ELSE (CMAKE_STD_NAMESPACE) MESSAGE(STATUS "Check for STD namespace - not found") - SET (CMAKE_NO_STD_NAMESPACE 1 CACHE INTERNAL + SET (CMAKE_NO_STD_NAMESPACE 1 CACHE INTERNAL "Does the compiler support std::.") FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the CXX compiler has std namespace failed with " diff --git a/Modules/TestForSTDNamespace.cxx b/Modules/TestForSTDNamespace.cxx index fc3ac591169..b537d44a933 100644 --- a/Modules/TestForSTDNamespace.cxx +++ b/Modules/TestForSTDNamespace.cxx @@ -1,6 +1,6 @@ #include int main(int, char*[]) -{ +{ std::list(); return 0; } diff --git a/Modules/UseQt4.cmake b/Modules/UseQt4.cmake index 027504fc531..d4852a08347 100644 --- a/Modules/UseQt4.cmake +++ b/Modules/UseQt4.cmake @@ -103,6 +103,6 @@ FOREACH(module QT3SUPPORT QTOPENGL QTASSISTANT QTDESIGNER QTMOTIF QTNSPLUGIN MESSAGE("Qt ${module} library not found.") ENDIF (QT_${module}_FOUND) ENDIF (QT_USE_${module} OR QT_USE_${module}_DEPENDS) - + ENDFOREACH(module) diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake index ef7672440c0..a7085ee314c 100644 --- a/Modules/UseSWIG.cmake +++ b/Modules/UseSWIG.cmake @@ -10,7 +10,7 @@ # Set Source files properties such as CPLUSPLUS and SWIG_FLAGS to specify # special behavior of SWIG. Also global CMAKE_SWIG_FLAGS can be used to add # special flags to all swig calls. -# Another special variable is CMAKE_SWIG_OUTDIR, it allows one to specify +# Another special variable is CMAKE_SWIG_OUTDIR, it allows one to specify # where to write all the swig generated module (swig -outdir option) # The name-specific variable SWIG_MODULE__EXTRA_DEPS may be used # to specify extra dependencies for the generated modules. @@ -52,7 +52,7 @@ MACRO(SWIG_MODULE_INITIALIZE name language) MESSAGE(FATAL_ERROR "SWIG Error: Language \"${language}\" not found") ELSEIF("${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "PYTHON") # when swig is used without the -interface it will produce in the module.py - # a 'import _modulename' statement, which implies having a corresponding + # a 'import _modulename' statement, which implies having a corresponding # _modulename.so (*NIX), _modulename.pyd (Win32). SET(SWIG_MODULE_${name}_REAL_NAME "_${name}") ELSEIF("${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "PERL") @@ -93,13 +93,13 @@ MACRO(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile) ENDIF("${swig_source_file_flags}" STREQUAL "NOTFOUND") SET(swig_source_file_fullname "${infile}") IF(${swig_source_file_path} MATCHES "^${CMAKE_CURRENT_SOURCE_DIR}") - STRING(REGEX REPLACE + STRING(REGEX REPLACE "^${CMAKE_CURRENT_SOURCE_DIR}" "" swig_source_file_relative_path "${swig_source_file_path}") ELSE(${swig_source_file_path} MATCHES "^${CMAKE_CURRENT_SOURCE_DIR}") IF(${swig_source_file_path} MATCHES "^${CMAKE_CURRENT_BINARY_DIR}") - STRING(REGEX REPLACE + STRING(REGEX REPLACE "^${CMAKE_CURRENT_BINARY_DIR}" "" swig_source_file_relative_path "${swig_source_file_path}") @@ -178,7 +178,7 @@ MACRO(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile) "${swig_source_file_fullname}" MAIN_DEPENDENCY "${swig_source_file_fullname}" DEPENDS ${SWIG_MODULE_${name}_EXTRA_DEPS} - COMMENT "Swig source") + COMMENT "Swig source") SET_SOURCE_FILES_PROPERTIES("${swig_generated_file_fullname}" ${swig_extra_generated_files} PROPERTIES GENERATED 1) SET(${outfiles} "${swig_generated_file_fullname}" ${swig_extra_generated_files}) diff --git a/Source/CPack/OSXScriptLauncher.cxx b/Source/CPack/OSXScriptLauncher.cxx index e0fbe9b7527..a9842c1df8a 100644 --- a/Source/CPack/OSXScriptLauncher.cxx +++ b/Source/CPack/OSXScriptLauncher.cxx @@ -93,7 +93,7 @@ int main(int argc, char* argv[]) cmsysProcess_SetOption(cp, cmsysProcess_Option_HideWindow, 1); cmsysProcess_SetTimeout(cp, 0); cmsysProcess_Execute(cp); - + std::vector tempOutput; char* data; int length; @@ -111,9 +111,9 @@ int main(int argc, char* argv[]) } cmsys_ios::cout.write(data, length); } - + cmsysProcess_WaitForExit(cp, 0); - + bool result = true; if(cmsysProcess_GetState(cp) == cmsysProcess_State_Exited) { @@ -140,7 +140,7 @@ int main(int argc, char* argv[]) std::cerr << error_str << std::endl; result = false; } - + cmsysProcess_Delete(cp); return 0; diff --git a/Source/CPack/bills-comments.txt b/Source/CPack/bills-comments.txt index f73499d0182..c3b4ee8e71b 100644 --- a/Source/CPack/bills-comments.txt +++ b/Source/CPack/bills-comments.txt @@ -1,18 +1,18 @@ cpack.cxx - -cmCPackGenerators -- creates cmCPackGenericGenerator's via NewGenerator + +cmCPackGenerators -- creates cmCPackGenericGenerator's via NewGenerator - a cmCPackGenericGenerator factory cmCPackGenericGenerator::Initialize this->InitializeInternal - CPACK_INCLUDE_TOPLEVEL_DIRECTORY = 0 turns off + CPACK_INCLUDE_TOPLEVEL_DIRECTORY = 0 turns off // binary package run cmCPackGenericGenerator::ProcessGenerator // DoPackage cmCPackGenericGenerator::PrepareNames -- sets a bunch of CPACK_vars - cmCPackGenericGenerator::InstallProject + cmCPackGenericGenerator::InstallProject run preinstall (make preinstall/fast) call ReadListFile(cmake_install.cmake) glob recurse in install directory to get list of files @@ -22,9 +22,9 @@ cmCPackGenericGenerator::ProcessGenerator // DoPackage // source package run cmCPackGenericGenerator::ProcessGenerator // DoPackage cmCPackGenericGenerator::PrepareNames -- sets a bunch of CPACK_vars - cmCPackGenericGenerator::InstallProject --> + cmCPackGenericGenerator::InstallProject --> if set CPACK_INSTALLED_DIRECTORIES - glob the files in that directory + glob the files in that directory copy those files to the tmp install directory _CPack something glob recurse in install directory to get list of files this->CompressFiles with the list of files @@ -35,12 +35,12 @@ packages. It is controled based on values set in CPACK_ variables. InstallProject - 1. CPACK_INSTALL_COMMANDS - a list of commands used to install the package + 1. CPACK_INSTALL_COMMANDS - a list of commands used to install the package 2. CPACK_INSTALLED_DIRECTORIES - copy this directory to CPACK_TEMPORARY_DIRECTORY 3. CPACK_INSTALL_CMAKE_PROJECTS - a cmake install script - - run make preinstall + - run make preinstall - run cmake_install.cmake - set CMAKE_INSTALL_PREFIX to the temp directory - CPACK_BUILD_CONFIG check this and set the BUILD_TYPE to it @@ -59,10 +59,10 @@ rename cmCPackGenericGenerator::ProcessGenerator -> cmCPackGenerator::DoPackage break up cmCPackGenerator::InstallProject so it calls the following: // run user provided install commands - cmCPackGenerator::RunInstallCommands(); + cmCPackGenerator::RunInstallCommands(); // copy entire directories that need no processing like source trees - cmCPackGenerator::CopyPreInstalledDirectories(); + cmCPackGenerator::CopyPreInstalledDirectories(); // run the cmake install scripts if provided - cmCPackGenerator::RunCMakeInstallScripts() + cmCPackGenerator::RunCMakeInstallScripts() - diff --git a/Source/CPack/cmCPackArchiveGenerator.h b/Source/CPack/cmCPackArchiveGenerator.h index b1bbb8363ab..6411b1ebf25 100644 --- a/Source/CPack/cmCPackArchiveGenerator.h +++ b/Source/CPack/cmCPackArchiveGenerator.h @@ -33,7 +33,7 @@ class cmCPackArchiveGenerator : public cmCPackGenerator */ cmCPackArchiveGenerator(cmArchiveWrite::Compress, cmArchiveWrite::Type); virtual ~cmCPackArchiveGenerator(); - // Used to add a header to the archive + // Used to add a header to the archive virtual int GenerateHeader(std::ostream* os); // component support virtual bool SupportsComponentInstallation() const; diff --git a/Source/CPack/cmCPackBundleGenerator.cxx b/Source/CPack/cmCPackBundleGenerator.cxx index af78e7822fa..6c994f13fdc 100644 --- a/Source/CPack/cmCPackBundleGenerator.cxx +++ b/Source/CPack/cmCPackBundleGenerator.cxx @@ -91,8 +91,8 @@ int cmCPackBundleGenerator::PackageFiles() } // Get optional arguments ... - const std::string cpack_bundle_startup_command = - this->GetOption("CPACK_BUNDLE_STARTUP_COMMAND") + const std::string cpack_bundle_startup_command = + this->GetOption("CPACK_BUNDLE_STARTUP_COMMAND") ? this->GetOption("CPACK_BUNDLE_STARTUP_COMMAND") : ""; // The staging directory contains everything that will end-up inside the diff --git a/Source/CPack/cmCPackComponentGroup.cxx b/Source/CPack/cmCPackComponentGroup.cxx index 1d21fb11ca8..f93eca82382 100644 --- a/Source/CPack/cmCPackComponentGroup.cxx +++ b/Source/CPack/cmCPackComponentGroup.cxx @@ -36,7 +36,7 @@ unsigned long cmCPackComponent::GetInstalledSize(const char* installDir) const } //---------------------------------------------------------------------- -unsigned long +unsigned long cmCPackComponent::GetInstalledSizeInKbytes(const char* installDir) const { unsigned long result = (GetInstalledSize(installDir) + 512) / 1024; diff --git a/Source/CPack/cmCPackComponentGroup.h b/Source/CPack/cmCPackComponentGroup.h index cebdd6d204b..48d935cbe97 100644 --- a/Source/CPack/cmCPackComponentGroup.h +++ b/Source/CPack/cmCPackComponentGroup.h @@ -18,7 +18,7 @@ class cmCPackComponentGroup; /** \class cmCPackInstallationType - * \brief A certain type of installation, which encompasses a + * \brief A certain type of installation, which encompasses a * set of components. */ class cmCPackInstallationType @@ -90,7 +90,7 @@ class cmCPackComponent std::vector Directories; /// Get the total installed size of all of the files in this - /// component, in bytes. installDir is the directory into which the + /// component, in bytes. installDir is the directory into which the /// component was installed. unsigned long GetInstalledSize(const char* installDir) const; diff --git a/Source/CPack/cmCPackCygwinBinaryGenerator.cxx b/Source/CPack/cmCPackCygwinBinaryGenerator.cxx index 6c8fc54e0cb..6605f16e02f 100644 --- a/Source/CPack/cmCPackCygwinBinaryGenerator.cxx +++ b/Source/CPack/cmCPackCygwinBinaryGenerator.cxx @@ -50,7 +50,7 @@ int cmCPackCygwinBinaryGenerator::PackageFiles() std::string manifest = "/usr/share/doc/"; manifest += packageName; manifest += "/MANIFEST"; - std::string manifestFile + std::string manifestFile = this->GetOption("CPACK_TEMPORARY_DIRECTORY"); // Create a MANIFEST file that contains all of the files in // the tar file @@ -70,8 +70,8 @@ int cmCPackCygwinBinaryGenerator::PackageFiles() } // add the manifest file to the list of all files files.push_back(manifestFile); - - // create the bzip2 tar file + + // create the bzip2 tar file return this->Superclass::PackageFiles(); } @@ -81,8 +81,8 @@ const char* cmCPackCygwinBinaryGenerator::GetOutputExtension() const char* patchNumber =this->GetOption("CPACK_CYGWIN_PATCH_NUMBER"); if(!patchNumber) { - patchNumber = "1"; - cmCPackLogger(cmCPackLog::LOG_WARNING, + patchNumber = "1"; + cmCPackLogger(cmCPackLog::LOG_WARNING, "CPACK_CYGWIN_PATCH_NUMBER not specified using 1" << std::endl); } diff --git a/Source/CPack/cmCPackCygwinSourceGenerator.cxx b/Source/CPack/cmCPackCygwinSourceGenerator.cxx index 5979729926f..f1e8539b971 100644 --- a/Source/CPack/cmCPackCygwinSourceGenerator.cxx +++ b/Source/CPack/cmCPackCygwinSourceGenerator.cxx @@ -68,18 +68,18 @@ int cmCPackCygwinSourceGenerator::PackageFiles() // and the CPACK_CYGWIN_PATCH_FILE and CPACK_TOPLEVEL_DIRECTORY // files std::string compressOutFile = packageDirFileName; - // at this point compressOutFile is the full path to + // at this point compressOutFile is the full path to // _CPack_Package/.../package-2.5.0.tar.bz2 // we want to create a tar _CPack_Package/.../package-2.5.0-1-src.tar.bz2 - // with these - // _CPack_Package/.../package-2.5.0-1.patch + // with these + // _CPack_Package/.../package-2.5.0-1.patch // _CPack_Package/.../package-2.5.0-1.sh // _CPack_Package/.../package-2.5.0.tar.bz2 // the -1 is CPACK_CYGWIN_PATCH_NUMBER - + // first copy the patch file and the .sh file // to the toplevel cpack temp dir - + // copy the patch file into place if(!this->GetOption("CPACK_CYGWIN_PATCH_FILE")) { @@ -98,7 +98,7 @@ int cmCPackCygwinSourceGenerator::PackageFiles() } if(!this->GetOption("CPACK_CYGWIN_BUILD_SCRIPT")) { - cmCPackLogger(cmCPackLog::LOG_ERROR, + cmCPackLogger(cmCPackLog::LOG_ERROR, "No build script specified for cygwin sources."); return 0; } @@ -168,7 +168,7 @@ const char* cmCPackCygwinSourceGenerator::GetPackagingInstallPrefix() const char* cmCPackCygwinSourceGenerator::GetOutputExtension() { this->OutputExtension = "-"; - const char* patch = this->GetOption("CPACK_CYGWIN_PATCH_NUMBER"); + const char* patch = this->GetOption("CPACK_CYGWIN_PATCH_NUMBER"); if(!patch) { cmCPackLogger(cmCPackLog::LOG_WARNING, "CPACK_CYGWIN_PATCH_NUMBER" @@ -179,4 +179,4 @@ const char* cmCPackCygwinSourceGenerator::GetOutputExtension() this->OutputExtension += "-src.tar.bz2"; return this->OutputExtension.c_str(); } - + diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx index fa456deffcf..4bd5d5c2f48 100644 --- a/Source/CPack/cmCPackDebGenerator.cxx +++ b/Source/CPack/cmCPackDebGenerator.cxx @@ -293,15 +293,15 @@ int cmCPackDebGenerator::createDeb() // debian policy enforce lower case for package name // mandatory entries: - std::string debian_pkg_name = cmsys::SystemTools::LowerCase( + std::string debian_pkg_name = cmsys::SystemTools::LowerCase( this->GetOption("CPACK_DEBIAN_PACKAGE_NAME") ); - const char* debian_pkg_version = + const char* debian_pkg_version = this->GetOption("CPACK_DEBIAN_PACKAGE_VERSION"); - const char* debian_pkg_section = + const char* debian_pkg_section = this->GetOption("CPACK_DEBIAN_PACKAGE_SECTION"); - const char* debian_pkg_priority = + const char* debian_pkg_priority = this->GetOption("CPACK_DEBIAN_PACKAGE_PRIORITY"); - const char* debian_pkg_arch = + const char* debian_pkg_arch = this->GetOption("CPACK_DEBIAN_PACKAGE_ARCHITECTURE"); const char* maintainer = this->GetOption("CPACK_DEBIAN_PACKAGE_MAINTAINER"); const char* desc = this->GetOption("CPACK_DEBIAN_PACKAGE_DESCRIPTION"); @@ -719,8 +719,8 @@ static int copy_ar(CF *cfp, off_t size) FILE* from = cfp->rFile; FILE* to = cfp->wFile; - while (sz && - (nr = fread(buf, 1, sz < static_cast(sizeof(buf)) + while (sz && + (nr = fread(buf, 1, sz < static_cast(sizeof(buf)) ? static_cast(sz) : sizeof(buf), from )) > 0) { sz -= nr; @@ -731,7 +731,7 @@ static int copy_ar(CF *cfp, off_t size) if (sz) return -2; - if (cfp->flags & WPAD && (size + ar_already_written) & 1 + if (cfp->flags & WPAD && (size + ar_already_written) & 1 && fwrite(&pad, 1, 1, to) != 1) return -4; @@ -767,8 +767,8 @@ static int put_arobj(CF *cfp, struct stat *sb) (long long)sb->st_size + lname, ARFMAG); else { lname = 0; - (void)sprintf(ar_hb, HDR2, name, - (long int)sb->st_mtime, uid, gid, sb->st_mode, + (void)sprintf(ar_hb, HDR2, name, + (long int)sb->st_mtime, uid, gid, sb->st_mode, (long long)sb->st_size, ARFMAG); } off_t size = sb->st_size; @@ -790,7 +790,7 @@ static int put_arobj(CF *cfp, struct stat *sb) /* append -- * Append files to the archive - modifies original archive or creates - * a new archive if named archive does not exist. + * a new archive if named archive does not exist. */ static int ar_append(const char* archive,const std::vector& files) { diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx index 6aee401ffbb..78cb1b61cd2 100644 --- a/Source/CPack/cmCPackDragNDropGenerator.cxx +++ b/Source/CPack/cmCPackDragNDropGenerator.cxx @@ -17,7 +17,7 @@ #include -static const char* SLAHeader = +static const char* SLAHeader = "data 'LPic' (5000) {\n" " $\"0002 0011 0003 0001 0000 0000 0002 0000\"\n" " $\"0008 0003 0000 0001 0004 0000 0004 0005\"\n" @@ -29,7 +29,7 @@ static const char* SLAHeader = "};\n" "\n"; -static const char* SLASTREnglish = +static const char* SLASTREnglish = "resource 'STR#' (5002, \"English\") {\n" " {\n" " \"English\",\n" @@ -90,7 +90,7 @@ int cmCPackDragNDropGenerator::InitializeInternal() return 0; } this->SetOptionIfNotSet("CPACK_COMMAND_SETFILE", setfile_path.c_str()); - + const std::string rez_path = cmSystemTools::FindProgram("Rez", paths, false); if(rez_path.empty()) @@ -222,7 +222,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, // Get optional arguments ... const std::string cpack_package_icon = this->GetOption("CPACK_PACKAGE_ICON") ? this->GetOption("CPACK_PACKAGE_ICON") : ""; - + const std::string cpack_dmg_volume_name = this->GetOption("CPACK_DMG_VOLUME_NAME") ? this->GetOption("CPACK_DMG_VOLUME_NAME") @@ -233,8 +233,8 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, ? this->GetOption("CPACK_DMG_FORMAT") : "UDZO"; // Get optional arguments ... - std::string cpack_license_file = - this->GetOption("CPACK_RESOURCE_FILE_LICENSE") ? + std::string cpack_license_file = + this->GetOption("CPACK_RESOURCE_FILE_LICENSE") ? this->GetOption("CPACK_RESOURCE_FILE_LICENSE") : ""; const std::string cpack_dmg_background_image = @@ -405,7 +405,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, cmOStringStream detach_command; detach_command << this->GetOption("CPACK_COMMAND_HDIUTIL"); detach_command << " detach"; - detach_command << " \"" << temp_mount.str() << "\""; + detach_command << " \"" << temp_mount.str() << "\""; if(!this->RunCommand(detach_command)) { @@ -416,7 +416,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, return 0; } } - + if(!cpack_license_file.empty()) { std::string sla_r = this->GetOption("CPACK_TOPLEVEL_DIRECTORY"); @@ -460,7 +460,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, udco_image_command << " convert \"" << temp_image << "\""; udco_image_command << " -format UDCO"; udco_image_command << " -o \"" << temp_udco << "\""; - + std::string error; if(!this->RunCommand(udco_image_command, &error)) { @@ -476,17 +476,17 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, unflatten_command << this->GetOption("CPACK_COMMAND_HDIUTIL"); unflatten_command << " unflatten "; unflatten_command << "\"" << temp_udco << "\""; - + if(!this->RunCommand(unflatten_command, &error)) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Error unflattening dmg for adding SLA." << std::endl - << error + << error << std::endl); return 0; } - - // Rez the SLA + + // Rez the SLA cmOStringStream embed_sla_command; embed_sla_command << this->GetOption("CPACK_COMMAND_REZ"); embed_sla_command << " \"" << sla_r << "\""; @@ -496,8 +496,8 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, if(!this->RunCommand(embed_sla_command, &error)) { cmCPackLogger(cmCPackLog::LOG_ERROR, - "Error adding SLA." << std::endl - << error + "Error adding SLA." << std::endl + << error << std::endl); return 0; } @@ -507,7 +507,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, flatten_command << this->GetOption("CPACK_COMMAND_HDIUTIL"); flatten_command << " flatten "; flatten_command << "\"" << temp_udco << "\""; - + if(!this->RunCommand(flatten_command, &error)) { cmCPackLogger(cmCPackLog::LOG_ERROR, @@ -530,7 +530,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, final_image_command << " -imagekey"; final_image_command << " zlib-level=9"; final_image_command << " -o \"" << output_file << "\""; - + if(!this->RunCommand(final_image_command)) { cmCPackLogger(cmCPackLog::LOG_ERROR, diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index 0177653f52e..f11340046cf 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -105,7 +105,7 @@ int cmCPackGenerator::PrepareNames() "CPACK_PACKAGE_FILE_NAME not specified" << std::endl); return 0; } - std::string outName = pfname; + std::string outName = pfname; tempDirectory += "/" + outName; if(!this->GetOutputExtension()) { @@ -149,7 +149,7 @@ int cmCPackGenerator::PrepareNames() if ( !cmSystemTools::FileExists(descFileName) ) { cmCPackLogger(cmCPackLog::LOG_ERROR, - "Cannot find description file name: [" + "Cannot find description file name: [" << descFileName << "]" << std::endl); return 0; } @@ -207,7 +207,7 @@ int cmCPackGenerator::InstallProject() if ( !cmsys::SystemTools::MakeDirectory(bareTempInstallDirectory.c_str())) { cmCPackLogger(cmCPackLog::LOG_ERROR, - "Problem creating temporary directory: " + "Problem creating temporary directory: " << (tempInstallDirectory ? tempInstallDirectory : "(NULL}") << std::endl); return 0; @@ -584,7 +584,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects( !(this->IsSet("CPACK_MONOLITHIC_INSTALL"))) { // Determine the installation types for this project (if provided). - std::string installTypesVar = "CPACK_" + std::string installTypesVar = "CPACK_" + cmSystemTools::UpperCase(installComponent) + "_INSTALL_TYPES"; const char *installTypes = this->GetOption(installTypesVar.c_str()); if (installTypes && *installTypes) @@ -596,16 +596,16 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects( installTypeIt != installTypesVector.end(); ++installTypeIt) { - this->GetInstallationType(installProjectName.c_str(), + this->GetInstallationType(installProjectName.c_str(), installTypeIt->c_str()); } } // Determine the set of components that will be used in this project - std::string componentsVar + std::string componentsVar = "CPACK_COMPONENTS_" + cmSystemTools::UpperCase(installComponent); const char *components = this->GetOption(componentsVar.c_str()); - if (components && *components) + if (components && *components) { cmSystemTools::ExpandListArgument(components, componentsVector); std::vector::iterator compIt; @@ -688,10 +688,10 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects( if (componentInstall) { cmCPackLogger(cmCPackLog::LOG_OUTPUT, - "- Install component: " << installComponent + "- Install component: " << installComponent << std::endl); } - + cmake cm; cm.AddCMakePaths(); cm.SetProgressCallback(cmCPackGeneratorProgress, this); @@ -758,7 +758,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects( "- Using DESTDIR + CPACK_INSTALL_PREFIX... (mf->AddDefinition)" << std::endl); cmCPackLogger(cmCPackLog::LOG_DEBUG, - "- Setting CMAKE_INSTALL_PREFIX to '" << dir << "'" + "- Setting CMAKE_INSTALL_PREFIX to '" << dir << "'" << std::endl); // Make sure that DESTDIR + CPACK_INSTALL_PREFIX directory @@ -792,7 +792,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects( if ( !cmsys::SystemTools::MakeDirectory(dir.c_str())) { cmCPackLogger(cmCPackLog::LOG_ERROR, - "Problem creating temporary directory: " + "Problem creating temporary directory: " << dir << std::endl); return 0; } @@ -806,7 +806,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects( tempInstallDirectory.c_str())) { cmCPackLogger(cmCPackLog::LOG_ERROR, - "Problem creating temporary directory: " + "Problem creating temporary directory: " << tempInstallDirectory << std::endl); return 0; } @@ -832,7 +832,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects( installComponent.c_str()); } - // strip on TRUE, ON, 1, one or several file names, but not on + // strip on TRUE, ON, 1, one or several file names, but not on // FALSE, OFF, 0 and an empty string if (!cmSystemTools::IsOff(this->GetOption("CPACK_STRIP_FILES"))) { @@ -1024,7 +1024,7 @@ int cmCPackGenerator::DoPackage() = this->GetOption("CPACK_TOPLEVEL_DIRECTORY"); if ( cmSystemTools::FileExists(toplevelDirectory) ) { - cmCPackLogger(cmCPackLog::LOG_VERBOSE, + cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Remove toplevel directory: " << toplevelDirectory << std::endl); if ( !cmSystemTools::RepeatedRemoveDirectory(toplevelDirectory) ) @@ -1153,10 +1153,10 @@ int cmCPackGenerator::Initialize(const char* name, cmMakefile* mf) // set the running generator name this->SetOption("CPACK_GENERATOR", this->Name.c_str()); // Load the project specific config file - const char* config = + const char* config = this->GetOption("CPACK_PROJECT_CONFIG_FILE"); if(config) - { + { mf->ReadListFile(config); } int result = this->InitializeInternal(); @@ -1193,13 +1193,13 @@ bool cmCPackGenerator::IsOn(const char* name) const //---------------------------------------------------------------------- const char* cmCPackGenerator::GetOption(const char* op) const -{ +{ const char* ret = this->MakefileMap->GetDefinition(op); if(!ret) - { - cmCPackLogger(cmCPackLog::LOG_DEBUG, + { + cmCPackLogger(cmCPackLog::LOG_DEBUG, "Warning, GetOption return NULL for: " - << op + << op << std::endl); } return ret; @@ -1222,7 +1222,7 @@ int cmCPackGenerator::SetCMakeRoot() return 1; } cmCPackLogger(cmCPackLog::LOG_ERROR, - "Could not find CMAKE_ROOT !!!" + "Could not find CMAKE_ROOT !!!" << std::endl << "CMake has most likely not been installed correctly." << std::endl @@ -1516,14 +1516,14 @@ cmCPackGenerator::GetInstallationType(const char *projectName, (void) projectName; bool hasInstallationType = this->InstallationTypes.count(name) != 0; cmCPackInstallationType *installType = &this->InstallationTypes[name]; - if (!hasInstallationType) + if (!hasInstallationType) { // Define the installation type - std::string macroPrefix = "CPACK_INSTALL_TYPE_" + std::string macroPrefix = "CPACK_INSTALL_TYPE_" + cmsys::SystemTools::UpperCase(name); installType->Name = name; - const char* displayName + const char* displayName = this->GetOption((macroPrefix + "_DISPLAY_NAME").c_str()); if (displayName && *displayName) { @@ -1546,13 +1546,13 @@ cmCPackGenerator::GetComponent(const char *projectName, const char *name) { bool hasComponent = this->Components.count(name) != 0; cmCPackComponent *component = &this->Components[name]; - if (!hasComponent) + if (!hasComponent) { // Define the component - std::string macroPrefix = "CPACK_COMPONENT_" + std::string macroPrefix = "CPACK_COMPONENT_" + cmsys::SystemTools::UpperCase(name); component->Name = name; - const char* displayName + const char* displayName = this->GetOption((macroPrefix + "_DISPLAY_NAME").c_str()); if (displayName && *displayName) { @@ -1562,7 +1562,7 @@ cmCPackGenerator::GetComponent(const char *projectName, const char *name) { component->DisplayName = component->Name; } - component->IsHidden + component->IsHidden = this->IsSet((macroPrefix + "_HIDDEN").c_str()); component->IsRequired = this->IsSet((macroPrefix + "_REQUIRED").c_str()); @@ -1572,7 +1572,7 @@ cmCPackGenerator::GetComponent(const char *projectName, const char *name) = this->IsSet((macroPrefix + "_DOWNLOADED").c_str()) || cmSystemTools::IsOn(this->GetOption("CPACK_DOWNLOAD_ALL")); - const char* archiveFile = this->GetOption((macroPrefix + + const char* archiveFile = this->GetOption((macroPrefix + "_ARCHIVE_FILE").c_str()); if (archiveFile && *archiveFile) { @@ -1580,7 +1580,7 @@ cmCPackGenerator::GetComponent(const char *projectName, const char *name) } const char* groupName = this->GetOption((macroPrefix + "_GROUP").c_str()); - if (groupName && *groupName) + if (groupName && *groupName) { component->Group = GetComponentGroup(projectName, groupName); component->Group->Components.push_back(component); @@ -1598,15 +1598,15 @@ cmCPackGenerator::GetComponent(const char *projectName, const char *name) } // Determine the installation types. - const char *installTypes + const char *installTypes = this->GetOption((macroPrefix + "_INSTALL_TYPES").c_str()); - if (installTypes && *installTypes) + if (installTypes && *installTypes) { std::vector installTypesVector; cmSystemTools::ExpandListArgument(installTypes, installTypesVector); std::vector::iterator installTypesIt; - for (installTypesIt = installTypesVector.begin(); - installTypesIt != installTypesVector.end(); + for (installTypesIt = installTypesVector.begin(); + installTypesIt != installTypesVector.end(); ++installTypesIt) { component->InstallationTypes.push_back( @@ -1616,16 +1616,16 @@ cmCPackGenerator::GetComponent(const char *projectName, const char *name) // Determine the component dependencies. const char *depends = this->GetOption((macroPrefix + "_DEPENDS").c_str()); - if (depends && *depends) + if (depends && *depends) { std::vector dependsVector; cmSystemTools::ExpandListArgument(depends, dependsVector); std::vector::iterator dependIt; - for (dependIt = dependsVector.begin(); - dependIt != dependsVector.end(); + for (dependIt = dependsVector.begin(); + dependIt != dependsVector.end(); ++dependIt) { - cmCPackComponent *child = GetComponent(projectName, + cmCPackComponent *child = GetComponent(projectName, dependIt->c_str()); component->Dependencies.push_back(child); child->ReverseDependencies.push_back(component); @@ -1640,15 +1640,15 @@ cmCPackComponentGroup* cmCPackGenerator::GetComponentGroup(const char *projectName, const char *name) { (void) projectName; - std::string macroPrefix = "CPACK_COMPONENT_GROUP_" + std::string macroPrefix = "CPACK_COMPONENT_GROUP_" + cmsys::SystemTools::UpperCase(name); bool hasGroup = this->ComponentGroups.count(name) != 0; cmCPackComponentGroup *group = &this->ComponentGroups[name]; - if (!hasGroup) + if (!hasGroup) { // Define the group group->Name = name; - const char* displayName + const char* displayName = this->GetOption((macroPrefix + "_DISPLAY_NAME").c_str()); if (displayName && *displayName) { @@ -1669,7 +1669,7 @@ cmCPackGenerator::GetComponentGroup(const char *projectName, const char *name) = this->IsSet((macroPrefix + "_BOLD_TITLE").c_str()); group->IsExpandedByDefault = this->IsSet((macroPrefix + "_EXPANDED").c_str()); - const char* parentGroupName + const char* parentGroupName = this->GetOption((macroPrefix + "_PARENT_GROUP").c_str()); if (parentGroupName && *parentGroupName) { diff --git a/Source/CPack/cmCPackGenerator.h b/Source/CPack/cmCPackGenerator.h index 6748512d2ac..8fafef93d2b 100644 --- a/Source/CPack/cmCPackGenerator.h +++ b/Source/CPack/cmCPackGenerator.h @@ -113,7 +113,7 @@ class cmCPackGenerator : public cmObject //! Display verbose information via logger void DisplayVerboseOutput(const char* msg, float progress); - + bool ReadListFile(const char* moduleName); protected: diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx index 7b5251148a9..b2e57a2b8ed 100644 --- a/Source/CPack/cmCPackNSISGenerator.cxx +++ b/Source/CPack/cmCPackNSISGenerator.cxx @@ -102,7 +102,7 @@ int cmCPackNSISGenerator::PackageFiles() } if (!Components.empty()) { - // If this is a component installation, strip off the component + // If this is a component installation, strip off the component // part of the path. std::string::size_type slash = fileN.find('/'); if (slash != std::string::npos) @@ -124,12 +124,12 @@ int cmCPackNSISGenerator::PackageFiles() } cmCPackLogger(cmCPackLog::LOG_DEBUG, "Uninstall Dirs: " << dstr.str().c_str() << std::endl); - this->SetOptionIfNotSet("CPACK_NSIS_DELETE_DIRECTORIES", + this->SetOptionIfNotSet("CPACK_NSIS_DELETE_DIRECTORIES", dstr.str().c_str()); cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Configure file: " << nsisInFileName << " to " << nsisFileName << std::endl); - if(this->IsSet("CPACK_NSIS_MUI_ICON") + if(this->IsSet("CPACK_NSIS_MUI_ICON") || this->IsSet("CPACK_NSIS_MUI_UNIICON")) { std::string installerIconCode; @@ -174,7 +174,7 @@ int cmCPackNSISGenerator::PackageFiles() this->SetOptionIfNotSet("CPACK_NSIS_INSTALLATION_TYPES", ""); this->SetOptionIfNotSet("CPACK_NSIS_INSTALLER_MUI_COMPONENTS_DESC", ""); this->SetOptionIfNotSet("CPACK_NSIS_PAGE_COMPONENTS", ""); - this->SetOptionIfNotSet("CPACK_NSIS_FULL_INSTALL", + this->SetOptionIfNotSet("CPACK_NSIS_FULL_INSTALL", "File /r \"${INST_DIR}\\*.*\""); this->SetOptionIfNotSet("CPACK_NSIS_COMPONENT_SECTIONS", ""); this->SetOptionIfNotSet("CPACK_NSIS_COMPONENT_SECTION_LIST", ""); @@ -194,7 +194,7 @@ int cmCPackNSISGenerator::PackageFiles() // Create installation types. The order is significant, so we first fill // in a vector based on the indices, and print them in that order. - std::vector + std::vector installTypes(this->InstallationTypes.size()); std::map::iterator installTypeIt; for (installTypeIt = this->InstallationTypes.begin(); @@ -221,15 +221,15 @@ int cmCPackNSISGenerator::PackageFiles() { if (groupIt->second.ParentGroup == 0) { - componentCode += + componentCode += this->CreateComponentGroupDescription(&groupIt->second, macrosOut); } // Add the group description, if any. if (!groupIt->second.Description.empty()) { - groupDescriptions += " !insertmacro MUI_DESCRIPTION_TEXT ${" - + groupIt->first + "} \"" + groupDescriptions += " !insertmacro MUI_DESCRIPTION_TEXT ${" + + groupIt->first + "} \"" + this->TranslateNewlines(groupIt->second.Description) + "\"\n"; } } @@ -251,7 +251,7 @@ int cmCPackNSISGenerator::PackageFiles() if (!compIt->second.Group) { - componentCode + componentCode += this->CreateComponentDescription(&compIt->second, macrosOut); } @@ -265,8 +265,8 @@ int cmCPackNSISGenerator::PackageFiles() // Add the component description, if any. if (!compIt->second.Description.empty()) { - componentDescriptions += " !insertmacro MUI_DESCRIPTION_TEXT ${" - + compIt->first + "} \"" + componentDescriptions += " !insertmacro MUI_DESCRIPTION_TEXT ${" + + compIt->first + "} \"" + this->TranslateNewlines(compIt->second.Description) + "\"\n"; } } @@ -276,17 +276,17 @@ int cmCPackNSISGenerator::PackageFiles() if (componentDescriptions.empty() && groupDescriptions.empty()) { // Turn off the "Description" box - this->SetOptionIfNotSet("CPACK_NSIS_INSTALLER_MUI_COMPONENTS_DESC", + this->SetOptionIfNotSet("CPACK_NSIS_INSTALLER_MUI_COMPONENTS_DESC", "!define MUI_COMPONENTSPAGE_NODESC"); } else { - componentDescriptions = + componentDescriptions = "!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN\n" + componentDescriptions + groupDescriptions + "!insertmacro MUI_FUNCTION_DESCRIPTION_END\n"; - this->SetOptionIfNotSet("CPACK_NSIS_INSTALLER_MUI_COMPONENTS_DESC", + this->SetOptionIfNotSet("CPACK_NSIS_INSTALLER_MUI_COMPONENTS_DESC", componentDescriptions.c_str()); } @@ -308,12 +308,12 @@ int cmCPackNSISGenerator::PackageFiles() componentCode.c_str()); this->SetOptionIfNotSet("CPACK_NSIS_COMPONENT_SECTION_LIST", sectionList.c_str()); - this->SetOptionIfNotSet("CPACK_NSIS_SECTION_SELECTED_VARS", + this->SetOptionIfNotSet("CPACK_NSIS_SECTION_SELECTED_VARS", selectedVarsList.c_str()); this->SetOption("CPACK_NSIS_DEFINES", defines.c_str()); } - this->ConfigureFile(nsisInInstallOptions.c_str(), + this->ConfigureFile(nsisInInstallOptions.c_str(), nsisInstallOptions.c_str()); this->ConfigureFile(nsisInFileName.c_str(), nsisFileName.c_str()); std::string nsisCmd = "\""; @@ -445,11 +445,11 @@ int cmCPackNSISGenerator::InitializeInternal() { cmCPackLogger(cmCPackLog::LOG_DEBUG, "CPACK_CREATE_DESKTOP_LINKS: " << cpackPackageDeskTopLinks << std::endl); - + cmSystemTools:: ExpandListArgument(cpackPackageDeskTopLinks, cpackPackageDesktopLinksVector); - for(std::vector::iterator i = + for(std::vector::iterator i = cpackPackageDesktopLinksVector.begin(); i != cpackPackageDesktopLinksVector.end(); ++i) { @@ -499,7 +499,7 @@ int cmCPackNSISGenerator::InitializeInternal() if(cpackPackageDesktopLinksVector.size() && std::find(cpackPackageDesktopLinksVector.begin(), cpackPackageDesktopLinksVector.end(), - execName) + execName) != cpackPackageDesktopLinksVector.end()) { str << " StrCmp \"$INSTALL_DESKTOP\" \"1\" 0 +2\n"; @@ -579,7 +579,7 @@ void cmCPackNSISGenerator::CreateMenuLinks( cmOStringStream& str, else { str << " WriteINIStr \"$SMPROGRAMS\\$STARTMENU_FOLDER\\" - << linkName << ".url\" \"InternetShortcut\" \"URL\" \"" + << linkName << ".url\" \"InternetShortcut\" \"URL\" \"" << sourceName << "\"" << std::endl; deleteStr << " Delete \"$SMPROGRAMS\\$MUI_TEMP\\" << linkName @@ -651,9 +651,9 @@ bool cmCPackNSISGenerator::SupportsComponentInstallation() const } //---------------------------------------------------------------------- -std::string +std::string cmCPackNSISGenerator:: -CreateComponentDescription(cmCPackComponent *component, +CreateComponentDescription(cmCPackComponent *component, cmOStringStream& macrosOut) { // Basic description of the component @@ -668,7 +668,7 @@ CreateComponentDescription(cmCPackComponent *component, componentCode += "-"; } componentCode += component->DisplayName + "\" " + component->Name + "\n"; - if (component->IsRequired) + if (component->IsRequired) { componentCode += " SectionIn RO\n"; } @@ -701,7 +701,7 @@ CreateComponentDescription(cmCPackComponent *component, } // Create the directory for the upload area - const char* userUploadDirectory = + const char* userUploadDirectory = this->GetOption("CPACK_UPLOAD_DIRECTORY"); std::string uploadDirectory; if (userUploadDirectory && *userUploadDirectory) @@ -727,7 +727,7 @@ CreateComponentDescription(cmCPackComponent *component, // Remove the old archive, if one exists std::string archiveFile = uploadDirectory + '/' + component->ArchiveFile; cmCPackLogger(cmCPackLog::LOG_OUTPUT, - "- Building downloaded component archive: " + "- Building downloaded component archive: " << archiveFile << std::endl); if (cmSystemTools::FileExists(archiveFile.c_str(), true)) { @@ -760,18 +760,18 @@ CreateComponentDescription(cmCPackComponent *component, dirName += component->Name; dirName += '/'; - // Build the list of files to go into this archive, and determine the + // Build the list of files to go into this archive, and determine the // size of the installed component. std::string zipListFileName = this->GetOption("CPACK_TEMPORARY_DIRECTORY"); zipListFileName += "/winZip.filelist"; - bool needQuotesInFile + bool needQuotesInFile = cmSystemTools::IsOn(this->GetOption("CPACK_ZIP_NEED_QUOTES")); unsigned long totalSize = 0; { // the scope is needed for cmGeneratedFileStream cmGeneratedFileStream out(zipListFileName.c_str()); std::vector::iterator fileIt; - for (fileIt = component->Files.begin(); - fileIt != component->Files.end(); + for (fileIt = component->Files.begin(); + fileIt != component->Files.end(); ++fileIt) { if ( needQuotesInFile ) @@ -792,11 +792,11 @@ CreateComponentDescription(cmCPackComponent *component, // Build the archive in the upload area std::string cmd = this->GetOption("CPACK_ZIP_COMMAND"); cmsys::SystemTools::ReplaceString(cmd, "", archiveFile.c_str()); - cmsys::SystemTools::ReplaceString(cmd, "", + cmsys::SystemTools::ReplaceString(cmd, "", zipListFileName.c_str()); std::string output; int retVal = -1; - int res = cmSystemTools::RunSingleCommand(cmd.c_str(), &output, &retVal, + int res = cmSystemTools::RunSingleCommand(cmd.c_str(), &output, &retVal, dirName.c_str(), cmSystemTools::OUTPUT_NONE, 0); if ( !res || retVal ) @@ -812,7 +812,7 @@ CreateComponentDescription(cmCPackComponent *component, << "Please check " << tmpFile.c_str() << " for errors" << std::endl); return ""; } - + // Create the NSIS code to download this file on-the-fly. unsigned long totalSizeInKbytes = (totalSize + 512) / 1024; if (totalSizeInKbytes == 0) @@ -823,7 +823,7 @@ CreateComponentDescription(cmCPackComponent *component, out << " AddSize " << totalSizeInKbytes << "\n" << " Push \"" << component->ArchiveFile << "\"\n" << " Call DownloadFile\n" - << " ZipDLL::extractall \"$INSTDIR\\" + << " ZipDLL::extractall \"$INSTDIR\\" << component->ArchiveFile << "\" \"$INSTDIR\"\n" << " Pop $2 ; error message\n" " StrCmp $2 \"success\" +2 0\n" @@ -889,7 +889,7 @@ std::string cmCPackNSISGenerator::CreateSelectionDependenciesDescription std::set& visited) { // Don't visit a component twice - if (visited.count(component)) + if (visited.count(component)) { return std::string(); } @@ -921,7 +921,7 @@ std::string cmCPackNSISGenerator::CreateDeselectionDependenciesDescription std::set& visited) { // Don't visit a component twice - if (visited.count(component)) + if (visited.count(component)) { return std::string(); } @@ -939,7 +939,7 @@ std::string cmCPackNSISGenerator::CreateDeselectionDependenciesDescription out << " IntOp $0 $0 & $1\n"; out << " SectionSetFlags ${" << (*dependIt)->Name << "} $0\n"; out << " IntOp $" << (*dependIt)->Name << "_selected 0 + 0\n"; - + // Recurse out << CreateDeselectionDependenciesDescription(*dependIt, visited).c_str(); @@ -949,9 +949,9 @@ std::string cmCPackNSISGenerator::CreateDeselectionDependenciesDescription } //---------------------------------------------------------------------- -std::string +std::string cmCPackNSISGenerator:: -CreateComponentGroupDescription(cmCPackComponentGroup *group, +CreateComponentGroupDescription(cmCPackComponentGroup *group, cmOStringStream& macrosOut) { if (group->Components.empty() && group->Subgroups.empty()) @@ -982,8 +982,8 @@ CreateComponentGroupDescription(cmCPackComponentGroup *group, } std::vector::iterator comp; - for (comp = group->Components.begin(); - comp != group->Components.end(); + for (comp = group->Components.begin(); + comp != group->Components.end(); ++comp) { if ((*comp)->Files.empty()) diff --git a/Source/CPack/cmCPackOSXX11Generator.cxx b/Source/CPack/cmCPackOSXX11Generator.cxx index 363ccea0c95..76e15fb843a 100644 --- a/Source/CPack/cmCPackOSXX11Generator.cxx +++ b/Source/CPack/cmCPackOSXX11Generator.cxx @@ -64,7 +64,7 @@ int cmCPackOSXX11Generator::PackageFiles() { std::string cpackExecutableName = *it; ++ it; - this->SetOptionIfNotSet("CPACK_EXECUTABLE_NAME", + this->SetOptionIfNotSet("CPACK_EXECUTABLE_NAME", cpackExecutableName.c_str()); } } @@ -113,7 +113,7 @@ int cmCPackOSXX11Generator::PackageFiles() cmSystemTools::CreateSymlink("/Applications", applicationsLinkName.c_str()); if ( - !this->CopyResourcePlistFile("VolumeIcon.icns", + !this->CopyResourcePlistFile("VolumeIcon.icns", diskImageDirectory.c_str(), ".VolumeIcon.icns", true ) || !this->CopyResourcePlistFile("DS_Store", diskImageDirectory.c_str(), @@ -125,9 +125,9 @@ int cmCPackOSXX11Generator::PackageFiles() "Info.plist" ) || !this->CopyResourcePlistFile("OSXX11.main.scpt", scrDir, "main.scpt", true ) || - !this->CopyResourcePlistFile("OSXScriptLauncher.rsrc", dir, + !this->CopyResourcePlistFile("OSXScriptLauncher.rsrc", dir, rsrcFile, true) || - !this->CopyResourcePlistFile("OSXScriptLauncher", appdir, + !this->CopyResourcePlistFile("OSXScriptLauncher", appdir, this->GetOption("CPACK_PACKAGE_FILE_NAME"), true) ) { @@ -167,11 +167,11 @@ int cmCPackOSXX11Generator::PackageFiles() tmpFile += "/hdiutilOutput.log"; cmOStringStream dmgCmd; dmgCmd << "\"" << this->GetOption("CPACK_INSTALLER_PROGRAM_DISK_IMAGE") - << "\" create -ov -format UDZO -srcfolder \"" - << diskImageDirectory.c_str() + << "\" create -ov -format UDZO -srcfolder \"" + << diskImageDirectory.c_str() << "\" \"" << packageFileNames[0] << "\""; cmCPackLogger(cmCPackLog::LOG_VERBOSE, - "Compress disk image using command: " + "Compress disk image using command: " << dmgCmd.str().c_str() << std::endl); // since we get random dashboard failures with this one // try running it more than once @@ -181,7 +181,7 @@ int cmCPackOSXX11Generator::PackageFiles() while(numTries > 0) { res = cmSystemTools::RunSingleCommand(dmgCmd.str().c_str(), &output, - &retVal, 0, + &retVal, 0, this->GeneratorVerbose, 0); if ( res && !retVal ) { @@ -219,7 +219,7 @@ int cmCPackOSXX11Generator::InitializeInternal() << std::endl); return 0; } - this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM_DISK_IMAGE", + this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM_DISK_IMAGE", pkgPath.c_str()); return this->Superclass::InitializeInternal(); @@ -235,7 +235,7 @@ bool cmCPackOSXX11Generator::CopyCreateResourceFile(const char* name) if ( !inFileName ) { cmCPackLogger(cmCPackLog::LOG_ERROR, "CPack option: " << cpackVar.c_str() - << " not specified. It should point to " + << " not specified. It should point to " << (name ? name : "(NULL)") << ".rtf, " << name << ".html, or " << name << ".txt file" << std::endl); @@ -243,7 +243,7 @@ bool cmCPackOSXX11Generator::CopyCreateResourceFile(const char* name) } if ( !cmSystemTools::FileExists(inFileName) ) { - cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find " + cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find " << (name ? name : "(NULL)") << " resource file: " << inFileName << std::endl); return false; @@ -262,7 +262,7 @@ bool cmCPackOSXX11Generator::CopyCreateResourceFile(const char* name) destFileName += name + ext; - cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Configure file: " + cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Configure file: " << (inFileName ? inFileName : "(NULL)") << " to " << destFileName.c_str() << std::endl); this->ConfigureFile(inFileName, destFileName.c_str()); diff --git a/Source/CPack/cmCPackPackageMakerGenerator.cxx b/Source/CPack/cmCPackPackageMakerGenerator.cxx index 3a0e89bbd92..edbe8380d6d 100644 --- a/Source/CPack/cmCPackPackageMakerGenerator.cxx +++ b/Source/CPack/cmCPackPackageMakerGenerator.cxx @@ -52,7 +52,7 @@ int cmCPackPackageMakerGenerator::CopyInstallScript(const char* resdir, cmSystemTools::CopyFileAlways(script, dst.c_str()); cmSystemTools::SetPermissions(dst.c_str(),0777); cmCPackLogger(cmCPackLog::LOG_VERBOSE, - "copy script : " << script << "\ninto " << dst.c_str() << + "copy script : " << script << "\ninto " << dst.c_str() << std::endl); return 1; @@ -79,7 +79,7 @@ int cmCPackPackageMakerGenerator::PackageFiles() if ( !cmsys::SystemTools::MakeDirectory(packageDirFileName.c_str())) { cmCPackLogger(cmCPackLog::LOG_ERROR, - "unable to create package directory " + "unable to create package directory " << packageDirFileName << std::endl); return 0; } @@ -89,7 +89,7 @@ int cmCPackPackageMakerGenerator::PackageFiles() if ( !cmsys::SystemTools::MakeDirectory(resDir.c_str())) { cmCPackLogger(cmCPackLog::LOG_ERROR, - "unable to create package subdirectory " << resDir + "unable to create package subdirectory " << resDir << std::endl); return 0; } @@ -98,7 +98,7 @@ int cmCPackPackageMakerGenerator::PackageFiles() if ( !cmsys::SystemTools::MakeDirectory(resDir.c_str())) { cmCPackLogger(cmCPackLog::LOG_ERROR, - "unable to create package subdirectory " << resDir + "unable to create package subdirectory " << resDir << std::endl); return 0; } @@ -135,7 +135,7 @@ int cmCPackPackageMakerGenerator::PackageFiles() return 0; } } - // if preflight, postflight, or postupgrade are set + // if preflight, postflight, or postupgrade are set // then copy them into the resource directory and make // them executable if(preflight) @@ -206,7 +206,7 @@ int cmCPackPackageMakerGenerator::PackageFiles() if (!cmSystemTools::MakeDirectory(uploadDirectory.c_str())) { cmCPackLogger(cmCPackLog::LOG_ERROR, - "Unable to create package upload directory " + "Unable to create package upload directory " << uploadDirectory << std::endl); return 0; } @@ -254,7 +254,7 @@ int cmCPackPackageMakerGenerator::PackageFiles() std::string packageDir = toplevel; packageDir += '/'; packageDir += compIt->first; - if (!this->GenerateComponentPackage(packageFile.c_str(), + if (!this->GenerateComponentPackage(packageFile.c_str(), packageDir.c_str(), compIt->second)) { @@ -293,7 +293,7 @@ int cmCPackPackageMakerGenerator::PackageFiles() } pkgCmd << "\" -r \"" << this->GetOption("CPACK_TOPLEVEL_DIRECTORY") << "/Resources\" -i \"" - << this->GetOption("CPACK_TOPLEVEL_DIRECTORY") + << this->GetOption("CPACK_TOPLEVEL_DIRECTORY") << "/Info.plist\" -d \"" << this->GetOption("CPACK_TOPLEVEL_DIRECTORY") << "/Description.plist\""; @@ -324,7 +324,7 @@ int cmCPackPackageMakerGenerator::PackageFiles() while(numTries > 0) { res = cmSystemTools::RunSingleCommand(dmgCmd.str().c_str(), &output, - &retVal, 0, this->GeneratorVerbose, + &retVal, 0, this->GeneratorVerbose, 0); if ( res && !retVal ) { @@ -474,7 +474,7 @@ int cmCPackPackageMakerGenerator::InitializeInternal() const char *packageCompat = this->GetOption("CPACK_OSX_PACKAGE_VERSION"); if (packageCompat && *packageCompat) { - this->PackageCompatibilityVersion = atof(packageCompat); + this->PackageCompatibilityVersion = atof(packageCompat); } else if (this->GetOption("CPACK_DOWNLOAD_SITE")) { @@ -500,7 +500,7 @@ int cmCPackPackageMakerGenerator::InitializeInternal() << std::endl); return 0; } - this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM_DISK_IMAGE", + this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM_DISK_IMAGE", pkgPath.c_str()); return this->Superclass::InitializeInternal(); @@ -516,7 +516,7 @@ bool cmCPackPackageMakerGenerator::CopyCreateResourceFile(const char* name, if ( !inFileName ) { cmCPackLogger(cmCPackLog::LOG_ERROR, "CPack option: " << cpackVar.c_str() - << " not specified. It should point to " + << " not specified. It should point to " << (name ? name : "(NULL)") << ".rtf, " << name << ".html, or " << name << ".txt file" << std::endl); @@ -524,7 +524,7 @@ bool cmCPackPackageMakerGenerator::CopyCreateResourceFile(const char* name, } if ( !cmSystemTools::FileExists(inFileName) ) { - cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find " + cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find " << (name ? name : "(NULL)") << " resource file: " << inFileName << std::endl); return false; @@ -547,7 +547,7 @@ bool cmCPackPackageMakerGenerator::CopyCreateResourceFile(const char* name, this->SetOption(("CPACK_RESOURCE_FILE_" + uname + "_NOPATH").c_str(), (name + ext).c_str()); - cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Configure file: " + cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Configure file: " << (inFileName ? inFileName : "(NULL)") << " to " << destFileName.c_str() << std::endl); this->ConfigureFile(inFileName, destFileName.c_str()); @@ -593,7 +593,7 @@ bool cmCPackPackageMakerGenerator::RunPackageMaker(const char *command, cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Execute: " << command << std::endl); std::string output; int retVal = 1; - bool res = cmSystemTools::RunSingleCommand(command, &output, &retVal, 0, + bool res = cmSystemTools::RunSingleCommand(command, &output, &retVal, 0, this->GeneratorVerbose, 0); cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Done running package maker" << std::endl); @@ -612,7 +612,7 @@ bool cmCPackPackageMakerGenerator::RunPackageMaker(const char *command, // sometimes the command finishes but the directory is not yet // created, so try 10 times to see if it shows up int tries = 10; - while(tries > 0 && + while(tries > 0 && !cmSystemTools::FileExists(packageFile)) { cmSystemTools::Delay(500); @@ -632,7 +632,7 @@ bool cmCPackPackageMakerGenerator::RunPackageMaker(const char *command, } //---------------------------------------------------------------------- -std::string +std::string cmCPackPackageMakerGenerator::GetPackageName(const cmCPackComponent& component) { if (component.ArchiveFile.empty()) @@ -664,7 +664,7 @@ GenerateComponentPackage(const char *packageFile, // The command that will be used to run PackageMaker cmOStringStream pkgCmd; - if (this->PackageCompatibilityVersion < 10.5 || + if (this->PackageCompatibilityVersion < 10.5 || this->PackageMakerVersion < 3.0) { // Create Description.plist and Info.plist files for normal Mac OS @@ -680,10 +680,10 @@ GenerateComponentPackage(const char *packageFile, << " IFPkgDescriptionTitle" << std::endl << " " << component.DisplayName << "" << std::endl << " IFPkgDescriptionVersion" << std::endl - << " " << this->GetOption("CPACK_PACKAGE_VERSION") + << " " << this->GetOption("CPACK_PACKAGE_VERSION") << "" << std::endl << " IFPkgDescriptionDescription" << std::endl - << " " + this->EscapeForXML(component.Description) + << " " + this->EscapeForXML(component.Description) << "" << std::endl << "" << std::endl << "" << std::endl; @@ -692,7 +692,7 @@ GenerateComponentPackage(const char *packageFile, // Create the Info.plist file for this component std::string moduleVersionSuffix = "."; moduleVersionSuffix += component.Name; - this->SetOption("CPACK_MODULE_VERSION_SUFFIX", + this->SetOption("CPACK_MODULE_VERSION_SUFFIX", moduleVersionSuffix.c_str()); std::string infoFileName = component.Name; infoFileName += "-Info.plist"; @@ -704,9 +704,9 @@ GenerateComponentPackage(const char *packageFile, pkgCmd << "\"" << this->GetOption("CPACK_INSTALLER_PROGRAM") << "\" -build -p \"" << packageFile << "\"" << " -f \"" << packageDir << "\"" - << " -i \"" << this->GetOption("CPACK_TOPLEVEL_DIRECTORY") + << " -i \"" << this->GetOption("CPACK_TOPLEVEL_DIRECTORY") << "/" << infoFileName << "\"" - << " -d \"" << descriptionFile << "\""; + << " -d \"" << descriptionFile << "\""; } else { @@ -729,16 +729,16 @@ GenerateComponentPackage(const char *packageFile, << " --out \"" << packageFile << "\""; } - // Run PackageMaker + // Run PackageMaker return RunPackageMaker(pkgCmd.str().c_str(), packageFile); } //---------------------------------------------------------------------- -void +void cmCPackPackageMakerGenerator:: WriteDistributionFile(const char* metapackageFile) { - std::string distributionTemplate + std::string distributionTemplate = this->FindTemplate("CPack.distribution.dist.in"); if ( distributionTemplate.empty() ) { @@ -757,8 +757,8 @@ WriteDistributionFile(const char* metapackageFile) // Emit the outline for the groups std::map::iterator groupIt; - for (groupIt = this->ComponentGroups.begin(); - groupIt != this->ComponentGroups.end(); + for (groupIt = this->ComponentGroups.begin(); + groupIt != this->ComponentGroups.end(); ++groupIt) { if (groupIt->second.ParentGroup == 0) @@ -781,8 +781,8 @@ WriteDistributionFile(const char* metapackageFile) choiceOut << "" << std::endl; // Create the actual choices - for (groupIt = this->ComponentGroups.begin(); - groupIt != this->ComponentGroups.end(); + for (groupIt = this->ComponentGroups.begin(); + groupIt != this->ComponentGroups.end(); ++groupIt) { CreateChoice(groupIt->second, choiceOut); @@ -796,7 +796,7 @@ WriteDistributionFile(const char* metapackageFile) // Create the distribution.dist file in the metapackage to turn it // into a distribution package. - this->ConfigureFile(distributionTemplate.c_str(), + this->ConfigureFile(distributionTemplate.c_str(), distributionFile.c_str()); } @@ -824,13 +824,13 @@ CreateChoiceOutline(const cmCPackComponentGroup& group, cmOStringStream& out) } //---------------------------------------------------------------------- -void +void cmCPackPackageMakerGenerator::CreateChoice(const cmCPackComponentGroup& group, cmOStringStream& out) { - out << "GetOption("CPACK_PACKAGE_VENDOR"); - packageId += '.'; + packageId += '.'; packageId += this->GetOption("CPACK_PACKAGE_NAME"); packageId += '.'; packageId += component.Name; - out << "GetOption("CPACK_TEMPORARY_DIRECTORY"); dirName += '/'; dirName += component.Name; - unsigned long installedSize + unsigned long installedSize = component.GetInstalledSizeInKbytes(dirName.c_str()); out << ""; if (component.IsDownloaded) { - out << this->GetOption("CPACK_DOWNLOAD_SITE") + out << this->GetOption("CPACK_DOWNLOAD_SITE") << this->GetPackageName(component); } else @@ -925,9 +925,9 @@ cmCPackPackageMakerGenerator::CreateChoice(const cmCPackComponent& component, } //---------------------------------------------------------------------- -void +void cmCPackPackageMakerGenerator:: -AddDependencyAttributes(const cmCPackComponent& component, +AddDependencyAttributes(const cmCPackComponent& component, std::set& visited, cmOStringStream& out) { @@ -942,16 +942,16 @@ AddDependencyAttributes(const cmCPackComponent& component, dependIt != component.Dependencies.end(); ++dependIt) { - out << " && choices['" << + out << " && choices['" << (*dependIt)->Name << "Choice'].selected"; AddDependencyAttributes(**dependIt, visited, out); } } //---------------------------------------------------------------------- -void +void cmCPackPackageMakerGenerator:: -AddReverseDependencyAttributes(const cmCPackComponent& component, +AddReverseDependencyAttributes(const cmCPackComponent& component, std::set& visited, cmOStringStream& out) { diff --git a/Source/CPack/cmCPackPackageMakerGenerator.h b/Source/CPack/cmCPackPackageMakerGenerator.h index 2bab9479107..101813fa427 100644 --- a/Source/CPack/cmCPackPackageMakerGenerator.h +++ b/Source/CPack/cmCPackPackageMakerGenerator.h @@ -67,8 +67,8 @@ class cmCPackPackageMakerGenerator : public cmCPackGenerator // Generate a package in the file packageFile for the given // component. All of the files within this component are stored in // the directory packageDir. Returns true if successful, false - // otherwise. - bool GenerateComponentPackage(const char *packageFile, + // otherwise. + bool GenerateComponentPackage(const char *packageFile, const char *packageDir, const cmCPackComponent& component); @@ -87,14 +87,14 @@ class cmCPackPackageMakerGenerator : public cmCPackGenerator // Subroutine of WriteDistributionFile that writes out the // reverse dependency attributes for inter-component dependencies. - void + void AddReverseDependencyAttributes(const cmCPackComponent& component, std::set& visited, cmOStringStream& out); // Generates XML that encodes the hierarchy of component groups and // their components in a form that can be used by distribution - // metapackages. + // metapackages. void CreateChoiceOutline(const cmCPackComponentGroup& group, cmOStringStream& out); @@ -111,7 +111,7 @@ class cmCPackPackageMakerGenerator : public cmCPackGenerator // Escape the given string to make it usable as an XML attribute // value. std::string EscapeForXML(std::string str); - + double PackageMakerVersion; double PackageCompatibilityVersion; }; diff --git a/Source/CPack/cmCPackRPMGenerator.cxx b/Source/CPack/cmCPackRPMGenerator.cxx index 413572ee755..13aa6d8f9c1 100644 --- a/Source/CPack/cmCPackRPMGenerator.cxx +++ b/Source/CPack/cmCPackRPMGenerator.cxx @@ -230,7 +230,7 @@ int cmCPackRPMGenerator::PackageFiles() } } - if (!this->IsSet("RPMBUILD_EXECUTABLE")) + if (!this->IsSet("RPMBUILD_EXECUTABLE")) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find rpmbuild" << std::endl); retval = 0; diff --git a/Source/CPack/cmCPackSTGZGenerator.cxx b/Source/CPack/cmCPackSTGZGenerator.cxx index 966a231b7a4..9b6cf14dfbc 100644 --- a/Source/CPack/cmCPackSTGZGenerator.cxx +++ b/Source/CPack/cmCPackSTGZGenerator.cxx @@ -97,7 +97,7 @@ int cmCPackSTGZGenerator::GenerateHeader(std::ostream* os) { licenseText += line + "\n"; } - this->SetOptionIfNotSet("CPACK_RESOURCE_FILE_LICENSE_CONTENT", + this->SetOptionIfNotSet("CPACK_RESOURCE_FILE_LICENSE_CONTENT", licenseText.c_str()); const char headerLengthTag[] = "###CPACK_HEADER_LENGTH###"; @@ -126,7 +126,7 @@ int cmCPackSTGZGenerator::GenerateHeader(std::ostream* os) ++ptr; } counter ++; - cmCPackLogger(cmCPackLog::LOG_DEBUG, + cmCPackLogger(cmCPackLog::LOG_DEBUG, "Number of lines: " << counter << std::endl); char buffer[1024]; sprintf(buffer, "%d", counter); diff --git a/Source/CPack/cmCPackTarBZip2Generator.cxx b/Source/CPack/cmCPackTarBZip2Generator.cxx index 971d1666784..ae73c379523 100644 --- a/Source/CPack/cmCPackTarBZip2Generator.cxx +++ b/Source/CPack/cmCPackTarBZip2Generator.cxx @@ -12,7 +12,7 @@ #include "cmCPackTarBZip2Generator.h" //---------------------------------------------------------------------- -cmCPackTarBZip2Generator::cmCPackTarBZip2Generator() +cmCPackTarBZip2Generator::cmCPackTarBZip2Generator() :cmCPackArchiveGenerator(cmArchiveWrite::CompressBZip2, cmArchiveWrite::TypeTAR) { diff --git a/Source/CPack/cmCPackTarCompressGenerator.cxx b/Source/CPack/cmCPackTarCompressGenerator.cxx index 7a8f697c06c..df294084c14 100644 --- a/Source/CPack/cmCPackTarCompressGenerator.cxx +++ b/Source/CPack/cmCPackTarCompressGenerator.cxx @@ -13,7 +13,7 @@ #include "cmCPackTarCompressGenerator.h" //---------------------------------------------------------------------- -cmCPackTarCompressGenerator::cmCPackTarCompressGenerator() +cmCPackTarCompressGenerator::cmCPackTarCompressGenerator() :cmCPackArchiveGenerator(cmArchiveWrite::CompressCompress, cmArchiveWrite::TypeTAR) { diff --git a/Source/CPack/cygwin.readme b/Source/CPack/cygwin.readme index 88922d3e64e..c0cd4b91369 100644 --- a/Source/CPack/cygwin.readme +++ b/Source/CPack/cygwin.readme @@ -16,11 +16,11 @@ Source- - write diff into toplevel - create tar file call super class -cmake-2.2.3-1 +cmake-2.2.3-1 + - 1. a source release -cmake-2.2.3-2-src.tar.bz2 +cmake-2.2.3-2-src.tar.bz2 cmake-2.2.3-2.patch has cmake-2.2.3/CYGWIN-PATCHES/cmake.README cmake-2.2.3/CYGWIN-PATCHES/setup.hint cmake-2.2.3-2.sh -> script to create cygwin release diff --git a/Source/CTest/cmCTestBatchTestHandler.cxx b/Source/CTest/cmCTestBatchTestHandler.cxx index 00bb6fa706e..a22c7be415c 100644 --- a/Source/CTest/cmCTestBatchTestHandler.cxx +++ b/Source/CTest/cmCTestBatchTestHandler.cxx @@ -56,7 +56,7 @@ void cmCTestBatchTestHandler::WriteSrunArgs(int test, std::fstream& fout) fout << "srun "; //fout << "--jobid=" << test << " "; fout << "-J=" << properties->Name << " "; - + //Write dependency information /*if(this->Tests[test].size() > 0) { diff --git a/Source/CTest/cmCTestBatchTestHandler.h b/Source/CTest/cmCTestBatchTestHandler.h index fdfd1be29e0..ab0d081ae85 100644 --- a/Source/CTest/cmCTestBatchTestHandler.h +++ b/Source/CTest/cmCTestBatchTestHandler.h @@ -21,7 +21,7 @@ /** \class cmCTestBatchTestHandler * \brief run parallel ctest * - * cmCTestBatchTestHandler + * cmCTestBatchTestHandler */ class cmCTestBatchTestHandler : public cmCTestMultiProcessHandler { diff --git a/Source/CTest/cmCTestBuildAndTestHandler.cxx b/Source/CTest/cmCTestBuildAndTestHandler.cxx index 8a2d65a7b92..554efb5bb66 100644 --- a/Source/CTest/cmCTestBuildAndTestHandler.cxx +++ b/Source/CTest/cmCTestBuildAndTestHandler.cxx @@ -67,7 +67,7 @@ int cmCTestBuildAndTestHandler::RunCMake(std::string* outstring, generator += this->BuildGenerator; args.push_back(generator); } - + const char* config = 0; if ( this->CTest->GetConfigType().size() > 0 ) { @@ -79,7 +79,7 @@ int cmCTestBuildAndTestHandler::RunCMake(std::string* outstring, config = CMAKE_INTDIR; } #endif - + if ( config ) { std::string btype @@ -198,8 +198,8 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring) std::string resultingConfig; std::vector extraPaths; std::vector failed; - fullPath = - cmCTestTestHandler::FindExecutable(this->CTest, + fullPath = + cmCTestTestHandler::FindExecutable(this->CTest, this->ConfigSample.c_str(), resultingConfig, extraPaths, @@ -211,7 +211,7 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring) out << "Using config sample with results: " << fullPath << " and " << resultingConfig << std::endl; } - + // we need to honor the timeout specified, the timeout include cmake, build // and test time double clock_start = cmSystemTools::GetTime(); @@ -228,7 +228,7 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring) // should we cmake? cmake cm; - cm.SetProgressCallback(CMakeProgressCallback, &cmakeOutString); + cm.SetProgressCallback(CMakeProgressCallback, &cmakeOutString); cm.SetGlobalGenerator(cm.CreateGlobalGenerator( this->BuildGenerator.c_str())); @@ -247,7 +247,7 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring) { this->BuildTargets.push_back(""); } - for ( tarIt = this->BuildTargets.begin(); + for ( tarIt = this->BuildTargets.begin(); tarIt != this->BuildTargets.end(); ++ tarIt ) { double remainingTime = 0; @@ -284,7 +284,7 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring) this->BuildProject.c_str(), tarIt->c_str(), &output, this->BuildMakeProgram.c_str(), config, - !this->BuildNoClean, + !this->BuildNoClean, false, remainingTime); out << output; // if the build failed then return @@ -322,13 +322,13 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring) extraPaths.push_back(tempPath); } std::vector failed; - fullPath = - cmCTestTestHandler::FindExecutable(this->CTest, + fullPath = + cmCTestTestHandler::FindExecutable(this->CTest, this->TestCommand.c_str(), resultingConfig, extraPaths, failed); - + if(!cmSystemTools::FileExists(fullPath.c_str())) { out << "Could not find path to executable, perhaps it was not built: " @@ -388,8 +388,8 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring) return 1; } } - - int runTestRes = this->CTest->RunTest(testCommand, &outs, &retval, 0, + + int runTestRes = this->CTest->RunTest(testCommand, &outs, &retval, 0, remainingTime, 0); if(runTestRes != cmsysProcess_State_Exited || retval != 0) diff --git a/Source/CTest/cmCTestBuildAndTestHandler.h b/Source/CTest/cmCTestBuildAndTestHandler.h index 6e5f7a6abc4..90296001a98 100644 --- a/Source/CTest/cmCTestBuildAndTestHandler.h +++ b/Source/CTest/cmCTestBuildAndTestHandler.h @@ -42,7 +42,7 @@ class cmCTestBuildAndTestHandler : public cmCTestGenericHandler * Get the output variable */ const char* GetOutput(); - + cmCTestBuildAndTestHandler(); virtual void Initialize(); @@ -50,10 +50,10 @@ class cmCTestBuildAndTestHandler : public cmCTestGenericHandler protected: ///! Run CMake and build a test and then run it as a single test. int RunCMakeAndTest(std::string* output); - int RunCMake(std::string* outstring, cmOStringStream &out, + int RunCMake(std::string* outstring, cmOStringStream &out, std::string &cmakeOutString, std::string &cwd, cmake *cm); - + cmStdString Output; std::string BuildGenerator; diff --git a/Source/CTest/cmCTestBuildCommand.cxx b/Source/CTest/cmCTestBuildCommand.cxx index b984e850f5e..f4d38cef142 100644 --- a/Source/CTest/cmCTestBuildCommand.cxx +++ b/Source/CTest/cmCTestBuildCommand.cxx @@ -175,7 +175,7 @@ bool cmCTestBuildCommand::InitialPass(std::vector const& args, { bool ret = cmCTestHandlerCommand::InitialPass(args, status); if ( this->Values[ctb_NUMBER_ERRORS] && *this->Values[ctb_NUMBER_ERRORS]) - { + { cmOStringStream str; str << this->Handler->GetTotalErrors(); this->Makefile->AddDefinition( diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx index 27bb06c1366..39eeb70a38f 100644 --- a/Source/CTest/cmCTestBuildHandler.cxx +++ b/Source/CTest/cmCTestBuildHandler.cxx @@ -168,7 +168,7 @@ static cmCTestBuildCompileErrorWarningRex cmCTestWarningErrorFileLine[] = { { "^Warning W[0-9]+ ([a-zA-Z.\\:/0-9_+ ~-]+) ([0-9]+):", 1, 2 }, { "^([a-zA-Z./0-9_+ ~-]+):([0-9]+):", 1, 2 }, - { "^([a-zA-Z.\\:/0-9_+ ~-]+)\\(([0-9]+)\\)", 1, 2 }, + { "^([a-zA-Z.\\:/0-9_+ ~-]+)\\(([0-9]+)\\)", 1, 2 }, { "^[0-9]+>([a-zA-Z.\\:/0-9_+ ~-]+)\\(([0-9]+)\\)", 1, 2 }, { "^([a-zA-Z./0-9_+ ~-]+)\\(([0-9]+)\\)", 1, 2 }, { "\"([a-zA-Z./0-9_+ ~-]+)\", line ([0-9]+)", 1, 2 }, @@ -289,7 +289,7 @@ std::string cmCTestBuildHandler::GetMakeCommand() std::string makeCommand = this->CTest->GetCTestConfiguration("MakeCommand"); cmCTestLog(this->CTest, - HANDLER_VERBOSE_OUTPUT, "MakeCommand:" << makeCommand << + HANDLER_VERBOSE_OUTPUT, "MakeCommand:" << makeCommand << "\n"); std::string configType = this->CTest->GetConfigType(); @@ -392,7 +392,7 @@ int cmCTestBuildHandler::ProcessHandler() { this->CustomWarningMatches.push_back(cmCTestWarningMatches[cc]); } - + for ( cc = 0; cmCTestWarningExceptions[cc]; cc ++ ) { this->CustomWarningExceptions.push_back(cmCTestWarningExceptions[cc]); @@ -557,7 +557,7 @@ void cmCTestBuildHandler::GenerateXMLHeader(std::ostream& os) this->CTest->StartXML(os, this->AppendXML); os << "\n" << "\t" << this->StartBuild << "\n" - << "\t" << + << "\t" << static_cast(this->StartBuildTime) << "\n" << "" @@ -998,7 +998,7 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command, // dashboard. cmCTestBuildErrorWarning errorwarning; errorwarning.LogLine = 1; - errorwarning.Text + errorwarning.Text = "*** WARNING non-zero return value in ctest from: "; errorwarning.Text += argv[0]; errorwarning.PreContext = ""; @@ -1150,7 +1150,7 @@ void cmCTestBuildHandler::ProcessBuffer(const char* data, int length, { // This is not an error or warning. // So, figure out if this is a post-context line - if ( this->ErrorsAndWarnings.size() && + if ( this->ErrorsAndWarnings.size() && this->LastErrorOrWarning != this->ErrorsAndWarnings.end() && this->PostContextCount < this->MaxPostContext ) { diff --git a/Source/CTest/cmCTestConfigureHandler.cxx b/Source/CTest/cmCTestConfigureHandler.cxx index 33297564e92..7c4129864e9 100644 --- a/Source/CTest/cmCTestConfigureHandler.cxx +++ b/Source/CTest/cmCTestConfigureHandler.cxx @@ -106,7 +106,7 @@ int cmCTestConfigureHandler::ProcessHandler() std::string end_time = this->CTest->CurrentTime(); os << "\t" << retVal << "\n" << "\t" << end_time << "\n" - << "\t" << + << "\t" << static_cast(cmSystemTools::GetTime()) << "\n" << "" diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx index 81d3669379d..4d1e249e65b 100644 --- a/Source/CTest/cmCTestCoverageHandler.cxx +++ b/Source/CTest/cmCTestCoverageHandler.cxx @@ -80,15 +80,15 @@ class cmCTestRunProcess { args.push_back(i->c_str()); } - args.push_back(0); // null terminate + args.push_back(0); // null terminate cmsysProcess_SetCommand(this->Process, &*args.begin()); if(this->WorkingDirectory.size()) { cmsysProcess_SetWorkingDirectory(this->Process, this->WorkingDirectory.c_str()); } - - cmsysProcess_SetOption(this->Process, + + cmsysProcess_SetOption(this->Process, cmsysProcess_Option_HideWindow, 1); if(this->TimeOut != -1) { @@ -112,7 +112,7 @@ class cmCTestRunProcess { cmsysProcess_SetPipeFile(this->Process, cmsysProcess_Pipe_STDERR, fname); } - int WaitForExit(double* timeout =0) + int WaitForExit(double* timeout =0) { this->PipeState = cmsysProcess_WaitForExit(this->Process, timeout); @@ -183,7 +183,7 @@ bool cmCTestCoverageHandler::StartCoverageLogFile( this->CTest->StartXML(covLogFile, this->AppendXML); covLogFile << "" << std::endl << "\t" << local_start_time << "" - << "\t" + << "\t" << static_cast(cmSystemTools::GetTime()) << "" << std::endl; @@ -196,7 +196,7 @@ void cmCTestCoverageHandler::EndCoverageLogFile(cmGeneratedFileStream& ostr, { std::string local_end_time = this->CTest->CurrentTime(); ostr << "\t" << local_end_time << "" << std::endl - << "\t" << + << "\t" << static_cast(cmSystemTools::GetTime()) << "" << std::endl << "" << std::endl; @@ -325,7 +325,7 @@ int cmCTestCoverageHandler::ProcessHandler() { return error; } - + std::string coverage_start_time = this->CTest->CurrentTime(); unsigned int coverage_start_time_time = static_cast( cmSystemTools::GetTime()); @@ -659,7 +659,7 @@ int cmCTestCoverageHandler::ProcessHandler() covSumFile.precision(2); covSumFile << (percent_coverage)<< "\n" << "\t" << end_time << "\n" - << "\t" << + << "\t" << static_cast(cmSystemTools::GetTime()) << "\n"; covSumFile << "" << @@ -871,7 +871,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage( cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Cannot find any GCov coverage files." << std::endl); - // No coverage files is a valid thing, so the exit code is 0 + // No coverage files is a valid thing, so the exit code is 0 return 0; } @@ -1294,7 +1294,7 @@ int cmCTestCoverageHandler::HandleTracePyCoverage( cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Cannot find any Python Trace.py coverage files." << std::endl); - // No coverage files is a valid thing, so the exit code is 0 + // No coverage files is a valid thing, so the exit code is 0 return 0; } @@ -1436,7 +1436,7 @@ std::string cmCTestCoverageHandler::FindFile( // This is a header put on each marked up source file namespace { - const char* bullseyeHelp[] = + const char* bullseyeHelp[] = {" Coverage produced by bullseye covbr tool: ", " www.bullseye.com/help/ref_covbr.html", " * An arrow --> indicates incomplete coverage.", @@ -1451,7 +1451,7 @@ namespace " * The slash / means this probe is excluded from summary results. ", 0}; } - + //---------------------------------------------------------------------- int cmCTestCoverageHandler::RunBullseyeCoverageBranch( cmCTestCoverageHandlerContainer* cont, @@ -1461,7 +1461,7 @@ int cmCTestCoverageHandler::RunBullseyeCoverageBranch( { if(files.size() != filesFullPath.size()) { - cmCTestLog(this->CTest, ERROR_MESSAGE, + cmCTestLog(this->CTest, ERROR_MESSAGE, "Files and full path files not the same size?:\n"); return 0; } @@ -1498,13 +1498,13 @@ int cmCTestCoverageHandler::RunBullseyeCoverageBranch( } std::map fileMap; std::vector::iterator fp = filesFullPath.begin(); - for(std::vector::iterator f = files.begin(); + for(std::vector::iterator f = files.begin(); f != files.end(); ++f, ++fp) { fileMap[*f] = *fp; } - int count =0; // keep count of the number of files + int count =0; // keep count of the number of files // Now parse each line from the bullseye cov log file std::string lineIn; bool valid = false; // are we in a valid output file @@ -1542,9 +1542,9 @@ int cmCTestCoverageHandler::RunBullseyeCoverageBranch( { return -1; } - count++; // move on one + count++; // move on one } - std::map::iterator + std::map::iterator i = fileMap.find(file); // if the file should be covered write out the header for that file if(i != fileMap.end()) @@ -1659,10 +1659,10 @@ int cmCTestCoverageHandler::RunBullseyeSourceSummary( cmCTestLog(this->CTest, ERROR_MESSAGE, "error running covsrc:\n"); return 0; } - + std::ostream& tmpLog = *cont->OFS; // copen the Coverage.xml file in the Testing directory - cmGeneratedFileStream covSumFile; + cmGeneratedFileStream covSumFile; if(!this->StartResultingXML(cmCTest::PartCoverage, "Coverage", covSumFile)) { cmCTestLog(this->CTest, ERROR_MESSAGE, @@ -1673,10 +1673,10 @@ int cmCTestCoverageHandler::RunBullseyeSourceSummary( double elapsed_time_start = cmSystemTools::GetTime(); std::string coverage_start_time = this->CTest->CurrentTime(); covSumFile << "" << std::endl - << "\t" + << "\t" << coverage_start_time << "" << std::endl - << "\t" + << "\t" << static_cast(cmSystemTools::GetTime()) << "" << std::endl; @@ -1717,7 +1717,7 @@ int cmCTestCoverageHandler::RunBullseyeSourceSummary( { // parse the comma separated output this->ParseBullsEyeCovsrcLine(stdline, - sourceFile, + sourceFile, functionsCalled, totalFunctions, percentFunction, @@ -1741,7 +1741,7 @@ int cmCTestCoverageHandler::RunBullseyeSourceSummary( file = cmSystemTools::CollapseFullPath(file.c_str()); bool shouldIDoCoverage = this->ShouldIDoCoverage(file.c_str(), - cont->SourceDir.c_str(), + cont->SourceDir.c_str(), cont->BinaryDir.c_str()); if ( !shouldIDoCoverage ) { @@ -1797,20 +1797,20 @@ int cmCTestCoverageHandler::RunBullseyeSourceSummary( << "\t\t" << branchCovered << "\n" - << "\t\t" + << "\t\t" << totalBranches - branchCovered << "\n" << "\t\t" << functionsCalled << "\n" - << "\t\t" + << "\t\t" << totalFunctions - functionsCalled << "\n" // Hack for conversion of function to loc assume a function // has 100 lines of code << "\t\t" << functionsCalled *100 << "\n" - << "\t\t" + << "\t\t" << (totalFunctions - functionsCalled)*100 << "\n" << "\t\t"; @@ -1832,12 +1832,12 @@ int cmCTestCoverageHandler::RunBullseyeSourceSummary( << "\t"; covSumFile.setf(std::ios::fixed, std::ios::floatfield); covSumFile.precision(2); - covSumFile + covSumFile << SAFEDIV(percent_coverage,number_files)<< "\n" << "\t" << end_time << "\n" << "\t" << static_cast(cmSystemTools::GetTime()) << "\n"; - covSumFile + covSumFile << "" << static_cast((cmSystemTools::GetTime() - elapsed_time_start)/6)/10.0 << "" @@ -1858,22 +1858,22 @@ int cmCTestCoverageHandler::HandleBullseyeCoverage( const char* covfile = cmSystemTools::GetEnv("COVFILE"); if(!covfile || strlen(covfile) == 0) { - cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, - " COVFILE environment variable not found, not running " + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + " COVFILE environment variable not found, not running " " bullseye\n"); return 0; } - cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, - " run covsrc with COVFILE=[" + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + " run covsrc with COVFILE=[" << covfile << "]" << std::endl); if(!this->RunBullseyeSourceSummary(cont)) - { - cmCTestLog(this->CTest, ERROR_MESSAGE, + { + cmCTestLog(this->CTest, ERROR_MESSAGE, "Error running bullseye summary.\n"); return 0; } - cmCTestLog(this->CTest, DEBUG, "HandleBullseyeCoverage return 1 " + cmCTestLog(this->CTest, DEBUG, "HandleBullseyeCoverage return 1 " << std::endl); return 1; } @@ -1881,7 +1881,7 @@ int cmCTestCoverageHandler::HandleBullseyeCoverage( bool cmCTestCoverageHandler::GetNextInt(std::string const& inputLine, std::string::size_type& pos, int& value) -{ +{ std::string::size_type start = pos; pos = inputLine.find(',', start); value = atoi(inputLine.substr(start, pos).c_str()); @@ -1892,7 +1892,7 @@ bool cmCTestCoverageHandler::GetNextInt(std::string const& inputLine, pos++; return true; } - + bool cmCTestCoverageHandler::ParseBullsEyeCovsrcLine( std::string const& inputLine, std::string& sourceFile, @@ -1906,7 +1906,7 @@ bool cmCTestCoverageHandler::ParseBullsEyeCovsrcLine( // find the first comma std::string::size_type pos = inputLine.find(','); if(pos == inputLine.npos) - { + { cmCTestLog(this->CTest, ERROR_MESSAGE, "Error parsing string : " << inputLine.c_str() << "\n"); return false; @@ -1942,7 +1942,7 @@ bool cmCTestCoverageHandler::ParseBullsEyeCovsrcLine( if(pos != inputLine.npos) { cmCTestLog(this->CTest, ERROR_MESSAGE, "Error parsing input : " - << inputLine.c_str() << " last pos not npos = " << pos << + << inputLine.c_str() << " last pos not npos = " << pos << "\n"); } return true; diff --git a/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.cxx b/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.cxx index 56312c0fba0..abc33de6863 100644 --- a/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.cxx +++ b/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.cxx @@ -28,8 +28,8 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) ostr << "problem removing the binary directory: " << args[0].c_str(); this->SetError(ostr.str().c_str()); return false; - } - + } + return true; } diff --git a/Source/CTest/cmCTestGenericHandler.cxx b/Source/CTest/cmCTestGenericHandler.cxx index fd75e45e88f..5338f307b1e 100644 --- a/Source/CTest/cmCTestGenericHandler.cxx +++ b/Source/CTest/cmCTestGenericHandler.cxx @@ -51,7 +51,7 @@ void cmCTestGenericHandler::SetOption(const char* op, const char* value) } //---------------------------------------------------------------------- -void cmCTestGenericHandler::SetPersistentOption(const char* op, +void cmCTestGenericHandler::SetPersistentOption(const char* op, const char* value) { this->SetOption(op, value); @@ -79,7 +79,7 @@ void cmCTestGenericHandler::Initialize() this->AppendXML = false; this->Options.clear(); t_StringToString::iterator it; - for ( it = this->PersistentOptions.begin(); + for ( it = this->PersistentOptions.begin(); it != this->PersistentOptions.end(); ++ it ) { @@ -117,7 +117,7 @@ bool cmCTestGenericHandler::StartResultingXML(cmCTest::Part part, { ostr << "_" << this->SubmitIndex; } - ostr << ".xml"; + ostr << ".xml"; if(this->CTest->GetCurrentTag().empty()) { cmCTestLog(this->CTest, ERROR_MESSAGE, diff --git a/Source/CTest/cmCTestGenericHandler.h b/Source/CTest/cmCTestGenericHandler.h index 18189ec2b8e..ba8febb6193 100644 --- a/Source/CTest/cmCTestGenericHandler.h +++ b/Source/CTest/cmCTestGenericHandler.h @@ -73,7 +73,7 @@ class cmCTestGenericHandler : public cmObject typedef std::map t_StringToString; - + void SetPersistentOption(const char* op, const char* value); void SetOption(const char* op, const char* value); const char* GetOption(const char* op); diff --git a/Source/CTest/cmCTestHandlerCommand.cxx b/Source/CTest/cmCTestHandlerCommand.cxx index 1957e04e31d..0da8aae5277 100644 --- a/Source/CTest/cmCTestHandlerCommand.cxx +++ b/Source/CTest/cmCTestHandlerCommand.cxx @@ -91,7 +91,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) } else { - const char* bdir = + const char* bdir = this->Makefile->GetSafeDefinition("CTEST_BINARY_DIRECTORY"); if(bdir) { diff --git a/Source/CTest/cmCTestMemCheckCommand.h b/Source/CTest/cmCTestMemCheckCommand.h index 399fe8b22d1..6db47aec8a0 100644 --- a/Source/CTest/cmCTestMemCheckCommand.h +++ b/Source/CTest/cmCTestMemCheckCommand.h @@ -60,7 +60,7 @@ class cmCTestMemCheckCommand : public cmCTestTestCommand " ctest_memcheck([BUILD build_dir] [RETURN_VALUE res] [APPEND]\n" " [START start number] [END end number]\n" " [STRIDE stride number] [EXCLUDE exclude regex ]\n" - " [INCLUDE include regex] \n" + " [INCLUDE include regex] \n" " [EXCLUDE_LABEL exclude regex] \n" " [INCLUDE_LABEL label regex] \n" " [PARALLEL_LEVEL level] )\n" diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx index 3e4ecddaaea..a2a16d3bd05 100644 --- a/Source/CTest/cmCTestMemCheckHandler.cxx +++ b/Source/CTest/cmCTestMemCheckHandler.cxx @@ -84,7 +84,7 @@ class cmBoundsCheckerParser : public cmXMLParser } const char* GetAttribute(const char* name, const char** atts) - { + { int i = 0; for(; atts[i] != 0; ++i) { @@ -117,9 +117,9 @@ class cmBoundsCheckerParser : public cmXMLParser } if(ptr->ErrorCategory) { - this->Errors.push_back(cmCTestMemCheckHandler::ABW); // do not know + this->Errors.push_back(cmCTestMemCheckHandler::ABW); // do not know cmCTestLog(this->CTest, ERROR_MESSAGE, - "Found unknown Bounds Checker error " + "Found unknown Bounds Checker error " << ptr->ErrorCategory << std::endl); } } @@ -528,7 +528,7 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking() this->MemoryTesterOptions.push_back(outputFile); } else if ( this->MemoryTester.find("BC") != std::string::npos ) - { + { this->BoundsCheckerXMLFile = this->MemoryTesterOutputFile; std::string dpbdFile = this->CTest->GetBinaryDir() + "/Testing/Temporary/MemoryChecker.DPbd"; @@ -594,9 +594,9 @@ bool cmCTestMemCheckHandler::ProcessMemCheckOutput(const std::string& str, bool cmCTestMemCheckHandler::ProcessMemCheckPurifyOutput( const std::string& str, std::string& log, int* results) -{ +{ std::vector lines; - cmSystemTools::Split(str.c_str(), lines); + cmSystemTools::Split(str.c_str(), lines); cmOStringStream ostr; log = ""; @@ -604,7 +604,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckPurifyOutput( int defects = 0; - for( std::vector::iterator i = lines.begin(); + for( std::vector::iterator i = lines.begin(); i != lines.end(); ++i) { int failure = cmCTestMemCheckHandler::NO_MEMORY_FAULT; @@ -657,7 +657,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckValgrindOutput( { unlimitedOutput = true; } - + std::string::size_type cc; cmOStringStream ostr; @@ -782,7 +782,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckValgrindOutput( } totalOutputSize += lines[cc].size(); ostr << cmXMLSafe(lines[cc]) << std::endl; - } + } else { nonValGrindOutput.push_back(cc); @@ -791,7 +791,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckValgrindOutput( // Now put all all the non valgrind output into the test output if(!outputFull) { - for(std::vector::iterator i = + for(std::vector::iterator i = nonValGrindOutput.begin(); i != nonValGrindOutput.end(); ++i) { totalOutputSize += lines[*i].size(); @@ -801,7 +801,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckValgrindOutput( << cmXMLSafe(lines[*i]) << std::endl); ostr << cmXMLSafe(lines[*i]) << std::endl; - if(!unlimitedOutput && totalOutputSize > + if(!unlimitedOutput && totalOutputSize > static_cast(this->CustomMaximumFailedTestOutputSize)) { outputFull = true; @@ -833,7 +833,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckBoundsCheckerOutput( log = ""; double sttime = cmSystemTools::GetTime(); std::vector lines; - cmSystemTools::Split(str.c_str(), lines); + cmSystemTools::Split(str.c_str(), lines); cmCTestLog(this->CTest, DEBUG, "Start test: " << lines.size() << std::endl); std::vector::size_type cc; for ( cc = 0; cc < lines.size(); cc ++ ) @@ -886,8 +886,8 @@ bool cmCTestMemCheckHandler::ProcessMemCheckBoundsCheckerOutput( // for the test void cmCTestMemCheckHandler::PostProcessBoundsCheckerTest(cmCTestTestResult& res) -{ - cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, +{ + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "PostProcessBoundsCheckerTest for : " << res.Name.c_str() << std::endl); if ( !cmSystemTools::FileExists(this->MemoryTesterOutputFile.c_str()) ) @@ -902,22 +902,22 @@ cmCTestMemCheckHandler::PostProcessBoundsCheckerTest(cmCTestTestResult& res) std::ifstream ifs(this->MemoryTesterOutputFile.c_str()); if ( !ifs ) { - std::string log = "Cannot read memory tester output file: " + std::string log = "Cannot read memory tester output file: " + this->MemoryTesterOutputFile; cmCTestLog(this->CTest, ERROR_MESSAGE, log.c_str() << std::endl); return; - } + } res.Output += BOUNDS_CHECKER_MARKER; res.Output += "\n"; std::string line; while ( cmSystemTools::GetLineFromStream(ifs, line) ) { - res.Output += line; + res.Output += line; res.Output += "\n"; } } cmSystemTools::Delay(1000); - cmSystemTools::RemoveFile(this->BoundsCheckerDPBDFile.c_str()); + cmSystemTools::RemoveFile(this->BoundsCheckerDPBDFile.c_str()); cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Remove: " << this->BoundsCheckerDPBDFile.c_str() << std::endl); cmSystemTools::RemoveFile(this->BoundsCheckerXMLFile.c_str()); @@ -928,7 +928,7 @@ cmCTestMemCheckHandler::PostProcessBoundsCheckerTest(cmCTestTestResult& res) void cmCTestMemCheckHandler::PostProcessPurifyTest(cmCTestTestResult& res) { - cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "PostProcessPurifyTest for : " << res.Name.c_str() << std::endl); if ( !cmSystemTools::FileExists(this->MemoryTesterOutputFile.c_str()) ) @@ -945,7 +945,7 @@ cmCTestMemCheckHandler::PostProcessPurifyTest(cmCTestTestResult& res) + this->MemoryTesterOutputFile; cmCTestLog(this->CTest, ERROR_MESSAGE, log.c_str() << std::endl); return; - } + } std::string line; while ( cmSystemTools::GetLineFromStream(ifs, line) ) { diff --git a/Source/CTest/cmCTestMemCheckHandler.h b/Source/CTest/cmCTestMemCheckHandler.h index 427d4717d4a..1e81c893b07 100644 --- a/Source/CTest/cmCTestMemCheckHandler.h +++ b/Source/CTest/cmCTestMemCheckHandler.h @@ -30,7 +30,7 @@ class cmCTestMemCheckHandler : public cmCTestTestHandler cmTypeMacro(cmCTestMemCheckHandler, cmCTestTestHandler); void PopulateCustomVectors(cmMakefile *mf); - + cmCTestMemCheckHandler(); void Initialize(); @@ -108,13 +108,13 @@ class cmCTestMemCheckHandler : public cmCTestTestHandler //! Parse Valgrind/Purify/Bounds Checker result out of the output //string. After running, log holds the output and results hold the //different memmory errors. - bool ProcessMemCheckOutput(const std::string& str, + bool ProcessMemCheckOutput(const std::string& str, std::string& log, int* results); - bool ProcessMemCheckValgrindOutput(const std::string& str, + bool ProcessMemCheckValgrindOutput(const std::string& str, std::string& log, int* results); - bool ProcessMemCheckPurifyOutput(const std::string& str, + bool ProcessMemCheckPurifyOutput(const std::string& str, std::string& log, int* results); - bool ProcessMemCheckBoundsCheckerOutput(const std::string& str, + bool ProcessMemCheckBoundsCheckerOutput(const std::string& str, std::string& log, int* results); void PostProcessPurifyTest(cmCTestTestResult& res); diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index 2cae80215f5..ebef1ed9cff 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -48,7 +48,7 @@ cmCTestMultiProcessHandler::~cmCTestMultiProcessHandler() } // Set the tests -void +void cmCTestMultiProcessHandler::SetTests(TestMap& tests, PropertiesMap& properties) { @@ -178,7 +178,7 @@ void cmCTestMultiProcessHandler::EraseTest(int test) //--------------------------------------------------------- inline size_t cmCTestMultiProcessHandler::GetProcessorsUsed(int test) { - size_t processors = + size_t processors = static_cast(this->Properties[test]->Processors); //If this is set to run serially, it must run alone. //Also, if processors setting is set higher than the -j @@ -205,7 +205,7 @@ bool cmCTestMultiProcessHandler::StartTest(int test) } } - // copy the depend tests locally because when + // copy the depend tests locally because when // a test is finished it will be removed from the depend list // and we don't want to be iterating a list while removing from it TestSet depends = this->Tests[test]; @@ -240,7 +240,7 @@ bool cmCTestMultiProcessHandler::StartTest(int test) this->StartTestProcess(test); return true; } - // This test was not able to start because it is waiting + // This test was not able to start because it is waiting // on depends to run return false; } @@ -351,7 +351,7 @@ void cmCTestMultiProcessHandler::UpdateCostData() while(std::getline(fin, line)) { if(line == "---") break; - std::vector parts = + std::vector parts = cmSystemTools::SplitString(line.c_str(), ' '); //Format: if(parts.size() < 3) break; @@ -552,7 +552,7 @@ void cmCTestMultiProcessHandler::PrintTestList() } cmOStringStream indexStr; indexStr << " #" << p.Index << ":"; - cmCTestLog(this->CTest, HANDLER_OUTPUT, + cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(3 + getNumWidth(this->TestHandler->GetMaxIndex())) << indexStr.str().c_str()); cmCTestLog(this->CTest, HANDLER_OUTPUT, " "); @@ -603,7 +603,7 @@ void cmCTestMultiProcessHandler::CheckResume() << std::endl << "----------------------------------------------------------" << std::endl; - + std::ifstream fin; fin.open(fname.c_str()); std::string line; diff --git a/Source/CTest/cmCTestMultiProcessHandler.h b/Source/CTest/cmCTestMultiProcessHandler.h index 1483440c600..cd21d9187b6 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.h +++ b/Source/CTest/cmCTestMultiProcessHandler.h @@ -19,16 +19,16 @@ /** \class cmCTestMultiProcessHandler * \brief run parallel ctest * - * cmCTestMultiProcessHandler + * cmCTestMultiProcessHandler */ -class cmCTestMultiProcessHandler +class cmCTestMultiProcessHandler { friend class TestComparator; public: struct TestSet : public std::set {}; struct TestMap : public std::map {}; struct TestList : public std::vector {}; - struct PropertiesMap : public + struct PropertiesMap : public std::map {}; cmCTestMultiProcessHandler(); diff --git a/Source/CTest/cmCTestReadCustomFilesCommand.h b/Source/CTest/cmCTestReadCustomFilesCommand.h index f382b0f2d2d..b984c84e946 100644 --- a/Source/CTest/cmCTestReadCustomFilesCommand.h +++ b/Source/CTest/cmCTestReadCustomFilesCommand.h @@ -25,11 +25,11 @@ class cmCTestReadCustomFilesCommand : public cmCTestCommand public: cmCTestReadCustomFilesCommand() {} - + /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { cmCTestReadCustomFilesCommand* ni = new cmCTestReadCustomFilesCommand; ni->CTest = this->CTest; @@ -55,7 +55,7 @@ class cmCTestReadCustomFilesCommand : public cmCTestCommand { return "read CTestCustom files."; } - + /** * More documentation. */ diff --git a/Source/CTest/cmCTestRunScriptCommand.h b/Source/CTest/cmCTestRunScriptCommand.h index 6df69afa636..05e78991a03 100644 --- a/Source/CTest/cmCTestRunScriptCommand.h +++ b/Source/CTest/cmCTestRunScriptCommand.h @@ -25,11 +25,11 @@ class cmCTestRunScriptCommand : public cmCTestCommand public: cmCTestRunScriptCommand() {} - + /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { cmCTestRunScriptCommand* ni = new cmCTestRunScriptCommand; ni->CTest = this->CTest; @@ -56,7 +56,7 @@ class cmCTestRunScriptCommand : public cmCTestCommand { return "runs a ctest -S script"; } - + /** * More documentation. */ diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index c3de5dcf673..5eabf3fbe16 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -59,7 +59,7 @@ bool cmCTestRunTest::CheckOutput() { // Store this line of output. cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, - this->GetIndex() << ": " << line << std::endl); + this->GetIndex() << ": " << line << std::endl); this->ProcessOutput += line; this->ProcessOutput += "\n"; } @@ -79,7 +79,7 @@ void cmCTestRunTest::CompressOutput() int ret; z_stream strm; - unsigned char* in = + unsigned char* in = reinterpret_cast( const_cast(this->ProcessOutput.c_str())); //zlib makes the guarantee that this is the maximum output size @@ -112,7 +112,7 @@ void cmCTestRunTest::CompressOutput() } (void)deflateEnd(&strm); - + unsigned char *encoded_buffer = new unsigned char[static_cast(outSize * 1.5)]; @@ -169,11 +169,11 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started) } } if ( !found ) - { + { reason = "Required regular expression not found."; forceFail = true; } - reason += "Regex=["; + reason += "Regex=["; for ( passIt = this->TestProperties->RequiredRegularExpressions.begin(); passIt != this->TestProperties->RequiredRegularExpressions.end(); ++ passIt ) @@ -201,10 +201,10 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started) } if (res == cmsysProcess_State_Exited) { - bool success = - !forceFail && (retVal == 0 || + bool success = + !forceFail && (retVal == 0 || this->TestProperties->RequiredRegularExpressions.size()); - if((success && !this->TestProperties->WillFail) + if((success && !this->TestProperties->WillFail) || (!success && this->TestProperties->WillFail)) { this->TestResult.Status = cmCTestTestHandler::COMPLETED; @@ -312,10 +312,10 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started) << std::endl; if(this->TestResult.Reason.size()) { - *this->TestHandler->LogFile << reasonType << ":\n" + *this->TestHandler->LogFile << reasonType << ":\n" << this->TestResult.Reason << "\n"; } - else + else { if(pass) { @@ -333,14 +333,14 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started) << "----------------------------------------------------------" << std::endl << std::endl; } - // if the test actually started and ran - // record the results in TestResult + // if the test actually started and ran + // record the results in TestResult if(started) { bool compress = !this->TestHandler->MemCheck && this->CompressionRatio < 1 && this->CTest->ShouldCompressTestOutput(); - this->TestResult.Output = compress ? this->CompressedOutput + this->TestResult.Output = compress ? this->CompressedOutput : this->ProcessOutput; this->TestResult.CompressOutput = compress; this->TestResult.ReturnValue = this->TestProcess->GetExitValue(); @@ -378,7 +378,7 @@ void cmCTestRunTest::MemCheckPostProcess() { return; } - cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, this->Index + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, this->Index << ": process test output now: " << this->TestProperties->Name.c_str() << " " << this->TestResult.Name.c_str() << std::endl); @@ -390,7 +390,7 @@ void cmCTestRunTest::MemCheckPostProcess() } else if(handler->MemoryTesterStyle == cmCTestMemCheckHandler::PURIFY) { - handler->PostProcessPurifyTest(this->TestResult); + handler->PostProcessPurifyTest(this->TestResult); } } @@ -411,7 +411,7 @@ bool cmCTestRunTest::StartTest(size_t total) this->TestResult.ReturnValue = -1; this->TestResult.CompletionStatus = "Failed to start"; this->TestResult.Status = cmCTestTestHandler::BAD_COMMAND; - this->TestResult.TestCount = this->TestProperties->Index; + this->TestResult.TestCount = this->TestProperties->Index; this->TestResult.Name = this->TestProperties->Name; this->TestResult.Path = this->TestProperties->Directory.c_str(); @@ -438,7 +438,7 @@ bool cmCTestRunTest::StartTest(size_t total) this->TestResult.Status = cmCTestTestHandler::NOT_RUN; return false; } - + // Check if all required files exist for(std::vector::iterator i = this->TestProperties->RequiredFiles.begin(); @@ -465,9 +465,9 @@ bool cmCTestRunTest::StartTest(size_t total) if (this->ActualCommand == "") { // if the command was not found create a TestResult object - // that has that information + // that has that information this->TestProcess = new cmProcess; - *this->TestHandler->LogFile << "Unable to find executable: " + *this->TestHandler->LogFile << "Unable to find executable: " << args[1].c_str() << std::endl; cmCTestLog(this->CTest, ERROR_MESSAGE, "Unable to find executable: " << args[1].c_str() << std::endl); @@ -536,7 +536,7 @@ void cmCTestRunTest::ComputeArguments() cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, std::endl << this->Index << ": " - << (this->TestHandler->MemCheck?"MemCheck":"Test") + << (this->TestHandler->MemCheck?"MemCheck":"Test") << " command: " << testCommand << std::endl); } @@ -544,7 +544,7 @@ void cmCTestRunTest::ComputeArguments() //---------------------------------------------------------------------- void cmCTestRunTest::DartProcessing() { - if (!this->ProcessOutput.empty() && + if (!this->ProcessOutput.empty() && this->ProcessOutput.find("ProcessOutput.npos) { if (this->TestHandler->DartStuff.find(this->ProcessOutput.c_str())) @@ -695,7 +695,7 @@ void cmCTestRunTest::WriteLogOutputTop(size_t completed, size_t total) cmOStringStream indexStr; indexStr << " #" << this->Index << ":"; - cmCTestLog(this->CTest, HANDLER_OUTPUT, + cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(3 + getNumWidth(this->TestHandler->GetMaxIndex())) << indexStr.str().c_str()); cmCTestLog(this->CTest, HANDLER_OUTPUT, " "); @@ -704,17 +704,17 @@ void cmCTestRunTest::WriteLogOutputTop(size_t completed, size_t total) outname.resize(maxTestNameWidth + 4, '.'); *this->TestHandler->LogFile << this->TestProperties->Index << "/" - << this->TestHandler->TotalNumberOfTests << " Testing: " + << this->TestHandler->TotalNumberOfTests << " Testing: " << this->TestProperties->Name << std::endl; *this->TestHandler->LogFile << this->TestProperties->Index << "/" << this->TestHandler->TotalNumberOfTests << " Test: " << this->TestProperties->Name.c_str() << std::endl; *this->TestHandler->LogFile << "Command: \"" << this->ActualCommand << "\""; - + for (std::vector::iterator i = this->Arguments.begin(); i != this->Arguments.end(); ++i) { - *this->TestHandler->LogFile + *this->TestHandler->LogFile << " \"" << i->c_str() << "\""; } *this->TestHandler->LogFile << std::endl @@ -730,6 +730,6 @@ void cmCTestRunTest::WriteLogOutputTop(size_t completed, size_t total) << this->ProcessOutput.c_str() << "" << std::endl; cmCTestLog(this->CTest, HANDLER_OUTPUT, outname.c_str()); - cmCTestLog(this->CTest, DEBUG, "Testing " + cmCTestLog(this->CTest, DEBUG, "Testing " << this->TestProperties->Name.c_str() << " ... "); } diff --git a/Source/CTest/cmCTestRunTest.h b/Source/CTest/cmCTestRunTest.h index 89456d505ed..476f3e12637 100644 --- a/Source/CTest/cmCTestRunTest.h +++ b/Source/CTest/cmCTestRunTest.h @@ -74,7 +74,7 @@ class cmCTestRunTest cmCTestTestHandler * TestHandler; cmCTest * CTest; cmProcess * TestProcess; - //If the executable to run is ctest, don't create a new process; + //If the executable to run is ctest, don't create a new process; //just instantiate a new cmTest. (Can be disabled for a single test //if this option is set to false.) //bool OptimizeForCTest; diff --git a/Source/CTest/cmCTestScriptHandler.h b/Source/CTest/cmCTestScriptHandler.h index a7cf6ba6503..9d852cab67a 100644 --- a/Source/CTest/cmCTestScriptHandler.h +++ b/Source/CTest/cmCTestScriptHandler.h @@ -97,7 +97,7 @@ class cmCTestScriptHandler : public cmCTestGenericHandler static void SleepInSeconds(unsigned int secondsToWait); void UpdateElapsedTime(); - /** + /** * Return the time remaianing that the script is allowed to run in * seconds if the user has set the variable CTEST_TIME_LIMIT. If that has * not been set it returns 1e7 seconds diff --git a/Source/CTest/cmCTestSleepCommand.cxx b/Source/CTest/cmCTestSleepCommand.cxx index 5b06972197b..7e8755066a4 100644 --- a/Source/CTest/cmCTestSleepCommand.cxx +++ b/Source/CTest/cmCTestSleepCommand.cxx @@ -47,7 +47,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) } return true; } - + this->SetError("called with incorrect number of arguments"); return false; } diff --git a/Source/CTest/cmCTestSleepCommand.h b/Source/CTest/cmCTestSleepCommand.h index 80fd6afb71a..0f51ddfeb1d 100644 --- a/Source/CTest/cmCTestSleepCommand.h +++ b/Source/CTest/cmCTestSleepCommand.h @@ -25,11 +25,11 @@ class cmCTestSleepCommand : public cmCTestCommand public: cmCTestSleepCommand() {} - + /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { cmCTestSleepCommand* ni = new cmCTestSleepCommand; ni->CTest = this->CTest; @@ -56,7 +56,7 @@ class cmCTestSleepCommand : public cmCTestCommand { return "sleeps for some amount of time"; } - + /** * More documentation. */ diff --git a/Source/CTest/cmCTestTestCommand.cxx b/Source/CTest/cmCTestTestCommand.cxx index 5aee035c79f..231f035fbb8 100644 --- a/Source/CTest/cmCTestTestCommand.cxx +++ b/Source/CTest/cmCTestTestCommand.cxx @@ -32,7 +32,7 @@ cmCTestTestCommand::cmCTestTestCommand() cmCTestGenericHandler* cmCTestTestCommand::InitializeHandler() { - const char* ctestTimeout = + const char* ctestTimeout = this->Makefile->GetDefinition("CTEST_TEST_TIMEOUT"); double timeout = this->CTest->GetTimeOut(); @@ -86,7 +86,7 @@ cmCTestGenericHandler* cmCTestTestCommand::InitializeHandler() } if(this->Values[ctt_INCLUDE_LABEL]) { - handler->SetOption("LabelRegularExpression", + handler->SetOption("LabelRegularExpression", this->Values[ctt_INCLUDE_LABEL]); } if(this->Values[ctt_PARALLEL_LEVEL]) diff --git a/Source/CTest/cmCTestTestCommand.h b/Source/CTest/cmCTestTestCommand.h index d184ff2a072..130cb6973d3 100644 --- a/Source/CTest/cmCTestTestCommand.h +++ b/Source/CTest/cmCTestTestCommand.h @@ -58,7 +58,7 @@ class cmCTestTestCommand : public cmCTestHandlerCommand " ctest_test([BUILD build_dir] [APPEND]\n" " [START start number] [END end number]\n" " [STRIDE stride number] [EXCLUDE exclude regex ]\n" - " [INCLUDE include regex] [RETURN_VALUE res] \n" + " [INCLUDE include regex] [RETURN_VALUE res] \n" " [EXCLUDE_LABEL exclude regex] \n" " [INCLUDE_LABEL label regex] \n" " [PARALLEL_LEVEL level] \n" diff --git a/Source/CTest/cmProcess.cxx b/Source/CTest/cmProcess.cxx index 0ee631fe977..000bc8503d4 100644 --- a/Source/CTest/cmProcess.cxx +++ b/Source/CTest/cmProcess.cxx @@ -196,12 +196,12 @@ int cmProcess::ReportStatus() { case cmsysProcess_State_Starting: { - std::cerr << "cmProcess: Never started " + std::cerr << "cmProcess: Never started " << this->Command << " process.\n"; } break; case cmsysProcess_State_Error: { - std::cerr << "cmProcess: Error executing " << this->Command + std::cerr << "cmProcess: Error executing " << this->Command << " process: " << cmsysProcess_GetErrorString(this->Process) << "\n"; @@ -241,19 +241,19 @@ int cmProcess::ReportStatus() } break; case cmsysProcess_State_Executing: { - std::cerr << "cmProcess: Never terminated " << + std::cerr << "cmProcess: Never terminated " << this->Command << " process.\n"; } break; case cmsysProcess_State_Exited: { result = cmsysProcess_GetExitValue(this->Process); - std::cerr << "cmProcess: " << this->Command + std::cerr << "cmProcess: " << this->Command << " process exited with code " << result << "\n"; } break; case cmsysProcess_State_Expired: { - std::cerr << "cmProcess: killed " << this->Command + std::cerr << "cmProcess: killed " << this->Command << " process due to timeout.\n"; } break; case cmsysProcess_State_Killed: diff --git a/Source/CTest/cmProcess.h b/Source/CTest/cmProcess.h index ff99ca23dfa..1479df05f9e 100644 --- a/Source/CTest/cmProcess.h +++ b/Source/CTest/cmProcess.h @@ -22,7 +22,7 @@ * * cmProcess wraps the kwsys process stuff in a c++ class. */ -class cmProcess +class cmProcess { public: cmProcess(); @@ -37,7 +37,7 @@ class cmProcess // return the process status int GetProcessStatus(); - // Report the status of the program + // Report the status of the program int ReportStatus(); int GetId() { return this->Id; } void SetId(int id) { this->Id = id;} diff --git a/Source/CursesDialog/cmCursesBoolWidget.cxx b/Source/CursesDialog/cmCursesBoolWidget.cxx index 9c4c5a577e3..fd15b994417 100644 --- a/Source/CursesDialog/cmCursesBoolWidget.cxx +++ b/Source/CursesDialog/cmCursesBoolWidget.cxx @@ -12,7 +12,7 @@ #include "cmCursesBoolWidget.h" #include "cmCursesMainForm.h" -cmCursesBoolWidget::cmCursesBoolWidget(int width, int height, +cmCursesBoolWidget::cmCursesBoolWidget(int width, int height, int left, int top) : cmCursesWidget(width, height, left, top) { @@ -38,15 +38,15 @@ bool cmCursesBoolWidget::HandleInput(int& key, cmCursesMainForm*, WINDOW* w) this->SetValueAsBool(true); } - touchwin(w); - wrefresh(w); + touchwin(w); + wrefresh(w); return true; } else { return false; } - + } void cmCursesBoolWidget::SetValueAsBool(bool value) @@ -56,7 +56,7 @@ void cmCursesBoolWidget::SetValueAsBool(bool value) this->SetValue("ON"); } else - { + { this->SetValue("OFF"); } } @@ -68,7 +68,7 @@ bool cmCursesBoolWidget::GetValueAsBool() return true; } else - { + { return false; } } diff --git a/Source/CursesDialog/cmCursesBoolWidget.h b/Source/CursesDialog/cmCursesBoolWidget.h index 0d1d6a6cfb2..d2a25ca12b5 100644 --- a/Source/CursesDialog/cmCursesBoolWidget.h +++ b/Source/CursesDialog/cmCursesBoolWidget.h @@ -19,7 +19,7 @@ class cmCursesBoolWidget : public cmCursesWidget { public: cmCursesBoolWidget(int width, int height, int left, int top); - + // Description: // Handle user input. Called by the container of this widget // when this widget has focus. Returns true if the input was diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx index 828384d710e..c58d037f025 100644 --- a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx +++ b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx @@ -19,19 +19,19 @@ #include "../cmSystemTools.h" cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(const char* key, - int labelwidth, + int labelwidth, int entrywidth) : Key(key), LabelWidth(labelwidth), EntryWidth(entrywidth) { this->Label = new cmCursesLabelWidget(this->LabelWidth, 1, 1, 1, key); this->IsNewLabel = new cmCursesLabelWidget(1, 1, 1, 1, " "); - this->Entry = 0; + this->Entry = 0; this->Entry = new cmCursesStringWidget(this->EntryWidth, 1, 1, 1); } cmCursesCacheEntryComposite::cmCursesCacheEntryComposite( - const char* key, const cmCacheManager::CacheIterator& it, bool isNew, - int labelwidth, int entrywidth) + const char* key, const cmCacheManager::CacheIterator& it, bool isNew, + int labelwidth, int entrywidth) : Key(key), LabelWidth(labelwidth), EntryWidth(entrywidth) { this->Label = new cmCursesLabelWidget(this->LabelWidth, 1, 1, 1, key); @@ -74,7 +74,7 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite( it.GetValue()); break; case cmCacheManager::UNINITIALIZED: - cmSystemTools::Error("Found an undefined variable: ", it.GetName()); + cmSystemTools::Error("Found an undefined variable: ", it.GetName()); break; default: // TODO : put warning message here diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.h b/Source/CursesDialog/cmCursesCacheEntryComposite.h index a40ea28e1e2..1357a02ecc9 100644 --- a/Source/CursesDialog/cmCursesCacheEntryComposite.h +++ b/Source/CursesDialog/cmCursesCacheEntryComposite.h @@ -20,7 +20,7 @@ class cmCursesCacheEntryComposite public: cmCursesCacheEntryComposite(const char* key, int labelwidth, int entrywidth); cmCursesCacheEntryComposite(const char* key, - const cmCacheManager::CacheIterator& it, + const cmCacheManager::CacheIterator& it, bool isNew, int labelwidth, int entrywidth); ~cmCursesCacheEntryComposite(); const char* GetValue(); diff --git a/Source/CursesDialog/cmCursesDummyWidget.cxx b/Source/CursesDialog/cmCursesDummyWidget.cxx index 1d8a45d79c4..60086a51bf3 100644 --- a/Source/CursesDialog/cmCursesDummyWidget.cxx +++ b/Source/CursesDialog/cmCursesDummyWidget.cxx @@ -11,7 +11,7 @@ ============================================================================*/ #include "cmCursesDummyWidget.h" -cmCursesDummyWidget::cmCursesDummyWidget(int width, int height, +cmCursesDummyWidget::cmCursesDummyWidget(int width, int height, int left, int top) : cmCursesWidget(width, height, left, top) { diff --git a/Source/CursesDialog/cmCursesDummyWidget.h b/Source/CursesDialog/cmCursesDummyWidget.h index cc4cc748da2..9ac13652d68 100644 --- a/Source/CursesDialog/cmCursesDummyWidget.h +++ b/Source/CursesDialog/cmCursesDummyWidget.h @@ -20,7 +20,7 @@ class cmCursesDummyWidget : public cmCursesWidget { public: cmCursesDummyWidget(int width, int height, int left, int top); - + // Description: // Handle user input. Called by the container of this widget // when this widget has focus. Returns true if the input was diff --git a/Source/CursesDialog/cmCursesFilePathWidget.cxx b/Source/CursesDialog/cmCursesFilePathWidget.cxx index 13bbcc936e9..01db014bbd6 100644 --- a/Source/CursesDialog/cmCursesFilePathWidget.cxx +++ b/Source/CursesDialog/cmCursesFilePathWidget.cxx @@ -11,7 +11,7 @@ ============================================================================*/ #include "cmCursesFilePathWidget.h" -cmCursesFilePathWidget::cmCursesFilePathWidget(int width, int height, +cmCursesFilePathWidget::cmCursesFilePathWidget(int width, int height, int left, int top) : cmCursesPathWidget(width, height, left, top) { diff --git a/Source/CursesDialog/cmCursesForm.h b/Source/CursesDialog/cmCursesForm.h index 7556d74b591..3cba856ab49 100644 --- a/Source/CursesDialog/cmCursesForm.h +++ b/Source/CursesDialog/cmCursesForm.h @@ -20,7 +20,7 @@ class cmCursesForm public: cmCursesForm(); virtual ~cmCursesForm(); - + // Description: // Handle user input. virtual void HandleInput() = 0; @@ -59,7 +59,7 @@ class cmCursesForm } static cmCursesForm* CurrentForm; - + protected: diff --git a/Source/CursesDialog/cmCursesLabelWidget.cxx b/Source/CursesDialog/cmCursesLabelWidget.cxx index 2ad4813c60f..b5ed3128c54 100644 --- a/Source/CursesDialog/cmCursesLabelWidget.cxx +++ b/Source/CursesDialog/cmCursesLabelWidget.cxx @@ -11,7 +11,7 @@ ============================================================================*/ #include "cmCursesLabelWidget.h" -cmCursesLabelWidget::cmCursesLabelWidget(int width, int height, +cmCursesLabelWidget::cmCursesLabelWidget(int width, int height, int left, int top, const std::string& name) : cmCursesWidget(width, height, left, top) diff --git a/Source/CursesDialog/cmCursesLabelWidget.h b/Source/CursesDialog/cmCursesLabelWidget.h index bbcc58618e0..cc32d11eaa7 100644 --- a/Source/CursesDialog/cmCursesLabelWidget.h +++ b/Source/CursesDialog/cmCursesLabelWidget.h @@ -23,7 +23,7 @@ class cmCursesLabelWidget : public cmCursesWidget cmCursesLabelWidget(int width, int height, int left, int top, const std::string& name); virtual ~cmCursesLabelWidget(); - + // Description: // Handle user input. Called by the container of this widget // when this widget has focus. Returns true if the input was diff --git a/Source/CursesDialog/cmCursesLongMessageForm.cxx b/Source/CursesDialog/cmCursesLongMessageForm.cxx index 0e2cd229fc0..057f8f3d86f 100644 --- a/Source/CursesDialog/cmCursesLongMessageForm.cxx +++ b/Source/CursesDialog/cmCursesLongMessageForm.cxx @@ -19,10 +19,10 @@ inline int ctrl(int z) { return (z&037); -} +} -cmCursesLongMessageForm::cmCursesLongMessageForm(std::vector - const& messages, const char* +cmCursesLongMessageForm::cmCursesLongMessageForm(std::vector + const& messages, const char* title) { // Append all messages into on big string @@ -84,7 +84,7 @@ void cmCursesLongMessageForm::UpdateStatusBar() curses_move(y-4,0); attron(A_STANDOUT); printw(bar); - attroff(A_STANDOUT); + attroff(A_STANDOUT); curses_move(y-3,0); printw(version); pos_form_cursor(this->Form); @@ -94,7 +94,7 @@ void cmCursesLongMessageForm::PrintKeys() { int x,y; getmaxyx(stdscr, y, x); - if ( x < cmCursesMainForm::MIN_WIDTH || + if ( x < cmCursesMainForm::MIN_WIDTH || y < cmCursesMainForm::MIN_HEIGHT ) { return; @@ -105,7 +105,7 @@ void cmCursesLongMessageForm::PrintKeys() curses_move(y-2,0); printw(firstLine); pos_form_cursor(this->Form); - + } void cmCursesLongMessageForm::Render(int, int, int, int) @@ -155,7 +155,7 @@ void cmCursesLongMessageForm::Render(int, int, int, int) this->UpdateStatusBar(); this->PrintKeys(); - touchwin(stdscr); + touchwin(stdscr); refresh(); } @@ -200,8 +200,8 @@ void cmCursesLongMessageForm::HandleInput() this->UpdateStatusBar(); this->PrintKeys(); - touchwin(stdscr); - wrefresh(stdscr); + touchwin(stdscr); + wrefresh(stdscr); } } diff --git a/Source/CursesDialog/cmCursesLongMessageForm.h b/Source/CursesDialog/cmCursesLongMessageForm.h index 341f9c6c692..1e86974f2ab 100644 --- a/Source/CursesDialog/cmCursesLongMessageForm.h +++ b/Source/CursesDialog/cmCursesLongMessageForm.h @@ -21,10 +21,10 @@ class cmCursesCacheEntryComposite; class cmCursesLongMessageForm : public cmCursesForm { public: - cmCursesLongMessageForm(std::vector const& messages, + cmCursesLongMessageForm(std::vector const& messages, const char* title); virtual ~cmCursesLongMessageForm(); - + // Description: // Handle user input. virtual void HandleInput(); diff --git a/Source/CursesDialog/cmCursesMainForm.h b/Source/CursesDialog/cmCursesMainForm.h index 3e191b4972d..883a2b3d6ea 100644 --- a/Source/CursesDialog/cmCursesMainForm.h +++ b/Source/CursesDialog/cmCursesMainForm.h @@ -30,12 +30,12 @@ class cmCursesMainForm : public cmCursesForm public: cmCursesMainForm(std::vector const& args, int initwidth); virtual ~cmCursesMainForm(); - + /** * Set the widgets which represent the cache entries. */ void InitializeUI(); - + /** * Handle user input. */ @@ -65,7 +65,7 @@ class cmCursesMainForm : public cmCursesForm * exception is during a resize. The optional argument specifies the * string to be displayed in the status bar. */ - virtual void UpdateStatusBar() { this->UpdateStatusBar(0); } + virtual void UpdateStatusBar() { this->UpdateStatusBar(0); } virtual void UpdateStatusBar(const char* message); /** @@ -90,7 +90,7 @@ class cmCursesMainForm : public cmCursesForm int Configure(int noconfigure=0); /** - * Used to generate + * Used to generate */ int Generate(); @@ -98,7 +98,7 @@ class cmCursesMainForm : public cmCursesForm * Used by main program */ int LoadCache(const char *dir); - + /** * Progress callback */ diff --git a/Source/CursesDialog/cmCursesPathWidget.cxx b/Source/CursesDialog/cmCursesPathWidget.cxx index b113c2e6a9c..14c325bcbb7 100644 --- a/Source/CursesDialog/cmCursesPathWidget.cxx +++ b/Source/CursesDialog/cmCursesPathWidget.cxx @@ -14,7 +14,7 @@ #include "cmCursesMainForm.h" #include "cmSystemTools.h" -cmCursesPathWidget::cmCursesPathWidget(int width, int height, +cmCursesPathWidget::cmCursesPathWidget(int width, int height, int left, int top) : cmCursesStringWidget(width, height, left, top) { @@ -75,8 +75,8 @@ void cmCursesPathWidget::OnTab(cmCursesMainForm* fm, WINDOW* w) } this->SetString(cstr.c_str()); - touchwin(w); - wrefresh(w); + touchwin(w); + wrefresh(w); form_driver(form, REQ_END_FIELD); this->LastGlob = glob; this->LastString = cstr; diff --git a/Source/CursesDialog/cmCursesStringWidget.cxx b/Source/CursesDialog/cmCursesStringWidget.cxx index d363f00908a..5c7414f13f1 100644 --- a/Source/CursesDialog/cmCursesStringWidget.cxx +++ b/Source/CursesDialog/cmCursesStringWidget.cxx @@ -15,9 +15,9 @@ inline int ctrl(int z) { return (z&037); -} +} -cmCursesStringWidget::cmCursesStringWidget(int width, int height, +cmCursesStringWidget::cmCursesStringWidget(int width, int height, int left, int top) : cmCursesWidget(width, height, left, top) { @@ -63,7 +63,7 @@ void cmCursesStringWidget::OnType(int& key, cmCursesMainForm* fm, WINDOW*) form_driver(fm->GetForm(), key); } -bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm, +bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm, WINDOW* w) { int x,y; @@ -90,7 +90,7 @@ bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm, getmaxyx(stdscr, y, x); // If window too small, handle 'q' only - if ( x < cmCursesMainForm::MIN_WIDTH || + if ( x < cmCursesMainForm::MIN_WIDTH || y < cmCursesMainForm::MIN_HEIGHT ) { // quit @@ -100,7 +100,7 @@ bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm, } else { - key=getch(); + key=getch(); continue; } } @@ -111,7 +111,7 @@ bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm, return false; } // 10 == enter - if (key == 10 || key == KEY_ENTER) + if (key == 10 || key == KEY_ENTER) { this->OnReturn(fm, w); } @@ -121,7 +121,7 @@ bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm, key == KEY_PPAGE || key == ctrl('u')) { this->InEdit = false; - delete[] this->OriginalString; + delete[] this->OriginalString; // trick to force forms to update the field buffer form_driver(form, REQ_NEXT_FIELD); form_driver(form, REQ_PREV_FIELD); @@ -136,8 +136,8 @@ bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm, fm->PrintKeys(); this->SetString(this->OriginalString); delete[] this->OriginalString; - touchwin(w); - wrefresh(w); + touchwin(w); + wrefresh(w); return true; } } @@ -165,7 +165,7 @@ bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm, { form_driver(form, REQ_END_FIELD); } - else if ( key == 127 || + else if ( key == 127 || key == KEY_BACKSPACE ) { if ( form->curcol > 0 ) @@ -186,10 +186,10 @@ bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm, } if ( !this->Done ) { - touchwin(w); - wrefresh(w); - - key=getch(); + touchwin(w); + wrefresh(w); + + key=getch(); } } return true; @@ -214,7 +214,7 @@ bool cmCursesStringWidget::PrintKeys() { int x,y; getmaxyx(stdscr, y, x); - if ( x < cmCursesMainForm::MIN_WIDTH || + if ( x < cmCursesMainForm::MIN_WIDTH || y < cmCursesMainForm::MIN_HEIGHT ) { return false; diff --git a/Source/CursesDialog/cmCursesStringWidget.h b/Source/CursesDialog/cmCursesStringWidget.h index cd54f249b0d..e939049dfea 100644 --- a/Source/CursesDialog/cmCursesStringWidget.h +++ b/Source/CursesDialog/cmCursesStringWidget.h @@ -26,7 +26,7 @@ class cmCursesStringWidget : public cmCursesWidget { public: cmCursesStringWidget(int width, int height, int left, int top); - + /** * Handle user input. Called by the container of this widget * when this widget has focus. Returns true if the input was diff --git a/Source/CursesDialog/cmCursesWidget.h b/Source/CursesDialog/cmCursesWidget.h index ee36af61339..952c67a86f7 100644 --- a/Source/CursesDialog/cmCursesWidget.h +++ b/Source/CursesDialog/cmCursesWidget.h @@ -22,7 +22,7 @@ class cmCursesWidget public: cmCursesWidget(int width, int height, int left, int top); virtual ~cmCursesWidget(); - + /** * Handle user input. Called by the container of this widget * when this widget has focus. Returns true if the input was diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx index c942bc4ad08..01893f589c7 100644 --- a/Source/QtDialog/CMakeSetup.cxx +++ b/Source/QtDialog/CMakeSetup.cxx @@ -99,15 +99,15 @@ int main(int argc, char** argv) } QApplication app(argc, argv); - + // clean out standard Qt paths for plugins, which we don't use anyway // when creating Mac bundles, it potentially causes problems foreach(QString p, QApplication::libraryPaths()) { QApplication::removeLibraryPath(p); } - - // if arg for install + + // if arg for install for(int i =0; i < argc; i++) { if(strcmp(argv[i], "--mac-install") == 0) @@ -117,7 +117,7 @@ int main(int argc, char** argv) return 0; } } - // tell the cmake library where cmake is + // tell the cmake library where cmake is QDir cmExecDir(QApplication::applicationDirPath()); #if defined(Q_OS_MAC) cmExecDir.cd("../../../"); @@ -131,7 +131,7 @@ int main(int argc, char** argv) QString transfile = QString("cmake_%1").arg(QLocale::system().name()); translator.load(transfile, translationsDir.path()); app.installTranslator(&translator); - + // app setup app.setApplicationName("CMakeSetup"); app.setOrganizationName("Kitware"); @@ -139,16 +139,16 @@ int main(int argc, char** argv) appIcon.addFile(":/Icons/CMakeSetup32.png"); appIcon.addFile(":/Icons/CMakeSetup128.png"); app.setWindowIcon(appIcon); - + CMakeSetupDialog dialog; dialog.show(); - + cmsys::CommandLineArguments arg; arg.Initialize(argc, argv); std::string binaryDirectory; std::string sourceDirectory; typedef cmsys::CommandLineArguments argT; - arg.AddArgument("-B", argT::CONCAT_ARGUMENT, + arg.AddArgument("-B", argT::CONCAT_ARGUMENT, &binaryDirectory, "Binary Directory"); arg.AddArgument("-H", argT::CONCAT_ARGUMENT, &sourceDirectory, "Source Directory"); @@ -199,7 +199,7 @@ int main(int argc, char** argv) } } } - + return app.exec(); } diff --git a/Source/QtDialog/Compilers.h b/Source/QtDialog/Compilers.h index e9c90a50490..3f7b83411a7 100644 --- a/Source/QtDialog/Compilers.h +++ b/Source/QtDialog/Compilers.h @@ -10,7 +10,7 @@ class Compilers : public QWidget, public Ui::Compilers { Q_OBJECT public: - Compilers(QWidget* p=NULL) : + Compilers(QWidget* p=NULL) : QWidget(p) { this->setupUi(this); diff --git a/Source/QtDialog/FirstConfigure.cxx b/Source/QtDialog/FirstConfigure.cxx index 2a79877da8a..6de9f00ccba 100644 --- a/Source/QtDialog/FirstConfigure.cxx +++ b/Source/QtDialog/FirstConfigure.cxx @@ -25,7 +25,7 @@ StartCompilerSetup::StartCompilerSetup(QWidget* p) l->addWidget(this->CompilerSetupOptions[1]); l->addWidget(this->CompilerSetupOptions[2]); l->addWidget(this->CompilerSetupOptions[3]); - + this->CompilerSetupOptions[0]->setChecked(true); QObject::connect(this->CompilerSetupOptions[0], SIGNAL(toggled(bool)), @@ -47,7 +47,7 @@ void StartCompilerSetup::setGenerators(const QStringList& gens) this->GeneratorOptions->clear(); this->GeneratorOptions->addItems(gens); }; - + void StartCompilerSetup::setCurrentGenerator(const QString& gen) { int idx = this->GeneratorOptions->findText(gen); @@ -237,7 +237,7 @@ void CrossCompilerSetup::setProcessor(const QString& t) { this->systemProcessor->setText(t); } - + QString CrossCompilerSetup::getFindRoot() const { return this->crossFindRoot->text(); @@ -313,10 +313,10 @@ FirstConfigure::FirstConfigure() this->mNativeCompilerSetupPage = new NativeCompilerSetup(this); this->setPage(NativeSetup, this->mNativeCompilerSetupPage); - + this->mCrossCompilerSetupPage = new CrossCompilerSetup(this); this->setPage(CrossSetup, this->mCrossCompilerSetupPage); - + this->mToolchainCompilerSetupPage = new ToolchainCompilerSetup(this); this->setPage(ToolchainSetup, this->mToolchainCompilerSetupPage); } @@ -370,14 +370,14 @@ void FirstConfigure::loadFromSettings() void FirstConfigure::saveToSettings() { QSettings settings; - + // save generator settings.beginGroup("Settings/StartPath"); QString lastGen = this->mStartCompilerSetupPage->getGenerator(); settings.setValue("LastGenerator", lastGen); settings.endGroup(); - // save compiler setup + // save compiler setup settings.beginGroup("Settings/Compiler"); settings.setValue("CCompiler", this->mNativeCompilerSetupPage->getCCompiler()); settings.setValue("CXXCompiler", this->mNativeCompilerSetupPage->getCXXCompiler()); @@ -419,7 +419,7 @@ bool FirstConfigure::crossCompilerToolChainFile() const { return this->mStartCompilerSetupPage->crossCompilerToolChainFile(); } - + QString FirstConfigure::getCrossCompilerToolChainFile() const { return this->mToolchainCompilerSetupPage->toolchainFile(); diff --git a/Source/QtDialog/FirstConfigure.h b/Source/QtDialog/FirstConfigure.h index f4e368bfc5c..be390b0fdd0 100644 --- a/Source/QtDialog/FirstConfigure.h +++ b/Source/QtDialog/FirstConfigure.h @@ -30,14 +30,14 @@ class StartCompilerSetup : public QWizardPage void setGenerators(const QStringList& gens); void setCurrentGenerator(const QString& gen); QString getGenerator() const; - + bool defaultSetup() const; bool compilerSetup() const; bool crossCompilerSetup() const; bool crossCompilerToolChainFile() const; int nextId() const; - + signals: void selectionChanged(); @@ -56,7 +56,7 @@ class NativeCompilerSetup : public QWizardPage, protected Ui::Compilers public: NativeCompilerSetup(QWidget* p); ~NativeCompilerSetup(); - + QString getCCompiler() const; void setCCompiler(const QString&); @@ -65,7 +65,7 @@ class NativeCompilerSetup : public QWizardPage, protected Ui::Compilers QString getFortranCompiler() const; void setFortranCompiler(const QString&); - + int nextId() const { return -1; } }; @@ -76,13 +76,13 @@ class CrossCompilerSetup : public QWizardPage, protected Ui::CrossCompiler public: CrossCompilerSetup(QWidget* p); ~CrossCompilerSetup(); - + QString getSystem() const; void setSystem(const QString&); - + QString getVersion() const; void setVersion(const QString&); - + QString getProcessor() const; void setProcessor(const QString&); @@ -94,7 +94,7 @@ class CrossCompilerSetup : public QWizardPage, protected Ui::CrossCompiler QString getFortranCompiler() const; void setFortranCompiler(const QString&); - + QString getFindRoot() const; void setFindRoot(const QString&); @@ -104,14 +104,14 @@ class CrossCompilerSetup : public QWizardPage, protected Ui::CrossCompiler ONLY, NEVER }; - + int getProgramMode() const; void setProgramMode(int); int getLibraryMode() const; void setLibraryMode(int); int getIncludeMode() const; void setIncludeMode(int); - + int nextId() const { return -1; } }; @@ -127,7 +127,7 @@ class ToolchainCompilerSetup : public QWizardPage void setToolchainFile(const QString&); int nextId() const { return -1; } - + protected: QCMakeFilePathEditor* ToolchainFile; }; @@ -151,7 +151,7 @@ class FirstConfigure : public QWizard QString getCCompiler() const; QString getCXXCompiler() const; QString getFortranCompiler() const; - + QString getSystemName() const; QString getSystemVersion() const; QString getSystemProcessor() const; @@ -159,7 +159,7 @@ class FirstConfigure : public QWizard QString getCrossProgramMode() const; QString getCrossLibraryMode() const; QString getCrossIncludeMode() const; - + QString getCrossCompilerToolChainFile() const; void loadFromSettings(); diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx index 8554ff8944e..a2b1567bf46 100644 --- a/Source/QtDialog/QCMake.cxx +++ b/Source/QtDialog/QCMake.cxx @@ -32,9 +32,9 @@ QCMake::QCMake(QObject* p) this->WarnUnusedMode = false; qRegisterMetaType(); qRegisterMetaType(); - + QDir execDir(QCoreApplication::applicationDirPath()); - + #if defined(Q_OS_MAC) if(execDir.exists("../bin/cmake")) { @@ -45,7 +45,7 @@ QCMake::QCMake(QObject* p) execDir.cd("../../../"); // path to cmake in build directory (need to fix for deployment) } #endif - + QString cmakeCommand = QString("cmake")+QString::fromLocal8Bit(cmSystemTools::GetExecutableExtension()); cmakeCommand = execDir.filePath(cmakeCommand); @@ -58,7 +58,7 @@ QCMake::QCMake(QObject* p) this->CMakeInstance->SetCMakeCommand(cmakeCommand.toLocal8Bit().data()); #if defined(Q_OS_MAC) this->CMakeInstance->SetCMakeEditCommand("cmake-gui.app/Contents/MacOS/cmake-gui"); -#else +#else this->CMakeInstance->SetCMakeEditCommand("cmake-gui"); #endif this->CMakeInstance->SetProgressCallback(QCMake::progressCallback, this); @@ -96,7 +96,7 @@ void QCMake::loadCache(const QString& dir) void QCMake::setSourceDirectory(const QString& _dir) { - QString dir = + QString dir = QString::fromLocal8Bit(cmSystemTools::GetActualCaseForPath(_dir.toLocal8Bit().data()).c_str()); if(this->SourceDirectory != dir) { @@ -107,7 +107,7 @@ void QCMake::setSourceDirectory(const QString& _dir) void QCMake::setBinaryDirectory(const QString& _dir) { - QString dir = + QString dir = QString::fromLocal8Bit(cmSystemTools::GetActualCaseForPath(_dir.toLocal8Bit().data()).c_str()); if(this->BinaryDirectory != dir) { @@ -126,7 +126,7 @@ void QCMake::setBinaryDirectory(const QString& _dir) "Please check the permissions of the directory you are trying to run CMake on."); } } - + QCMakePropertyList props = this->properties(); emit this->propertiesChanged(props); cmCacheManager::CacheIterator itm = cachem->NewIterator(); @@ -202,7 +202,7 @@ void QCMake::generate() emit this->generateDone(err); } - + void QCMake::setProperties(const QCMakePropertyList& newProps) { QCMakePropertyList props = newProps; @@ -251,7 +251,7 @@ void QCMake::setProperties(const QCMakePropertyList& newProps) cachem->RemoveCacheEntry(s.toLocal8Bit().data()); } - + // add some new properites foreach(QCMakeProperty s, props) { @@ -286,7 +286,7 @@ void QCMake::setProperties(const QCMakePropertyList& newProps) cmCacheManager::FILEPATH); } } - + cachem->SaveCache(this->BinaryDirectory.toLocal8Bit().data()); } @@ -339,7 +339,7 @@ QCMakePropertyList QCMake::properties() const return ret; } - + void QCMake::interrupt() { this->InterruptFlag.ref(); @@ -416,7 +416,7 @@ void QCMake::reloadCache() props = this->properties(); emit this->propertiesChanged(props); } - + void QCMake::setDebugOutput(bool flag) { if(flag != this->CMakeInstance->GetDebugOutput()) diff --git a/Source/QtDialog/QCMake.h b/Source/QtDialog/QCMake.h index 0d68586f26f..93ac8ab00b0 100644 --- a/Source/QtDialog/QCMake.h +++ b/Source/QtDialog/QCMake.h @@ -38,12 +38,12 @@ struct QCMakeProperty QString Help; PropertyType Type; bool Advanced; - bool operator==(const QCMakeProperty& other) const - { + bool operator==(const QCMakeProperty& other) const + { return this->Key == other.Key; } - bool operator<(const QCMakeProperty& other) const - { + bool operator<(const QCMakeProperty& other) const + { return this->Key < other.Key; } }; @@ -56,7 +56,7 @@ Q_DECLARE_METATYPE(QCMakeProperty) Q_DECLARE_METATYPE(QCMakePropertyList) /// Qt API for CMake library. -/// Wrapper like class allows for easier integration with +/// Wrapper like class allows for easier integration with /// Qt features such as, signal/slot connections, multi-threading, etc.. class QCMake : public QObject { @@ -136,7 +136,7 @@ public slots: static bool interruptCallback(void*); static void progressCallback(const char* msg, float percent, void* cd); - static void errorCallback(const char* msg, const char* title, + static void errorCallback(const char* msg, const char* title, bool&, void* cd); bool SuppressDevWarnings; bool WarnUninitializedMode; diff --git a/Source/QtDialog/QCMakeCacheView.cxx b/Source/QtDialog/QCMakeCacheView.cxx index 72e9b246452..1d21d421d0e 100644 --- a/Source/QtDialog/QCMakeCacheView.cxx +++ b/Source/QtDialog/QCMakeCacheView.cxx @@ -64,7 +64,7 @@ class QCMakeSearchFilter : public QSortFilterProxyModel return true; } } - + return false; } }; @@ -73,11 +73,11 @@ class QCMakeSearchFilter : public QSortFilterProxyModel class QCMakeAdvancedFilter : public QSortFilterProxyModel { public: - QCMakeAdvancedFilter(QObject* o) + QCMakeAdvancedFilter(QObject* o) : QSortFilterProxyModel(o), ShowAdvanced(false) {} - void setShowAdvanced(bool f) - { + void setShowAdvanced(bool f) + { this->ShowAdvanced = f; this->invalidate(); } @@ -102,7 +102,7 @@ class QCMakeAdvancedFilter : public QSortFilterProxyModel } return false; } - + // check children int num = m->rowCount(idx); for(int i=0; isetItemDelegate(delegate); - + this->setUniformRowHeights(true); - + this->setEditTriggers(QAbstractItemView::AllEditTriggers); // tab, backtab doesn't step through items @@ -153,13 +153,13 @@ bool QCMakeCacheView::event(QEvent* e) } return QTreeView::event(e); } - + QCMakeCacheModel* QCMakeCacheView::cacheModel() const { return this->CacheModel; } - -QModelIndex QCMakeCacheView::moveCursor(CursorAction act, + +QModelIndex QCMakeCacheView::moveCursor(CursorAction act, Qt::KeyboardModifiers mod) { // want home/end to go to begin/end of rows, not columns @@ -173,7 +173,7 @@ QModelIndex QCMakeCacheView::moveCursor(CursorAction act, } return QTreeView::moveCursor(act, mod); } - + void QCMakeCacheView::setShowAdvanced(bool s) { #if QT_VERSION >= 040300 @@ -224,7 +224,7 @@ void QCMakeCacheModel::clear() { this->QStandardItemModel::clear(); this->NewPropertyCount = 0; - + QStringList labels; labels << tr("Name") << tr("Value"); this->setHorizontalHeaderLabels(labels); @@ -281,7 +281,7 @@ void QCMakeCacheModel::setProperties(const QCMakePropertyList& props) this->breakProperties(newProps2, newPropsTree2); QStandardItem* root = this->invisibleRootItem(); - + foreach(QString key, newPropsTree.keys()) { QCMakePropertyList props2 = newPropsTree[key]; @@ -308,12 +308,12 @@ void QCMakeCacheModel::setProperties(const QCMakePropertyList& props) this->setPropertyData(this->indexFromItem(items[0]), prop, true); } } - + foreach(QString key, newPropsTree2.keys()) { QCMakePropertyList props2 = newPropsTree2[key]; - QStandardItem* parentItem = + QStandardItem* parentItem = new QStandardItem(key.isEmpty() ? tr("Ungrouped Entries") : key); root->appendRow(parentItem); parentItem->setData(1, GroupRole); @@ -330,7 +330,7 @@ void QCMakeCacheModel::setProperties(const QCMakePropertyList& props) } } } - + this->blockSignals(b); this->reset(); } @@ -361,7 +361,7 @@ void QCMakeCacheModel::setViewType(QCMakeCacheModel::ViewType t) this->reset(); } -void QCMakeCacheModel::setPropertyData(const QModelIndex& idx1, +void QCMakeCacheModel::setPropertyData(const QModelIndex& idx1, const QCMakeProperty& prop, bool isNew) { QModelIndex idx2 = idx1.sibling(idx1.row(), 1); @@ -370,7 +370,7 @@ void QCMakeCacheModel::setPropertyData(const QModelIndex& idx1, this->setData(idx1, prop.Help, QCMakeCacheModel::HelpRole); this->setData(idx1, prop.Type, QCMakeCacheModel::TypeRole); this->setData(idx1, prop.Advanced, QCMakeCacheModel::AdvancedRole); - + if(prop.Type == QCMakeProperty::BOOL) { int check = prop.Value.toBool() ? Qt::Checked : Qt::Unchecked; @@ -394,7 +394,7 @@ void QCMakeCacheModel::setPropertyData(const QModelIndex& idx1, } } -void QCMakeCacheModel::getPropertyData(const QModelIndex& idx1, +void QCMakeCacheModel::getPropertyData(const QModelIndex& idx1, QCMakeProperty& prop) const { QModelIndex idx2 = idx1.sibling(idx1.row(), 1); @@ -457,7 +457,7 @@ void QCMakeCacheModel::breakProperties(const QSet& props, } result = tmp; } - + QCMakePropertyList QCMakeCacheModel::properties() const { QCMakePropertyList props; @@ -488,7 +488,7 @@ QCMakePropertyList QCMakeCacheModel::properties() const this->getPropertyData(idx, prop); props.append(prop); } - + // go to the next in the tree while(!idxs.isEmpty() && !idxs.last().sibling(idxs.last().row()+1, 0).isValid()) { @@ -503,7 +503,7 @@ QCMakePropertyList QCMakeCacheModel::properties() const return props; } - + bool QCMakeCacheModel::insertProperty(QCMakeProperty::PropertyType t, const QString& name, const QString& description, const QVariant& value, bool advanced) @@ -554,7 +554,7 @@ Qt::ItemFlags QCMakeCacheModel::flags (const QModelIndex& idx) const QModelIndex QCMakeCacheModel::buddy(const QModelIndex& idx) const { - if(!this->hasChildren(idx) && + if(!this->hasChildren(idx) && this->data(idx, TypeRole).toInt() != QCMakeProperty::BOOL) { return this->index(idx.row(), 1, idx.parent()); @@ -572,7 +572,7 @@ void QCMakeCacheModelDelegate::setFileDialogFlag(bool f) this->FileDialogFlag = f; } -QWidget* QCMakeCacheModelDelegate::createEditor(QWidget* p, +QWidget* QCMakeCacheModelDelegate::createEditor(QWidget* p, const QStyleOptionViewItem&, const QModelIndex& idx) const { QModelIndex var = idx.sibling(idx.row(), 0); @@ -584,7 +584,7 @@ QWidget* QCMakeCacheModelDelegate::createEditor(QWidget* p, else if(type == QCMakeProperty::PATH) { QCMakePathEditor* editor = - new QCMakePathEditor(p, + new QCMakePathEditor(p, var.data(Qt::DisplayRole).toString()); QObject::connect(editor, SIGNAL(fileDialogExists(bool)), this, SLOT(setFileDialogFlag(bool))); @@ -593,7 +593,7 @@ QWidget* QCMakeCacheModelDelegate::createEditor(QWidget* p, else if(type == QCMakeProperty::FILEPATH) { QCMakeFilePathEditor* editor = - new QCMakeFilePathEditor(p, + new QCMakeFilePathEditor(p, var.data(Qt::DisplayRole).toString()); QObject::connect(editor, SIGNAL(fileDialogExists(bool)), this, SLOT(setFileDialogFlag(bool))); @@ -602,7 +602,7 @@ QWidget* QCMakeCacheModelDelegate::createEditor(QWidget* p, else if(type == QCMakeProperty::STRING && var.data(QCMakeCacheModel::StringsRole).isValid()) { - QCMakeComboBox* editor = + QCMakeComboBox* editor = new QCMakeComboBox(p, var.data(QCMakeCacheModel::StringsRole).toStringList()); editor->setFrame(false); return editor; @@ -613,7 +613,7 @@ QWidget* QCMakeCacheModelDelegate::createEditor(QWidget* p, return editor; } -bool QCMakeCacheModelDelegate::editorEvent(QEvent* e, QAbstractItemModel* model, +bool QCMakeCacheModelDelegate::editorEvent(QEvent* e, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index) { Qt::ItemFlags flags = model->flags(index); @@ -637,7 +637,7 @@ bool QCMakeCacheModelDelegate::editorEvent(QEvent* e, QAbstractItemModel* model, { return true; } - } + } else if (e->type() == QEvent::KeyPress) { if(static_cast(e)->key() != Qt::Key_Space && @@ -645,8 +645,8 @@ bool QCMakeCacheModelDelegate::editorEvent(QEvent* e, QAbstractItemModel* model, { return false; } - } - else + } + else { return false; } @@ -660,7 +660,7 @@ bool QCMakeCacheModelDelegate::editorEvent(QEvent* e, QAbstractItemModel* model, } return success; } - + // Issue 205903 fixed in Qt 4.5.0. // Can remove this function and FileDialogFlag when minimum Qt version is 4.5 bool QCMakeCacheModelDelegate::eventFilter(QObject* object, QEvent* evt) @@ -682,7 +682,7 @@ void QCMakeCacheModelDelegate::setModelData(QWidget* editor, QItemDelegate::setModelData(editor, model, index); const_cast(this)->recordChange(model, index); } - + QSize QCMakeCacheModelDelegate::sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const { QSize sz = QItemDelegate::sizeHint(option, index); @@ -695,7 +695,7 @@ QSize QCMakeCacheModelDelegate::sizeHint(const QStyleOptionViewItem& option, con return sz; } - + QSet QCMakeCacheModelDelegate::changes() const { return mChanges; @@ -721,7 +721,7 @@ void QCMakeCacheModelDelegate::recordChange(QAbstractItemModel* model, const QMo QCMakeProperty prop; idx = idx.sibling(idx.row(), 0); cache_model->getPropertyData(idx, prop); - + // clean out an old one QSet::iterator iter = mChanges.find(prop); if(iter != mChanges.end()) diff --git a/Source/QtDialog/QCMakeCacheView.h b/Source/QtDialog/QCMakeCacheView.h index 0a628b90abb..41f0bd87cbc 100644 --- a/Source/QtDialog/QCMakeCacheView.h +++ b/Source/QtDialog/QCMakeCacheView.h @@ -33,7 +33,7 @@ class QCMakeCacheView : public QTreeView // retrieve the QCMakeCacheModel storing all the pointers // this isn't necessarily the model one would get from model() QCMakeCacheModel* cacheModel() const; - + // get whether to show advanced entries bool showAdvanced() const; @@ -65,7 +65,7 @@ class QCMakeCacheModel : public QStandardItemModel // roles used to retrieve extra data such has help strings, types of // properties, and the advanced flag enum { HelpRole = Qt::ToolTipRole, - TypeRole = Qt::UserRole, + TypeRole = Qt::UserRole, AdvancedRole, StringsRole, GroupRole @@ -102,7 +102,7 @@ public slots: public: // get the properties QCMakePropertyList properties() const; - + // editing enabled bool editEnabled() const; @@ -112,7 +112,7 @@ public slots: // return flags (overloaded to modify flag based on EditEnabled flag) Qt::ItemFlags flags (const QModelIndex& index) const; QModelIndex buddy(const QModelIndex& idx) const; - + // get the data in the model for this property void getPropertyData(const QModelIndex& idx1, QCMakeProperty& prop) const; @@ -124,20 +124,20 @@ public slots: ViewType View; // set the data in the model for this property - void setPropertyData(const QModelIndex& idx1, + void setPropertyData(const QModelIndex& idx1, const QCMakeProperty& p, bool isNew); // breaks up he property list into groups // where each group has the same prefix up to the first underscore static void breakProperties(const QSet& props, QMap& result); - + // gets the prefix of a string up to the first _ static QString prefix(const QString& s); }; -/// Qt delegate class for interaction (or other customization) +/// Qt delegate class for interaction (or other customization) /// with cache properties class QCMakeCacheModelDelegate : public QItemDelegate { @@ -145,9 +145,9 @@ class QCMakeCacheModelDelegate : public QItemDelegate public: QCMakeCacheModelDelegate(QObject* p); /// create our own editors for cache properties - QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, + QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index ) const; - bool editorEvent (QEvent* event, QAbstractItemModel* model, + bool editorEvent (QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index); bool eventFilter(QObject* object, QEvent* event); void setModelData(QWidget * editor, QAbstractItemModel * model, const QModelIndex & index ) const; diff --git a/Source/QtDialog/QCMakeWidgets.cxx b/Source/QtDialog/QCMakeWidgets.cxx index 144e1f32e65..a0c5e17fe24 100644 --- a/Source/QtDialog/QCMakeWidgets.cxx +++ b/Source/QtDialog/QCMakeWidgets.cxx @@ -69,7 +69,7 @@ void QCMakeFilePathEditor::chooseFile() this->fileDialogExists(true); path = QFileDialog::getOpenFileName(this, title, info.absolutePath()); this->fileDialogExists(false); - + if(!path.isEmpty()) { this->setText(QDir::fromNativeSeparators(path)); diff --git a/Source/QtDialog/QMacInstallDialog.cxx b/Source/QtDialog/QMacInstallDialog.cxx index 6eb053b2134..8b8c5319f29 100644 --- a/Source/QtDialog/QMacInstallDialog.cxx +++ b/Source/QtDialog/QMacInstallDialog.cxx @@ -15,11 +15,11 @@ QMacInstallDialog::QMacInstallDialog(QWidget*w) { this->Internals = new QMacInstallDialogInternals; this->Internals->setupUi(this); - QObject::connect(this->Internals->choosePathButton, SIGNAL(pressed()), + QObject::connect(this->Internals->choosePathButton, SIGNAL(pressed()), this, SLOT(ShowBrowser())); - QObject::connect(this->Internals->skipInstallButton, SIGNAL(pressed()), + QObject::connect(this->Internals->skipInstallButton, SIGNAL(pressed()), this, SLOT(SkipInstall())); - QObject::connect(this->Internals->doInstallButton, SIGNAL(pressed()), + QObject::connect(this->Internals->doInstallButton, SIGNAL(pressed()), this, SLOT(DoInstall())); this->Internals->InstallPrefix->setText("/usr/bin/"); @@ -31,7 +31,7 @@ QMacInstallDialog::~QMacInstallDialog() } void QMacInstallDialog::DoInstall() -{ +{ QDir installDir(this->Internals->InstallPrefix->text()); QString installTo = installDir.path(); if(!cmSystemTools::FileExists(installTo.toLocal8Bit().data())) @@ -42,7 +42,7 @@ void QMacInstallDialog::DoInstall() message += installDir.path(); QString title = tr("Create Directory"); QMessageBox::StandardButton btn; - btn = QMessageBox::information(this, title, message, + btn = QMessageBox::information(this, title, message, QMessageBox::Yes | QMessageBox::No); if(btn == QMessageBox::Yes) { @@ -52,7 +52,7 @@ void QMacInstallDialog::DoInstall() QDir cmExecDir(QApplication::applicationDirPath()); cmExecDir.cd("../bin"); QFileInfoList list = cmExecDir.entryInfoList(); - for (int i = 0; i < list.size(); ++i) + for (int i = 0; i < list.size(); ++i) { QFileInfo fileInfo = list.at(i); QString filename = fileInfo.fileName(); @@ -75,7 +75,7 @@ void QMacInstallDialog::DoInstall() message += newName; QString title = tr("Error Removing file"); QMessageBox::StandardButton btn = - QMessageBox::critical(this, title, message, + QMessageBox::critical(this, title, message, QMessageBox::Ok|QMessageBox::Abort); if(btn == QMessageBox::Abort) { @@ -93,7 +93,7 @@ void QMacInstallDialog::DoInstall() message += newName; QString title = tr("Error Creating Symlink"); QMessageBox::StandardButton btn = - QMessageBox::critical(this, title, message, + QMessageBox::critical(this, title, message, QMessageBox::Ok|QMessageBox::Abort); if(btn == QMessageBox::Abort) { @@ -112,7 +112,7 @@ void QMacInstallDialog::SkipInstall() void QMacInstallDialog::ShowBrowser() { - QString dir = QFileDialog::getExistingDirectory(this, + QString dir = QFileDialog::getExistingDirectory(this, tr("Enter Install Prefix"), this->Internals->InstallPrefix->text()); if(!dir.isEmpty()) { diff --git a/Source/QtDialog/QtDialogCPack.cmake.in b/Source/QtDialog/QtDialogCPack.cmake.in index 701991b7a6e..e73e23f2239 100644 --- a/Source/QtDialog/QtDialogCPack.cmake.in +++ b/Source/QtDialog/QtDialogCPack.cmake.in @@ -2,7 +2,7 @@ SET(IS_APPLE @APPLE@) SET(CMAKE_PACKAGE_QTGUI @CMAKE_PACKAGE_QTGUI@) IF(CMAKE_PACKAGE_QTGUI) - SET(CPACK_PACKAGE_EXECUTABLES "cmake-gui" "CMake (cmake-gui)" ${CPACK_PACKAGE_EXECUTABLES}) + SET(CPACK_PACKAGE_EXECUTABLES "cmake-gui" "CMake (cmake-gui)" ${CPACK_PACKAGE_EXECUTABLES}) SET(CPACK_CREATE_DESKTOP_LINKS "cmake-gui" ${CPACK_CREATE_DESKTOP_LINKS}) IF(IS_APPLE) # for apple install we set the install prefix to diff --git a/Source/cmAddCustomCommandCommand.h b/Source/cmAddCustomCommandCommand.h index 1f770ed39d7..c5252b79465 100644 --- a/Source/cmAddCustomCommandCommand.h +++ b/Source/cmAddCustomCommandCommand.h @@ -16,7 +16,7 @@ #include "cmDocumentGeneratorExpressions.h" /** \class cmAddCustomCommandCommand - * \brief + * \brief * * cmAddCustomCommandCommand defines a new command (rule) that can * be executed within the build process @@ -29,7 +29,7 @@ class cmAddCustomCommandCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmAddCustomCommandCommand; } @@ -45,7 +45,7 @@ class cmAddCustomCommandCommand : public cmCommand * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() const {return "add_custom_command";} - + /** * Succinct documentation. */ @@ -53,7 +53,7 @@ class cmAddCustomCommandCommand : public cmCommand { return "Add a custom build rule to the generated build system."; } - + /** * More documentation. */ @@ -177,7 +177,7 @@ class cmAddCustomCommandCommand : public cmCommand "is recompiled.\n" ; } - + cmTypeMacro(cmAddCustomCommandCommand, cmCommand); protected: bool CheckOutputs(const std::vector& outputs); diff --git a/Source/cmAddCustomTargetCommand.h b/Source/cmAddCustomTargetCommand.h index 50bffefde5e..d4ed450f09d 100644 --- a/Source/cmAddCustomTargetCommand.h +++ b/Source/cmAddCustomTargetCommand.h @@ -27,7 +27,7 @@ class cmAddCustomTargetCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmAddCustomTargetCommand; } @@ -38,13 +38,13 @@ class cmAddCustomTargetCommand : public cmCommand */ virtual bool InitialPass(std::vector const& args, cmExecutionStatus &status); - + /** * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() const {return "add_custom_target";} - + /** * Succinct documentation. */ @@ -52,7 +52,7 @@ class cmAddCustomTargetCommand : public cmCommand { return "Add a target with no output so it will always be built."; } - + /** * More documentation. */ @@ -101,7 +101,7 @@ class cmAddCustomTargetCommand : public cmCommand "convenience in editing even if they have not build rules." ; } - + cmTypeMacro(cmAddCustomTargetCommand, cmCommand); }; diff --git a/Source/cmAddDependenciesCommand.h b/Source/cmAddDependenciesCommand.h index 14a7741fad5..ed8006765d9 100644 --- a/Source/cmAddDependenciesCommand.h +++ b/Source/cmAddDependenciesCommand.h @@ -25,7 +25,7 @@ class cmAddDependenciesCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmAddDependenciesCommand; } @@ -49,7 +49,7 @@ class cmAddDependenciesCommand : public cmCommand { return "Add a dependency between top-level targets."; } - + /** * More documentation. */ @@ -70,7 +70,7 @@ class cmAddDependenciesCommand : public cmCommand "SET_SOURCE_FILES_PROPERTIES to add file-level dependencies to object " "files."; } - + cmTypeMacro(cmAddDependenciesCommand, cmCommand); }; diff --git a/Source/cmAddLibraryCommand.h b/Source/cmAddLibraryCommand.h index b1ae202890d..b330e68c858 100644 --- a/Source/cmAddLibraryCommand.h +++ b/Source/cmAddLibraryCommand.h @@ -26,7 +26,7 @@ class cmAddLibraryCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmAddLibraryCommand; } @@ -50,7 +50,7 @@ class cmAddLibraryCommand : public cmCommand { return "Add a library to the project using the specified source files."; } - + /** * More documentation. */ @@ -134,7 +134,7 @@ class cmAddLibraryCommand : public cmCommand "Object libraries cannot be imported, exported, installed, or linked." ; } - + cmTypeMacro(cmAddLibraryCommand, cmCommand); }; diff --git a/Source/cmAddSubDirectoryCommand.cxx b/Source/cmAddSubDirectoryCommand.cxx index 5fca527ca12..9efeda48faa 100644 --- a/Source/cmAddSubDirectoryCommand.cxx +++ b/Source/cmAddSubDirectoryCommand.cxx @@ -20,11 +20,11 @@ bool cmAddSubDirectoryCommand::InitialPass this->SetError("called with incorrect number of arguments"); return false; } - + // store the binpath std::string srcArg = args[0]; std::string binArg; - + bool excludeFromAll = false; // process the rest of the arguments looking for optional args diff --git a/Source/cmAddSubDirectoryCommand.h b/Source/cmAddSubDirectoryCommand.h index 3d6f51ea52b..fa322b0c4ec 100644 --- a/Source/cmAddSubDirectoryCommand.h +++ b/Source/cmAddSubDirectoryCommand.h @@ -27,7 +27,7 @@ class cmAddSubDirectoryCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmAddSubDirectoryCommand; } @@ -51,7 +51,7 @@ class cmAddSubDirectoryCommand : public cmCommand { return "Add a subdirectory to the build."; } - + /** * More documentation. */ @@ -90,7 +90,7 @@ class cmAddSubDirectoryCommand : public cmCommand "project build system to satisfy the dependency." ; } - + cmTypeMacro(cmAddSubDirectoryCommand, cmCommand); }; diff --git a/Source/cmAddTestCommand.h b/Source/cmAddTestCommand.h index 59f10f62285..b11bff9679f 100644 --- a/Source/cmAddTestCommand.h +++ b/Source/cmAddTestCommand.h @@ -26,7 +26,7 @@ class cmAddTestCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmAddTestCommand; } @@ -50,7 +50,7 @@ class cmAddTestCommand : public cmCommand { return "Add a test to the project with the specified arguments."; } - + /** * More documentation. */ @@ -91,7 +91,7 @@ class cmAddTestCommand : public cmCommand "executable file produced by target \"myexe\"." ; } - + cmTypeMacro(cmAddTestCommand, cmCommand); private: bool HandleNameMode(std::vector const& args); diff --git a/Source/cmAuxSourceDirectoryCommand.cxx b/Source/cmAuxSourceDirectoryCommand.cxx index f88be3d5852..01f64b73016 100644 --- a/Source/cmAuxSourceDirectoryCommand.cxx +++ b/Source/cmAuxSourceDirectoryCommand.cxx @@ -23,7 +23,7 @@ bool cmAuxSourceDirectoryCommand::InitialPass this->SetError("called with incorrect number of arguments"); return false; } - + std::string sourceListValue; std::string templateDirectory = args[0]; this->Makefile->AddExtraDirectory(templateDirectory.c_str()); @@ -40,12 +40,12 @@ bool cmAuxSourceDirectoryCommand::InitialPass } // was the list already populated - const char *def = this->Makefile->GetDefinition(args[1].c_str()); + const char *def = this->Makefile->GetDefinition(args[1].c_str()); if (def) { sourceListValue = def; } - + // Load all the files in the directory cmsys::Directory dir; if(dir.Load(tdir.c_str())) @@ -69,7 +69,7 @@ bool cmAuxSourceDirectoryCommand::InitialPass std::string fullname = templateDirectory; fullname += "/"; fullname += file; - // add the file as a class file so + // add the file as a class file so // depends can be done cmSourceFile* sf = this->Makefile->GetOrCreateSource(fullname.c_str()); @@ -83,7 +83,7 @@ bool cmAuxSourceDirectoryCommand::InitialPass } } } - this->Makefile->AddDefinition(args[1].c_str(), sourceListValue.c_str()); + this->Makefile->AddDefinition(args[1].c_str(), sourceListValue.c_str()); return true; } diff --git a/Source/cmAuxSourceDirectoryCommand.h b/Source/cmAuxSourceDirectoryCommand.h index f059e447351..8a70f19cb36 100644 --- a/Source/cmAuxSourceDirectoryCommand.h +++ b/Source/cmAuxSourceDirectoryCommand.h @@ -29,7 +29,7 @@ class cmAuxSourceDirectoryCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmAuxSourceDirectoryCommand; } @@ -45,7 +45,7 @@ class cmAuxSourceDirectoryCommand : public cmCommand * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() const { return "aux_source_directory";} - + /** * Succinct documentation. */ @@ -53,7 +53,7 @@ class cmAuxSourceDirectoryCommand : public cmCommand { return "Find all source files in a directory."; } - + /** * More documentation. */ @@ -77,7 +77,7 @@ class cmAuxSourceDirectoryCommand : public cmCommand "one would have to manually rerun CMake to generate a build system " "incorporating the new file."; } - + cmTypeMacro(cmAuxSourceDirectoryCommand, cmCommand); }; diff --git a/Source/cmBreakCommand.h b/Source/cmBreakCommand.h index 67ef37e9a98..17f57cfa1a6 100644 --- a/Source/cmBreakCommand.h +++ b/Source/cmBreakCommand.h @@ -25,7 +25,7 @@ class cmBreakCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmBreakCommand; } @@ -46,7 +46,7 @@ class cmBreakCommand : public cmCommand * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() const {return "break";} - + /** * Succinct documentation. */ @@ -54,7 +54,7 @@ class cmBreakCommand : public cmCommand { return "Break from an enclosing foreach or while loop."; } - + /** * More documentation. */ @@ -64,7 +64,7 @@ class cmBreakCommand : public cmCommand " break()\n" "Breaks from an enclosing foreach loop or while loop"; } - + cmTypeMacro(cmBreakCommand, cmCommand); }; diff --git a/Source/cmBuildCommand.h b/Source/cmBuildCommand.h index a333c5d954a..1bab4536e80 100644 --- a/Source/cmBuildCommand.h +++ b/Source/cmBuildCommand.h @@ -25,7 +25,7 @@ class cmBuildCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmBuildCommand; } diff --git a/Source/cmBuildNameCommand.cxx b/Source/cmBuildNameCommand.cxx index fa698303cdd..f95a79eda5a 100644 --- a/Source/cmBuildNameCommand.cxx +++ b/Source/cmBuildNameCommand.cxx @@ -25,7 +25,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) const char* cacheValue = this->Makefile->GetDefinition(args[0].c_str()); if(cacheValue) { - // do we need to correct the value? + // do we need to correct the value? cmsys::RegularExpression reg("[()/]"); if (reg.find(cacheValue)) { @@ -41,7 +41,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) return true; } - + std::string buildname = "WinNT"; if(this->Makefile->GetDefinition("UNIX")) { @@ -67,7 +67,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) "(", "_"); cmSystemTools::ReplaceString(buildname, ")", "_"); - + this->Makefile->AddCacheDefinition(args[0].c_str(), buildname.c_str(), "Name of build.", diff --git a/Source/cmCMakeMinimumRequired.cxx b/Source/cmCMakeMinimumRequired.cxx index 126934cebf5..49c585fba24 100644 --- a/Source/cmCMakeMinimumRequired.cxx +++ b/Source/cmCMakeMinimumRequired.cxx @@ -120,7 +120,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) { this->Makefile->SetPolicyVersion(version_string.c_str()); } - + return true; } diff --git a/Source/cmCMakeMinimumRequired.h b/Source/cmCMakeMinimumRequired.h index d23ce79cf68..acf28298bef 100644 --- a/Source/cmCMakeMinimumRequired.h +++ b/Source/cmCMakeMinimumRequired.h @@ -25,7 +25,7 @@ class cmCMakeMinimumRequired : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmCMakeMinimumRequired; } @@ -46,7 +46,7 @@ class cmCMakeMinimumRequired : public cmCommand * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() const {return "cmake_minimum_required";} - + /** * Succinct documentation. */ @@ -54,7 +54,7 @@ class cmCMakeMinimumRequired : public cmCommand { return "Set the minimum required version of cmake for a project."; } - + /** * More documentation. */ @@ -77,7 +77,7 @@ class cmCMakeMinimumRequired : public cmCommand "It should be specified so CMake versions 2.4 and lower fail with an " "error instead of just a warning."; } - + cmTypeMacro(cmCMakeMinimumRequired, cmCommand); private: diff --git a/Source/cmCMakePolicyCommand.h b/Source/cmCMakePolicyCommand.h index 4f1ed36ad30..4f9faa168a5 100644 --- a/Source/cmCMakePolicyCommand.h +++ b/Source/cmCMakePolicyCommand.h @@ -17,8 +17,8 @@ /** \class cmCMakePolicyCommand * \brief Set how CMake should handle policies * - * cmCMakePolicyCommand sets how CMake should deal with backwards - * compatibility policies. + * cmCMakePolicyCommand sets how CMake should deal with backwards + * compatibility policies. */ class cmCMakePolicyCommand : public cmCommand { @@ -26,7 +26,7 @@ class cmCMakePolicyCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmCMakePolicyCommand; } @@ -47,7 +47,7 @@ class cmCMakePolicyCommand : public cmCommand * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() const {return "cmake_policy";} - + /** * Succinct documentation. */ @@ -55,7 +55,7 @@ class cmCMakePolicyCommand : public cmCommand { return "Manage CMake Policy settings."; } - + /** * More documentation. */ @@ -129,7 +129,7 @@ class cmCMakePolicyCommand : public cmCommand "closest nested policy stack entry." ; } - + cmTypeMacro(cmCMakePolicyCommand, cmCommand); private: bool HandleSetMode(std::vector const& args); diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx index e237913558d..48ae50e42f0 100644 --- a/Source/cmCPluginAPI.cxx +++ b/Source/cmCPluginAPI.cxx @@ -389,7 +389,7 @@ void CCONV cmAddLibrary(void *arg, const char *libname, int shared, { srcs2.push_back(srcs[i]); } - mf->AddLibrary(libname, + mf->AddLibrary(libname, (shared? cmTarget::SHARED_LIBRARY : cmTarget::STATIC_LIBRARY), srcs2); } @@ -859,13 +859,13 @@ void CCONV cmFree(void *data) } void CCONV DefineSourceFileProperty (void *arg, const char *name, - const char *briefDocs, + const char *briefDocs, const char *longDocs, int chained) { cmMakefile *mf = static_cast(arg); mf->GetCMakeInstance()->DefineProperty(name,cmProperty::SOURCE_FILE, - briefDocs, longDocs, + briefDocs, longDocs, chained != 0); } diff --git a/Source/cmCPluginAPI.h b/Source/cmCPluginAPI.h index fd5a4f81989..5c832c30e7e 100644 --- a/Source/cmCPluginAPI.h +++ b/Source/cmCPluginAPI.h @@ -168,10 +168,10 @@ typedef struct /* new functions added after 2.4 */ void *(CCONV *CreateNewSourceFile) (void *mf); void (CCONV *DefineSourceFileProperty) (void *mf, const char *name, - const char *briefDocs, + const char *briefDocs, const char *longDocs, int chained); - + /* this is the end of the C function stub API structure */ } cmCAPI; diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index b5687e39a2a..a6d04b70d42 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -75,8 +75,8 @@ struct tm* cmCTest::GetNightlyTime(std::string str, char buf[1024]; // add todays year day and month to the time in str because // curl_getdate no longer assumes the day is today - sprintf(buf, "%d%02d%02d %s", - lctime->tm_year+1900, + sprintf(buf, "%d%02d%02d %s", + lctime->tm_year+1900, lctime->tm_mon +1, lctime->tm_mday, str.c_str()); @@ -223,7 +223,7 @@ int cmCTest::HTTPRequest(std::string url, HTTPMethod method, default: break; } - + ::curl_easy_setopt(curl, CURLOPT_URL, url.c_str()); ::curl_easy_setopt(curl, CURLOPT_TIMEOUT, timeout); ::curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1); @@ -237,7 +237,7 @@ int cmCTest::HTTPRequest(std::string url, HTTPMethod method, ::curl_easy_cleanup(curl); ::curl_global_cleanup(); - + return static_cast(res); } #endif @@ -300,7 +300,7 @@ cmCTest::cmCTest() this->ForceNewCTestProcess = false; this->TomorrowTag = false; this->Verbose = false; - + this->Debug = false; this->ShowLineNumbers = false; this->Quiet = false; @@ -760,7 +760,7 @@ bool cmCTest::UpdateCTestConfiguration() } else { - cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, "Parse Config file:" + cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, "Parse Config file:" << fileName.c_str() << "\n"); // parse the dart test file std::ifstream fin(fileName.c_str()); @@ -944,7 +944,7 @@ bool cmCTest::AddIfExists(Part part, const char* file) //---------------------------------------------------------------------- bool cmCTest::CTestFileExists(const std::string& filename) { - std::string testingDir = this->BinaryDir + "/Testing/" + + std::string testingDir = this->BinaryDir + "/Testing/" + this->CurrentTag + "/" + filename; return cmSystemTools::FileExists(testingDir.c_str()); } @@ -952,7 +952,7 @@ bool cmCTest::CTestFileExists(const std::string& filename) //---------------------------------------------------------------------- cmCTestGenericHandler* cmCTest::GetInitializedHandler(const char* handler) { - cmCTest::t_TestingHandlers::iterator it = + cmCTest::t_TestingHandlers::iterator it = this->TestingHandlers.find(handler); if ( it == this->TestingHandlers.end() ) { @@ -965,7 +965,7 @@ cmCTestGenericHandler* cmCTest::GetInitializedHandler(const char* handler) //---------------------------------------------------------------------- cmCTestGenericHandler* cmCTest::GetHandler(const char* handler) { - cmCTest::t_TestingHandlers::iterator it = + cmCTest::t_TestingHandlers::iterator it = this->TestingHandlers.find(handler); if ( it == this->TestingHandlers.end() ) { @@ -1314,8 +1314,8 @@ int cmCTest::RunTest(std::vector argv, { if(argv[i]) { - // make sure we pass the timeout in for any build and test - // invocations. Since --build-generator is required this is a + // make sure we pass the timeout in for any build and test + // invocations. Since --build-generator is required this is a // good place to check for it, and to add the arguments in if (strcmp(argv[i],"--build-generator") == 0 && timeout > 0) { @@ -1524,18 +1524,18 @@ void cmCTest::StartXML(std::ostream& ostr, bool append) << "\tNumberOfPhysicalCPU=\""<< info.GetNumberOfPhysicalCPU() << "\"\n" << "\tTotalVirtualMemory=\"" << info.GetTotalVirtualMemory() << "\"\n" << "\tTotalPhysicalMemory=\""<< info.GetTotalPhysicalMemory() << "\"\n" - << "\tLogicalProcessorsPerPhysical=\"" + << "\tLogicalProcessorsPerPhysical=\"" << info.GetLogicalProcessorsPerPhysical() << "\"\n" - << "\tProcessorClockFrequency=\"" - << info.GetProcessorClockFrequency() << "\"\n" + << "\tProcessorClockFrequency=\"" + << info.GetProcessorClockFrequency() << "\"\n" << ">" << std::endl; - this->AddSiteProperties(ostr); + this->AddSiteProperties(ostr); } //---------------------------------------------------------------------- void cmCTest::AddSiteProperties(std::ostream& ostr) { - cmCTestScriptHandler* ch = + cmCTestScriptHandler* ch = static_cast(this->GetHandler("script")); cmake* cm = ch->GetCMake(); // if no CMake then this is the old style script and props like @@ -1547,9 +1547,9 @@ void cmCTest::AddSiteProperties(std::ostream& ostr) // This code should go when cdash is changed to use labels only const char* subproject = cm->GetProperty("SubProject", cmProperty::GLOBAL); if(subproject) - { + { ostr << "\n"; - const char* labels = + const char* labels = ch->GetCMake()->GetProperty("SubProjectLabels", cmProperty::GLOBAL); if(labels) { @@ -1566,11 +1566,11 @@ void cmCTest::AddSiteProperties(std::ostream& ostr) } ostr << "\n"; } - + // This code should stay when cdash only does label based sub-projects const char* label = cm->GetProperty("Label", cmProperty::GLOBAL); if(label) - { + { ostr << "\n"; ostr << " \n"; ostr << "\n"; @@ -1762,7 +1762,7 @@ bool cmCTest::SubmitExtraFiles(const char* cfiles) //------------------------------------------------------- -// for a -D argument convert the next argument into +// for a -D argument convert the next argument into // the proper list of dashboard steps via SetTest bool cmCTest::AddTestsForDashboardType(std::string &targ) { @@ -1980,9 +1980,9 @@ bool cmCTest::CheckArgument(const std::string& arg, const char* varg1, //---------------------------------------------------------------------- -// Processes one command line argument (and its arguments if any) +// Processes one command line argument (and its arguments if any) // for many simple options and then returns -void cmCTest::HandleCommandLineArguments(size_t &i, +void cmCTest::HandleCommandLineArguments(size_t &i, std::vector &args) { std::string arg = args[i]; @@ -2031,14 +2031,14 @@ void cmCTest::HandleCommandLineArguments(size_t &i, i++; this->SetStopTime(args[i]); } - + if(this->CheckArgument(arg, "-C", "--build-config") && i < args.size() - 1) { i++; this->SetConfigType(args[i].c_str()); } - + if(this->CheckArgument(arg, "--debug")) { this->Debug = true; @@ -2078,7 +2078,7 @@ void cmCTest::HandleCommandLineArguments(size_t &i, { this->OutputTestOutputOnTestFailure = true; } - + if(this->CheckArgument(arg, "-N", "--show-only")) { this->ShowOnly = true; @@ -2118,7 +2118,7 @@ void cmCTest::HandleCommandLineArguments(size_t &i, this->SubmitIndex = 0; } } - + if(this->CheckArgument(arg, "--overwrite") && i < args.size() - 1) { i++; @@ -2171,7 +2171,7 @@ void cmCTest::HandleCommandLineArguments(size_t &i, this->GetHandler("memcheck")-> SetPersistentOption("ExcludeLabelRegularExpression", args[i].c_str()); } - + if(this->CheckArgument(arg, "-E", "--exclude-regex") && i < args.size() - 1) { @@ -2180,17 +2180,17 @@ void cmCTest::HandleCommandLineArguments(size_t &i, SetPersistentOption("ExcludeRegularExpression", args[i].c_str()); this->GetHandler("memcheck")-> SetPersistentOption("ExcludeRegularExpression", args[i].c_str()); - } + } } //---------------------------------------------------------------------- // handle the -S -SR and -SP arguments -void cmCTest::HandleScriptArguments(size_t &i, +void cmCTest::HandleScriptArguments(size_t &i, std::vector &args, bool &SRArgumentSpecified) { std::string arg = args[i]; - if(this->CheckArgument(arg, "-SP", "--script-new-process") && + if(this->CheckArgument(arg, "-SP", "--script-new-process") && i < args.size() - 1 ) { this->RunConfigurationScript = true; @@ -2203,8 +2203,8 @@ void cmCTest::HandleScriptArguments(size_t &i, ch->AddConfigurationScript(args[i].c_str(),false); } } - - if(this->CheckArgument(arg, "-SR", "--script-run") && + + if(this->CheckArgument(arg, "-SR", "--script-run") && i < args.size() - 1 ) { SRArgumentSpecified = true; @@ -2214,7 +2214,7 @@ void cmCTest::HandleScriptArguments(size_t &i, = static_cast(this->GetHandler("script")); ch->AddConfigurationScript(args[i].c_str(),true); } - + if(this->CheckArgument(arg, "-S", "--script") && i < args.size() - 1 ) { this->RunConfigurationScript = true; @@ -2396,7 +2396,7 @@ int cmCTest::Run(std::vector &args, std::string* output) } // the close of the for argument loop - // now what sould cmake do? if --build-and-test was specified then + // now what sould cmake do? if --build-and-test was specified then // we run the build and test handler and return if(cmakeAndTest) { @@ -2410,7 +2410,7 @@ int cmCTest::Run(std::vector &args, std::string* output) #endif if(retv != 0) { - cmCTestLog(this, DEBUG, "build and test failing returing: " << retv + cmCTestLog(this, DEBUG, "build and test failing returing: " << retv << std::endl); } return retv; @@ -2438,14 +2438,14 @@ int cmCTest::Run(std::vector &args, std::string* output) res = this->GetHandler("script")->ProcessHandler(); if(res != 0) { - cmCTestLog(this, DEBUG, "running script failing returning: " << res + cmCTestLog(this, DEBUG, "running script failing returning: " << res << std::endl); } } else { - // What is this? -V seems to be the same as -VV, + // What is this? -V seems to be the same as -VV, // and Verbose is always on in this case this->ExtraVerbose = this->Verbose; this->Verbose = true; @@ -2472,7 +2472,7 @@ int cmCTest::Run(std::vector &args, std::string* output) } if(res != 0) { - cmCTestLog(this, DEBUG, "Running a test(s) failed returning : " << res + cmCTestLog(this, DEBUG, "Running a test(s) failed returning : " << res << std::endl); } return res; diff --git a/Source/cmCTest.h b/Source/cmCTest.h index beffe9e7ace..f2638feda2f 100644 --- a/Source/cmCTest.h +++ b/Source/cmCTest.h @@ -93,7 +93,7 @@ class cmCTest */ static int HTTPRequest(std::string url, HTTPMethod method, std::string& response, - std::string fields = "", + std::string fields = "", std::string putFile = "", int timeout = 0); #endif @@ -198,13 +198,13 @@ class cmCTest //! base64 encode a file std::string Base64EncodeFile(std::string file); - /** + /** * Return the time remaining that the script is allowed to run in * seconds if the user has set the variable CTEST_TIME_LIMIT. If that has * not been set it returns 1e7 seconds */ double GetRemainingTimeAllowed(); - + ///! Open file in the output directory and set the stream bool OpenOutputFile(const std::string& path, const std::string& name, @@ -529,11 +529,11 @@ class cmCTest bool AddVariableDefinition(const std::string &arg); //! parse and process most common command line arguments - void HandleCommandLineArguments(size_t &i, + void HandleCommandLineArguments(size_t &i, std::vector &args); //! hande the -S -SP and -SR arguments - void HandleScriptArguments(size_t &i, + void HandleScriptArguments(size_t &i, std::vector &args, bool &SRArgumentSpecified); diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx index 47a0e85534d..423124340f2 100644 --- a/Source/cmCacheManager.cxx +++ b/Source/cmCacheManager.cxx @@ -267,7 +267,7 @@ bool cmCacheManager::LoadCache(const char* path, // If the entry is not internal to the cache being loaded // or if it is in the list of internal entries to be // imported, load it. - if ( internal || (e.Type != INTERNAL) || + if ( internal || (e.Type != INTERNAL) || (includes.find(entryKey) != includes.end()) ) { // If we are loading the cache from another project, @@ -478,7 +478,7 @@ bool cmCacheManager::SaveCache(const char* path) = this->GetCacheEntry("CMAKE_COMMAND"); if ( cmakeCacheEntry ) { - fout << "# It was generated by CMake: " << + fout << "# It was generated by CMake: " << cmakeCacheEntry->Value << std::endl; } @@ -500,10 +500,10 @@ bool cmCacheManager::SaveCache(const char* path) fout << "########################\n"; fout << "\n"; - for( std::map::const_iterator i = + for( std::map::const_iterator i = this->Cache.begin(); i != this->Cache.end(); ++i) { - const CacheEntry& ce = (*i).second; + const CacheEntry& ce = (*i).second; CacheEntryType t = ce.Type; if(!ce.Initialized) { @@ -641,7 +641,7 @@ void cmCacheManager::OutputHelpString(std::ostream& fout, std::string::size_type pos = 0; for (std::string::size_type i=0; i<=end; i++) { - if ((i==end) + if ((i==end) || (helpString[i]=='\n') || ((i-pos >= 60) && (helpString[i]==' '))) { @@ -700,12 +700,12 @@ void cmCacheManager::PrintCache(std::ostream& out) const { out << "=================================================" << std::endl; out << "CMakeCache Contents:" << std::endl; - for(std::map::const_iterator i = + for(std::map::const_iterator i = this->Cache.begin(); i != this->Cache.end(); ++i) { if((*i).second.Type != INTERNAL) { - out << (*i).first.c_str() << " = " << (*i).second.Value.c_str() + out << (*i).first.c_str() << " = " << (*i).second.Value.c_str() << std::endl; } } @@ -768,7 +768,7 @@ bool cmCacheManager::CacheIterator::IsAtEnd() const void cmCacheManager::CacheIterator::Begin() { - this->Position = this->Container.Cache.begin(); + this->Position = this->Container.Cache.begin(); } bool cmCacheManager::CacheIterator::Find(const char* key) @@ -781,7 +781,7 @@ void cmCacheManager::CacheIterator::Next() { if (!this->IsAtEnd()) { - ++this->Position; + ++this->Position; } } diff --git a/Source/cmCacheManager.h b/Source/cmCacheManager.h index 9c94d214c5f..4a5ee450fb8 100644 --- a/Source/cmCacheManager.h +++ b/Source/cmCacheManager.h @@ -22,7 +22,7 @@ class cmake; * \brief Control class for cmake's cache * * Load and Save CMake cache files. - * + * */ class cmCacheManager { @@ -30,7 +30,7 @@ class cmCacheManager cmCacheManager(cmake* cm); class CacheIterator; friend class cmCacheManager::CacheIterator; - enum CacheEntryType{ BOOL=0, PATH, FILEPATH, STRING, INTERNAL,STATIC, + enum CacheEntryType{ BOOL=0, PATH, FILEPATH, STRING, INTERNAL,STATIC, UNINITIALIZED }; private: @@ -57,7 +57,7 @@ class cmCacheManager bool IsAtEnd() const; void Next(); const char *GetName() const { - return this->Position->first.c_str(); } + return this->Position->first.c_str(); } const char* GetProperty(const char*) const ; bool GetPropertyAsBool(const char*) const ; bool PropertyExists(const char*) const; @@ -76,7 +76,7 @@ class cmCacheManager CacheIterator(cmCacheManager &cm) : Container(cm) { this->Begin(); } - CacheIterator(cmCacheManager &cm, const char* key) : Container(cm) + CacheIterator(cmCacheManager &cm, const char* key) : Container(cm) { if ( key ) { @@ -87,30 +87,30 @@ class cmCacheManager CacheEntry const& GetEntry() const { return this->Position->second; } CacheEntry& GetEntry() { return this->Position->second; } }; - + ///! return an iterator to iterate through the cache map - cmCacheManager::CacheIterator NewIterator() + cmCacheManager::CacheIterator NewIterator() { return CacheIterator(*this); - } - + } + /** * Types for the cache entries. These are useful as * hints for a cache editor program. Path should bring - * up a file chooser, BOOL a check box, and STRING a + * up a file chooser, BOOL a check box, and STRING a * text entry box, FILEPATH is a full path to a file which * can be different than just a path input */ static CacheEntryType StringToType(const char*); static const char* TypeToString(CacheEntryType); static bool IsType(const char*); - + ///! Load a cache for given makefile. Loads from ouput home. - bool LoadCache(cmMakefile*); + bool LoadCache(cmMakefile*); ///! Load a cache for given makefile. Loads from path/CMakeCache.txt. bool LoadCache(const char* path); bool LoadCache(const char* path, bool internal); - bool LoadCache(const char* path, bool internal, + bool LoadCache(const char* path, bool internal, std::set& excludes, std::set& includes); @@ -124,19 +124,19 @@ class cmCacheManager ///! Print the cache to a stream void PrintCache(std::ostream&) const; - + ///! Get the iterator for an entry with a given key. cmCacheManager::CacheIterator GetCacheIterator(const char *key=0); - + ///! Remove an entry from the cache void RemoveCacheEntry(const char* key); - + ///! Get the number of entries in the cache int GetSize() { return static_cast(this->Cache.size()); } - + ///! Break up a line like VAR:type="value" into var, type and value - static bool ParseEntry(const char* entry, + static bool ParseEntry(const char* entry, std::string& var, std::string& value, CacheEntryType& type); @@ -154,7 +154,7 @@ class cmCacheManager protected: ///! Add an entry into the cache - void AddCacheEntry(const char* key, const char* value, + void AddCacheEntry(const char* key, const char* value, const char* helpString, CacheEntryType type); ///! Get a cache entry object for a key diff --git a/Source/cmCommand.h b/Source/cmCommand.h index 4faaee3ac7e..49f451b581d 100644 --- a/Source/cmCommand.h +++ b/Source/cmCommand.h @@ -23,8 +23,8 @@ * cmCommand is the base class for all commands in CMake. A command * manifests as an entry in CMakeLists.txt and produces one or * more makefile rules. Commands are associated with a particular - * makefile. This base class cmCommand defines the API for commands - * to support such features as enable/disable, inheritance, + * makefile. This base class cmCommand defines the API for commands + * to support such features as enable/disable, inheritance, * documentation, and construction. */ class cmCommand : public cmObject @@ -35,18 +35,18 @@ class cmCommand : public cmObject /** * Construct the command. By default it is enabled with no makefile. */ - cmCommand() + cmCommand() {this->Makefile = 0; this->Enabled = true;} /** * Need virtual destructor to destroy real command type. */ virtual ~cmCommand() {} - + /** * Specify the makefile. */ - void SetMakefile(cmMakefile*m) + void SetMakefile(cmMakefile*m) {this->Makefile = m; } cmMakefile* GetMakefile() { return this->Makefile; } @@ -87,12 +87,12 @@ class cmCommand : public cmObject * Does this command have a final pass? Query after InitialPass. */ virtual bool HasFinalPass() const { return false; } - + /** * This is a virtual constructor for the command. */ virtual cmCommand* Clone() = 0; - + /** * This determines if the command is invoked when in script mode. */ @@ -139,13 +139,13 @@ class cmCommand : public cmObject /** * Enable the command. */ - void EnabledOn() + void EnabledOn() {this->Enabled = true;} /** * Disable the command. */ - void EnabledOff() + void EnabledOff() {this->Enabled = false;} /** @@ -157,13 +157,13 @@ class cmCommand : public cmObject /** * Disable or enable the command. */ - void SetEnabled(bool enabled) + void SetEnabled(bool enabled) {this->Enabled = enabled;} /** * Return the last error string. */ - const char* GetError() + const char* GetError() { if(this->Error.length() == 0) { diff --git a/Source/cmCommandArgumentLexer.h b/Source/cmCommandArgumentLexer.h index 828122b9fdd..2ea3fa29fb7 100644 --- a/Source/cmCommandArgumentLexer.h +++ b/Source/cmCommandArgumentLexer.h @@ -45,7 +45,7 @@ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 @@ -62,7 +62,7 @@ typedef uint32_t flex_uint32_t; typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; @@ -192,7 +192,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ diff --git a/Source/cmCommandArgumentLexer.in.l b/Source/cmCommandArgumentLexer.in.l index d10e50d9705..fdca61bfaf2 100644 --- a/Source/cmCommandArgumentLexer.in.l +++ b/Source/cmCommandArgumentLexer.in.l @@ -66,43 +66,43 @@ Modify cmCommandArgumentLexer.h: return cal_ENVCURLY; } -\$[A-Za-z0-9/_.+-]+\{ { +\$[A-Za-z0-9/_.+-]+\{ { //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; - yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2); - return cal_NCURLY; -} + yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2); + return cal_NCURLY; +} -@[A-Za-z0-9/_.+-]+@ { +@[A-Za-z0-9/_.+-]+@ { //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; - yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2); - return cal_ATNAME; -} + yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2); + return cal_ATNAME; +} "${" { //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; - //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); yylvalp->str = yyextra->DCURLYVariable; return cal_DCURLY; } "}" { //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; - //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); yylvalp->str = yyextra->RCURLYVariable; return cal_RCURLY; } "@" { //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; - //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); yylvalp->str = yyextra->ATVariable; return cal_AT; } -[A-Za-z0-9/_.+-]+ { +[A-Za-z0-9/_.+-]+ { //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; - yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); - return cal_NAME; + yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + return cal_NAME; } \\. { @@ -110,31 +110,31 @@ Modify cmCommandArgumentLexer.h: { return cal_ERROR; } - return cal_SYMBOL; + return cal_SYMBOL; } -[^\${}\\@]+ { +[^\${}\\@]+ { //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; - yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); - return cal_SYMBOL; + yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + return cal_SYMBOL; } "$" { - //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); yylvalp->str = yyextra->DOLLARVariable; - return cal_DOLLAR; + return cal_DOLLAR; } "{" { - //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); yylvalp->str = yyextra->LCURLYVariable; - return cal_LCURLY; + return cal_LCURLY; } "\\" { - //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); yylvalp->str = yyextra->BSLASHVariable; - return cal_BSLASH; + return cal_BSLASH; } "\\" { diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx index a781767e30c..2f26b0cd449 100644 --- a/Source/cmCommandArgumentParserHelper.cxx +++ b/Source/cmCommandArgumentParserHelper.cxx @@ -61,7 +61,7 @@ char* cmCommandArgumentParserHelper::AddString(const char* str) return stVal; } -char* cmCommandArgumentParserHelper::ExpandSpecialVariable(const char* key, +char* cmCommandArgumentParserHelper::ExpandSpecialVariable(const char* key, const char* var) { if ( !key ) @@ -163,7 +163,7 @@ char* cmCommandArgumentParserHelper::ExpandVariableForAt(const char* var) // try to expand the variable char* ret = this->ExpandVariable(var); // if the return was 0 and we want to replace empty strings - // then return an empty string + // then return an empty string if(!ret && this->RemoveEmpty) { return this->AddString(ret); @@ -175,7 +175,7 @@ char* cmCommandArgumentParserHelper::ExpandVariableForAt(const char* var) } } // at this point we want to put it back because of one of these cases: - // - this->ReplaceAtSyntax is false + // - this->ReplaceAtSyntax is false // - this->ReplaceAtSyntax is true, but this->RemoveEmpty is false, // and the variable was not defined std::string ref = "@"; @@ -274,7 +274,7 @@ int cmCommandArgumentParserHelper::ParseString(const char* str, int verb) this->InputBuffer = str; this->InputBufferPos = 0; this->CurrentLine = 0; - + this->Result = ""; yyscan_t yyscanner; @@ -292,7 +292,7 @@ int cmCommandArgumentParserHelper::ParseString(const char* str, int verb) if ( Verbose ) { - std::cerr << "Expanding [" << str << "] produced: [" + std::cerr << "Expanding [" << str << "] produced: [" << this->Result.c_str() << "]" << std::endl; } return 1; diff --git a/Source/cmCommandArgumentParserHelper.h b/Source/cmCommandArgumentParserHelper.h index cdb832b5f40..f8c672fef08 100644 --- a/Source/cmCommandArgumentParserHelper.h +++ b/Source/cmCommandArgumentParserHelper.h @@ -66,8 +66,8 @@ class cmCommandArgumentParserHelper void SetNoEscapeMode(bool b) { this->NoEscapeMode = b; } void SetReplaceAtSyntax(bool b) { this->ReplaceAtSyntax = b; } void SetRemoveEmpty(bool b) { this->RemoveEmpty = b; } - - const char* GetError() { return this->ErrorString.c_str(); } + + const char* GetError() { return this->ErrorString.c_str(); } char EmptyVariable[1]; char DCURLYVariable[3]; char RCURLYVariable[3]; @@ -102,7 +102,7 @@ class cmCommandArgumentParserHelper std::string ErrorString; bool NoEscapeMode; bool ReplaceAtSyntax; - bool RemoveEmpty; + bool RemoveEmpty; }; #endif diff --git a/Source/cmCommandArgumentsHelper.cxx b/Source/cmCommandArgumentsHelper.cxx index d92013788a1..1d5fc079069 100644 --- a/Source/cmCommandArgumentsHelper.cxx +++ b/Source/cmCommandArgumentsHelper.cxx @@ -12,20 +12,20 @@ #include "cmCommandArgumentsHelper.h" -cmCommandArgument::cmCommandArgument(cmCommandArgumentsHelper* args, - const char* key, +cmCommandArgument::cmCommandArgument(cmCommandArgumentsHelper* args, + const char* key, cmCommandArgumentGroup* group) :Key(key) ,Group(group) ,WasActive(false) ,ArgumentsBeforeEmpty(true) -,CurrentIndex(0) +,CurrentIndex(0) { if (args!=0) { args->AddArgument(this); } - + if (this->Group!=0) { this->Group->ContainedArguments.push_back(this); @@ -50,7 +50,7 @@ void cmCommandArgument::FollowsGroup(const cmCommandArgumentGroup* group) if (group!=0) { this->ArgumentsBeforeEmpty = false; - for(std::vector::const_iterator + for(std::vector::const_iterator argIt= group->ContainedArguments.begin(); argIt != group->ContainedArguments.end(); ++argIt) @@ -67,7 +67,7 @@ bool cmCommandArgument::MayFollow(const cmCommandArgument* current) const return true; } - std::set::const_iterator argIt + std::set::const_iterator argIt = this->ArgumentsBefore.find(current); if (argIt != this->ArgumentsBefore.end()) { @@ -90,7 +90,7 @@ void cmCommandArgument::ApplyOwnGroup() { if (this->Group!=0) { - for (std::vector::const_iterator + for (std::vector::const_iterator it = this->Group->ContainedArguments.begin(); it != this->Group->ContainedArguments.end(); ++it) @@ -105,7 +105,7 @@ void cmCommandArgument::ApplyOwnGroup() void cmCommandArgument::Activate() { - this->WasActive = true; + this->WasActive = true; this->CurrentIndex = 0; } @@ -117,8 +117,8 @@ bool cmCommandArgument::Consume(const std::string& arg) } -cmCAStringVector::cmCAStringVector(cmCommandArgumentsHelper* args, - const char* key, +cmCAStringVector::cmCAStringVector(cmCommandArgumentsHelper* args, + const char* key, cmCommandArgumentGroup* group) :cmCommandArgument(args, key, group) ,Ignore(0) @@ -151,8 +151,8 @@ void cmCAStringVector::DoReset() this->Vector.clear(); } -cmCAString::cmCAString(cmCommandArgumentsHelper* args, - const char* key, +cmCAString::cmCAString(cmCommandArgumentsHelper* args, + const char* key, cmCommandArgumentGroup* group) :cmCommandArgument(args, key, group) { @@ -181,11 +181,11 @@ void cmCAString::DoReset() this->String = ""; } -cmCAEnabler::cmCAEnabler(cmCommandArgumentsHelper* args, - const char* key, +cmCAEnabler::cmCAEnabler(cmCommandArgumentsHelper* args, + const char* key, cmCommandArgumentGroup* group) :cmCommandArgument(args, key, group) -,Enabled(false) +,Enabled(false) {} bool cmCAEnabler::DoConsume(const std::string&, unsigned int index) @@ -202,11 +202,11 @@ void cmCAEnabler::DoReset() this->Enabled = false; } -cmCADisabler::cmCADisabler(cmCommandArgumentsHelper* args, - const char* key, +cmCADisabler::cmCADisabler(cmCommandArgumentsHelper* args, + const char* key, cmCommandArgumentGroup* group) :cmCommandArgument(args, key, group) -,Enabled(true) +,Enabled(true) {} bool cmCADisabler::DoConsume(const std::string&, unsigned int index) @@ -225,7 +225,7 @@ void cmCADisabler::DoReset() void cmCommandArgumentGroup::Follows(const cmCommandArgument* arg) { - for(std::vector::iterator + for(std::vector::iterator it = this->ContainedArguments.begin(); it != this->ContainedArguments.end(); ++it) @@ -236,7 +236,7 @@ void cmCommandArgumentGroup::Follows(const cmCommandArgument* arg) void cmCommandArgumentGroup::FollowsGroup(const cmCommandArgumentGroup* group) { - for(std::vector::iterator + for(std::vector::iterator it = this->ContainedArguments.begin(); it != this->ContainedArguments.end(); ++it) @@ -245,7 +245,7 @@ void cmCommandArgumentGroup::FollowsGroup(const cmCommandArgumentGroup* group) } } -void cmCommandArgumentsHelper::Parse(const std::vector* args, +void cmCommandArgumentsHelper::Parse(const std::vector* args, std::vector* unconsumedArgs) { if(args==0) @@ -253,7 +253,7 @@ void cmCommandArgumentsHelper::Parse(const std::vector* args, return; } - for(std::vector::iterator + for(std::vector::iterator argIt = this->Arguments.begin(); argIt != this->Arguments.end(); ++argIt) @@ -268,7 +268,7 @@ void cmCommandArgumentsHelper::Parse(const std::vector* args, it != args->end(); ++it) { - for(std::vector::iterator + for(std::vector::iterator argIt = this->Arguments.begin(); argIt != this->Arguments.end(); ++argIt) diff --git a/Source/cmCommandArgumentsHelper.h b/Source/cmCommandArgumentsHelper.h index 3b0b058fd55..f732f8f1d3d 100644 --- a/Source/cmCommandArgumentsHelper.h +++ b/Source/cmCommandArgumentsHelper.h @@ -18,7 +18,7 @@ class cmCommandArgumentsHelper; class cmCommandArgumentGroup; /* cmCommandArgumentsHelper, cmCommandArgumentGroup and cmCommandArgument (i.e. -its derived classes cmCAXXX can be used to simplify the processing of +its derived classes cmCAXXX can be used to simplify the processing of arguments to cmake commands. Maybe they can also be used to generate documentation. @@ -26,11 +26,11 @@ For every argument supported by a command one cmCommandArgument is created and added to cmCommandArgumentsHelper. cmCommand has a cmCommandArgumentsHelper as member variable so this should be used. -The order of the arguments is defined using the Follows(arg) method. It says +The order of the arguments is defined using the Follows(arg) method. It says that this argument follows immediateley the given argument. It can be used with multiple arguments if the argument can follow after different arguments. -Arguments can be arranged in groups using cmCommandArgumentGroup. Every +Arguments can be arranged in groups using cmCommandArgumentGroup. Every member of a group can follow any other member of the group. These groups can also be used to define the order. @@ -42,8 +42,8 @@ For an example see cmExportCommand.cxx. class cmCommandArgument { public: - cmCommandArgument(cmCommandArgumentsHelper* args, - const char* key, + cmCommandArgument(cmCommandArgumentsHelper* args, + const char* key, cmCommandArgumentGroup* group=0); virtual ~cmCommandArgument() {} @@ -56,8 +56,8 @@ class cmCommandArgument /// Returns true if the argument was found in the argument list bool WasFound() const {return this->WasActive;} - // The following methods are only called from - // cmCommandArgumentsHelper::Parse(), but making this a friend would + // The following methods are only called from + // cmCommandArgumentsHelper::Parse(), but making this a friend would // give it access to everything /// Make the current argument the currently active argument @@ -89,19 +89,19 @@ class cmCommandArgument virtual void DoReset() = 0; }; -/** cmCAStringVector is to be used for arguments which can consist of more +/** cmCAStringVector is to be used for arguments which can consist of more than one string, e.g. the FILES argument in INSTALL(FILES f1 f2 f3 ...). */ class cmCAStringVector : public cmCommandArgument { public: - cmCAStringVector(cmCommandArgumentsHelper* args, - const char* key, + cmCAStringVector(cmCommandArgumentsHelper* args, + const char* key, cmCommandArgumentGroup* group=0); /// Return the vector of strings const std::vector& GetVector() const {return this->Vector;} - /** Is there a keyword which should be skipped in + /** Is there a keyword which should be skipped in the arguments (e.g. ARGS for ADD_CUSTOM_COMMAND) ? */ void SetIgnore(const char* ignore) {this->Ignore=ignore;} private: @@ -118,8 +118,8 @@ e.g. the executable name in ADD_EXECUTABLE(). */ class cmCAString : public cmCommandArgument { public: - cmCAString(cmCommandArgumentsHelper* args, - const char* key, + cmCAString(cmCommandArgumentsHelper* args, + const char* key, cmCommandArgumentGroup* group=0); /// Return the string @@ -138,8 +138,8 @@ enabled using a special argument, e.g. EXCLUDE_FROM_ALL in ADD_EXECUTABLE(). */ class cmCAEnabler : public cmCommandArgument { public: - cmCAEnabler(cmCommandArgumentsHelper* args, - const char* key, + cmCAEnabler(cmCommandArgumentsHelper* args, + const char* key, cmCommandArgumentGroup* group=0); /// Has it been enabled ? @@ -156,8 +156,8 @@ disabled using a special argument.*/ class cmCADisabler : public cmCommandArgument { public: - cmCADisabler(cmCommandArgumentsHelper* args, - const char* key, + cmCADisabler(cmCommandArgumentsHelper* args, + const char* key, cmCommandArgumentGroup* group=0); /// Is it still enabled ? @@ -170,7 +170,7 @@ class cmCADisabler : public cmCommandArgument }; -/** Group of arguments, needed for ordering. E.g. WIN32, EXCLUDE_FROM_ALL and +/** Group of arguments, needed for ordering. E.g. WIN32, EXCLUDE_FROM_ALL and MACSOX_BUNDLE from ADD_EXECUTABLE() are a group. */ class cmCommandArgumentGroup @@ -192,7 +192,7 @@ class cmCommandArgumentsHelper { public: /// Parse the argument list - void Parse(const std::vector* args, + void Parse(const std::vector* args, std::vector* unconsumedArgs); /// Add an argument. void AddArgument(cmCommandArgument* arg); diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index df78bf88658..cd3ef59a94a 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -1214,7 +1214,7 @@ void cmComputeLinkInformation::AddUserItem(std::string const& item, { // if this is a -l option then we might need to warn about // CMP0003 so put it in OldUserFlagItems, if it is not a -l - // or -Wl,-l (-framework -pthread), then allow it without a + // or -Wl,-l (-framework -pthread), then allow it without a // CMP0003 as -L will not affect those other linker flags if(item.find("-l") == 0 || item.find("-Wl,-l") == 0) { diff --git a/Source/cmConfigureFileCommand.cxx b/Source/cmConfigureFileCommand.cxx index ea98326e28e..e52ddef35af 100644 --- a/Source/cmConfigureFileCommand.cxx +++ b/Source/cmConfigureFileCommand.cxx @@ -104,7 +104,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) this->Immediate = true; } } - + // If we were told to copy the file immediately, then do it on the // first pass (now). if(this->Immediate) @@ -115,7 +115,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) return false; } } - + return true; } diff --git a/Source/cmConfigureFileCommand.h b/Source/cmConfigureFileCommand.h index de497a9526b..347174a9ea8 100644 --- a/Source/cmConfigureFileCommand.h +++ b/Source/cmConfigureFileCommand.h @@ -19,7 +19,7 @@ class cmConfigureFileCommand : public cmCommand public: cmTypeMacro(cmConfigureFileCommand, cmCommand); - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmConfigureFileCommand; } @@ -48,7 +48,7 @@ class cmConfigureFileCommand : public cmCommand { return "Copy a file to another location and modify its contents."; } - + /** * Longer documentation. */ @@ -93,7 +93,7 @@ class cmConfigureFileCommand : public cmCommand private: int ConfigureFile(); - + cmNewLineStyle NewLineStyle; std::string InputFile; diff --git a/Source/cmCreateTestSourceList.h b/Source/cmCreateTestSourceList.h index 806e5a909af..3aa0a79cff3 100644 --- a/Source/cmCreateTestSourceList.h +++ b/Source/cmCreateTestSourceList.h @@ -15,7 +15,7 @@ #include "cmCommand.h" /** \class cmCreateTestSourceList - * \brief + * \brief * */ @@ -25,7 +25,7 @@ class cmCreateTestSourceList : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmCreateTestSourceList; } @@ -41,7 +41,7 @@ class cmCreateTestSourceList : public cmCommand * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() const {return "create_test_sourcelist";} - + /** * Succinct documentation. */ @@ -49,7 +49,7 @@ class cmCreateTestSourceList : public cmCommand { return "Create a test driver and source list for building test programs."; } - + /** * More documentation. */ @@ -81,7 +81,7 @@ class cmCreateTestSourceList : public cmCommand "CMAKE_TESTDRIVER_AFTER_TESTMAIN can be set to have code that will be " "placed directly after the call to the test main function."; } - + cmTypeMacro(cmCreateTestSourceList, cmCommand); }; diff --git a/Source/cmDefinePropertyCommand.h b/Source/cmDefinePropertyCommand.h index 55ef52137e9..b5175d50bf2 100644 --- a/Source/cmDefinePropertyCommand.h +++ b/Source/cmDefinePropertyCommand.h @@ -17,7 +17,7 @@ class cmDefinePropertyCommand : public cmCommand { public: - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmDefinePropertyCommand; } @@ -41,7 +41,7 @@ class cmDefinePropertyCommand : public cmCommand { return "Define and document custom properties."; } - + /** * Longer documentation. */ @@ -80,7 +80,7 @@ class cmDefinePropertyCommand : public cmCommand "Corresponding options to the get_property command will retrieve the " "documentation."; } - + cmTypeMacro(cmDefinePropertyCommand, cmCommand); private: std::string PropertyName; diff --git a/Source/cmDepends.cxx b/Source/cmDepends.cxx index 9296d4cca65..545fe97e816 100644 --- a/Source/cmDepends.cxx +++ b/Source/cmDepends.cxx @@ -154,7 +154,7 @@ bool cmDepends::CheckDependencies(std::istream& internalDepends, while(internalDepends.getline(this->Dependee, this->MaxPath)) { - if ( this->Dependee[0] == 0 || this->Dependee[0] == '#' || + if ( this->Dependee[0] == 0 || this->Dependee[0] == '#' || this->Dependee[0] == '\r' ) { continue; diff --git a/Source/cmDepends.h b/Source/cmDepends.h index 087da6400f6..100e187b441 100644 --- a/Source/cmDepends.h +++ b/Source/cmDepends.h @@ -30,7 +30,7 @@ class cmDepends /** Instances need to know the build directory name and the relative path from the build directory to the target file. */ cmDepends(cmLocalGenerator* lg=0, const char* targetDir=""); - + /** at what level will the compile be done from */ void SetCompileDirectory(const char *dir) {this->CompileDirectory = dir;}; @@ -48,7 +48,7 @@ class cmDepends /** should this be verbose in its output */ void SetVerbose(bool verb) { this->Verbose = verb; } - + /** Virtual destructor to cleanup subclasses properly. */ virtual ~cmDepends(); @@ -69,7 +69,7 @@ class cmDepends void Clear(const char *file); /** Set the file comparison object */ - void SetFileComparison(cmFileTimeComparison* fc) { + void SetFileComparison(cmFileTimeComparison* fc) { this->FileComparison = fc; } protected: diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index c1b60905da4..3e660587d62 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -889,7 +889,7 @@ bool cmDependsFortran::FindIncludeFile(const char* dir, } // Search the include path for the file. - for(std::vector::const_iterator i = + for(std::vector::const_iterator i = this->IncludePath.begin(); i != this->IncludePath.end(); ++i) { fullName = *i; diff --git a/Source/cmDependsJavaLexer.h b/Source/cmDependsJavaLexer.h index 09c19bfff87..61aa66de2b6 100644 --- a/Source/cmDependsJavaLexer.h +++ b/Source/cmDependsJavaLexer.h @@ -58,7 +58,7 @@ typedef uint32_t flex_uint32_t; typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; #endif /* ! C99 */ @@ -188,7 +188,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ diff --git a/Source/cmDependsJavaLexer.in.l b/Source/cmDependsJavaLexer.in.l index aae7ec658db..9796ad52a4a 100644 --- a/Source/cmDependsJavaLexer.in.l +++ b/Source/cmDependsJavaLexer.in.l @@ -171,18 +171,18 @@ null { PRIMITIVE; return jp_NULLLITERAL; } "\*" { SYMBOL; return jp_TIMES; } "\*=" { SYMBOL; return jp_TIMESEQUALS; } -[a-z_A-Z][a-z_0-9A-Z]* { - yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); - return jp_NAME; +[a-z_A-Z][a-z_0-9A-Z]* { + yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + return jp_NAME; } \/\/.*\n { } [ \f\t\n\r] { } -. { - std::cerr << "Unknown character: " << yytext[0] - << " (" << (int)yytext[0] << ")" << std::endl; - yyextra->Error("Unknown character"); - return jp_ERROR; +. { + std::cerr << "Unknown character: " << yytext[0] + << " (" << (int)yytext[0] << ")" << std::endl; + yyextra->Error("Unknown character"); + return jp_ERROR; } %% diff --git a/Source/cmDependsJavaParserHelper.cxx b/Source/cmDependsJavaParserHelper.cxx index 7b595cc1fed..6136baa84fe 100644 --- a/Source/cmDependsJavaParserHelper.cxx +++ b/Source/cmDependsJavaParserHelper.cxx @@ -35,7 +35,7 @@ cmDependsJavaParserHelper::~cmDependsJavaParserHelper() } void cmDependsJavaParserHelper::CurrentClass -::AddFileNamesForPrinting(std::vector *files, +::AddFileNamesForPrinting(std::vector *files, const char* prefix, const char* sep) { cmStdString rname = ""; @@ -103,7 +103,7 @@ void cmDependsJavaParserHelper::AddPackagesImport(const char* sclass) this->PackagesImport.push_back(sclass); } -void cmDependsJavaParserHelper::SafePrintMissing(const char* str, +void cmDependsJavaParserHelper::SafePrintMissing(const char* str, int line, int cnt) { if ( str ) @@ -134,7 +134,7 @@ void cmDependsJavaParserHelper::Print(const char* place, const char* str) } } -void cmDependsJavaParserHelper::CombineUnions(char** out, +void cmDependsJavaParserHelper::CombineUnions(char** out, const char* in1, char** in2, const char* sep) { @@ -193,7 +193,7 @@ ::PrepareElement(cmDependsJavaParserHelper::ParserType* me) } void cmDependsJavaParserHelper -::AllocateParserType(cmDependsJavaParserHelper::ParserType* pt, +::AllocateParserType(cmDependsJavaParserHelper::ParserType* pt, const char* str, int len) { pt->str = 0; @@ -270,7 +270,7 @@ std::vector cmDependsJavaParserHelper::GetFilesProduced() std::vector files; CurrentClass* toplevel = &(*(this->ClassStack.begin())); std::vector::iterator it; - for ( it = toplevel->NestedClasses->begin(); + for ( it = toplevel->NestedClasses->begin(); it != toplevel->NestedClasses->end(); ++ it ) { @@ -289,7 +289,7 @@ int cmDependsJavaParserHelper::ParseString(const char* str, int verb) this->InputBuffer = str; this->InputBufferPos = 0; this->CurrentLine = 0; - + yyscan_t yyscanner; cmDependsJava_yylex_init(&yyscanner); @@ -306,7 +306,7 @@ int cmDependsJavaParserHelper::ParseString(const char* str, int verb) { if ( this->CurrentPackage.size() > 0 ) { - std::cout << "Current package is: " << + std::cout << "Current package is: " << this->CurrentPackage.c_str() << std::endl; } std::cout << "Imports packages:"; @@ -337,7 +337,7 @@ int cmDependsJavaParserHelper::ParseString(const char* str, int verb) this->PrintClasses(); if ( this->UnionsAvailable != 0 ) { - std::cout << "There are still " << + std::cout << "There are still " << this->UnionsAvailable << " unions available" << std::endl; } } @@ -348,13 +348,13 @@ int cmDependsJavaParserHelper::ParseString(const char* str, int verb) void cmDependsJavaParserHelper::CleanupParser() { std::vector::iterator it; - for ( it = this->Allocates.begin(); + for ( it = this->Allocates.begin(); it != this->Allocates.end(); ++ it ) { delete [] *it; } - this->Allocates.erase(this->Allocates.begin(), + this->Allocates.erase(this->Allocates.begin(), this->Allocates.end()); } @@ -382,11 +382,11 @@ int cmDependsJavaParserHelper::LexInput(char* buf, int maxlen) void cmDependsJavaParserHelper::Error(const char* str) { unsigned long pos = static_cast(this->InputBufferPos); - fprintf(stderr, "JPError: %s (%lu / Line: %d)\n", + fprintf(stderr, "JPError: %s (%lu / Line: %d)\n", str, pos, this->CurrentLine); int cc; std::cerr << "String: ["; - for ( cc = 0; + for ( cc = 0; cc < 30 && *(this->InputBuffer.c_str() + this->InputBufferPos + cc); cc ++ ) { @@ -395,7 +395,7 @@ void cmDependsJavaParserHelper::Error(const char* str) std::cerr << "]" << std::endl; } -void cmDependsJavaParserHelper::UpdateCombine(const char* str1, +void cmDependsJavaParserHelper::UpdateCombine(const char* str1, const char* str2) { if ( this->CurrentCombine == "" && str1 != 0) diff --git a/Source/cmDependsJavaParserHelper.h b/Source/cmDependsJavaParserHelper.h index baecab37855..9807a048c47 100644 --- a/Source/cmDependsJavaParserHelper.h +++ b/Source/cmDependsJavaParserHelper.h @@ -9,7 +9,7 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#ifndef cmDependsJavaParserHelper_h +#ifndef cmDependsJavaParserHelper_h #define cmDependsJavaParserHelper_h #include "cmStandardIncludes.h" @@ -39,7 +39,7 @@ class cmDependsJavaParserHelper int ParseFile(const char* file); // For the lexer: - void AllocateParserType(cmDependsJavaParserHelper::ParserType* pt, + void AllocateParserType(cmDependsJavaParserHelper::ParserType* pt, const char* str, int len = 0); int LexInput(char* buf, int maxlen); @@ -69,7 +69,7 @@ class cmDependsJavaParserHelper public: cmStdString Name; std::vector* NestedClasses; - CurrentClass() + CurrentClass() { this->NestedClasses = new std::vector; } @@ -77,7 +77,7 @@ class cmDependsJavaParserHelper { delete this->NestedClasses; } - CurrentClass& operator=(CurrentClass const& c) + CurrentClass& operator=(CurrentClass const& c) { this->NestedClasses->clear(); this->Name = c.Name; @@ -93,7 +93,7 @@ class cmDependsJavaParserHelper { (*this) = c; } - void AddFileNamesForPrinting(std::vector *files, + void AddFileNamesForPrinting(std::vector *files, const char* prefix, const char* sep); }; cmStdString CurrentPackage; @@ -117,7 +117,7 @@ class cmDependsJavaParserHelper void PrintClasses(); void Print(const char* place, const char* str); - void CombineUnions(char** out, const char* in1, char** in2, + void CombineUnions(char** out, const char* in1, char** in2, const char* sep); void SafePrintMissing(const char* str, int line, int cnt); diff --git a/Source/cmDocumentationFormatter.cxx b/Source/cmDocumentationFormatter.cxx index 6762d6677f7..9f01949b94a 100644 --- a/Source/cmDocumentationFormatter.cxx +++ b/Source/cmDocumentationFormatter.cxx @@ -19,7 +19,7 @@ cmDocumentationFormatter::~cmDocumentationFormatter() { } -void cmDocumentationFormatter::PrintFormatted(std::ostream& os, +void cmDocumentationFormatter::PrintFormatted(std::ostream& os, const char* text) { if(!text) diff --git a/Source/cmDocumentationFormatterDocbook.cxx b/Source/cmDocumentationFormatterDocbook.cxx index 30873306d1d..eabdbc128ab 100644 --- a/Source/cmDocumentationFormatterDocbook.cxx +++ b/Source/cmDocumentationFormatterDocbook.cxx @@ -34,7 +34,7 @@ static void cmDocumentationPrintDocbookChar(std::ostream& os, char c) case '<': os << "<"; break; - case '>': + case '>': os << ">"; break; case '&': @@ -126,13 +126,13 @@ ::PrintSection(std::ostream& os, std::string prefix = this->ComputeSectionLinkPrefix(name); - const std::vector &entries = + const std::vector &entries = section.GetEntries(); if (!entries.empty()) { os << "\n"; - for(std::vector::const_iterator op + for(std::vector::const_iterator op = entries.begin(); op != entries.end(); ++ op ) { if(op->Name.size()) @@ -147,7 +147,7 @@ ::PrintSection(std::ostream& os, os << "\n" ; } - for(std::vector::const_iterator op = entries.begin(); + for(std::vector::const_iterator op = entries.begin(); op != entries.end();) { if(op->Name.size()) @@ -160,8 +160,8 @@ ::PrintSection(std::ostream& os, cmDocumentationPrintDocbookEscapes(os, op->Name.c_str()); // make sure that each id exists only once. Since it seems - // not easily possible to determine which link refers to which id, - // we have at least to make sure that the duplicated id's get a + // not easily possible to determine which link refers to which id, + // we have at least to make sure that the duplicated id's get a // different name (by appending an increasing number), Alex std::string id = prefix; id += "_"; @@ -191,7 +191,7 @@ ::PrintSection(std::ostream& os, if(op->Full.size()) { // a line break seems to be simply a line break with docbook - os << "\n "; + os << "\n "; this->PrintFormatted(os, op->Full.c_str()); } os << "\n"; @@ -210,7 +210,7 @@ ::PrintSection(std::ostream& os, } } -void cmDocumentationFormatterDocbook::PrintPreformatted(std::ostream& os, +void cmDocumentationFormatterDocbook::PrintPreformatted(std::ostream& os, const char* text) { os << ""; @@ -218,7 +218,7 @@ void cmDocumentationFormatterDocbook::PrintPreformatted(std::ostream& os, os << "\n "; } -void cmDocumentationFormatterDocbook::PrintParagraph(std::ostream& os, +void cmDocumentationFormatterDocbook::PrintParagraph(std::ostream& os, const char* text) { os << ""; @@ -232,7 +232,7 @@ void cmDocumentationFormatterDocbook::PrintHeader(const char* docname, std::ostream& os) { // this one is used to ensure that we don't create multiple link targets - // with the same name. We can clear it here since we are at the + // with the same name. We can clear it here since we are at the // start of a document here. this->EmittedLinkIds.clear(); diff --git a/Source/cmDocumentationFormatterHTML.cxx b/Source/cmDocumentationFormatterHTML.cxx index cd0077ed92c..7213b43de76 100644 --- a/Source/cmDocumentationFormatterHTML.cxx +++ b/Source/cmDocumentationFormatterHTML.cxx @@ -29,7 +29,7 @@ static void cmDocumentationPrintHTMLChar(std::ostream& os, char c) // Use an escape sequence if necessary. switch (c) { - case '<': + case '<': os << "<"; break; case '>': @@ -114,7 +114,7 @@ ::PrintSection(std::ostream& os, { std::string prefix = this->ComputeSectionLinkPrefix(name); - const std::vector &entries = + const std::vector &entries = section.GetEntries(); // skip the index if the help for only a single item (--help-command, @@ -131,7 +131,7 @@ ::PrintSection(std::ostream& os, } // Is a list needed? - for(std::vector::const_iterator op + for(std::vector::const_iterator op = entries.begin(); op != entries.end(); ++ op ) { if (op->Name.size()) @@ -154,7 +154,7 @@ ::PrintSection(std::ostream& os, } } - for(std::vector::const_iterator op = entries.begin(); + for(std::vector::const_iterator op = entries.begin(); op != entries.end();) { if(op->Name.size()) @@ -191,7 +191,7 @@ ::PrintSection(std::ostream& os, } } -void cmDocumentationFormatterHTML::PrintPreformatted(std::ostream& os, +void cmDocumentationFormatterHTML::PrintPreformatted(std::ostream& os, const char* text) { os << "
";
@@ -199,7 +199,7 @@ void cmDocumentationFormatterHTML::PrintPreformatted(std::ostream& os,
   os << "
\n "; } -void cmDocumentationFormatterHTML::PrintParagraph(std::ostream& os, +void cmDocumentationFormatterHTML::PrintParagraph(std::ostream& os, const char* text) { os << "

"; @@ -229,7 +229,7 @@ void cmDocumentationFormatterHTML::PrintFooter(std::ostream& os) } //---------------------------------------------------------------------------- -void cmDocumentationFormatterHTML::PrintHTMLEscapes(std::ostream& os, +void cmDocumentationFormatterHTML::PrintHTMLEscapes(std::ostream& os, const char* text) { // Hyperlink prefixes. @@ -262,7 +262,7 @@ ::PrintIndex(std::ostream& os, std::vector& sections) { // skip the index if only the help for a single item is printed - if ((sections.size() == 1) + if ((sections.size() == 1) && (sections[0]->GetName(this->GetForm()) != 0 ) && (std::string(sections[0]->GetName(this->GetForm())) == "SingleItem")) { diff --git a/Source/cmDocumentationFormatterHTML.h b/Source/cmDocumentationFormatterHTML.h index 427e04bc5e7..44bf2402611 100644 --- a/Source/cmDocumentationFormatterHTML.h +++ b/Source/cmDocumentationFormatterHTML.h @@ -32,7 +32,7 @@ class cmDocumentationFormatterHTML : public cmDocumentationFormatter const cmDocumentationSection& section, const char* name); virtual void PrintPreformatted(std::ostream& os, const char* text); - virtual void PrintParagraph(std::ostream& os, const char* text); + virtual void PrintParagraph(std::ostream& os, const char* text); virtual void PrintIndex(std::ostream& , std::vector&); private: diff --git a/Source/cmDocumentationFormatterText.cxx b/Source/cmDocumentationFormatterText.cxx index 0b04b73d2cb..5def1947a6c 100644 --- a/Source/cmDocumentationFormatterText.cxx +++ b/Source/cmDocumentationFormatterText.cxx @@ -33,9 +33,9 @@ ::PrintSection(std::ostream& os, os << name << "\n\n"; } - const std::vector &entries = + const std::vector &entries = section.GetEntries(); - for(std::vector::const_iterator op = entries.begin(); + for(std::vector::const_iterator op = entries.begin(); op != entries.end(); ++op) { if(op->Name.size()) @@ -58,7 +58,7 @@ ::PrintSection(std::ostream& os, } } -void cmDocumentationFormatterText::PrintPreformatted(std::ostream& os, +void cmDocumentationFormatterText::PrintPreformatted(std::ostream& os, const char* text) { bool newline = true; @@ -78,7 +78,7 @@ void cmDocumentationFormatterText::PrintPreformatted(std::ostream& os, os << "\n"; } -void cmDocumentationFormatterText::PrintParagraph(std::ostream& os, +void cmDocumentationFormatterText::PrintParagraph(std::ostream& os, const char* text) { os << this->TextIndent; @@ -91,7 +91,7 @@ void cmDocumentationFormatterText::SetIndent(const char* indent) this->TextIndent = indent; } -void cmDocumentationFormatterText::PrintColumn(std::ostream& os, +void cmDocumentationFormatterText::PrintColumn(std::ostream& os, const char* text) { // Print text arranged in an indented column of fixed witdh. @@ -100,14 +100,14 @@ void cmDocumentationFormatterText::PrintColumn(std::ostream& os, bool newSentence = false; bool firstLine = true; int width = this->TextWidth - static_cast(strlen(this->TextIndent)); - + // Loop until the end of the text. while(*l) { // Parse the next word. const char* r = l; while(*r && (*r != '\n') && (*r != ' ')) { ++r; } - + // Does it fit on this line? if(r-l < (width-column-(newSentence?1:0))) { @@ -135,12 +135,12 @@ void cmDocumentationFormatterText::PrintColumn(std::ostream& os, // first line. os << (firstLine?"":this->TextIndent); } - + // Print the word. os.write(l, static_cast(r-l)); newSentence = (*(r-1) == '.'); } - + if(*r == '\n') { // Text provided a newline. Start a new line. @@ -175,6 +175,6 @@ void cmDocumentationFormatterText::PrintColumn(std::ostream& os, // Move to beginning of next word. Skip over whitespace. l = r; - while(*l && (*l == ' ')) { ++l; } + while(*l && (*l == ' ')) { ++l; } } } diff --git a/Source/cmDocumentationFormatterUsage.cxx b/Source/cmDocumentationFormatterUsage.cxx index 8a415cb4d33..a068e5682a7 100644 --- a/Source/cmDocumentationFormatterUsage.cxx +++ b/Source/cmDocumentationFormatterUsage.cxx @@ -28,9 +28,9 @@ ::PrintSection(std::ostream& os, os << name << "\n"; } - const std::vector &entries = + const std::vector &entries = section.GetEntries(); - for(std::vector::const_iterator op = entries.begin(); + for(std::vector::const_iterator op = entries.begin(); op != entries.end(); ++op) { if(op->Name.size()) diff --git a/Source/cmDocumentationSection.h b/Source/cmDocumentationSection.h index 0fab38f81d1..4f8c10d3e3c 100644 --- a/Source/cmDocumentationSection.h +++ b/Source/cmDocumentationSection.h @@ -26,28 +26,28 @@ class cmDocumentationSection /** Create a cmSection, with a special name for man-output mode. */ cmDocumentationSection(const char* name, const char* manName) :Name(name), ManName(manName) {} - + /** Has any content been added to this section or is it empty ? */ bool IsEmpty() const { return this->Entries.empty(); } - + /** Clear contents. */ void Clear() { this->Entries.clear(); } - + /** Return the name of this section for the given output form. */ const char* GetName(cmDocumentationEnums::Form form) const { return (form==cmDocumentationEnums::ManForm ? this->ManName.c_str() : this->Name.c_str()); } - + /** Return a pointer to the first entry of this section. */ const std::vector &GetEntries() const { return this->Entries; } - + /** Append an entry to this section. */ void Append(const cmDocumentationEntry& entry) { this->Entries.push_back(entry); } void Append(const std::vector &entries) { this->Entries.insert(this->Entries.end(),entries.begin(),entries.end()); } - + /** Append an entry to this section using NULL terminated chars */ void Append(const char *[][3]); void Append(const char *n, const char *b, const char *f); @@ -58,7 +58,7 @@ class cmDocumentationSection { this->Entries.insert(this->Entries.begin(), entries.begin(),entries.end()); } - + private: std::string Name; std::string ManName; diff --git a/Source/cmElseCommand.h b/Source/cmElseCommand.h index 5e8b7905800..f2599194335 100644 --- a/Source/cmElseCommand.h +++ b/Source/cmElseCommand.h @@ -25,7 +25,7 @@ class cmElseCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmElseCommand; } @@ -54,7 +54,7 @@ class cmElseCommand : public cmCommand { return "Starts the else portion of an if block."; } - + /** * More documentation. */ @@ -64,7 +64,7 @@ class cmElseCommand : public cmCommand " else(expression)\n" "See the if command."; } - + cmTypeMacro(cmElseCommand, cmCommand); }; diff --git a/Source/cmElseIfCommand.h b/Source/cmElseIfCommand.h index 20cd81aaa0c..46e2bd9f992 100644 --- a/Source/cmElseIfCommand.h +++ b/Source/cmElseIfCommand.h @@ -25,7 +25,7 @@ class cmElseIfCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmElseIfCommand; } @@ -54,7 +54,7 @@ class cmElseIfCommand : public cmCommand { return "Starts the elseif portion of an if block."; } - + /** * More documentation. */ @@ -64,7 +64,7 @@ class cmElseIfCommand : public cmCommand " elseif(expression)\n" "See the if command."; } - + cmTypeMacro(cmElseIfCommand, cmCommand); }; diff --git a/Source/cmEnableLanguageCommand.cxx b/Source/cmEnableLanguageCommand.cxx index f8f36ebbb3e..dcabf6a468e 100644 --- a/Source/cmEnableLanguageCommand.cxx +++ b/Source/cmEnableLanguageCommand.cxx @@ -22,7 +22,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) this->SetError ("called with incorrect number of arguments"); return false; - } + } for (std::vector::const_iterator it = args.begin(); it != args.end(); ++it) diff --git a/Source/cmEnableLanguageCommand.h b/Source/cmEnableLanguageCommand.h index 5958e4481e0..e4bb2517a6a 100644 --- a/Source/cmEnableLanguageCommand.h +++ b/Source/cmEnableLanguageCommand.h @@ -28,7 +28,7 @@ class cmEnableLanguageCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmEnableLanguageCommand; } @@ -39,7 +39,7 @@ class cmEnableLanguageCommand : public cmCommand */ virtual bool InitialPass(std::vector const& args, cmExecutionStatus &status); - + /** * The name of the command as specified in CMakeList.txt. */ @@ -52,7 +52,7 @@ class cmEnableLanguageCommand : public cmCommand { return "Enable a language (CXX/C/Fortran/etc)"; } - + /** * More documentation. */ @@ -67,7 +67,7 @@ class cmEnableLanguageCommand : public cmCommand "If OPTIONAL is used, use the CMAKE__COMPILER_WORKS " "variable to check whether the language has been enabled successfully."; } - + cmTypeMacro(cmEnableLanguageCommand, cmCommand); }; diff --git a/Source/cmEnableTestingCommand.cxx b/Source/cmEnableTestingCommand.cxx index 5abb873bdc9..aa41ef73b9f 100644 --- a/Source/cmEnableTestingCommand.cxx +++ b/Source/cmEnableTestingCommand.cxx @@ -12,7 +12,7 @@ #include "cmEnableTestingCommand.h" #include "cmLocalGenerator.h" -// we do this in the final pass so that we now the subdirs have all +// we do this in the final pass so that we now the subdirs have all // been defined bool cmEnableTestingCommand::InitialPass(std::vector const&, cmExecutionStatus &) diff --git a/Source/cmEnableTestingCommand.h b/Source/cmEnableTestingCommand.h index b607818ce35..9b9e9851bc8 100644 --- a/Source/cmEnableTestingCommand.h +++ b/Source/cmEnableTestingCommand.h @@ -24,7 +24,7 @@ * within the valid control structures are replicated in Testfile * (i.e. SUBDIRS() and ADD_TEST() commands within IF() commands that are * not entered by CMake are not replicated in Testfile). - * Note that CTest expects to find this file in the build directory root; + * Note that CTest expects to find this file in the build directory root; * therefore, this command should be in the source directory root too. */ class cmEnableTestingCommand : public cmCommand @@ -33,7 +33,7 @@ class cmEnableTestingCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmEnableTestingCommand; } @@ -57,7 +57,7 @@ class cmEnableTestingCommand : public cmCommand { return "Enable testing for current directory and below."; } - + /** * More documentation. */ @@ -70,9 +70,9 @@ class cmEnableTestingCommand : public cmCommand "a test file in the build directory root. Therefore, this command " "should be in the source directory root."; } - + cmTypeMacro(cmEnableTestingCommand, cmCommand); - + }; diff --git a/Source/cmEndForEachCommand.cxx b/Source/cmEndForEachCommand.cxx index 2eca4e2921a..7f11ae5f954 100644 --- a/Source/cmEndForEachCommand.cxx +++ b/Source/cmEndForEachCommand.cxx @@ -12,7 +12,7 @@ #include "cmEndForEachCommand.h" bool cmEndForEachCommand -::InvokeInitialPass(std::vector const&, +::InvokeInitialPass(std::vector const&, cmExecutionStatus &) { this->SetError("An ENDFOREACH command was found outside of a proper " diff --git a/Source/cmEndForEachCommand.h b/Source/cmEndForEachCommand.h index 37b2d2a32e8..d5ee8a6aef7 100644 --- a/Source/cmEndForEachCommand.h +++ b/Source/cmEndForEachCommand.h @@ -25,7 +25,7 @@ class cmEndForEachCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmEndForEachCommand; } @@ -36,7 +36,7 @@ class cmEndForEachCommand : public cmCommand */ virtual bool InvokeInitialPass(std::vector const&, cmExecutionStatus &); - + /** * This is called when the command is first encountered in * the CMakeLists.txt file. @@ -61,7 +61,7 @@ class cmEndForEachCommand : public cmCommand { return "Ends a list of commands in a FOREACH block."; } - + /** * More documentation. */ @@ -71,7 +71,7 @@ class cmEndForEachCommand : public cmCommand " endforeach(expression)\n" "See the FOREACH command."; } - + cmTypeMacro(cmEndForEachCommand, cmCommand); }; diff --git a/Source/cmEndFunctionCommand.h b/Source/cmEndFunctionCommand.h index 54ac068f394..d7b74e98b81 100644 --- a/Source/cmEndFunctionCommand.h +++ b/Source/cmEndFunctionCommand.h @@ -25,7 +25,7 @@ class cmEndFunctionCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmEndFunctionCommand; } @@ -36,7 +36,7 @@ class cmEndFunctionCommand : public cmCommand */ virtual bool InvokeInitialPass(std::vector const&, cmExecutionStatus &); - + /** * This is called when the command is first encountered in * the CMakeLists.txt file. @@ -61,7 +61,7 @@ class cmEndFunctionCommand : public cmCommand { return "Ends a list of commands in a function block."; } - + /** * More documentation. */ @@ -71,7 +71,7 @@ class cmEndFunctionCommand : public cmCommand " endfunction(expression)\n" "See the function command."; } - + cmTypeMacro(cmEndFunctionCommand, cmCommand); }; diff --git a/Source/cmEndIfCommand.cxx b/Source/cmEndIfCommand.cxx index e98d4d41504..0ac09de7274 100644 --- a/Source/cmEndIfCommand.cxx +++ b/Source/cmEndIfCommand.cxx @@ -20,7 +20,7 @@ bool cmEndIfCommand::InitialPass(std::vector const&, { return true; } - + this->SetError("An ENDIF command was found outside of a proper " "IF ENDIF structure. Or its arguments did not match " "the opening IF command."); diff --git a/Source/cmEndIfCommand.h b/Source/cmEndIfCommand.h index 81d1b5ff450..5c4b9e36a90 100644 --- a/Source/cmEndIfCommand.h +++ b/Source/cmEndIfCommand.h @@ -25,7 +25,7 @@ class cmEndIfCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmEndIfCommand; } @@ -54,7 +54,7 @@ class cmEndIfCommand : public cmCommand { return "Ends a list of commands in an if block."; } - + /** * More documentation. */ @@ -64,7 +64,7 @@ class cmEndIfCommand : public cmCommand " endif(expression)\n" "See the if command."; } - + cmTypeMacro(cmEndIfCommand, cmCommand); }; diff --git a/Source/cmEndMacroCommand.h b/Source/cmEndMacroCommand.h index 25e86b70f43..9d0e70fdc50 100644 --- a/Source/cmEndMacroCommand.h +++ b/Source/cmEndMacroCommand.h @@ -25,7 +25,7 @@ class cmEndMacroCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmEndMacroCommand; } @@ -36,7 +36,7 @@ class cmEndMacroCommand : public cmCommand */ virtual bool InvokeInitialPass(std::vector const&, cmExecutionStatus &); - + /** * This is called when the command is first encountered in * the CMakeLists.txt file. @@ -61,7 +61,7 @@ class cmEndMacroCommand : public cmCommand { return "Ends a list of commands in a macro block."; } - + /** * More documentation. */ @@ -71,7 +71,7 @@ class cmEndMacroCommand : public cmCommand " endmacro(expression)\n" "See the macro command."; } - + cmTypeMacro(cmEndMacroCommand, cmCommand); }; diff --git a/Source/cmEndWhileCommand.h b/Source/cmEndWhileCommand.h index 635ad5a7f03..18ba5ea3137 100644 --- a/Source/cmEndWhileCommand.h +++ b/Source/cmEndWhileCommand.h @@ -25,7 +25,7 @@ class cmEndWhileCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmEndWhileCommand; } @@ -36,7 +36,7 @@ class cmEndWhileCommand : public cmCommand */ virtual bool InvokeInitialPass(std::vector const& args, cmExecutionStatus &status); - + /** * This is called when the command is first encountered in * the CMakeLists.txt file. @@ -61,7 +61,7 @@ class cmEndWhileCommand : public cmCommand { return "Ends a list of commands in a while block."; } - + /** * More documentation. */ @@ -71,7 +71,7 @@ class cmEndWhileCommand : public cmCommand " endwhile(expression)\n" "See the while command."; } - + cmTypeMacro(cmEndWhileCommand, cmCommand); }; diff --git a/Source/cmExecProgramCommand.cxx b/Source/cmExecProgramCommand.cxx index 61b27eaf037..9fdb1e896fc 100644 --- a/Source/cmExecProgramCommand.cxx +++ b/Source/cmExecProgramCommand.cxx @@ -36,7 +36,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) doingargs = false; havereturn_variable = false; haveoutput_variable = true; - } + } else if ( haveoutput_variable ) { if ( output_variable.size() > 0 ) @@ -54,7 +54,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) doingargs = false; haveoutput_variable = false; havereturn_variable = true; - } + } else if ( havereturn_variable ) { if ( return_variable.size() > 0 ) @@ -108,16 +108,16 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) } else { - result = cmSystemTools::RunCommand(command.c_str(), output, + result = cmSystemTools::RunCommand(command.c_str(), output, retVal, 0, verbose); } if(!result) { retVal = -1; - } + } if ( output_variable.size() > 0 ) - { + { std::string::size_type first = output.find_first_not_of(" \n\t\r"); std::string::size_type last = output.find_last_not_of(" \n\t\r"); if(first == std::string::npos) @@ -128,7 +128,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) { last = output.size()-1; } - + std::string coutput = std::string(output, first, last-first+1); this->Makefile->AddDefinition(output_variable.c_str(), coutput.c_str()); } @@ -139,7 +139,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) sprintf(buffer, "%d", retVal); this->Makefile->AddDefinition(return_variable.c_str(), buffer); } - + return true; } diff --git a/Source/cmExecProgramCommand.h b/Source/cmExecProgramCommand.h index 72338609939..f752501fae1 100644 --- a/Source/cmExecProgramCommand.h +++ b/Source/cmExecProgramCommand.h @@ -27,7 +27,7 @@ class cmExecProgramCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmExecProgramCommand; } @@ -38,13 +38,13 @@ class cmExecProgramCommand : public cmCommand */ virtual bool InitialPass(std::vector const& args, cmExecutionStatus &status); - + /** * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() const {return "exec_program";} - + /** * This determines if the command is invoked when in script mode. */ @@ -55,10 +55,10 @@ class cmExecProgramCommand : public cmCommand */ virtual const char* GetTerseDocumentation() const { - return + return "Deprecated. Use the execute_process() command instead."; } - + /** * More documentation. */ @@ -82,7 +82,7 @@ class cmExecProgramCommand : public cmCommand "stdout/stderr of the console running cmake.\n" ; } - + /** This command is kept for compatibility with older CMake versions. */ virtual bool IsDiscouraged() const { diff --git a/Source/cmExecuteProcessCommand.cxx b/Source/cmExecuteProcessCommand.cxx index a0d9c9cafe4..994c1707bbc 100644 --- a/Source/cmExecuteProcessCommand.cxx +++ b/Source/cmExecuteProcessCommand.cxx @@ -266,12 +266,12 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) } if(!output_file.empty()) { - cmsysProcess_SetPipeFile(cp, cmsysProcess_Pipe_STDOUT, + cmsysProcess_SetPipeFile(cp, cmsysProcess_Pipe_STDOUT, output_file.c_str()); } if(!error_file.empty()) { - cmsysProcess_SetPipeFile(cp, cmsysProcess_Pipe_STDERR, + cmsysProcess_SetPipeFile(cp, cmsysProcess_Pipe_STDERR, error_file.c_str()); } @@ -326,12 +326,12 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) // Store the output obtained. if(!output_variable.empty() && tempOutput.size()) { - this->Makefile->AddDefinition(output_variable.c_str(), + this->Makefile->AddDefinition(output_variable.c_str(), &*tempOutput.begin()); } if(!merge_output && !error_variable.empty() && tempError.size()) { - this->Makefile->AddDefinition(error_variable.c_str(), + this->Makefile->AddDefinition(error_variable.c_str(), &*tempError.begin()); } diff --git a/Source/cmExecutionStatus.h b/Source/cmExecutionStatus.h index 9fbecacfe9d..1488924c774 100644 --- a/Source/cmExecutionStatus.h +++ b/Source/cmExecutionStatus.h @@ -23,19 +23,19 @@ class cmExecutionStatus : public cmObject { public: cmTypeMacro(cmExecutionStatus, cmObject); - + cmExecutionStatus() { this->Clear();}; - - virtual void SetReturnInvoked(bool val) + + virtual void SetReturnInvoked(bool val) { this->ReturnInvoked = val; } virtual bool GetReturnInvoked() { return this->ReturnInvoked; } - - virtual void SetBreakInvoked(bool val) + + virtual void SetBreakInvoked(bool val) { this->BreakInvoked = val; } virtual bool GetBreakInvoked() { return this->BreakInvoked; } - + virtual void Clear() { this->ReturnInvoked = false; @@ -45,7 +45,7 @@ class cmExecutionStatus : public cmObject virtual void SetNestedError(bool val) { this->NestedError = val; } virtual bool GetNestedError() { return this->NestedError; } - + protected: bool ReturnInvoked; bool BreakInvoked; diff --git a/Source/cmExportLibraryDependencies.cxx b/Source/cmExportLibraryDependencies.cxx index 8fdb069da32..f07b783d60e 100644 --- a/Source/cmExportLibraryDependencies.cxx +++ b/Source/cmExportLibraryDependencies.cxx @@ -26,7 +26,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) this->SetError("called with incorrect number of arguments"); return false; } - + // store the arguments for the final pass this->Filename = args[0]; this->Append = false; diff --git a/Source/cmExportLibraryDependencies.h b/Source/cmExportLibraryDependencies.h index 2a2ff215ed0..d8b65ccf11a 100644 --- a/Source/cmExportLibraryDependencies.h +++ b/Source/cmExportLibraryDependencies.h @@ -18,7 +18,7 @@ * \brief Add a test to the lists of tests to run. * * cmExportLibraryDependenciesCommand adds a test to the list of tests to run - * + * */ class cmExportLibraryDependenciesCommand : public cmCommand { @@ -26,7 +26,7 @@ class cmExportLibraryDependenciesCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmExportLibraryDependenciesCommand; } @@ -40,7 +40,7 @@ class cmExportLibraryDependenciesCommand : public cmCommand /** * This is called at the end after all the information - * specified by the command is accumulated. + * specified by the command is accumulated. */ virtual void FinalPass(); virtual bool HasFinalPass() const { return true; } @@ -57,7 +57,7 @@ class cmExportLibraryDependenciesCommand : public cmCommand { return "Deprecated. Use INSTALL(EXPORT) or EXPORT command."; } - + /** * More documentation. */ @@ -87,7 +87,7 @@ class cmExportLibraryDependenciesCommand : public cmCommand { return true; } - + cmTypeMacro(cmExportLibraryDependenciesCommand, cmCommand); private: diff --git a/Source/cmExprLexer.h b/Source/cmExprLexer.h index 4c10496abd1..03b36cec558 100644 --- a/Source/cmExprLexer.h +++ b/Source/cmExprLexer.h @@ -58,7 +58,7 @@ typedef uint32_t flex_uint32_t; typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; #endif /* ! C99 */ @@ -188,7 +188,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ diff --git a/Source/cmExprLexer.in.l b/Source/cmExprLexer.in.l index db9018f997b..f344b40ff93 100644 --- a/Source/cmExprLexer.in.l +++ b/Source/cmExprLexer.in.l @@ -54,19 +54,19 @@ Modify cmExprLexer.h: %% -[0-9][0-9]* { yylvalp->Number = atoi(yytext); return exp_NUMBER; } +[0-9][0-9]* { yylvalp->Number = atoi(yytext); return exp_NUMBER; } "+" { return exp_PLUS; } -"-" { return exp_MINUS; } -"*" { return exp_TIMES; } -"/" { return exp_DIVIDE; } -"%" { return exp_MOD; } -"\|" { return exp_OR; } -"&" { return exp_AND; } -"^" { return exp_XOR; } -"~" { return exp_NOT; } -"<<" { return exp_SHIFTLEFT; } -">>" { return exp_SHIFTRIGHT; } +"-" { return exp_MINUS; } +"*" { return exp_TIMES; } +"/" { return exp_DIVIDE; } +"%" { return exp_MOD; } +"\|" { return exp_OR; } +"&" { return exp_AND; } +"^" { return exp_XOR; } +"~" { return exp_NOT; } +"<<" { return exp_SHIFTLEFT; } +">>" { return exp_SHIFTRIGHT; } "(" { return exp_OPENPARENT; } ")" { return exp_CLOSEPARENT; } diff --git a/Source/cmExprParserHelper.cxx b/Source/cmExprParserHelper.cxx index 7728d740be6..9c1795ec25f 100644 --- a/Source/cmExprParserHelper.cxx +++ b/Source/cmExprParserHelper.cxx @@ -42,7 +42,7 @@ int cmExprParserHelper::ParseString(const char* str, int verb) this->InputBuffer = str; this->InputBufferPos = 0; this->CurrentLine = 0; - + this->Result = 0; yyscan_t yyscanner; @@ -61,7 +61,7 @@ int cmExprParserHelper::ParseString(const char* str, int verb) if ( Verbose ) { - std::cerr << "Expanding [" << str << "] produced: [" + std::cerr << "Expanding [" << str << "] produced: [" << this->Result << "]" << std::endl; } return 1; diff --git a/Source/cmExprParserHelper.h b/Source/cmExprParserHelper.h index 690426d8d0e..4b76b332238 100644 --- a/Source/cmExprParserHelper.h +++ b/Source/cmExprParserHelper.h @@ -9,7 +9,7 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#ifndef cmExprParserHelper_h +#ifndef cmExprParserHelper_h #define cmExprParserHelper_h #include "cmStandardIncludes.h" diff --git a/Source/cmExternalMakefileProjectGenerator.cxx b/Source/cmExternalMakefileProjectGenerator.cxx index 6ed84bd954c..9c965cc24a4 100644 --- a/Source/cmExternalMakefileProjectGenerator.cxx +++ b/Source/cmExternalMakefileProjectGenerator.cxx @@ -49,7 +49,7 @@ const char* cmExternalMakefileProjectGenerator::GetGlobalGeneratorName( } // otherwise search for the matching global generator - for (std::vector::const_iterator + for (std::vector::const_iterator it = this->SupportedGlobalGenerators.begin(); it != this->SupportedGlobalGenerators.end(); ++it) diff --git a/Source/cmExternalMakefileProjectGenerator.h b/Source/cmExternalMakefileProjectGenerator.h index 46f1d310ba7..182c1a8f6f8 100644 --- a/Source/cmExternalMakefileProjectGenerator.h +++ b/Source/cmExternalMakefileProjectGenerator.h @@ -22,12 +22,12 @@ class cmGlobalGenerator; * \brief Base class for generators for "External Makefile based IDE projects". * * cmExternalMakefileProjectGenerator is a base class for generators - * for "external makefile based projects", i.e. IDE projects which work + * for "external makefile based projects", i.e. IDE projects which work * an already existing makefiles. * See cmGlobalKdevelopGenerator as an example. - * After the makefiles have been generated by one of the Makefile + * After the makefiles have been generated by one of the Makefile * generators, the Generate() method is called and this generator - * can iterate over the local generators and/or projects to produce the + * can iterate over the local generators and/or projects to produce the * project files for the IDE. */ class cmExternalMakefileProjectGenerator @@ -39,7 +39,7 @@ class cmExternalMakefileProjectGenerator ///! Get the name for this generator. virtual const char* GetName() const = 0; /** Get the documentation entry for this generator. */ - virtual void GetDocumentation(cmDocumentationEntry& entry, + virtual void GetDocumentation(cmDocumentationEntry& entry, const char* fullName) const = 0; ///! set the global generator which will generate the makefiles @@ -47,7 +47,7 @@ class cmExternalMakefileProjectGenerator {this->GlobalGenerator = generator;} ///! Return the list of global generators supported by this extra generator - const std::vector& GetSupportedGlobalGenerators() const + const std::vector& GetSupportedGlobalGenerators() const {return this->SupportedGlobalGenerators;} ///! Get the name of the global generator for the given full name @@ -55,7 +55,7 @@ class cmExternalMakefileProjectGenerator /** Create a full name from the given global generator name and the * extra generator name */ - static std::string CreateFullGeneratorName(const char* globalGenerator, + static std::string CreateFullGeneratorName(const char* globalGenerator, const char* extraGenerator); ///! Generate the project files, the Makefiles have already been generated diff --git a/Source/cmFLTKWrapUICommand.cxx b/Source/cmFLTKWrapUICommand.cxx index 93533e57cc9..a4aa75a7db8 100644 --- a/Source/cmFLTKWrapUICommand.cxx +++ b/Source/cmFLTKWrapUICommand.cxx @@ -33,19 +33,19 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) std::vector newArgs; this->Makefile->ExpandSourceListArguments(args,newArgs, 1); - - // get the list of GUI files from which .cxx and .h will be generated + + // get the list of GUI files from which .cxx and .h will be generated std::string outputDirectory = this->Makefile->GetCurrentOutputDirectory(); - // Some of the generated files are *.h so the directory "GUI" + // Some of the generated files are *.h so the directory "GUI" // where they are created have to be added to the include path this->Makefile->AddIncludeDirectory( outputDirectory.c_str() ); - for(std::vector::iterator i = (newArgs.begin() + 1); + for(std::vector::iterator i = (newArgs.begin() + 1); i != newArgs.end(); i++) { cmSourceFile *curr = this->Makefile->GetSource(i->c_str()); - // if we should use the source GUI + // if we should use the source GUI // to generate .cxx and .h files if (!curr || !curr->GetPropertyAsBool("WRAP_EXCLUDE")) { @@ -107,11 +107,11 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) std::string varName = this->Target; varName += "_FLTK_UI_SRCS"; this->Makefile->AddDefinition(varName.c_str(), sourceListValue.c_str()); - + return true; } -void cmFLTKWrapUICommand::FinalPass() +void cmFLTKWrapUICommand::FinalPass() { // people should add the srcs to the target themselves, but the old command // didn't support that, so check and see if they added the files in and if @@ -119,7 +119,7 @@ void cmFLTKWrapUICommand::FinalPass() cmTarget* target = this->Makefile->FindTarget(this->Target.c_str()); if(!target) { - std::string msg = + std::string msg = "FLTK_WRAP_UI was called with a target that was never created: "; msg += this->Target; msg +=". The problem was found while processing the source directory: "; @@ -128,12 +128,12 @@ void cmFLTKWrapUICommand::FinalPass() cmSystemTools::Message(msg.c_str(),"Warning"); return; } - std::vector const& srcs = + std::vector const& srcs = target->GetSourceFiles(); bool found = false; for (unsigned int i = 0; i < srcs.size(); ++i) { - if (srcs[i]->GetFullPath() == + if (srcs[i]->GetFullPath() == this->GeneratedSourcesClasses[0]->GetFullPath()) { found = true; @@ -142,7 +142,7 @@ void cmFLTKWrapUICommand::FinalPass() } if (!found) { - std::string msg = + std::string msg = "In CMake 2.2 the FLTK_WRAP_UI command sets a variable to the list of " "source files that should be added to your executable or library. It " "appears that you have not added these source files to your target. " @@ -153,13 +153,13 @@ void cmFLTKWrapUICommand::FinalPass() "of sources to add to your target when you call ADD_LIBRARY or " "ADD_EXECUTABLE. For now CMake will add the sources to your target " "for you as was done in CMake 2.0 and earlier. In the future this may " - "become an error."; + "become an error."; msg +="The problem was found while processing the source directory: "; msg += this->Makefile->GetStartDirectory(); cmSystemTools::Message(msg.c_str(),"Warning"); // first we add the rules for all the .fl to .h and .cxx files size_t lastHeadersClass = this->GeneratedSourcesClasses.size(); - + // Generate code for all the .fl files for(size_t classNum = 0; classNum < lastHeadersClass; classNum++) { diff --git a/Source/cmFLTKWrapUICommand.h b/Source/cmFLTKWrapUICommand.h index cb0f9d5348a..530de2c9613 100644 --- a/Source/cmFLTKWrapUICommand.h +++ b/Source/cmFLTKWrapUICommand.h @@ -28,7 +28,7 @@ class cmFLTKWrapUICommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmFLTKWrapUICommand; } @@ -39,7 +39,7 @@ class cmFLTKWrapUICommand : public cmCommand */ virtual bool InitialPass(std::vector const& args, cmExecutionStatus &status); - + /** * This is called at the end after all the information * specified by the command is accumulated. Most commands do @@ -61,7 +61,7 @@ class cmFLTKWrapUICommand : public cmCommand { return "Create FLTK user interfaces Wrappers."; } - + /** * More documentation. */ @@ -75,7 +75,7 @@ class cmFLTKWrapUICommand : public cmCommand "resultingLibraryName_FLTK_UI_SRCS which should be added to your " "library."; } - + private: /** * List of produced files. @@ -83,7 +83,7 @@ class cmFLTKWrapUICommand : public cmCommand std::vector GeneratedSourcesClasses; /** - * List of Fluid files that provide the source + * List of Fluid files that provide the source * generating .cxx and .h files */ std::string Target; diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 5da5a018198..5103d395c6d 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -271,7 +271,7 @@ bool cmFileCommand::HandleReadCommand(std::vector const& args) // Open the specified file. #if defined(_WIN32) || defined(__CYGWIN__) - std::ifstream file(fileName.c_str(), std::ios::in | + std::ifstream file(fileName.c_str(), std::ios::in | (hexOutputArg.IsEnabled() ? std::ios::binary : std::ios::in)); #else std::ifstream file(fileName.c_str(), std::ios::in); @@ -2621,17 +2621,17 @@ namespace { ::curl_easy_cleanup(this->Easy); } } - - inline void release(void) + + inline void release(void) { this->Easy = 0; return; } - + private: ::CURL * Easy; }; - + } #endif diff --git a/Source/cmFileTimeComparison.cxx b/Source/cmFileTimeComparison.cxx index b1050d31186..3167be4969b 100644 --- a/Source/cmFileTimeComparison.cxx +++ b/Source/cmFileTimeComparison.cxx @@ -116,7 +116,7 @@ cmFileTimeComparison::~cmFileTimeComparison() } //---------------------------------------------------------------------------- -bool cmFileTimeComparison::FileTimeCompare(const char* f1, +bool cmFileTimeComparison::FileTimeCompare(const char* f1, const char* f2, int* result) { return this->Internals->FileTimeCompare(f1, f2, result); @@ -129,7 +129,7 @@ bool cmFileTimeComparison::FileTimesDiffer(const char* f1, const char* f2) } //---------------------------------------------------------------------------- -int cmFileTimeComparisonInternal::Compare(cmFileTimeComparison_Type* s1, +int cmFileTimeComparisonInternal::Compare(cmFileTimeComparison_Type* s1, cmFileTimeComparison_Type* s2) { #if !defined(_WIN32) || defined(__CYGWIN__) diff --git a/Source/cmFileTimeComparison.h b/Source/cmFileTimeComparison.h index f5de2f61976..cc1ef633d89 100644 --- a/Source/cmFileTimeComparison.h +++ b/Source/cmFileTimeComparison.h @@ -31,7 +31,7 @@ class cmFileTimeComparison * Compare file modification times. * Return true for successful comparison and false for error. * When true is returned, result has -1, 0, +1 for - * f1 older, same, or newer than f2. + * f1 older, same, or newer than f2. */ bool FileTimeCompare(const char* f1, const char* f2, int* result); @@ -42,7 +42,7 @@ class cmFileTimeComparison bool FileTimesDiffer(const char* f1, const char* f2); protected: - + cmFileTimeComparisonInternal* Internals; }; diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx index fb8bcf78d43..a54bf7c4ae0 100644 --- a/Source/cmFindBase.cxx +++ b/Source/cmFindBase.cxx @@ -10,7 +10,7 @@ See the License for more information. ============================================================================*/ #include "cmFindBase.h" - + cmFindBase::cmFindBase() { this->AlreadyInCache = false; @@ -132,7 +132,7 @@ bool cmFindBase::ParseArguments(std::vector const& argsIn) bool compatibility = this->Makefile->NeedBackwardsCompatibility(2,3); // copy argsIn into args so it can be modified, - // in the process extract the DOC "documentation" + // in the process extract the DOC "documentation" size_t size = argsIn.size(); std::vector args; bool foundDoc = false; @@ -178,7 +178,7 @@ bool cmFindBase::ParseArguments(std::vector const& argsIn) this->AlreadyInCache = true; return true; } - this->AlreadyInCache = false; + this->AlreadyInCache = false; // Find the current root path mode. this->SelectDefaultRootPathMode(); @@ -264,17 +264,17 @@ bool cmFindBase::ParseArguments(std::vector const& argsIn) } else if(this->Names.size() == 1) { - this->VariableDocumentation += "the " + this->VariableDocumentation += "the " + this->Names[0] + " library be found"; } else - { + { this->VariableDocumentation += "one of the " + this->Names[0]; for (unsigned int j = 1; j < this->Names.size() - 1; ++j) { this->VariableDocumentation += ", " + this->Names[j]; } - this->VariableDocumentation += " or " + this->VariableDocumentation += " or " + this->Names[this->Names.size() - 1] + " libraries be found"; } } @@ -504,7 +504,7 @@ void cmFindBase::AddPathSuffixes() cmSystemTools::ConvertToUnixSlashes(*i); // copy each finalPath combined with SearchPathSuffixes // to the SearchPaths ivar - for(std::vector::iterator j = + for(std::vector::iterator j = this->SearchPathSuffixes.begin(); j != this->SearchPathSuffixes.end(); ++j) { @@ -517,7 +517,7 @@ void cmFindBase::AddPathSuffixes() p += std::string("/"); } p += *j; - // add to all paths because the search path may be modified + // add to all paths because the search path may be modified // later with lib being replaced for lib64 which may exist paths.push_back(p); } @@ -535,13 +535,13 @@ void cmFindBase::PrintFindStuff() std::cerr << "SearchAppBundleOnly: " << this->SearchAppBundleOnly << "\n"; std::cerr << "SearchAppBundleFirst: " << this->SearchAppBundleFirst << "\n"; std::cerr << "VariableName " << this->VariableName << "\n"; - std::cerr << "VariableDocumentation " + std::cerr << "VariableDocumentation " << this->VariableDocumentation << "\n"; std::cerr << "NoDefaultPath " << this->NoDefaultPath << "\n"; - std::cerr << "NoCMakeEnvironmentPath " + std::cerr << "NoCMakeEnvironmentPath " << this->NoCMakeEnvironmentPath << "\n"; std::cerr << "NoCMakePath " << this->NoCMakePath << "\n"; - std::cerr << "NoSystemEnvironmentPath " + std::cerr << "NoSystemEnvironmentPath " << this->NoSystemEnvironmentPath << "\n"; std::cerr << "NoCMakeSystemPath " << this->NoCMakeSystemPath << "\n"; std::cerr << "EnvironmentPath " << this->EnvironmentPath << "\n"; diff --git a/Source/cmFindBase.h b/Source/cmFindBase.h index 37ab2ecd288..eac1885f3ae 100644 --- a/Source/cmFindBase.h +++ b/Source/cmFindBase.h @@ -30,7 +30,7 @@ class cmFindBase : public cmFindCommon */ virtual bool ParseArguments(std::vector const& args); cmTypeMacro(cmFindBase, cmFindCommon); - + virtual const char* GetFullDocumentation() const; protected: @@ -43,7 +43,7 @@ class cmFindBase : public cmFindCommon // also copy the documentation from the cache to VariableDocumentation // if it has documentation in the cache bool CheckForVariableInCache(); - + cmStdString GenericDocumentation; // use by command during find cmStdString VariableDocumentation; diff --git a/Source/cmFindFileCommand.h b/Source/cmFindFileCommand.h index 7d349d33c11..1bfdcbd1681 100644 --- a/Source/cmFindFileCommand.h +++ b/Source/cmFindFileCommand.h @@ -18,7 +18,7 @@ * \brief Define a command to search for an executable program. * * cmFindFileCommand is used to define a CMake variable - * that specifies an executable program. The command searches + * that specifies an executable program. The command searches * in the current path (e.g., PATH environment variable) for * an executable that matches one of the supplied names. */ @@ -29,7 +29,7 @@ class cmFindFileCommand : public cmFindPathCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmFindFileCommand; } @@ -42,7 +42,7 @@ class cmFindFileCommand : public cmFindPathCommand { return "Find the full path to a file."; } - + cmTypeMacro(cmFindFileCommand, cmFindPathCommand); protected: virtual void GenerateDocumentation(); diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx index 652e697edd6..0080e55aa74 100644 --- a/Source/cmFindLibraryCommand.cxx +++ b/Source/cmFindLibraryCommand.cxx @@ -15,7 +15,7 @@ #include cmFindLibraryCommand::cmFindLibraryCommand() -{ +{ this->EnvironmentPath = "LIB"; } diff --git a/Source/cmFindLibraryCommand.h b/Source/cmFindLibraryCommand.h index 31a5c3f8df0..455348aaff7 100644 --- a/Source/cmFindLibraryCommand.h +++ b/Source/cmFindLibraryCommand.h @@ -29,7 +29,7 @@ class cmFindLibraryCommand : public cmFindBase /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmFindLibraryCommand; } @@ -59,7 +59,7 @@ class cmFindLibraryCommand : public cmFindBase return "Find a library."; } cmTypeMacro(cmFindLibraryCommand, cmFindBase); - + protected: void AddArchitecturePaths(const char* suffix); void AddArchitecturePath(std::string const& dir, diff --git a/Source/cmFindPathCommand.cxx b/Source/cmFindPathCommand.cxx index 846d187cbfc..952492463b1 100644 --- a/Source/cmFindPathCommand.cxx +++ b/Source/cmFindPathCommand.cxx @@ -104,7 +104,7 @@ ::InitialPass(std::vector const& argsIn, cmExecutionStatus &) (this->VariableName.c_str(), (this->VariableName + "-NOTFOUND").c_str(), this->VariableDocumentation.c_str(), - (this->IncludeFileInPath) ? + (this->IncludeFileInPath) ? cmCacheManager::FILEPATH :cmCacheManager::PATH); return true; } @@ -143,14 +143,14 @@ cmFindPathCommand::FindHeaderInFramework(std::string const& file, // remove the name from the slash; fileName = fileName.substr(pos+1); frameWorkName = file; - frameWorkName = + frameWorkName = frameWorkName.substr(0, frameWorkName.size()-fileName.size()-1); // if the framework has a path in it then just use the filename if(frameWorkName.find("/") != frameWorkName.npos) { fileName = file; frameWorkName = ""; - } + } if(frameWorkName.size()) { std::string fpath = dir; @@ -160,7 +160,7 @@ cmFindPathCommand::FindHeaderInFramework(std::string const& file, intPath += "/Headers/"; intPath += fileName; if(cmSystemTools::FileExists(intPath.c_str())) - { + { if(this->IncludeFileInPath) { return intPath; diff --git a/Source/cmFindPathCommand.h b/Source/cmFindPathCommand.h index a6129901186..759567dc1c9 100644 --- a/Source/cmFindPathCommand.h +++ b/Source/cmFindPathCommand.h @@ -29,7 +29,7 @@ class cmFindPathCommand : public cmFindBase /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmFindPathCommand; } diff --git a/Source/cmFindProgramCommand.cxx b/Source/cmFindProgramCommand.cxx index 00f5419c2e8..909b333ff76 100644 --- a/Source/cmFindProgramCommand.cxx +++ b/Source/cmFindProgramCommand.cxx @@ -81,7 +81,7 @@ ::InitialPass(std::vector const& argsIn, cmExecutionStatus &) result.c_str(), this->VariableDocumentation.c_str(), cmCacheManager::FILEPATH); - + return true; } this->Makefile->AddCacheDefinition(this->VariableName.c_str(), @@ -117,21 +117,21 @@ ::FindAppBundle(std::vector names) for(std::vector::const_iterator name = names.begin(); name != names.end() ; ++name) { - + std::string appName = *name + std::string(".app"); - std::string appPath = cmSystemTools::FindDirectory(appName.c_str(), - this->SearchPaths, + std::string appPath = cmSystemTools::FindDirectory(appName.c_str(), + this->SearchPaths, true); if ( !appPath.empty() ) { std::string executable = GetBundleExecutable(appPath); - if (!executable.empty()) + if (!executable.empty()) { return cmSystemTools::CollapseFullPath(executable.c_str()); } - } - } + } + } // Couldn't find app bundle return ""; @@ -142,44 +142,44 @@ std::string cmFindProgramCommand::GetBundleExecutable(std::string bundlePath) std::string executable = ""; (void)bundlePath; #if defined(__APPLE__) - // Started with an example on developer.apple.com about finding bundles + // Started with an example on developer.apple.com about finding bundles // and modified from that. - + // Get a CFString of the app bundle path // XXX - Is it safe to assume everything is in UTF8? - CFStringRef bundlePathCFS = - CFStringCreateWithCString(kCFAllocatorDefault , + CFStringRef bundlePathCFS = + CFStringCreateWithCString(kCFAllocatorDefault , bundlePath.c_str(), kCFStringEncodingUTF8 ); - + // Make a CFURLRef from the CFString representation of the // bundle’s path. - CFURLRef bundleURL = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, + CFURLRef bundleURL = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, bundlePathCFS, kCFURLPOSIXPathStyle, true ); - + // Make a bundle instance using the URLRef. CFBundleRef appBundle = CFBundleCreate( kCFAllocatorDefault, bundleURL ); - + // returned executableURL is relative to /Contents/MacOS/ CFURLRef executableURL = CFBundleCopyExecutableURL(appBundle); - + if (executableURL != NULL) { const int MAX_OSX_PATH_SIZE = 1024; char buffer[MAX_OSX_PATH_SIZE]; - + // Convert the CFString to a C string - CFStringGetCString( CFURLGetString(executableURL), buffer, + CFStringGetCString( CFURLGetString(executableURL), buffer, MAX_OSX_PATH_SIZE, kCFStringEncodingUTF8 ); - + // And finally to a c++ string executable = bundlePath + "/Contents/MacOS/" + std::string(buffer); // Only release CFURLRef if it's not null CFRelease( executableURL ); } - // Any CF objects returned from functions with "create" or + // Any CF objects returned from functions with "create" or // "copy" in their names must be released by us! CFRelease( bundlePathCFS ); CFRelease( bundleURL ); diff --git a/Source/cmFindProgramCommand.h b/Source/cmFindProgramCommand.h index c1b14f91222..8350c9b4248 100644 --- a/Source/cmFindProgramCommand.h +++ b/Source/cmFindProgramCommand.h @@ -18,7 +18,7 @@ * \brief Define a command to search for an executable program. * * cmFindProgramCommand is used to define a CMake variable - * that specifies an executable program. The command searches + * that specifies an executable program. The command searches * in the current path (e.g., PATH environment variable) for * an executable that matches one of the supplied names. */ @@ -28,7 +28,7 @@ class cmFindProgramCommand : public cmFindBase /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmFindProgramCommand; } @@ -57,7 +57,7 @@ class cmFindProgramCommand : public cmFindBase { return "Find an executable program."; } - + cmTypeMacro(cmFindProgramCommand, cmFindBase); protected: diff --git a/Source/cmForEachCommand.cxx b/Source/cmForEachCommand.cxx index 74966c9c8ba..d6970673039 100644 --- a/Source/cmForEachCommand.cxx +++ b/Source/cmForEachCommand.cxx @@ -25,7 +25,7 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf, else if (!cmSystemTools::Strucmp(lff.Name.c_str(),"endforeach")) { // if this is the endofreach for this statement - if (!this->Depth) + if (!this->Depth) { // Remove the function blocker for this scope or bail. cmsys::auto_ptr @@ -45,7 +45,7 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf, std::string tmps; cmListFileArgument arg; for( ; j != this->Args.end(); ++j) - { + { // set the variable to the loop value mf.AddDefinition(this->Args[0].c_str(),j->c_str()); // Invoke all the functions that were collected in the block. @@ -83,10 +83,10 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf, this->Depth--; } } - + // record the command this->Functions.push_back(lff); - + // always return true return true; } @@ -121,7 +121,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) { return this->HandleInMode(args); } - + // create a function blocker cmForEachFunctionBlocker *f = new cmForEachFunctionBlocker(); if ( args.size() > 1 ) @@ -157,7 +157,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) step = 1; } } - if ( + if ( (start > stop && step > 0) || (start < stop && step < 0) || step == 0 @@ -198,7 +198,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) f->Args = args; } this->Makefile->AddFunctionBlocker(f); - + return true; } diff --git a/Source/cmForEachCommand.h b/Source/cmForEachCommand.h index ae50005be74..dc476130639 100644 --- a/Source/cmForEachCommand.h +++ b/Source/cmForEachCommand.h @@ -25,7 +25,7 @@ class cmForEachFunctionBlocker : public cmFunctionBlocker cmMakefile &mf, cmExecutionStatus &); virtual bool ShouldRemove(const cmListFileFunction& lff, cmMakefile &mf); - + std::vector Args; std::vector Functions; private: @@ -39,7 +39,7 @@ class cmForEachCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmForEachCommand; } @@ -68,7 +68,7 @@ class cmForEachCommand : public cmCommand { return "Evaluate a group of commands for each value in a list."; } - + /** * More documentation. */ @@ -106,7 +106,7 @@ class cmForEachCommand : public cmCommand "following it in the iteration." ; } - + cmTypeMacro(cmForEachCommand, cmCommand); private: bool HandleInMode(std::vector const& args); diff --git a/Source/cmFunctionBlocker.h b/Source/cmFunctionBlocker.h index 9ee0b5c2d6d..68bf76286a3 100644 --- a/Source/cmFunctionBlocker.h +++ b/Source/cmFunctionBlocker.h @@ -29,7 +29,7 @@ class cmFunctionBlocker /** * should this function blocker be removed, useful when one function adds a - * blocker and another must remove it + * blocker and another must remove it */ virtual bool ShouldRemove(const cmListFileFunction&, cmMakefile&) {return false;} diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx index ce36145f498..10b47b9e09f 100644 --- a/Source/cmFunctionCommand.cxx +++ b/Source/cmFunctionCommand.cxx @@ -65,7 +65,7 @@ class cmFunctionHelperCommand : public cmCommand * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() const { return this->Args[0].c_str(); } - + /** * Succinct documentation. */ @@ -131,15 +131,15 @@ bool cmFunctionHelperCommand::InvokeInitialPass { cmOStringStream tmpStream; tmpStream << "ARGV" << t; - this->Makefile->AddDefinition(tmpStream.str().c_str(), + this->Makefile->AddDefinition(tmpStream.str().c_str(), expandedArgs[t].c_str()); this->Makefile->MarkVariableAsUsed(tmpStream.str().c_str()); } - + // define the formal arguments for (unsigned int j = 1; j < this->Args.size(); ++j) { - this->Makefile->AddDefinition(this->Args[j].c_str(), + this->Makefile->AddDefinition(this->Args[j].c_str(), expandedArgs[j-1].c_str()); } @@ -208,7 +208,7 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf, else if(!cmSystemTools::Strucmp(lff.Name.c_str(),"endfunction")) { // if this is the endfunction for this function then execute - if (!this->Depth) + if (!this->Depth) { std::string name = this->Args[0]; std::vector::size_type cc; @@ -224,20 +224,20 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf, f->Args = this->Args; f->Functions = this->Functions; mf.RecordPolicies(f->Policies); - + // Set the FilePath on the arguments to match the function since it is // not stored and the original values may be freed for (unsigned int i = 0; i < f->Functions.size(); ++i) { for (unsigned int j = 0; j < f->Functions[i].Arguments.size(); ++j) { - f->Functions[i].Arguments[j].FilePath = + f->Functions[i].Arguments[j].FilePath = f->Functions[i].FilePath.c_str(); } } std::string newName = "_" + this->Args[0]; - mf.GetCMakeInstance()->RenameCommand(this->Args[0].c_str(), + mf.GetCMakeInstance()->RenameCommand(this->Args[0].c_str(), newName.c_str()); mf.AddCommand(f); @@ -265,7 +265,7 @@ ShouldRemove(const cmListFileFunction& lff, cmMakefile &mf) if(!cmSystemTools::Strucmp(lff.Name.c_str(),"endfunction")) { std::vector expandedArguments; - mf.ExpandArguments(lff.Arguments, expandedArguments); + mf.ExpandArguments(lff.Arguments, expandedArguments); // if the endfunction has arguments then make sure // they match the ones in the openeing function command if ((expandedArguments.empty() || @@ -291,7 +291,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) cmFunctionFunctionBlocker *f = new cmFunctionFunctionBlocker(); for(std::vector::const_iterator j = args.begin(); j != args.end(); ++j) - { + { f->Args.push_back(*j); } this->Makefile->AddFunctionBlocker(f); diff --git a/Source/cmFunctionCommand.h b/Source/cmFunctionCommand.h index 43c8e29837b..730a7a760e1 100644 --- a/Source/cmFunctionCommand.h +++ b/Source/cmFunctionCommand.h @@ -20,11 +20,11 @@ class cmFunctionFunctionBlocker : public cmFunctionBlocker public: cmFunctionFunctionBlocker() {this->Depth=0;} virtual ~cmFunctionFunctionBlocker() {} - virtual bool IsFunctionBlocked(const cmListFileFunction&, + virtual bool IsFunctionBlocked(const cmListFileFunction&, cmMakefile &mf, cmExecutionStatus &); virtual bool ShouldRemove(const cmListFileFunction&, cmMakefile &mf); - + std::vector Args; std::vector Functions; int Depth; diff --git a/Source/cmGeneratedFileStream.cxx b/Source/cmGeneratedFileStream.cxx index 1a391ede9eb..0af07532acd 100644 --- a/Source/cmGeneratedFileStream.cxx +++ b/Source/cmGeneratedFileStream.cxx @@ -31,7 +31,7 @@ cmGeneratedFileStream::cmGeneratedFileStream(const char* name, bool quiet): // Check if the file opened. if(!*this && !quiet) { - cmSystemTools::Error("Cannot open file for write: ", + cmSystemTools::Error("Cannot open file for write: ", this->TempName.c_str()); cmSystemTools::ReportLastSystemError(""); } @@ -58,7 +58,7 @@ cmGeneratedFileStream::Open(const char* name, bool quiet, bool binaryFlag) // Open the temporary output file. if ( binaryFlag ) { - this->Stream::open(this->TempName.c_str(), + this->Stream::open(this->TempName.c_str(), std::ios::out | std::ios::binary); } else @@ -69,7 +69,7 @@ cmGeneratedFileStream::Open(const char* name, bool quiet, bool binaryFlag) // Check if the file opened. if(!*this && !quiet) { - cmSystemTools::Error("Cannot open file for write: ", + cmSystemTools::Error("Cannot open file for write: ", this->TempName.c_str()); cmSystemTools::ReportLastSystemError(""); } diff --git a/Source/cmGetCMakePropertyCommand.h b/Source/cmGetCMakePropertyCommand.h index 0a5917cfd98..b77eaae047d 100644 --- a/Source/cmGetCMakePropertyCommand.h +++ b/Source/cmGetCMakePropertyCommand.h @@ -17,7 +17,7 @@ class cmGetCMakePropertyCommand : public cmCommand { public: - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmGetCMakePropertyCommand; } @@ -46,7 +46,7 @@ class cmGetCMakePropertyCommand : public cmCommand { return "Get a property of the CMake instance."; } - + /** * Longer documentation. */ @@ -63,7 +63,7 @@ class cmGetCMakePropertyCommand : public cmCommand "\n" "See also the more general get_property() command."; } - + cmTypeMacro(cmGetCMakePropertyCommand, cmCommand); }; diff --git a/Source/cmGetDirectoryPropertyCommand.cxx b/Source/cmGetDirectoryPropertyCommand.cxx index 5714b5079b3..9e76e1bc32a 100644 --- a/Source/cmGetDirectoryPropertyCommand.cxx +++ b/Source/cmGetDirectoryPropertyCommand.cxx @@ -22,12 +22,12 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) this->SetError("called with incorrect number of arguments"); return false; } - + std::vector::const_iterator i = args.begin(); std::string variable = *i; ++i; std::string output = ""; - + // get the directory argument if there is one cmMakefile *dir = this->Makefile; if (*i == "DIRECTORY") @@ -52,7 +52,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) sd = cmSystemTools::CollapseFullPath(sd.c_str()); // lookup the makefile from the directory name - cmLocalGenerator *lg = + cmLocalGenerator *lg = this->Makefile->GetLocalGenerator()->GetGlobalGenerator()-> FindLocalGenerator(sd.c_str()); if (!lg) @@ -69,7 +69,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) // OK, now we have the directory to process, we just get the requested // information out of it - + if ( *i == "DEFINITION" ) { ++i; diff --git a/Source/cmGetDirectoryPropertyCommand.h b/Source/cmGetDirectoryPropertyCommand.h index 901b90cff59..d0d58202848 100644 --- a/Source/cmGetDirectoryPropertyCommand.h +++ b/Source/cmGetDirectoryPropertyCommand.h @@ -17,7 +17,7 @@ class cmGetDirectoryPropertyCommand : public cmCommand { public: - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmGetDirectoryPropertyCommand; } @@ -46,7 +46,7 @@ class cmGetDirectoryPropertyCommand : public cmCommand { return "Get a property of DIRECTORY scope."; } - + /** * Longer documentation. */ @@ -69,7 +69,7 @@ class cmGetDirectoryPropertyCommand : public cmCommand "\n" "See also the more general get_property() command."; } - + cmTypeMacro(cmGetDirectoryPropertyCommand, cmCommand); }; diff --git a/Source/cmGetFilenameComponentCommand.cxx b/Source/cmGetFilenameComponentCommand.cxx index 1a31d5428f7..fd1ad601f30 100644 --- a/Source/cmGetFilenameComponentCommand.cxx +++ b/Source/cmGetFilenameComponentCommand.cxx @@ -32,7 +32,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) return true; } } - + std::string result; std::string filename = args[1]; if(filename.find("[HKEY") != filename.npos) @@ -79,7 +79,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) } } } - cmSystemTools::SplitProgramFromArgs(filename.c_str(), + cmSystemTools::SplitProgramFromArgs(filename.c_str(), result, programArgs); } else if (args[2] == "EXT") @@ -104,7 +104,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) result = cmSystemTools::GetRealPath(result.c_str()); } } - else + else { std::string err = "unknown component " + args[2]; this->SetError(err.c_str()); @@ -125,7 +125,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) args[2] == "PATH" ? cmCacheManager::FILEPATH : cmCacheManager::STRING); } - else + else { if(programArgs.size() && storeArgs.size()) { diff --git a/Source/cmGetFilenameComponentCommand.h b/Source/cmGetFilenameComponentCommand.h index 0c8e57a26cd..c4610162581 100644 --- a/Source/cmGetFilenameComponentCommand.h +++ b/Source/cmGetFilenameComponentCommand.h @@ -18,7 +18,7 @@ * \brief Get a specific component of a filename. * * cmGetFilenameComponentCommand is a utility command used to get the path, - * name, extension or name without extension of a full filename. + * name, extension or name without extension of a full filename. */ class cmGetFilenameComponentCommand : public cmCommand { @@ -26,7 +26,7 @@ class cmGetFilenameComponentCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmGetFilenameComponentCommand; } @@ -55,7 +55,7 @@ class cmGetFilenameComponentCommand : public cmCommand { return "Get a specific component of a full filename."; } - + /** * More documentation. */ @@ -82,7 +82,7 @@ class cmGetFilenameComponentCommand : public cmCommand "from the program name and stored in . This is used to " "separate a program name from its arguments in a command line string."; } - + cmTypeMacro(cmGetFilenameComponentCommand, cmCommand); }; diff --git a/Source/cmGetPropertyCommand.h b/Source/cmGetPropertyCommand.h index dca2627253a..3c597fdcf05 100644 --- a/Source/cmGetPropertyCommand.h +++ b/Source/cmGetPropertyCommand.h @@ -19,7 +19,7 @@ class cmGetPropertyCommand : public cmCommand public: cmGetPropertyCommand(); - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmGetPropertyCommand; } @@ -48,7 +48,7 @@ class cmGetPropertyCommand : public cmCommand { return "Get a property."; } - + /** * Longer documentation. */ @@ -92,7 +92,7 @@ class cmGetPropertyCommand : public cmCommand "If documentation is requested for a property that has not been " "defined NOTFOUND is returned."; } - + cmTypeMacro(cmGetPropertyCommand, cmCommand); private: enum OutType { OutValue, OutDefined, OutBriefDoc, OutFullDoc, OutSet }; diff --git a/Source/cmGetSourceFilePropertyCommand.h b/Source/cmGetSourceFilePropertyCommand.h index 6d52503b5b5..2ba81037f2a 100644 --- a/Source/cmGetSourceFilePropertyCommand.h +++ b/Source/cmGetSourceFilePropertyCommand.h @@ -17,7 +17,7 @@ class cmGetSourceFilePropertyCommand : public cmCommand { public: - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmGetSourceFilePropertyCommand; } @@ -41,7 +41,7 @@ class cmGetSourceFilePropertyCommand : public cmCommand { return "Get a property for a source file."; } - + /** * Longer documentation. */ @@ -57,7 +57,7 @@ class cmGetSourceFilePropertyCommand : public cmCommand "\n" "See also the more general get_property() command."; } - + cmTypeMacro(cmGetSourceFilePropertyCommand, cmCommand); }; diff --git a/Source/cmGetTargetPropertyCommand.h b/Source/cmGetTargetPropertyCommand.h index b60abea4c30..f5e1aa72958 100644 --- a/Source/cmGetTargetPropertyCommand.h +++ b/Source/cmGetTargetPropertyCommand.h @@ -17,7 +17,7 @@ class cmGetTargetPropertyCommand : public cmCommand { public: - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmGetTargetPropertyCommand; } @@ -41,7 +41,7 @@ class cmGetTargetPropertyCommand : public cmCommand { return "Get a property from a target."; } - + /** * Longer documentation. */ @@ -59,7 +59,7 @@ class cmGetTargetPropertyCommand : public cmCommand "\n" "See also the more general get_property() command."; } - + cmTypeMacro(cmGetTargetPropertyCommand, cmCommand); }; diff --git a/Source/cmGetTestPropertyCommand.h b/Source/cmGetTestPropertyCommand.h index af6bafaf31e..01f54d9516a 100644 --- a/Source/cmGetTestPropertyCommand.h +++ b/Source/cmGetTestPropertyCommand.h @@ -17,7 +17,7 @@ class cmGetTestPropertyCommand : public cmCommand { public: - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmGetTestPropertyCommand; } diff --git a/Source/cmGlobalBorlandMakefileGenerator.cxx b/Source/cmGlobalBorlandMakefileGenerator.cxx index b87b7e18642..8c6787a2c60 100644 --- a/Source/cmGlobalBorlandMakefileGenerator.cxx +++ b/Source/cmGlobalBorlandMakefileGenerator.cxx @@ -25,14 +25,14 @@ cmGlobalBorlandMakefileGenerator::cmGlobalBorlandMakefileGenerator() void cmGlobalBorlandMakefileGenerator -::EnableLanguage(std::vectorconst& l, - cmMakefile *mf, +::EnableLanguage(std::vectorconst& l, + cmMakefile *mf, bool optional) { std::string outdir = this->CMakeInstance->GetStartOutputDirectory(); mf->AddDefinition("BORLAND", "1"); mf->AddDefinition("CMAKE_GENERATOR_CC", "bcc32"); - mf->AddDefinition("CMAKE_GENERATOR_CXX", "bcc32"); + mf->AddDefinition("CMAKE_GENERATOR_CXX", "bcc32"); this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional); } diff --git a/Source/cmGlobalBorlandMakefileGenerator.h b/Source/cmGlobalBorlandMakefileGenerator.h index 0d386898967..c0cb8a6d1b0 100644 --- a/Source/cmGlobalBorlandMakefileGenerator.h +++ b/Source/cmGlobalBorlandMakefileGenerator.h @@ -23,9 +23,9 @@ class cmGlobalBorlandMakefileGenerator : public cmGlobalNMakeMakefileGenerator { public: cmGlobalBorlandMakefileGenerator(); - static cmGlobalGenerator* New() + static cmGlobalGenerator* New() { return new cmGlobalBorlandMakefileGenerator; } - + ///! Get the name for the generator. virtual const char* GetName() const { return cmGlobalBorlandMakefileGenerator::GetActualName();} @@ -33,13 +33,13 @@ class cmGlobalBorlandMakefileGenerator : public cmGlobalNMakeMakefileGenerator /** Get the documentation entry for this generator. */ virtual void GetDocumentation(cmDocumentationEntry& entry) const; - + ///! Create a local generator appropriate to this Global Generator virtual cmLocalGenerator *CreateLocalGenerator(); /** * Try to determine system infomation such as shared library - * extension, pthreads, byte order etc. + * extension, pthreads, byte order etc. */ virtual void EnableLanguage(std::vectorconst& languages, cmMakefile *, bool optional); diff --git a/Source/cmGlobalJOMMakefileGenerator.cxx b/Source/cmGlobalJOMMakefileGenerator.cxx index 411e28bf11e..ef42bd4d602 100644 --- a/Source/cmGlobalJOMMakefileGenerator.cxx +++ b/Source/cmGlobalJOMMakefileGenerator.cxx @@ -22,14 +22,14 @@ cmGlobalJOMMakefileGenerator::cmGlobalJOMMakefileGenerator() } void cmGlobalJOMMakefileGenerator -::EnableLanguage(std::vectorconst& l, - cmMakefile *mf, +::EnableLanguage(std::vectorconst& l, + cmMakefile *mf, bool optional) { - // pick a default + // pick a default mf->AddDefinition("CMAKE_GENERATOR_CC", "cl"); mf->AddDefinition("CMAKE_GENERATOR_CXX", "cl"); - if(!(cmSystemTools::GetEnv("INCLUDE") && + if(!(cmSystemTools::GetEnv("INCLUDE") && cmSystemTools::GetEnv("LIB")) ) { @@ -40,7 +40,7 @@ ::EnableLanguage(std::vectorconst& l, mf->IssueMessage(cmake::WARNING, message); } - + this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional); } diff --git a/Source/cmGlobalJOMMakefileGenerator.h b/Source/cmGlobalJOMMakefileGenerator.h index 08be4b4fc87..691ebdb8fe4 100644 --- a/Source/cmGlobalJOMMakefileGenerator.h +++ b/Source/cmGlobalJOMMakefileGenerator.h @@ -34,13 +34,13 @@ class cmGlobalJOMMakefileGenerator : public cmGlobalUnixMakefileGenerator3 /** Get the documentation entry for this generator. */ virtual void GetDocumentation(cmDocumentationEntry& entry) const; - + ///! Create a local generator appropriate to this Global Generator virtual cmLocalGenerator *CreateLocalGenerator(); /** * Try to determine system infomation such as shared library - * extension, pthreads, byte order etc. + * extension, pthreads, byte order etc. */ virtual void EnableLanguage(std::vectorconst& languages, cmMakefile *, bool optional); diff --git a/Source/cmGlobalKdevelopGenerator.cxx b/Source/cmGlobalKdevelopGenerator.cxx index f6994484731..a81c26c0f37 100644 --- a/Source/cmGlobalKdevelopGenerator.cxx +++ b/Source/cmGlobalKdevelopGenerator.cxx @@ -51,11 +51,11 @@ cmGlobalKdevelopGenerator::cmGlobalKdevelopGenerator() void cmGlobalKdevelopGenerator::Generate() { - // for each sub project in the project create + // for each sub project in the project create // a kdevelop project - for (std::map >::const_iterator - it = this->GlobalGenerator->GetProjectMap().begin(); - it!= this->GlobalGenerator->GetProjectMap().end(); + for (std::map >::const_iterator + it = this->GlobalGenerator->GetProjectMap().begin(); + it!= this->GlobalGenerator->GetProjectMap().end(); ++it) { cmMakefile* mf = it->second[0]->GetMakefile(); @@ -94,7 +94,7 @@ void cmGlobalKdevelopGenerator::Generate() break; } } - + // now create a project file this->CreateProjectFile(outputDir, projectDir, projectName, executable, cmakeFilePattern, fileToOpen); @@ -103,7 +103,7 @@ void cmGlobalKdevelopGenerator::Generate() bool cmGlobalKdevelopGenerator ::CreateFilelistFile(const std::vector& lgs, - const std::string& outputDir, + const std::string& outputDir, const std::string& projectDirIn, const std::string& projectname, std::string& cmakeFilePattern, @@ -115,24 +115,24 @@ ::CreateFilelistFile(const std::vector& lgs, std::set files; std::string tmp; - for (std::vector::const_iterator it=lgs.begin(); + for (std::vector::const_iterator it=lgs.begin(); it!=lgs.end(); it++) { cmMakefile* makefile=(*it)->GetMakefile(); const std::vector& listFiles=makefile->GetListFiles(); - for (std::vector::const_iterator lt=listFiles.begin(); + for (std::vector::const_iterator lt=listFiles.begin(); lt!=listFiles.end(); lt++) { tmp=*lt; cmSystemTools::ReplaceString(tmp, projectDir.c_str(), ""); // make sure the file is part of this source tree - if ((tmp[0]!='/') && - (strstr(tmp.c_str(), + if ((tmp[0]!='/') && + (strstr(tmp.c_str(), cmake::GetCMakeFilesDirectoryPostSlash())==0)) { files.insert(tmp); tmp=cmSystemTools::GetFilenameName(tmp); - //add all files which dont match the default + //add all files which dont match the default // */CMakeLists.txt;*cmake; to the file pattern if ((tmp!="CMakeLists.txt") && (strstr(tmp.c_str(), ".cmake")==0)) @@ -141,7 +141,7 @@ ::CreateFilelistFile(const std::vector& lgs, } } } - + //get all sources cmTargets& targets=makefile->GetTargets(); for (cmTargets::iterator ti = targets.begin(); @@ -158,8 +158,8 @@ ::CreateFilelistFile(const std::vector& lgs, cmSystemTools::ReplaceString(tmp, projectDir.c_str(), ""); - if ((tmp[0]!='/') && - (strstr(tmp.c_str(), + if ((tmp[0]!='/') && + (strstr(tmp.c_str(), cmake::GetCMakeFilesDirectoryPostSlash())==0) && (cmSystemTools::GetFilenameExtension(tmp)!=".moc")) { @@ -187,8 +187,8 @@ ::CreateFilelistFile(const std::vector& lgs, { tmp=*lt; cmSystemTools::ReplaceString(tmp, projectDir.c_str(), ""); - if ((tmp[0]!='/') && - (strstr(tmp.c_str(), + if ((tmp[0]!='/') && + (strstr(tmp.c_str(), cmake::GetCMakeFilesDirectoryPostSlash())==0)) { files.insert(tmp.c_str()); @@ -223,9 +223,9 @@ ::CreateFilelistFile(const std::vector& lgs, { return false; } - + fileToOpen=""; - for (std::set::const_iterator it=files.begin(); + for (std::set::const_iterator it=files.begin(); it!=files.end(); it++) { // get the full path to the file @@ -257,7 +257,7 @@ existing one, otherwise create a new one */ void cmGlobalKdevelopGenerator ::CreateProjectFile(const std::string& outputDir, const std::string& projectDir, - const std::string& projectname, + const std::string& projectname, const std::string& executable, const std::string& cmakeFilePattern, const std::string& fileToOpen) @@ -271,13 +271,13 @@ ::CreateProjectFile(const std::string& outputDir, if (cmSystemTools::FileExists(filename.c_str())) { - this->MergeProjectFiles(outputDir, projectDir, filename, - executable, cmakeFilePattern, + this->MergeProjectFiles(outputDir, projectDir, filename, + executable, cmakeFilePattern, fileToOpen, sessionFilename); } else { - // add all subdirectories which are cmake build directories to the + // add all subdirectories which are cmake build directories to the // kdevelop blacklist so they are not monitored for added or removed files // since this is handled by adding files to the cmake files cmsys::Directory d; @@ -295,7 +295,7 @@ ::CreateProjectFile(const std::string& outputDir, if (cmSystemTools::FileIsDirectory(tmp.c_str())) { tmp += "/CMakeCache.txt"; - if ((nextFile == "CMakeFiles") + if ((nextFile == "CMakeFiles") || (cmSystemTools::FileExists(tmp.c_str()))) { this->Blacklist.push_back(nextFile); @@ -305,17 +305,17 @@ ::CreateProjectFile(const std::string& outputDir, } } this->CreateNewProjectFile(outputDir, projectDir, filename, - executable, cmakeFilePattern, + executable, cmakeFilePattern, fileToOpen, sessionFilename); } } void cmGlobalKdevelopGenerator -::MergeProjectFiles(const std::string& outputDir, - const std::string& projectDir, - const std::string& filename, - const std::string& executable, +::MergeProjectFiles(const std::string& outputDir, + const std::string& projectDir, + const std::string& filename, + const std::string& executable, const std::string& cmakeFilePattern, const std::string& fileToOpen, const std::string& sessionFilename) @@ -323,8 +323,8 @@ ::MergeProjectFiles(const std::string& outputDir, std::ifstream oldProjectFile(filename.c_str()); if (!oldProjectFile) { - this->CreateNewProjectFile(outputDir, projectDir, filename, - executable, cmakeFilePattern, + this->CreateNewProjectFile(outputDir, projectDir, filename, + executable, cmakeFilePattern, fileToOpen, sessionFilename); return; } @@ -346,7 +346,7 @@ ::MergeProjectFiles(const std::string& outputDir, return; } - for (std::vector::const_iterator it=lines.begin(); + for (std::vector::const_iterator it=lines.begin(); it!=lines.end(); it++) { const char* line=(*it).c_str(); @@ -368,7 +368,7 @@ ::MergeProjectFiles(const std::string& outputDir, if (strstr(line, "")) { fout<< " KDevCustomProject\n"; - fout<< " " <" <\n"; //this one is important fout<<" true\n"; //and this one @@ -407,7 +407,7 @@ ::CreateNewProjectFile(const std::string& outputDir, bool hasSvn = cmSystemTools::FileExists((projectDir + "/.svn").c_str()); bool hasCvs = cmSystemTools::FileExists((projectDir + "/CVS").c_str()); - bool enableCxx = (this->GlobalGenerator->GetLanguageEnabled("C") + bool enableCxx = (this->GlobalGenerator->GetLanguageEnabled("C") || this->GlobalGenerator->GetLanguageEnabled("CXX")); bool enableFortran = this->GlobalGenerator->GetLanguageEnabled("Fortran"); std::string primaryLanguage = "C++"; @@ -425,7 +425,7 @@ ::CreateNewProjectFile(const std::string& outputDir, " KDevCustomProject\n" " " << primaryLanguage << "\n" " \n" - " " << projectDir.c_str() << + " " << projectDir.c_str() << "\n"; //this one is important fout<<" true\n"; //and this one @@ -472,7 +472,7 @@ ::CreateNewProjectFile(const std::string& outputDir, " 1\n" " false\n" " " << this->GlobalGenerator->GetLocalGenerators()[0]-> - GetMakefile()->GetRequiredDefinition("CMAKE_BUILD_TOOL") + GetMakefile()->GetRequiredDefinition("CMAKE_BUILD_TOOL") << " \n" " default\n" " \n" diff --git a/Source/cmGlobalMSYSMakefileGenerator.cxx b/Source/cmGlobalMSYSMakefileGenerator.cxx index 820e7e60586..80526aad8fa 100644 --- a/Source/cmGlobalMSYSMakefileGenerator.cxx +++ b/Source/cmGlobalMSYSMakefileGenerator.cxx @@ -22,7 +22,7 @@ cmGlobalMSYSMakefileGenerator::cmGlobalMSYSMakefileGenerator() this->UseLinkScript = false; } -std::string +std::string cmGlobalMSYSMakefileGenerator::FindMinGW(std::string const& makeloc) { std::string fstab = makeloc; @@ -45,8 +45,8 @@ cmGlobalMSYSMakefileGenerator::FindMinGW(std::string const& makeloc) } void cmGlobalMSYSMakefileGenerator -::EnableLanguage(std::vectorconst& l, - cmMakefile *mf, +::EnableLanguage(std::vectorconst& l, + cmMakefile *mf, bool optional) { this->FindMakeProgram(mf); diff --git a/Source/cmGlobalMSYSMakefileGenerator.h b/Source/cmGlobalMSYSMakefileGenerator.h index b5294acd535..b76a5bf9b4d 100644 --- a/Source/cmGlobalMSYSMakefileGenerator.h +++ b/Source/cmGlobalMSYSMakefileGenerator.h @@ -23,7 +23,7 @@ class cmGlobalMSYSMakefileGenerator : public cmGlobalUnixMakefileGenerator3 { public: cmGlobalMSYSMakefileGenerator(); - static cmGlobalGenerator* New() { + static cmGlobalGenerator* New() { return new cmGlobalMSYSMakefileGenerator; } ///! Get the name for the generator. @@ -33,13 +33,13 @@ class cmGlobalMSYSMakefileGenerator : public cmGlobalUnixMakefileGenerator3 /** Get the documentation entry for this generator. */ virtual void GetDocumentation(cmDocumentationEntry& entry) const; - + ///! Create a local generator appropriate to this Global Generator virtual cmLocalGenerator *CreateLocalGenerator(); /** * Try to determine system infomation such as shared library - * extension, pthreads, byte order etc. + * extension, pthreads, byte order etc. */ virtual void EnableLanguage(std::vectorconst& languages, cmMakefile *, bool optional); diff --git a/Source/cmGlobalMinGWMakefileGenerator.cxx b/Source/cmGlobalMinGWMakefileGenerator.cxx index a9e779847e8..d6045c8de88 100644 --- a/Source/cmGlobalMinGWMakefileGenerator.cxx +++ b/Source/cmGlobalMinGWMakefileGenerator.cxx @@ -22,10 +22,10 @@ cmGlobalMinGWMakefileGenerator::cmGlobalMinGWMakefileGenerator() } void cmGlobalMinGWMakefileGenerator -::EnableLanguage(std::vectorconst& l, - cmMakefile *mf, +::EnableLanguage(std::vectorconst& l, + cmMakefile *mf, bool optional) -{ +{ this->FindMakeProgram(mf); std::string makeProgram = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM"); std::vector locations; diff --git a/Source/cmGlobalMinGWMakefileGenerator.h b/Source/cmGlobalMinGWMakefileGenerator.h index 366146b0a91..9a6a5139f5d 100644 --- a/Source/cmGlobalMinGWMakefileGenerator.h +++ b/Source/cmGlobalMinGWMakefileGenerator.h @@ -23,7 +23,7 @@ class cmGlobalMinGWMakefileGenerator : public cmGlobalUnixMakefileGenerator3 { public: cmGlobalMinGWMakefileGenerator(); - static cmGlobalGenerator* New() { + static cmGlobalGenerator* New() { return new cmGlobalMinGWMakefileGenerator; } ///! Get the name for the generator. virtual const char* GetName() const { @@ -32,13 +32,13 @@ class cmGlobalMinGWMakefileGenerator : public cmGlobalUnixMakefileGenerator3 /** Get the documentation entry for this generator. */ virtual void GetDocumentation(cmDocumentationEntry& entry) const; - + ///! Create a local generator appropriate to this Global Generator virtual cmLocalGenerator *CreateLocalGenerator(); /** * Try to determine system infomation such as shared library - * extension, pthreads, byte order etc. + * extension, pthreads, byte order etc. */ virtual void EnableLanguage(std::vectorconst& languages, cmMakefile *, bool optional); diff --git a/Source/cmGlobalNMakeMakefileGenerator.cxx b/Source/cmGlobalNMakeMakefileGenerator.cxx index c3c15e70f5d..57a26c8ae73 100644 --- a/Source/cmGlobalNMakeMakefileGenerator.cxx +++ b/Source/cmGlobalNMakeMakefileGenerator.cxx @@ -22,14 +22,14 @@ cmGlobalNMakeMakefileGenerator::cmGlobalNMakeMakefileGenerator() } void cmGlobalNMakeMakefileGenerator -::EnableLanguage(std::vectorconst& l, - cmMakefile *mf, +::EnableLanguage(std::vectorconst& l, + cmMakefile *mf, bool optional) { - // pick a default + // pick a default mf->AddDefinition("CMAKE_GENERATOR_CC", "cl"); mf->AddDefinition("CMAKE_GENERATOR_CXX", "cl"); - if(!(cmSystemTools::GetEnv("INCLUDE") && + if(!(cmSystemTools::GetEnv("INCLUDE") && cmSystemTools::GetEnv("LIB")) ) { @@ -40,7 +40,7 @@ ::EnableLanguage(std::vectorconst& l, mf->IssueMessage(cmake::WARNING, message); } - + this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional); } diff --git a/Source/cmGlobalNMakeMakefileGenerator.h b/Source/cmGlobalNMakeMakefileGenerator.h index 70a8c190915..de33b8f9457 100644 --- a/Source/cmGlobalNMakeMakefileGenerator.h +++ b/Source/cmGlobalNMakeMakefileGenerator.h @@ -32,13 +32,13 @@ class cmGlobalNMakeMakefileGenerator : public cmGlobalUnixMakefileGenerator3 /** Get the documentation entry for this generator. */ virtual void GetDocumentation(cmDocumentationEntry& entry) const; - + ///! Create a local generator appropriate to this Global Generator virtual cmLocalGenerator *CreateLocalGenerator(); /** * Try to determine system infomation such as shared library - * extension, pthreads, byte order etc. + * extension, pthreads, byte order etc. */ virtual void EnableLanguage(std::vectorconst& languages, cmMakefile *, bool optional); diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 947a1c99de8..48ead25dbd6 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -94,7 +94,7 @@ ::GetDocumentation(cmDocumentationEntry& entry) const //---------------------------------------------------------------------------- void cmGlobalVisualStudio10Generator -::EnableLanguage(std::vectorconst & lang, +::EnableLanguage(std::vectorconst & lang, cmMakefile *mf, bool optional) { cmGlobalVisualStudio8Generator::EnableLanguage(lang, mf, optional); @@ -146,12 +146,12 @@ std::string cmGlobalVisualStudio10Generator::GetUserMacrosRegKeyBase() std::string cmGlobalVisualStudio10Generator ::GenerateBuildCommand(const char* makeProgram, - const char *projectName, + const char *projectName, const char* additionalOptions, const char *targetName, const char* config, bool ignoreErrors, bool fast) { // now build the test - std::string makeCommand + std::string makeCommand = cmSystemTools::ConvertToOutputPath(makeProgram); std::string lowerCaseCommand = makeCommand; cmSystemTools::LowerCase(lowerCaseCommand); @@ -177,7 +177,7 @@ ::GenerateBuildCommand(const char* makeProgram, if(!targetName || strlen(targetName) == 0) { targetName = "ALL_BUILD"; - } + } bool clean = false; if ( targetName && strcmp(targetName, "clean") == 0 ) { diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h index 060cdfff34d..47ce790f82e 100644 --- a/Source/cmGlobalVisualStudio10Generator.h +++ b/Source/cmGlobalVisualStudio10Generator.h @@ -20,26 +20,26 @@ * * cmGlobalVisualStudio10Generator manages UNIX build process for a tree */ -class cmGlobalVisualStudio10Generator : +class cmGlobalVisualStudio10Generator : public cmGlobalVisualStudio8Generator { public: cmGlobalVisualStudio10Generator(); - static cmGlobalGenerator* New() { + static cmGlobalGenerator* New() { return new cmGlobalVisualStudio10Generator; } - - virtual std::string + + virtual std::string GenerateBuildCommand(const char* makeProgram, - const char *projectName, + const char *projectName, const char* additionalOptions, const char *targetName, const char* config, bool ignoreErrors, bool); - + ///! Get the name for the generator. virtual const char* GetName() const { return cmGlobalVisualStudio10Generator::GetActualName();} static const char* GetActualName() {return "Visual Studio 10";} virtual void AddPlatformDefinitions(cmMakefile* mf); - + /** Get the documentation entry for this generator. */ virtual void GetDocumentation(cmDocumentationEntry& entry) const; @@ -50,9 +50,9 @@ class cmGlobalVisualStudio10Generator : /** * Try to determine system infomation such as shared library - * extension, pthreads, byte order etc. + * extension, pthreads, byte order etc. */ - virtual void EnableLanguage(std::vectorconst& languages, + virtual void EnableLanguage(std::vectorconst& languages, cmMakefile *, bool optional); virtual void WriteSLNHeader(std::ostream& fout); diff --git a/Source/cmGlobalVisualStudio6Generator.cxx b/Source/cmGlobalVisualStudio6Generator.cxx index fe44e200e91..cc703412985 100644 --- a/Source/cmGlobalVisualStudio6Generator.cxx +++ b/Source/cmGlobalVisualStudio6Generator.cxx @@ -36,13 +36,13 @@ cmGlobalVisualStudio6Generator::cmGlobalVisualStudio6Generator() } void cmGlobalVisualStudio6Generator -::EnableLanguage(std::vectorconst& lang, - cmMakefile *mf, +::EnableLanguage(std::vectorconst& lang, + cmMakefile *mf, bool optional) { mf->AddDefinition("CMAKE_GENERATOR_CC", "cl"); mf->AddDefinition("CMAKE_GENERATOR_CXX", "cl"); - mf->AddDefinition("CMAKE_GENERATOR_RC", "rc"); + mf->AddDefinition("CMAKE_GENERATOR_RC", "rc"); mf->AddDefinition("CMAKE_GENERATOR_NO_COMPILER_ENV", "1"); mf->AddDefinition("CMAKE_GENERATOR_Fortran", "ifort"); mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "X86"); @@ -84,10 +84,10 @@ void cmGlobalVisualStudio6Generator::GenerateConfigurations(cmMakefile* mf) std::string cmGlobalVisualStudio6Generator ::GenerateBuildCommand(const char* makeProgram, - const char *projectName, - const char* additionalOptions, + const char *projectName, + const char* additionalOptions, const char *targetName, - const char* config, + const char* config, bool ignoreErrors, bool) { @@ -100,7 +100,7 @@ ::GenerateBuildCommand(const char* makeProgram, "\\6.0\\Setup;VsCommonDir]/MSDev98/Bin"); cmSystemTools::ExpandRegistryValues(mp[0]); std::string originalCommand = makeProgram; - std::string makeCommand = + std::string makeCommand = cmSystemTools::FindProgram(makeProgram, mp); if(makeCommand.size() == 0) { @@ -116,7 +116,7 @@ ::GenerateBuildCommand(const char* makeProgram, // if there are spaces in the makeCommand, assume a full path // and convert it to a path with no spaces in it as the // RunSingleCommand does not like spaces -#if defined(_WIN32) && !defined(__CYGWIN__) +#if defined(_WIN32) && !defined(__CYGWIN__) if(makeCommand.find(' ') != std::string::npos) { cmSystemTools::GetShortPath(makeCommand.c_str(), makeCommand); @@ -226,7 +226,7 @@ ::WriteDSWFile(std::ostream& fout,cmLocalGenerator* root, } void cmGlobalVisualStudio6Generator -::OutputDSWFile(cmLocalGenerator* root, +::OutputDSWFile(cmLocalGenerator* root, std::vector& generators) { if(generators.size() == 0) @@ -250,7 +250,7 @@ ::OutputDSWFile(cmLocalGenerator* root, // output the DSW file void cmGlobalVisualStudio6Generator::OutputDSWFile() -{ +{ std::map >::iterator it; for(it = this->ProjectMap.begin(); it!= this->ProjectMap.end(); ++it) { @@ -259,16 +259,16 @@ void cmGlobalVisualStudio6Generator::OutputDSWFile() } // Write a dsp file into the DSW file, -// Note, that dependencies from executables to +// Note, that dependencies from executables to // the libraries it uses are also done here -void cmGlobalVisualStudio6Generator::WriteProject(std::ostream& fout, +void cmGlobalVisualStudio6Generator::WriteProject(std::ostream& fout, const char* dspname, const char* dir, cmTarget& target) { fout << "#########################################################" "######################\n\n"; - fout << "Project: \"" << dspname << "\"=" + fout << "Project: \"" << dspname << "\"=" << dir << "\\" << dspname << ".dsp - Package Owner=<4>\n\n"; fout << "Package=<5>\n{{{\n}}}\n\n"; fout << "Package=<4>\n"; @@ -304,22 +304,22 @@ void cmGlobalVisualStudio6Generator::WriteProject(std::ostream& fout, // Write a dsp file into the DSW file, -// Note, that dependencies from executables to +// Note, that dependencies from executables to // the libraries it uses are also done here -void cmGlobalVisualStudio6Generator::WriteExternalProject(std::ostream& fout, +void cmGlobalVisualStudio6Generator::WriteExternalProject(std::ostream& fout, const char* name, const char* location, const std::set& dependencies) { fout << "#########################################################" "######################\n\n"; - fout << "Project: \"" << name << "\"=" + fout << "Project: \"" << name << "\"=" << location << " - Package Owner=<4>\n\n"; fout << "Package=<5>\n{{{\n}}}\n\n"; fout << "Package=<4>\n"; fout << "{{{\n"; - + std::set::const_iterator i, end; // write dependencies. i = dependencies.begin(); @@ -347,7 +347,7 @@ void cmGlobalVisualStudio6Generator::WriteDSWFooter(std::ostream& fout) "##########################\n\n"; } - + // ouput standard header for dsw file void cmGlobalVisualStudio6Generator::WriteDSWHeader(std::ostream& fout) { diff --git a/Source/cmGlobalVisualStudio6Generator.h b/Source/cmGlobalVisualStudio6Generator.h index da08a125bcd..259aa8d033e 100644 --- a/Source/cmGlobalVisualStudio6Generator.h +++ b/Source/cmGlobalVisualStudio6Generator.h @@ -25,9 +25,9 @@ class cmGlobalVisualStudio6Generator : public cmGlobalVisualStudioGenerator { public: cmGlobalVisualStudio6Generator(); - static cmGlobalGenerator* New() { + static cmGlobalGenerator* New() { return new cmGlobalVisualStudio6Generator; } - + ///! Get the name for the generator. virtual const char* GetName() const { return cmGlobalVisualStudio6Generator::GetActualName();} @@ -35,15 +35,15 @@ class cmGlobalVisualStudio6Generator : public cmGlobalVisualStudioGenerator /** Get the documentation entry for this generator. */ virtual void GetDocumentation(cmDocumentationEntry& entry) const; - + ///! Create a local generator appropriate to this Global Generator virtual cmLocalGenerator *CreateLocalGenerator(); /** * Try to determine system infomation such as shared library - * extension, pthreads, byte order etc. + * extension, pthreads, byte order etc. */ - virtual void EnableLanguage(std::vectorconst& languages, + virtual void EnableLanguage(std::vectorconst& languages, cmMakefile *, bool optional); /** @@ -52,8 +52,8 @@ class cmGlobalVisualStudio6Generator : public cmGlobalVisualStudioGenerator */ virtual std::string GenerateBuildCommand(const char* makeProgram, const char *projectName, - const char* additionalOptions, - const char *targetName, + const char* additionalOptions, + const char *targetName, const char* config, bool ignoreErrors, bool fast); @@ -61,7 +61,7 @@ class cmGlobalVisualStudio6Generator : public cmGlobalVisualStudioGenerator /** * Generate the all required files for building this project/tree. This * basically creates a series of LocalGenerators for each directory and - * requests that they Generate. + * requests that they Generate. */ virtual void Generate(); @@ -90,9 +90,9 @@ class cmGlobalVisualStudio6Generator : public cmGlobalVisualStudioGenerator void GenerateConfigurations(cmMakefile* mf); void WriteDSWFile(std::ostream& fout); void WriteDSWHeader(std::ostream& fout); - void WriteProject(std::ostream& fout, + void WriteProject(std::ostream& fout, const char* name, const char* path, cmTarget &t); - void WriteExternalProject(std::ostream& fout, + void WriteExternalProject(std::ostream& fout, const char* name, const char* path, const std::set& dependencies); void WriteDSWFooter(std::ostream& fout); diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx index d6b653ca680..1da575ef8ad 100644 --- a/Source/cmGlobalVisualStudio71Generator.cxx +++ b/Source/cmGlobalVisualStudio71Generator.cxx @@ -99,7 +99,7 @@ void cmGlobalVisualStudio71Generator ::WriteSLNFile(std::ostream& fout, cmLocalGenerator* root, std::vector& generators) -{ +{ // Write out the header for a SLN file this->WriteSLNHeader(fout); @@ -156,7 +156,7 @@ ::WriteSolutionConfigurations(std::ostream& fout) //---------------------------------------------------------------------------- // Write a dsp file into the SLN file, -// Note, that dependencies from executables to +// Note, that dependencies from executables to // the libraries it uses are also done here void cmGlobalVisualStudio71Generator::WriteProject(std::ostream& fout, @@ -166,11 +166,11 @@ cmGlobalVisualStudio71Generator::WriteProject(std::ostream& fout, { // check to see if this is a fortran build const char* ext = ".vcproj"; - const char* project = + const char* project = "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \""; if(this->TargetIsFortranOnly(t)) { - ext = ".vfproj"; + ext = ".vfproj"; project = "Project(\"{6989167D-11E4-40FE-8C1A-2192A86A7E90}\") = \""; } const char* targetExt = t.GetProperty("GENERATOR_FILE_NAME_EXT"); @@ -187,7 +187,7 @@ cmGlobalVisualStudio71Generator::WriteProject(std::ostream& fout, fout << "\tProjectSection(ProjectDependencies) = postProject\n"; this->WriteProjectDepends(fout, dspname, dir, t); fout << "\tEndProjectSection\n"; - + fout <<"EndProject\n"; UtilityDependsMap::iterator ui = this->UtilityDepends.find(&t); @@ -208,7 +208,7 @@ cmGlobalVisualStudio71Generator::WriteProject(std::ostream& fout, //---------------------------------------------------------------------------- // Write a dsp file into the SLN file, -// Note, that dependencies from executables to +// Note, that dependencies from executables to // the libraries it uses are also done here void cmGlobalVisualStudio71Generator @@ -238,12 +238,12 @@ ::WriteProjectDepends(std::ostream& fout, // Write a dsp file into the SLN file, Note, that dependencies from // executables to the libraries it uses are also done here void cmGlobalVisualStudio71Generator -::WriteExternalProject(std::ostream& fout, +::WriteExternalProject(std::ostream& fout, const char* name, const char* location, const char* typeGuid, const std::set& depends) -{ +{ fout << "Project(\"{" << (typeGuid ? typeGuid : "8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942") << "}\") = \"" @@ -251,7 +251,7 @@ ::WriteExternalProject(std::ostream& fout, << this->ConvertToSolutionPath(location) << "\", \"{" << this->GetGUID(name) << "}\"\n"; - + // write out the dependencies here VS 7.1 includes dependencies with the // project instead of in the global section if(!depends.empty()) @@ -262,18 +262,18 @@ ::WriteExternalProject(std::ostream& fout, { if(it->size() > 0) { - fout << "\t\t{" - << this->GetGUID(it->c_str()) - << "} = {" - << this->GetGUID(it->c_str()) + fout << "\t\t{" + << this->GetGUID(it->c_str()) + << "} = {" + << this->GetGUID(it->c_str()) << "}\n"; } } fout << "\tEndProjectSection\n"; - } + } fout << "EndProject\n"; - + } @@ -289,7 +289,7 @@ ::WriteProjectConfigurations(std::ostream& fout, const char* name, for(std::vector::iterator i = this->Configurations.begin(); i != this->Configurations.end(); ++i) { - fout << "\t\t{" << guid << "}." << *i + fout << "\t\t{" << guid << "}." << *i << ".ActiveCfg = " << *i << "|" << (platformMapping ? platformMapping : "Win32") << std::endl; if(partOfDefaultBuild) diff --git a/Source/cmGlobalVisualStudio71Generator.h b/Source/cmGlobalVisualStudio71Generator.h index 503b708e5d8..285f202dcb1 100644 --- a/Source/cmGlobalVisualStudio71Generator.h +++ b/Source/cmGlobalVisualStudio71Generator.h @@ -24,9 +24,9 @@ class cmGlobalVisualStudio71Generator : public cmGlobalVisualStudio7Generator { public: cmGlobalVisualStudio71Generator(); - static cmGlobalGenerator* New() + static cmGlobalGenerator* New() { return new cmGlobalVisualStudio71Generator; } - + ///! Get the name for the generator. virtual const char* GetName() const { return cmGlobalVisualStudio71Generator::GetActualName();} @@ -34,7 +34,7 @@ class cmGlobalVisualStudio71Generator : public cmGlobalVisualStudio7Generator /** Get the documentation entry for this generator. */ virtual void GetDocumentation(cmDocumentationEntry& entry) const; - + ///! Create a local generator appropriate to this Global Generator virtual cmLocalGenerator *CreateLocalGenerator(); @@ -54,13 +54,13 @@ class cmGlobalVisualStudio71Generator : public cmGlobalVisualStudio7Generator protected: virtual const char* GetIDEVersion() { return "7.1"; } virtual void AddPlatformDefinitions(cmMakefile* mf); - virtual void WriteSLNFile(std::ostream& fout, + virtual void WriteSLNFile(std::ostream& fout, cmLocalGenerator* root, std::vector& generators); virtual void WriteSolutionConfigurations(std::ostream& fout); - virtual void WriteProject(std::ostream& fout, + virtual void WriteProject(std::ostream& fout, const char* name, const char* path, cmTarget &t); - virtual void WriteProjectDepends(std::ostream& fout, + virtual void WriteProjectDepends(std::ostream& fout, const char* name, const char* path, cmTarget &t); virtual void WriteProjectConfigurations(std::ostream& fout, const char* name, diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 6332d0b1027..d485d6ee34d 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -23,7 +23,7 @@ cmGlobalVisualStudio7Generator::cmGlobalVisualStudio7Generator() void cmGlobalVisualStudio7Generator -::EnableLanguage(std::vectorconst & lang, +::EnableLanguage(std::vectorconst & lang, cmMakefile *mf, bool optional) { mf->AddDefinition("CMAKE_GENERATOR_CC", "cl"); @@ -32,13 +32,13 @@ ::EnableLanguage(std::vectorconst & lang, mf->AddDefinition("CMAKE_GENERATOR_NO_COMPILER_ENV", "1"); mf->AddDefinition("CMAKE_GENERATOR_FC", "ifort"); this->AddPlatformDefinitions(mf); - + // Create list of configurations requested by user's cache, if any. this->cmGlobalGenerator::EnableLanguage(lang, mf, optional); this->GenerateConfigurations(mf); - + // if this environment variable is set, then copy it to - // a static cache entry. It will be used by + // a static cache entry. It will be used by // cmLocalGenerator::ConstructScript, to add an extra PATH // to all custom commands. This is because the VS IDE // does not use the environment it is run in, and this allows @@ -48,7 +48,7 @@ ::EnableLanguage(std::vectorconst & lang, if(extraPath) { mf->AddCacheDefinition - ("CMAKE_MSVCIDE_RUN_PATH", extraPath, + ("CMAKE_MSVCIDE_RUN_PATH", extraPath, "Saved environment variable CMAKE_MSVCIDE_RUN_PATH", cmCacheManager::STATIC); } @@ -64,7 +64,7 @@ void cmGlobalVisualStudio7Generator::AddPlatformDefinitions(cmMakefile* mf) std::string cmGlobalVisualStudio7Generator ::GenerateBuildCommand(const char* makeProgram, - const char *projectName, + const char *projectName, const char* additionalOptions, const char *targetName, const char* config, bool ignoreErrors, bool) { @@ -72,7 +72,7 @@ ::GenerateBuildCommand(const char* makeProgram, (void) ignoreErrors; // now build the test - std::string makeCommand = + std::string makeCommand = cmSystemTools::ConvertToOutputPath(makeProgram); std::string lowerCaseCommand = makeCommand; cmSystemTools::LowerCase(lowerCaseCommand); @@ -80,7 +80,7 @@ ::GenerateBuildCommand(const char* makeProgram, // if there are spaces in the makeCommand, assume a full path // and convert it to a path with no spaces in it as the // RunSingleCommand does not like spaces -#if defined(_WIN32) && !defined(__CYGWIN__) +#if defined(_WIN32) && !defined(__CYGWIN__) if(makeCommand.find(' ') != std::string::npos) { cmSystemTools::GetShortPath(makeCommand.c_str(), makeCommand); @@ -143,7 +143,7 @@ cmLocalGenerator *cmGlobalVisualStudio7Generator::CreateLocalGenerator() void cmGlobalVisualStudio7Generator::GenerateConfigurations(cmMakefile* mf) { // process the configurations - const char* ct + const char* ct = this->CMakeInstance->GetCacheDefinition("CMAKE_CONFIGURATION_TYPES"); if ( ct ) { @@ -152,7 +152,7 @@ void cmGlobalVisualStudio7Generator::GenerateConfigurations(cmMakefile* mf) for(std::vector::iterator i = argsOut.begin(); i != argsOut.end(); ++i) { - if(std::find(this->Configurations.begin(), + if(std::find(this->Configurations.begin(), this->Configurations.end(), *i) == this->Configurations.end()) { @@ -166,7 +166,7 @@ void cmGlobalVisualStudio7Generator::GenerateConfigurations(cmMakefile* mf) this->Configurations.push_back("Debug"); this->Configurations.push_back("Release"); } - + // Reset the entry to have a semi-colon separated list. std::string configs = this->Configurations[0]; for(unsigned int i=1; i < this->Configurations.size(); ++i) @@ -237,7 +237,7 @@ void cmGlobalVisualStudio7Generator::OutputSLNFile() void cmGlobalVisualStudio7Generator::WriteTargetConfigurations( - std::ostream& fout, + std::ostream& fout, cmLocalGenerator* root, OrderedTargetDependSet const& projectTargets) { @@ -258,7 +258,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetConfigurations( { bool partOfDefaultBuild = this->IsPartOfDefaultBuild( root->GetMakefile()->GetProjectName(), target); - const char *vcprojName = + const char *vcprojName = target->GetProperty("GENERATOR_FILE_NAME"); if (vcprojName) { @@ -369,13 +369,13 @@ void cmGlobalVisualStudio7Generator::WriteTargetDepends( projectTargets.begin(); tt != projectTargets.end(); ++tt) { cmTarget* target = *tt; - cmMakefile* mf = target->GetMakefile(); - const char *vcprojName = + cmMakefile* mf = target->GetMakefile(); + const char *vcprojName = target->GetProperty("GENERATOR_FILE_NAME"); if (vcprojName) - { + { std::string dir = mf->GetStartDirectory(); - this->WriteProjectDepends(fout, vcprojName, + this->WriteProjectDepends(fout, vcprojName, dir.c_str(), *target); } } @@ -409,7 +409,7 @@ ::WriteSLNFile(std::ostream& fout, // Write out the configurations information for the solution fout << "Global\n" << "\tGlobalSection(SolutionConfiguration) = preSolution\n"; - + int c = 0; for(std::vector::iterator i = this->Configurations.begin(); i != this->Configurations.end(); ++i) @@ -418,7 +418,7 @@ ::WriteSLNFile(std::ostream& fout, c++; } fout << "\tEndGlobalSection\n"; - // Write out project(target) depends + // Write out project(target) depends fout << "\tGlobalSection(ProjectDependencies) = postSolution\n"; this->WriteTargetDepends(fout, orderedProjectTargets); fout << "\tEndGlobalSection\n"; @@ -506,12 +506,12 @@ cmGlobalVisualStudio7Generator::ConvertToSolutionPath(const char* path) } // Write a dsp file into the SLN file, -// Note, that dependencies from executables to +// Note, that dependencies from executables to // the libraries it uses are also done here -void cmGlobalVisualStudio7Generator::WriteProject(std::ostream& fout, +void cmGlobalVisualStudio7Generator::WriteProject(std::ostream& fout, const char* dspname, const char* dir, cmTarget& target) -{ +{ // check to see if this is a fortran build const char* ext = ".vcproj"; const char* project = @@ -544,7 +544,7 @@ void cmGlobalVisualStudio7Generator::WriteProject(std::ostream& fout, // Write a dsp file into the SLN file, -// Note, that dependencies from executables to +// Note, that dependencies from executables to // the libraries it uses are also done here void cmGlobalVisualStudio7Generator @@ -607,14 +607,14 @@ ::WriteProjectConfigurations(std::ostream& fout, const char* name, // Write a dsp file into the SLN file, -// Note, that dependencies from executables to +// Note, that dependencies from executables to // the libraries it uses are also done here -void cmGlobalVisualStudio7Generator::WriteExternalProject(std::ostream& fout, +void cmGlobalVisualStudio7Generator::WriteExternalProject(std::ostream& fout, const char* name, const char* location, const char* typeGuid, const std::set&) -{ +{ std::string d = cmSystemTools::ConvertToOutputPath(location); fout << "Project(" << "\"{" @@ -639,7 +639,7 @@ void cmGlobalVisualStudio7Generator::WriteSLNFooter(std::ostream& fout) << "EndGlobal\n"; } - + // ouput standard header for dsw file void cmGlobalVisualStudio7Generator::WriteSLNHeader(std::ostream& fout) { @@ -705,7 +705,7 @@ std::string cmGlobalVisualStudio7Generator::GetGUID(const char* name) { std::string guidStoreName = name; guidStoreName += "_GUID_CMAKE"; - const char* storedGUID = + const char* storedGUID = this->CMakeInstance->GetCacheDefinition(guidStoreName.c_str()); if(storedGUID) { @@ -733,8 +733,8 @@ void cmGlobalVisualStudio7Generator::CreateGUID(const char* name) ret = reinterpret_cast(uidstr); RpcStringFree(&uidstr); ret = cmSystemTools::UpperCase(ret); - this->CMakeInstance->AddCacheEntry(guidStoreName.c_str(), - ret.c_str(), "Stored GUID", + this->CMakeInstance->AddCacheEntry(guidStoreName.c_str(), + ret.c_str(), "Stored GUID", cmCacheManager::INTERNAL); } @@ -775,7 +775,7 @@ bool cmGlobalVisualStudio7Generator::IsPartOfDefaultBuild(const char* project, { return false; } - // if it is a utilitiy target then only make it part of the + // if it is a utilitiy target then only make it part of the // default build if another target depends on it int type = target->GetType(); if (type == cmTarget::GLOBAL_TARGET) @@ -785,7 +785,7 @@ bool cmGlobalVisualStudio7Generator::IsPartOfDefaultBuild(const char* project, if(type == cmTarget::UTILITY) { return this->IsDependedOn(project, target); - } + } // default is to be part of the build return true; } diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx index e7c42327d15..a74a4eebec5 100644 --- a/Source/cmGlobalVisualStudio8Generator.cxx +++ b/Source/cmGlobalVisualStudio8Generator.cxx @@ -35,7 +35,7 @@ cmLocalGenerator *cmGlobalVisualStudio8Generator::CreateLocalGenerator() lg->SetGlobalGenerator(this); return lg; } - + //---------------------------------------------------------------------------- // ouput standard header for dsw file void cmGlobalVisualStudio8Generator::WriteSLNHeader(std::ostream& fout) @@ -336,7 +336,7 @@ bool cmGlobalVisualStudio8Generator::NeedLinkLibraryDependencies( //---------------------------------------------------------------------------- static cmVS7FlagTable cmVS8ExtraFlagTable[] = -{ +{ {"CallingConvention", "Gd", "cdecl", "0", 0 }, {"CallingConvention", "Gr", "fastcall", "1", 0 }, {"CallingConvention", "Gz", "stdcall", "2", 0 }, diff --git a/Source/cmGlobalVisualStudio8Generator.h b/Source/cmGlobalVisualStudio8Generator.h index 7dae4290773..31501bc90d5 100644 --- a/Source/cmGlobalVisualStudio8Generator.h +++ b/Source/cmGlobalVisualStudio8Generator.h @@ -24,9 +24,9 @@ class cmGlobalVisualStudio8Generator : public cmGlobalVisualStudio71Generator { public: cmGlobalVisualStudio8Generator(); - static cmGlobalGenerator* New() { + static cmGlobalGenerator* New() { return new cmGlobalVisualStudio8Generator; } - + ///! Get the name for the generator. virtual const char* GetName() const { return cmGlobalVisualStudio8Generator::GetActualName();} @@ -36,7 +36,7 @@ class cmGlobalVisualStudio8Generator : public cmGlobalVisualStudio71Generator /** Get the documentation entry for this generator. */ virtual void GetDocumentation(cmDocumentationEntry& entry) const; - + ///! Create a local generator appropriate to this Global Generator virtual cmLocalGenerator *CreateLocalGenerator(); diff --git a/Source/cmGlobalVisualStudio8Win64Generator.h b/Source/cmGlobalVisualStudio8Win64Generator.h index 084ba697cc7..136cdb8b44d 100644 --- a/Source/cmGlobalVisualStudio8Win64Generator.h +++ b/Source/cmGlobalVisualStudio8Win64Generator.h @@ -20,14 +20,14 @@ * * cmGlobalVisualStudio8Win64Generator manages UNIX build process for a tree */ -class cmGlobalVisualStudio8Win64Generator : +class cmGlobalVisualStudio8Win64Generator : public cmGlobalVisualStudio8Generator { public: cmGlobalVisualStudio8Win64Generator(); - static cmGlobalGenerator* New() { + static cmGlobalGenerator* New() { return new cmGlobalVisualStudio8Win64Generator; } - + ///! Get the name for the generator. virtual const char* GetName() const { return cmGlobalVisualStudio8Win64Generator::GetActualName();} @@ -43,7 +43,7 @@ class cmGlobalVisualStudio8Win64Generator : /** * Try to determine system infomation such as shared library - * extension, pthreads, byte order etc. + * extension, pthreads, byte order etc. */ virtual void AddPlatformDefinitions(cmMakefile *); }; diff --git a/Source/cmGlobalVisualStudio9Generator.cxx b/Source/cmGlobalVisualStudio9Generator.cxx index f082675eb9e..fcf00d532eb 100644 --- a/Source/cmGlobalVisualStudio9Generator.cxx +++ b/Source/cmGlobalVisualStudio9Generator.cxx @@ -59,7 +59,7 @@ ::GetDocumentation(cmDocumentationEntry& entry) const //---------------------------------------------------------------------------- void cmGlobalVisualStudio9Generator -::EnableLanguage(std::vectorconst & lang, +::EnableLanguage(std::vectorconst & lang, cmMakefile *mf, bool optional) { cmGlobalVisualStudio8Generator::EnableLanguage(lang, mf, optional); diff --git a/Source/cmGlobalVisualStudio9Generator.h b/Source/cmGlobalVisualStudio9Generator.h index bfb03c4c59c..361b58c7601 100644 --- a/Source/cmGlobalVisualStudio9Generator.h +++ b/Source/cmGlobalVisualStudio9Generator.h @@ -20,20 +20,20 @@ * * cmGlobalVisualStudio9Generator manages UNIX build process for a tree */ -class cmGlobalVisualStudio9Generator : +class cmGlobalVisualStudio9Generator : public cmGlobalVisualStudio8Generator { public: cmGlobalVisualStudio9Generator(); - static cmGlobalGenerator* New() { + static cmGlobalGenerator* New() { return new cmGlobalVisualStudio9Generator; } - + ///! Get the name for the generator. virtual const char* GetName() const { return cmGlobalVisualStudio9Generator::GetActualName();} static const char* GetActualName() {return "Visual Studio 9 2008";} virtual void AddPlatformDefinitions(cmMakefile* mf); - + /** Get the documentation entry for this generator. */ virtual void GetDocumentation(cmDocumentationEntry& entry) const; @@ -42,9 +42,9 @@ class cmGlobalVisualStudio9Generator : /** * Try to determine system infomation such as shared library - * extension, pthreads, byte order etc. + * extension, pthreads, byte order etc. */ - virtual void EnableLanguage(std::vectorconst& languages, + virtual void EnableLanguage(std::vectorconst& languages, cmMakefile *, bool optional); virtual void WriteSLNHeader(std::ostream& fout); diff --git a/Source/cmGlobalVisualStudio9Win64Generator.h b/Source/cmGlobalVisualStudio9Win64Generator.h index f6dcc03cd72..0ce1afe3d47 100644 --- a/Source/cmGlobalVisualStudio9Win64Generator.h +++ b/Source/cmGlobalVisualStudio9Win64Generator.h @@ -20,14 +20,14 @@ * * cmGlobalVisualStudio8Win64Generator manages UNIX build process for a tree */ -class cmGlobalVisualStudio9Win64Generator : +class cmGlobalVisualStudio9Win64Generator : public cmGlobalVisualStudio9Generator { public: cmGlobalVisualStudio9Win64Generator(); - static cmGlobalGenerator* New() { + static cmGlobalGenerator* New() { return new cmGlobalVisualStudio9Win64Generator; } - + ///! Get the name for the generator. virtual const char* GetName() const { return cmGlobalVisualStudio9Win64Generator::GetActualName();} @@ -43,7 +43,7 @@ class cmGlobalVisualStudio9Win64Generator : /** * Try to determine system infomation such as shared library - * extension, pthreads, byte order etc. + * extension, pthreads, byte order etc. */ virtual void AddPlatformDefinitions(cmMakefile *); }; diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index 2a918c925e6..a2b4c6519a6 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -53,7 +53,7 @@ void cmGlobalVisualStudioGenerator::Generate() { // Use no actual command lines so that the target itself is not // considered always out of date. - cmTarget* allBuild = + cmTarget* allBuild = gen[0]->GetMakefile()-> AddUtilityCommand("ALL_BUILD", true, no_working_dir, no_depends, no_commands, false, diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h index b62ba229d39..27fc8cf2e30 100644 --- a/Source/cmGlobalVisualStudioGenerator.h +++ b/Source/cmGlobalVisualStudioGenerator.h @@ -58,7 +58,7 @@ class cmGlobalVisualStudioGenerator : public cmGlobalGenerator */ virtual void CallVisualStudioMacro(MacroName m, const char* vsSolutionFile = 0); - + // return true if target is fortran only bool TargetIsFortranOnly(cmTarget& t); diff --git a/Source/cmGlobalWatcomWMakeGenerator.cxx b/Source/cmGlobalWatcomWMakeGenerator.cxx index 8c6dff9bd8d..45b171ff245 100644 --- a/Source/cmGlobalWatcomWMakeGenerator.cxx +++ b/Source/cmGlobalWatcomWMakeGenerator.cxx @@ -23,11 +23,11 @@ cmGlobalWatcomWMakeGenerator::cmGlobalWatcomWMakeGenerator() } void cmGlobalWatcomWMakeGenerator -::EnableLanguage(std::vectorconst& l, - cmMakefile *mf, +::EnableLanguage(std::vectorconst& l, + cmMakefile *mf, bool optional) { - // pick a default + // pick a default mf->AddDefinition("WATCOM", "1"); mf->AddDefinition("CMAKE_QUOTE_INCLUDE_PATHS", "1"); mf->AddDefinition("CMAKE_MANGLE_OBJECT_FILE_NAMES", "1"); diff --git a/Source/cmGlobalWatcomWMakeGenerator.h b/Source/cmGlobalWatcomWMakeGenerator.h index b416bb18161..ee16eaebc38 100644 --- a/Source/cmGlobalWatcomWMakeGenerator.h +++ b/Source/cmGlobalWatcomWMakeGenerator.h @@ -31,15 +31,15 @@ class cmGlobalWatcomWMakeGenerator : public cmGlobalUnixMakefileGenerator3 /** Get the documentation entry for this generator. */ virtual void GetDocumentation(cmDocumentationEntry& entry) const; - + ///! Create a local generator appropriate to this Global Generator virtual cmLocalGenerator *CreateLocalGenerator(); /** * Try to determine system infomation such as shared library - * extension, pthreads, byte order etc. + * extension, pthreads, byte order etc. */ - virtual void EnableLanguage(std::vectorconst& languages, + virtual void EnableLanguage(std::vectorconst& languages, cmMakefile *, bool optional); }; diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h index 800963b9ced..afa1ca22eb0 100644 --- a/Source/cmGlobalXCodeGenerator.h +++ b/Source/cmGlobalXCodeGenerator.h @@ -38,15 +38,15 @@ class cmGlobalXCodeGenerator : public cmGlobalGenerator /** Get the documentation entry for this generator. */ virtual void GetDocumentation(cmDocumentationEntry& entry) const; - + ///! Create a local generator appropriate to this Global Generator virtual cmLocalGenerator *CreateLocalGenerator(); /** * Try to determine system infomation such as shared library - * extension, pthreads, byte order etc. + * extension, pthreads, byte order etc. */ - virtual void EnableLanguage(std::vectorconst& languages, + virtual void EnableLanguage(std::vectorconst& languages, cmMakefile *, bool optional); /** * Try running cmake and building a file. This is used for dynalically @@ -54,16 +54,16 @@ class cmGlobalXCodeGenerator : public cmGlobalGenerator */ virtual std::string GenerateBuildCommand(const char* makeProgram, const char *projectName, - const char* additionalOptions, + const char* additionalOptions, const char *targetName, - const char* config, + const char* config, bool ignoreErrors, bool fast); /** * Generate the all required files for building this project/tree. This * basically creates a series of LocalGenerators for each directory and - * requests that they Generate. + * requests that they Generate. */ virtual void Generate(); @@ -82,7 +82,7 @@ class cmGlobalXCodeGenerator : public cmGlobalGenerator i.e. "Can I build Debug and Release in the same tree?" */ virtual bool IsMultiConfig(); -private: +private: cmXCodeObject* CreateOrGetPBXGroup(cmTarget& cmtarget, cmSourceGroup* sg); cmXCodeObject* CreatePBXGroup(cmXCodeObject *parent, @@ -107,18 +107,18 @@ class cmGlobalXCodeGenerator : public cmGlobalGenerator void AddCommandsToBuildPhase(cmXCodeObject* buildphase, cmTarget& target, - std::vector + std::vector const & commands, const char* commandFileName); - - void CreateCustomRulesMakefile(const char* makefileBasename, + + void CreateCustomRulesMakefile(const char* makefileBasename, cmTarget& target, std::vector const & commands, const char* configName, - const std::map& + const std::map& multipleOutputPairs ); - + cmXCodeObject* FindXCodeTarget(cmTarget*); std::string GetOrCreateId(const char* name, const char* id); @@ -135,9 +135,9 @@ class cmGlobalXCodeGenerator : public cmGlobalGenerator const char* GetTargetFileType(cmTarget& cmtarget); const char* GetTargetProductType(cmTarget& cmtarget); std::string AddConfigurations(cmXCodeObject* target, cmTarget& cmtarget); - void AppendOrAddBuildSetting(cmXCodeObject* settings, const char* attr, + void AppendOrAddBuildSetting(cmXCodeObject* settings, const char* attr, const char* value); - void AppendBuildSettingAttribute(cmXCodeObject* target, const char* attr, + void AppendBuildSettingAttribute(cmXCodeObject* target, const char* attr, const char* value, const char* configName); cmXCodeObject* CreateUtilityTarget(cmTarget& target); void AddDependAndLinkInformation(cmXCodeObject* target); @@ -161,10 +161,10 @@ class cmGlobalXCodeGenerator : public cmGlobalGenerator const std::string &lang); cmXCodeObject* CreateXCodeFileReference(cmSourceFile* sf, cmTarget& cmtarget); - cmXCodeObject* CreateXCodeSourceFile(cmLocalGenerator* gen, + cmXCodeObject* CreateXCodeSourceFile(cmLocalGenerator* gen, cmSourceFile* sf, cmTarget& cmtarget); - void CreateXCodeTargets(cmLocalGenerator* gen, + void CreateXCodeTargets(cmLocalGenerator* gen, std::vector&); bool IsHeaderFile(cmSourceFile*); void AddDependTarget(cmXCodeObject* target, @@ -172,9 +172,9 @@ class cmGlobalXCodeGenerator : public cmGlobalGenerator void CreateXCodeDependHackTarget(std::vector& targets); bool SpecialTargetEmitted(std::string const& tname); void SetGenerationRoot(cmLocalGenerator* root); - void AddExtraTargets(cmLocalGenerator* root, + void AddExtraTargets(cmLocalGenerator* root, std::vector& gens); - cmXCodeObject* CreateBuildPhase(const char* name, + cmXCodeObject* CreateBuildPhase(const char* name, const char* name2, cmTarget& cmtarget, const std::vector&); diff --git a/Source/cmHexFileConverter.cxx b/Source/cmHexFileConverter.cxx index 2ff794573fe..a540825ff59 100644 --- a/Source/cmHexFileConverter.cxx +++ b/Source/cmHexFileConverter.cxx @@ -22,8 +22,8 @@ // might go to SystemTools ? static bool cm_IsHexChar(char c) { - return (((c >= '0') && (c <= '9')) - || ((c >= 'a') && (c <= 'f')) + return (((c >= '0') && (c <= '9')) + || ((c >= 'a') && (c <= 'f')) || ((c >= 'A') && (c <= 'F'))); } @@ -45,7 +45,7 @@ static unsigned int ChompStrlen(const char* line) return length; } -static bool OutputBin(FILE* file, const char * buf, +static bool OutputBin(FILE* file, const char * buf, unsigned int startIndex, unsigned int stopIndex) { bool success = true; @@ -77,7 +77,7 @@ static bool OutputBin(FILE* file, const char * buf, static bool ConvertMotorolaSrecLine(const char* buf, FILE* outFile) { unsigned int slen = ChompStrlen(buf); - if ((slen < MOTOROLA_SREC_MIN_LINE_LENGTH) + if ((slen < MOTOROLA_SREC_MIN_LINE_LENGTH) || (slen > MOTOROLA_SREC_MAX_LINE_LENGTH)) { return false; @@ -125,7 +125,7 @@ static bool ConvertMotorolaSrecLine(const char* buf, FILE* outFile) static bool ConvertIntelHexLine(const char* buf, FILE* outFile) { unsigned int slen = ChompStrlen(buf); - if ((slen < INTEL_HEX_MIN_LINE_LENGTH) + if ((slen < INTEL_HEX_MIN_LINE_LENGTH) || (slen > INTEL_HEX_MAX_LINE_LENGTH)) { return false; @@ -148,7 +148,7 @@ static bool ConvertIntelHexLine(const char* buf, FILE* outFile) dataStart = 9; } // ignore extra address records - else if ((buf[8] == '2') || (buf[8] == '3') || (buf[8] == '4') + else if ((buf[8] == '2') || (buf[8] == '3') || (buf[8] == '4') || (buf[8] == '5')) { return true; diff --git a/Source/cmHexFileConverter.h b/Source/cmHexFileConverter.h index 94c757f7904..e11d74a2fe6 100644 --- a/Source/cmHexFileConverter.h +++ b/Source/cmHexFileConverter.h @@ -13,7 +13,7 @@ #define cmHexFileConverter_h /** \class cmHexFileConverter - * \brief Can detects Intel Hex and Motorola S-record files and convert them + * \brief Can detects Intel Hex and Motorola S-record files and convert them * to binary files. * */ diff --git a/Source/cmIfCommand.h b/Source/cmIfCommand.h index 94e4d998a0b..4893a17b64d 100644 --- a/Source/cmIfCommand.h +++ b/Source/cmIfCommand.h @@ -26,7 +26,7 @@ class cmIfFunctionBlocker : public cmFunctionBlocker cmExecutionStatus &); virtual bool ShouldRemove(const cmListFileFunction& lff, cmMakefile &mf); - + std::vector Args; std::vector Functions; bool IsBlocking; @@ -41,7 +41,7 @@ class cmIfCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmIfCommand; } @@ -52,7 +52,7 @@ class cmIfCommand : public cmCommand */ virtual bool InvokeInitialPass(const std::vector& args, cmExecutionStatus &); - + /** * This is called when the command is first encountered in * the CMakeLists.txt file. @@ -72,7 +72,7 @@ class cmIfCommand : public cmCommand { return "Conditionally execute a group of commands."; } - + /** * This determines if the command is invoked when in script mode. */ @@ -238,22 +238,22 @@ class cmIfCommand : public cmCommand "7) The left and right hand arguments to AND OR are " "independently tested to see if they are boolean constants, if " "so they are used as such, otherwise they are assumed to be " - "variables and are dereferenced. \n" + "variables and are dereferenced. \n" ; } // this is a shared function for both If and Else to determine if the // arguments were valid, and if so, was the response true. If there is // an error, the errorString will be set. - static bool IsTrue(const std::vector &args, - std::string &errorString, cmMakefile *mf, + static bool IsTrue(const std::vector &args, + std::string &errorString, cmMakefile *mf, cmake::MessageType &status); - + // Get a definition from the makefile. If it doesn't exist, // return the original string. static const char* GetVariableOrString(const char* str, const cmMakefile* mf); - + cmTypeMacro(cmIfCommand, cmCommand); }; diff --git a/Source/cmIncludeDirectoryCommand.cxx b/Source/cmIncludeDirectoryCommand.cxx index 9e6f4b6efbb..4dd98a16ccc 100644 --- a/Source/cmIncludeDirectoryCommand.cxx +++ b/Source/cmIncludeDirectoryCommand.cxx @@ -67,8 +67,8 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) // output from a program and passing it into a command the cleanup doesn't // always happen // -void cmIncludeDirectoryCommand::AddDirectory(const char *i, - bool before, +void cmIncludeDirectoryCommand::AddDirectory(const char *i, + bool before, bool system) { // break apart any line feed arguments @@ -91,7 +91,7 @@ void cmIncludeDirectoryCommand::AddDirectory(const char *i, // remove any leading or trailing spaces and \r std::string::size_type b = ret.find_first_not_of(" \r"); std::string::size_type e = ret.find_last_not_of(" \r"); - if ((b!=ret.npos) && (e!=ret.npos)) + if ((b!=ret.npos) && (e!=ret.npos)) { ret.assign(ret, b, 1+e-b); // copy the remaining substring } diff --git a/Source/cmIncludeDirectoryCommand.h b/Source/cmIncludeDirectoryCommand.h index dcc116aa848..6751fc02f08 100644 --- a/Source/cmIncludeDirectoryCommand.h +++ b/Source/cmIncludeDirectoryCommand.h @@ -26,7 +26,7 @@ class cmIncludeDirectoryCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmIncludeDirectoryCommand; } @@ -50,7 +50,7 @@ class cmIncludeDirectoryCommand : public cmCommand { return "Add include directories to the build."; } - + /** * More documentation. */ @@ -76,7 +76,7 @@ class cmIncludeDirectoryCommand : public cmCommand "directories are meant as system include directories on some " "platforms."; } - + cmTypeMacro(cmIncludeDirectoryCommand, cmCommand); protected: diff --git a/Source/cmIncludeExternalMSProjectCommand.cxx b/Source/cmIncludeExternalMSProjectCommand.cxx index d219c169ae6..d40d8fe7226 100644 --- a/Source/cmIncludeExternalMSProjectCommand.cxx +++ b/Source/cmIncludeExternalMSProjectCommand.cxx @@ -15,7 +15,7 @@ bool cmIncludeExternalMSProjectCommand ::InitialPass(std::vector const& args, cmExecutionStatus &) { - if(args.size() < 2) + if(args.size() < 2) { this->SetError("INCLUDE_EXTERNAL_MSPROJECT called with incorrect " "number of arguments"); @@ -77,7 +77,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) } // Create a target instance for this utility. - cmTarget* target=this->Makefile->AddNewTarget(cmTarget::UTILITY, + cmTarget* target=this->Makefile->AddNewTarget(cmTarget::UTILITY, utility_name.c_str()); target->SetProperty("GENERATOR_FILE_NAME", utility_name.c_str()); diff --git a/Source/cmIncludeExternalMSProjectCommand.h b/Source/cmIncludeExternalMSProjectCommand.h index 2b2ed0d1513..d5cec01ebb8 100644 --- a/Source/cmIncludeExternalMSProjectCommand.h +++ b/Source/cmIncludeExternalMSProjectCommand.h @@ -27,7 +27,7 @@ class cmIncludeExternalMSProjectCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmIncludeExternalMSProjectCommand; } @@ -38,7 +38,7 @@ class cmIncludeExternalMSProjectCommand : public cmCommand */ virtual bool InitialPass(std::vector const& args, cmExecutionStatus &status); - + /** * The name of the command as specified in CMakeList.txt. */ @@ -51,7 +51,7 @@ class cmIncludeExternalMSProjectCommand : public cmCommand { return "Include an external Microsoft project file in a workspace."; } - + /** * More documentation. */ @@ -75,7 +75,7 @@ class cmIncludeExternalMSProjectCommand : public cmCommand "(e.g. WIX projects). " "These options are not supported by the Visual Studio 6 generator."; } - + cmTypeMacro(cmIncludeExternalMSProjectCommand, cmCommand); }; diff --git a/Source/cmIncludeRegularExpressionCommand.cxx b/Source/cmIncludeRegularExpressionCommand.cxx index b0d8325d3a9..ef6e8c6ae3a 100644 --- a/Source/cmIncludeRegularExpressionCommand.cxx +++ b/Source/cmIncludeRegularExpressionCommand.cxx @@ -21,12 +21,12 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) return false; } this->Makefile->SetIncludeRegularExpression(args[0].c_str()); - + if(args.size() > 1) { this->Makefile->SetComplainRegularExpression(args[1].c_str()); } - + return true; } diff --git a/Source/cmIncludeRegularExpressionCommand.h b/Source/cmIncludeRegularExpressionCommand.h index 7c633c0a3e6..2e4177548aa 100644 --- a/Source/cmIncludeRegularExpressionCommand.h +++ b/Source/cmIncludeRegularExpressionCommand.h @@ -26,7 +26,7 @@ class cmIncludeRegularExpressionCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmIncludeRegularExpressionCommand; } @@ -37,7 +37,7 @@ class cmIncludeRegularExpressionCommand : public cmCommand */ virtual bool InitialPass(std::vector const& args, cmExecutionStatus &status); - + /** * The name of the command as specified in CMakeList.txt. */ @@ -50,7 +50,7 @@ class cmIncludeRegularExpressionCommand : public cmCommand { return "Set the regular expression used for dependency checking."; } - + /** * More documentation. */ @@ -66,7 +66,7 @@ class cmIncludeRegularExpressionCommand : public cmCommand " regex_match = \"^.*$\" (match everything)\n" " regex_complain = \"^$\" (match empty string only)"; } - + cmTypeMacro(cmIncludeRegularExpressionCommand, cmCommand); }; diff --git a/Source/cmInstallFilesCommand.h b/Source/cmInstallFilesCommand.h index d3c7ed67fcb..bb0a6ccaf40 100644 --- a/Source/cmInstallFilesCommand.h +++ b/Source/cmInstallFilesCommand.h @@ -18,7 +18,7 @@ * \brief Specifies where to install some files * * cmInstallFilesCommand specifies the relative path where a list of - * files should be installed. + * files should be installed. */ class cmInstallFilesCommand : public cmCommand { @@ -26,7 +26,7 @@ class cmInstallFilesCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmInstallFilesCommand; } @@ -50,7 +50,7 @@ class cmInstallFilesCommand : public cmCommand { return "Deprecated. Use the install(FILES ) command instead."; } - + /** * This is called at the end after all the information * specified by the command is accumulated. Most commands do @@ -90,7 +90,7 @@ class cmInstallFilesCommand : public cmCommand "The directory

is relative to the installation prefix, which " "is stored in the variable CMAKE_INSTALL_PREFIX."; } - + /** This command is kept for compatibility with older CMake versions. */ virtual bool IsDiscouraged() const { @@ -102,7 +102,7 @@ class cmInstallFilesCommand : public cmCommand protected: void CreateInstallGenerator() const; std::string FindInstallSource(const char* name) const; - + private: std::vector FinalArgs; bool IsFilesForm; diff --git a/Source/cmInstallProgramsCommand.h b/Source/cmInstallProgramsCommand.h index 29c84a09f0f..27a0498e506 100644 --- a/Source/cmInstallProgramsCommand.h +++ b/Source/cmInstallProgramsCommand.h @@ -18,7 +18,7 @@ * \brief Specifies where to install some programs * * cmInstallProgramsCommand specifies the relative path where a list of - * programs should be installed. + * programs should be installed. */ class cmInstallProgramsCommand : public cmCommand { @@ -26,7 +26,7 @@ class cmInstallProgramsCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmInstallProgramsCommand; } @@ -50,7 +50,7 @@ class cmInstallProgramsCommand : public cmCommand { return "Deprecated. Use the install(PROGRAMS ) command instead."; } - + /** * This is called at the end after all the information * specified by the command is accumulated. Most commands do @@ -87,7 +87,7 @@ class cmInstallProgramsCommand : public cmCommand "The directory is relative to the installation prefix, which " "is stored in the variable CMAKE_INSTALL_PREFIX."; } - + /** This command is kept for compatibility with older CMake versions. */ virtual bool IsDiscouraged() const { diff --git a/Source/cmInstallTargetGenerator.h b/Source/cmInstallTargetGenerator.h index b48d456619d..5d158b8d0fa 100644 --- a/Source/cmInstallTargetGenerator.h +++ b/Source/cmInstallTargetGenerator.h @@ -24,7 +24,7 @@ class cmInstallTargetGenerator: public cmInstallGenerator cmInstallTargetGenerator( cmTarget& t, const char* dest, bool implib, const char* file_permissions = "", - std::vector const& configurations + std::vector const& configurations = std::vector(), const char* component = "Unspecified", bool optional = false @@ -86,7 +86,7 @@ class cmInstallTargetGenerator: public cmInstallGenerator void AddRPathCheckRule(std::ostream& os, Indent const& indent, const char* config, std::string const& toDestDirPath); - + void AddStripRule(std::ostream& os, Indent const& indent, const std::string& toDestDirPath); void AddRanlibRule(std::ostream& os, Indent const& indent, diff --git a/Source/cmInstallTargetsCommand.h b/Source/cmInstallTargetsCommand.h index e05462faa00..c47b38700d9 100644 --- a/Source/cmInstallTargetsCommand.h +++ b/Source/cmInstallTargetsCommand.h @@ -19,7 +19,7 @@ * * cmInstallTargetsCommand specifies the relative path where a list of * targets should be installed. The targets can be executables or - * libraries. + * libraries. */ class cmInstallTargetsCommand : public cmCommand { @@ -27,7 +27,7 @@ class cmInstallTargetsCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmInstallTargetsCommand; } @@ -51,7 +51,7 @@ class cmInstallTargetsCommand : public cmCommand { return "Deprecated. Use the install(TARGETS ) command instead."; } - + /** * More documentation. */ @@ -67,7 +67,7 @@ class cmInstallTargetsCommand : public cmCommand "is specified, then on systems with special runtime files " "(Windows DLL), the files will be copied to that directory."; } - + /** This command is kept for compatibility with older CMake versions. */ virtual bool IsDiscouraged() const { diff --git a/Source/cmLinkDirectoriesCommand.h b/Source/cmLinkDirectoriesCommand.h index a7cd58340f6..889118cbcad 100644 --- a/Source/cmLinkDirectoriesCommand.h +++ b/Source/cmLinkDirectoriesCommand.h @@ -18,8 +18,8 @@ * \brief Define a list of directories containing files to link. * * cmLinkDirectoriesCommand is used to specify a list - * of directories containing files to link into executable(s). - * Note that the command supports the use of CMake built-in variables + * of directories containing files to link into executable(s). + * Note that the command supports the use of CMake built-in variables * such as CMAKE_BINARY_DIR and CMAKE_SOURCE_DIR. */ class cmLinkDirectoriesCommand : public cmCommand @@ -28,7 +28,7 @@ class cmLinkDirectoriesCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmLinkDirectoriesCommand; } @@ -52,7 +52,7 @@ class cmLinkDirectoriesCommand : public cmCommand { return "Specify directories in which the linker will look for libraries."; } - + /** * More documentation. */ @@ -73,7 +73,7 @@ class cmLinkDirectoriesCommand : public cmCommand "them." ; } - + cmTypeMacro(cmLinkDirectoriesCommand, cmCommand); private: void AddLinkDir(std::string const& dir); diff --git a/Source/cmLinkLibrariesCommand.cxx b/Source/cmLinkLibrariesCommand.cxx index c4458aa6ab5..2f1db2aa0cf 100644 --- a/Source/cmLinkLibrariesCommand.cxx +++ b/Source/cmLinkLibrariesCommand.cxx @@ -19,7 +19,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) { return true; } - // add libraries, nothe that there is an optional prefix + // add libraries, nothe that there is an optional prefix // of debug and optimized than can be used for(std::vector::const_iterator i = args.begin(); i != args.end(); ++i) @@ -50,10 +50,10 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) } else { - this->Makefile->AddLinkLibrary(i->c_str()); + this->Makefile->AddLinkLibrary(i->c_str()); } } - + return true; } diff --git a/Source/cmLinkLibrariesCommand.h b/Source/cmLinkLibrariesCommand.h index 2c0212cef56..c450a1cb9de 100644 --- a/Source/cmLinkLibrariesCommand.h +++ b/Source/cmLinkLibrariesCommand.h @@ -19,7 +19,7 @@ * * cmLinkLibrariesCommand is used to specify a list of libraries to link * into executable(s) or shared objects. The names of the libraries - * should be those defined by the LIBRARY(library) command(s). + * should be those defined by the LIBRARY(library) command(s). */ class cmLinkLibrariesCommand : public cmCommand { @@ -27,7 +27,7 @@ class cmLinkLibrariesCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmLinkLibrariesCommand; } @@ -51,7 +51,7 @@ class cmLinkLibrariesCommand : public cmCommand { return "Deprecated. Use the target_link_libraries() command instead."; } - + /** * More documentation. */ @@ -68,7 +68,7 @@ class cmLinkLibrariesCommand : public cmCommand "the next library listed is to be used only for that specific " "type of build."; } - + /** This command is kept for compatibility with older CMake versions. */ virtual bool IsDiscouraged() const { diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx index 908f3b060b3..9d4f175291d 100644 --- a/Source/cmListCommand.cxx +++ b/Source/cmListCommand.cxx @@ -98,7 +98,7 @@ bool cmListCommand::GetList(std::vector& list, const char* var) { return false; } - // if the size of the list + // if the size of the list if(listString.size() == 0) { return true; @@ -107,7 +107,7 @@ bool cmListCommand::GetList(std::vector& list, const char* var) cmSystemTools::ExpandListArgument(listString, list, true); // check the list for empty values bool hasEmpty = false; - for(std::vector::iterator i = list.begin(); + for(std::vector::iterator i = list.begin(); i != list.end(); ++i) { if(i->size() == 0) @@ -116,7 +116,7 @@ bool cmListCommand::GetList(std::vector& list, const char* var) break; } } - // if no empty elements then just return + // if no empty elements then just return if(!hasEmpty) { return true; @@ -124,7 +124,7 @@ bool cmListCommand::GetList(std::vector& list, const char* var) // if we have empty elements we need to check policy CMP0007 switch(this->Makefile->GetPolicyStatus(cmPolicies::CMP0007)) { - case cmPolicies::WARN: + case cmPolicies::WARN: { // Default is to warn and use old behavior // OLD behavior is to allow compatibility, so recall diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx index 84cb8fd839a..36d84f3be33 100644 --- a/Source/cmListFileCache.cxx +++ b/Source/cmListFileCache.cxx @@ -26,7 +26,7 @@ bool cmListFileCacheParseFunction(cmListFileLexer* lexer, cmListFileFunction& function, const char* filename); -bool cmListFile::ParseFile(const char* filename, +bool cmListFile::ParseFile(const char* filename, bool topLevel, cmMakefile *mf) { @@ -47,7 +47,7 @@ bool cmListFile::ParseFile(const char* filename, if(!cmListFileLexer_SetFileName(lexer, filename)) { cmListFileLexer_Delete(lexer); - cmSystemTools::Error("cmListFileCache: error can not open file ", + cmSystemTools::Error("cmListFileCache: error can not open file ", filename); return false; } @@ -119,7 +119,7 @@ bool cmListFile::ParseFile(const char* filename, { bool hasVersion = false; // search for the right policy command - for(std::vector::iterator i + for(std::vector::iterator i = this->Functions.begin(); i != this->Functions.end(); ++i) { @@ -129,7 +129,7 @@ bool cmListFile::ParseFile(const char* filename, break; } } - // if no policy command is found this is an error if they use any + // if no policy command is found this is an error if they use any // non advanced functions or a lot of functions if(!hasVersion) { @@ -152,7 +152,7 @@ bool cmListFile::ParseFile(const char* filename, allowedCommands.insert("option"); allowedCommands.insert("message"); isProblem = false; - for(std::vector::iterator i + for(std::vector::iterator i = this->Functions.begin(); i != this->Functions.end(); ++i) { @@ -161,10 +161,10 @@ bool cmListFile::ParseFile(const char* filename, { isProblem = true; break; - } + } } } - + if (isProblem) { // Tell the top level cmMakefile to diagnose @@ -181,7 +181,7 @@ bool cmListFile::ParseFile(const char* filename, { bool hasProject = false; // search for a project command - for(std::vector::iterator i + for(std::vector::iterator i = this->Functions.begin(); i != this->Functions.end(); ++i) { @@ -256,7 +256,7 @@ bool cmListFileCacheParseFunction(cmListFileLexer* lexer, parenDepth--; cmListFileArgument a(")", false, filename, token->line); - function.Arguments.push_back(a); + function.Arguments.push_back(a); } else if(token->type == cmListFileLexer_Token_Identifier || token->type == cmListFileLexer_Token_ArgumentUnquoted) @@ -276,7 +276,7 @@ bool cmListFileCacheParseFunction(cmListFileLexer* lexer, // Error. cmOStringStream error; error << "Error in cmake code at\n" - << filename << ":" << cmListFileLexer_GetCurrentLine(lexer) + << filename << ":" << cmListFileLexer_GetCurrentLine(lexer) << ":\n" << "Parse error. Function missing ending \")\". " << "Instead found " diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h index ec5886dbd3c..c057754a3c4 100644 --- a/Source/cmListFileCache.h +++ b/Source/cmListFileCache.h @@ -22,7 +22,7 @@ */ class cmMakefile; - + struct cmListFileArgument { cmListFileArgument(): Value(), Quoted(false), FilePath(0), Line(0) {} @@ -64,11 +64,11 @@ class cmListFileBacktrace: public std::vector {}; struct cmListFile { - cmListFile() - :ModifiedTime(0) + cmListFile() + :ModifiedTime(0) { } - bool ParseFile(const char* path, + bool ParseFile(const char* path, bool topLevel, cmMakefile *mf); diff --git a/Source/cmListFileLexer.c b/Source/cmListFileLexer.c index df5dc2b658b..b6424d60ed8 100644 --- a/Source/cmListFileLexer.c +++ b/Source/cmListFileLexer.c @@ -43,7 +43,7 @@ typedef uint32_t flex_uint32_t; typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; #endif /* ! C99 */ @@ -165,7 +165,7 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires * access to the local variable yy_act. Since yyless() is a macro, it would break - * existing scanners that call yyless() from OUTSIDE cmListFileLexer_yylex. + * existing scanners that call yyless() from OUTSIDE cmListFileLexer_yylex. * One obvious solution it to make yy_act a global. I tried that, and saw * a 5% performance hit in a non-yylineno scanner, because yy_act is * normally declared as a register variable-- so it is not worth it. @@ -177,7 +177,7 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; if ( yytext[yyl] == '\n' )\ --yylineno;\ }while(0) - + /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ @@ -242,7 +242,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -834,7 +834,7 @@ YY_DECL int yyl; for ( yyl = 0; yyl < yyleng; ++yyl ) if ( yytext[yyl] == '\n' ) - + do{ yylineno++; yycolumn=0; }while(0) @@ -1380,7 +1380,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) yyg->yy_hold_char = *++yyg->yy_c_buf_p; if ( c == '\n' ) - + do{ yylineno++; yycolumn=0; }while(0) @@ -1463,7 +1463,7 @@ static void cmListFileLexer_yy_load_buffer_state (yyscan_t yyscanner) YY_BUFFER_STATE cmListFileLexer_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) { YY_BUFFER_STATE b; - + b = (YY_BUFFER_STATE) cmListFileLexer_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in cmListFileLexer_yy_create_buffer()" ); @@ -1529,7 +1529,7 @@ static void cmListFileLexer_yy_load_buffer_state (yyscan_t yyscanner) } b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; - + errno = oerrno; } @@ -1633,9 +1633,9 @@ static void cmListFileLexer_yyensure_buffer_stack (yyscan_t yyscanner) yyg->yy_buffer_stack = (struct yy_buffer_state**)cmListFileLexer_yyalloc (num_to_alloc * sizeof(struct yy_buffer_state*) , yyscanner); - + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - + yyg->yy_buffer_stack_max = num_to_alloc; yyg->yy_buffer_stack_top = 0; return; @@ -1662,12 +1662,12 @@ static void cmListFileLexer_yyensure_buffer_stack (yyscan_t yyscanner) * @param base the character buffer * @param size the size in bytes of the character buffer * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. + * @return the newly allocated buffer state object. */ YY_BUFFER_STATE cmListFileLexer_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) { YY_BUFFER_STATE b; - + if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) @@ -1703,7 +1703,7 @@ YY_BUFFER_STATE cmListFileLexer_yy_scan_buffer (char * base, yy_size_t size , */ YY_BUFFER_STATE cmListFileLexer_yy_scan_string (yyconst char * yy_str , yyscan_t yyscanner) { - + return cmListFileLexer_yy_scan_bytes(yy_str,strlen(yy_str) ,yyscanner); } @@ -1720,7 +1720,7 @@ YY_BUFFER_STATE cmListFileLexer_yy_scan_bytes (yyconst char * bytes, int len , char *buf; yy_size_t n; int i; - + /* Get memory for full buffer, including space for trailing EOB's. */ n = len + 2; buf = (char *) cmListFileLexer_yyalloc(n ,yyscanner ); @@ -1789,10 +1789,10 @@ YY_EXTRA_TYPE cmListFileLexer_yyget_extra (yyscan_t yyscanner) int cmListFileLexer_yyget_lineno (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - + if (! YY_CURRENT_BUFFER) return 0; - + return yylineno; } @@ -1802,10 +1802,10 @@ int cmListFileLexer_yyget_lineno (yyscan_t yyscanner) int cmListFileLexer_yyget_column (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - + if (! YY_CURRENT_BUFFER) return 0; - + return yycolumn; } @@ -1866,8 +1866,8 @@ void cmListFileLexer_yyset_lineno (int line_number , yyscan_t yyscanner) /* lineno is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) - yy_fatal_error( "cmListFileLexer_yyset_lineno called with no buffer" , yyscanner); - + yy_fatal_error( "cmListFileLexer_yyset_lineno called with no buffer" , yyscanner); + yylineno = line_number; } @@ -1881,8 +1881,8 @@ void cmListFileLexer_yyset_column (int column_no , yyscan_t yyscanner) /* column is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) - yy_fatal_error( "cmListFileLexer_yyset_column called with no buffer" , yyscanner); - + yy_fatal_error( "cmListFileLexer_yyset_column called with no buffer" , yyscanner); + yycolumn = column_no; } diff --git a/Source/cmLoadCacheCommand.cxx b/Source/cmLoadCacheCommand.cxx index a239e55bf8f..462e086ef48 100644 --- a/Source/cmLoadCacheCommand.cxx +++ b/Source/cmLoadCacheCommand.cxx @@ -26,7 +26,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) { return this->ReadWithPrefix(args); } - + // Cache entries to be excluded from the import list. // If this set is empty, all cache entries are brought in // and they can not be overridden. @@ -97,7 +97,7 @@ bool cmLoadCacheCommand::ReadWithPrefix(std::vector const& args) this->SetError("READ_WITH_PREFIX form must specify a prefix."); return false; } - + // Make sure the cache file exists. std::string cacheFile = args[0]+"/CMakeCache.txt"; if(!cmSystemTools::FileExists(cacheFile.c_str())) @@ -106,22 +106,22 @@ bool cmLoadCacheCommand::ReadWithPrefix(std::vector const& args) this->SetError(e.c_str()); return false; } - + // Prepare the table of variables to read. this->Prefix = args[2]; for(unsigned int i=3; i < args.size(); ++i) { this->VariablesToRead.insert(args[i]); } - + // Read the cache file. - std::ifstream fin(cacheFile.c_str()); - + std::ifstream fin(cacheFile.c_str()); + // This is a big hack read loop to overcome a buggy ifstream // implementation on HP-UX. This should work on all platforms even // for small buffer sizes. const int bufferSize = 4096; - char buffer[bufferSize]; + char buffer[bufferSize]; std::string line; while(fin) { @@ -152,7 +152,7 @@ bool cmLoadCacheCommand::ReadWithPrefix(std::vector const& args) // Completed a line. this->CheckLine(line.c_str()); line = ""; - + // Skip the newline character. ++i; } @@ -164,7 +164,7 @@ bool cmLoadCacheCommand::ReadWithPrefix(std::vector const& args) // Partial last line. this->CheckLine(line.c_str()); } - + return true; } diff --git a/Source/cmLoadCacheCommand.h b/Source/cmLoadCacheCommand.h index ac50f8d391a..f55cbb3c1bd 100644 --- a/Source/cmLoadCacheCommand.h +++ b/Source/cmLoadCacheCommand.h @@ -25,7 +25,7 @@ class cmLoadCacheCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmLoadCacheCommand; } @@ -49,7 +49,7 @@ class cmLoadCacheCommand : public cmCommand { return "Load in the values from another project's CMake cache."; } - + /** * More documentation. */ @@ -74,13 +74,13 @@ class cmLoadCacheCommand : public cmCommand "of this form of the command is strongly discouraged, but it is " "provided for backward compatibility."; } - + cmTypeMacro(cmLoadCacheCommand, cmCommand); protected: - + std::set VariablesToRead; std::string Prefix; - + bool ReadWithPrefix(std::vector const& args); void CheckLine(const char* line); }; diff --git a/Source/cmLoadCommandCommand.cxx b/Source/cmLoadCommandCommand.cxx index 3a0115c96ad..b2acf06ad5c 100644 --- a/Source/cmLoadCommandCommand.cxx +++ b/Source/cmLoadCommandCommand.cxx @@ -25,23 +25,23 @@ #include extern "C" void TrapsForSignalsCFunction(int sig); - + // a class for loadabple commands class cmLoadedCommand : public cmCommand { public: cmLoadedCommand() { - memset(&this->info,0,sizeof(this->info)); + memset(&this->info,0,sizeof(this->info)); this->info.CAPI = &cmStaticCAPI; } - + ///! clean up any memory allocated by the plugin ~cmLoadedCommand(); - + /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { cmLoadedCommand *newC = new cmLoadedCommand; // we must copy when we clone @@ -53,7 +53,7 @@ class cmLoadedCommand : public cmCommand * This is called when the command is first encountered in * the CMakeLists.txt file. */ - virtual bool InitialPass(std::vector const& args, + virtual bool InitialPass(std::vector const& args, cmExecutionStatus &); /** @@ -70,7 +70,7 @@ class cmLoadedCommand : public cmCommand * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() const { return info.Name; } - + /** * Succinct documentation. */ @@ -79,7 +79,7 @@ class cmLoadedCommand : public cmCommand if (this->info.GetTerseDocumentation) { cmLoadedCommand::InstallSignalHandlers(info.Name); - const char* ret = info.GetTerseDocumentation(); + const char* ret = info.GetTerseDocumentation(); cmLoadedCommand::InstallSignalHandlers(info.Name, 1); return ret; } @@ -101,7 +101,7 @@ class cmLoadedCommand : public cmCommand { cmLoadedCommand::LastName = "????"; } - + if(!remove) { signal(SIGSEGV, TrapsForSignalsCFunction); @@ -119,7 +119,7 @@ class cmLoadedCommand : public cmCommand signal(SIGILL, 0); } } - + /** * More documentation. */ @@ -137,7 +137,7 @@ class cmLoadedCommand : public cmCommand return "LoadedCommand without any additional documentation"; } } - + cmTypeMacro(cmLoadedCommand, cmCommand); cmLoadedCommandInfo info; @@ -164,7 +164,7 @@ bool cmLoadedCommand::InitialPass(std::vector const& args, { free(this->info.Error); } - + // create argc and argv and then invoke the command int argc = static_cast (args.size()); char **argv = 0; @@ -179,10 +179,10 @@ bool cmLoadedCommand::InitialPass(std::vector const& args, } cmLoadedCommand::InstallSignalHandlers(info.Name); int result = info.InitialPass((void *)&info, - (void *)this->Makefile,argc,argv); + (void *)this->Makefile,argc,argv); cmLoadedCommand::InstallSignalHandlers(info.Name, 1); cmFreeArguments(argc,argv); - + if (result) { return true; @@ -249,7 +249,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) // expand variables std::string exp = args[j]; cmSystemTools::ExpandRegistryValues(exp); - + // Glob the entry in case of wildcards. cmSystemTools::GlobDirs(exp.c_str(), path); } @@ -298,7 +298,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) initFunction = (CM_INIT_FUNCTION)( cmsys::DynamicLoader::GetSymbolAddress(lib, initFuncName.c_str())); } - // if the symbol is found call it to set the name on the + // if the symbol is found call it to set the name on the // function blocker if(initFunction) { diff --git a/Source/cmLoadCommandCommand.h b/Source/cmLoadCommandCommand.h index 6517019484b..f0b34ee591c 100644 --- a/Source/cmLoadCommandCommand.h +++ b/Source/cmLoadCommandCommand.h @@ -25,7 +25,7 @@ class cmLoadCommandCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmLoadCommandCommand; } @@ -41,7 +41,7 @@ class cmLoadCommandCommand : public cmCommand * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() const {return "load_command";} - + /** * Succinct documentation. */ @@ -49,7 +49,7 @@ class cmLoadCommandCommand : public cmCommand { return "Load a command into a running CMake."; } - + /** * More documentation. */ @@ -66,7 +66,7 @@ class cmLoadCommandCommand : public cmCommand "will be set to the full path of the module that was loaded. " "Otherwise the variable will not be set."; } - + cmTypeMacro(cmLoadCommandCommand, cmCommand); }; diff --git a/Source/cmLocalVisualStudio10Generator.cxx b/Source/cmLocalVisualStudio10Generator.cxx index ace7adfa1e8..c3789a02255 100644 --- a/Source/cmLocalVisualStudio10Generator.cxx +++ b/Source/cmLocalVisualStudio10Generator.cxx @@ -21,9 +21,9 @@ class cmVS10XMLParser : public cmXMLParser public: virtual void EndElement(const char* /* name */) { - } + } virtual void CharacterDataHandler(const char* data, int length) - { + { if(this->DoGUID ) { this->GUID.assign(data+1, length-2); @@ -40,7 +40,7 @@ class cmVS10XMLParser : public cmXMLParser if(strcmp("ProjectGUID", name) == 0 || strcmp("ProjectGuid", name) == 0) { this->DoGUID = true; - } + } } int InitializeParser() { @@ -50,7 +50,7 @@ class cmVS10XMLParser : public cmXMLParser { return ret; } - // visual studio projects have a strange encoding, but it is + // visual studio projects have a strange encoding, but it is // really utf-8 XML_SetEncoding(static_cast(this->Parser), "utf-8"); return 1; @@ -72,7 +72,7 @@ cmLocalVisualStudio10Generator::~cmLocalVisualStudio10Generator() void cmLocalVisualStudio10Generator::Generate() { - + cmTargets &tgts = this->Makefile->GetTargets(); for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); ++l) { @@ -98,7 +98,7 @@ ::ReadAndStoreExternalGUID(const char* name, const char* path) { cmVS10XMLParser parser; - parser.ParseFile(path); + parser.ParseFile(path); // if we can not find a GUID then create one if(parser.GUID.empty()) diff --git a/Source/cmLocalVisualStudio10Generator.h b/Source/cmLocalVisualStudio10Generator.h index 699de4c00c4..41db735b2d9 100644 --- a/Source/cmLocalVisualStudio10Generator.h +++ b/Source/cmLocalVisualStudio10Generator.h @@ -31,7 +31,7 @@ class cmLocalVisualStudio10Generator : public cmLocalVisualStudio7Generator /** - * Generate the makefile for this directory. + * Generate the makefile for this directory. */ virtual void Generate(); virtual void ReadAndStoreExternalGUID(const char* name, diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx index 5ab223b7e76..1a7e611aa7b 100644 --- a/Source/cmLocalVisualStudio6Generator.cxx +++ b/Source/cmLocalVisualStudio6Generator.cxx @@ -108,7 +108,7 @@ void cmLocalVisualStudio6Generator::Generate() } void cmLocalVisualStudio6Generator::OutputDSPFile() -{ +{ // If not an in source build, then create the output directory if(strcmp(this->Makefile->GetStartOutputDirectory(), this->Makefile->GetHomeDirectory()) != 0) @@ -126,7 +126,7 @@ void cmLocalVisualStudio6Generator::OutputDSPFile() cmTargets &tgts = this->Makefile->GetTargets(); // build any targets - for(cmTargets::iterator l = tgts.begin(); + for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); l++) { switch(l->second.GetType()) @@ -152,7 +152,7 @@ void cmLocalVisualStudio6Generator::OutputDSPFile() } // INCLUDE_EXTERNAL_MSPROJECT command only affects the workspace // so don't build a projectfile for it - const char* path = + const char* path = l->second.GetProperty("EXTERNAL_MSPROJECT"); if(!path) { @@ -178,7 +178,7 @@ void cmLocalVisualStudio6Generator::OutputDSPFile() // extern std::string GetVS6TargetName(const std::string& targetName); -void cmLocalVisualStudio6Generator::CreateSingleDSP(const char *lname, +void cmLocalVisualStudio6Generator::CreateSingleDSP(const char *lname, cmTarget &target) { // add to the list of projects @@ -210,7 +210,7 @@ void cmLocalVisualStudio6Generator::AddDSPBuildRule(cmTarget& tgt) { std::string dspname = GetVS6TargetName(tgt.GetName()); dspname += ".dsp.cmake"; - const char* dsprule = + const char* dsprule = this->Makefile->GetRequiredDefinition("CMAKE_COMMAND"); cmCustomCommandLine commandLine; commandLine.push_back(dsprule); @@ -229,8 +229,8 @@ void cmLocalVisualStudio6Generator::AddDSPBuildRule(cmTarget& tgt) START_OUTPUT, UNCHANGED, true); commandLine.push_back(args); args = "-B"; - args += - this->Convert(this->Makefile->GetHomeOutputDirectory(), + args += + this->Convert(this->Makefile->GetHomeOutputDirectory(), START_OUTPUT, UNCHANGED, true); commandLine.push_back(args); @@ -254,7 +254,7 @@ void cmLocalVisualStudio6Generator::AddDSPBuildRule(cmTarget& tgt) } -void cmLocalVisualStudio6Generator::WriteDSPFile(std::ostream& fout, +void cmLocalVisualStudio6Generator::WriteDSPFile(std::ostream& fout, const char *libName, cmTarget &target) { @@ -301,21 +301,21 @@ void cmLocalVisualStudio6Generator::WriteDSPFile(std::ostream& fout, this->AddUtilityCommandHack(target, count++, depends, *cr); } } - + // We may be modifying the source groups temporarily, so make a copy. std::vector sourceGroups = this->Makefile->GetSourceGroups(); - + // get the classes from the source lists then add them to the groups std::vector const & classes = target.GetSourceFiles(); // now all of the source files have been properly assigned to the target // now stick them into source groups using the reg expressions - for(std::vector::const_iterator i = classes.begin(); + for(std::vector::const_iterator i = classes.begin(); i != classes.end(); i++) { // Add the file to the list of sources. std::string source = (*i)->GetFullPath(); - cmSourceGroup& sourceGroup = + cmSourceGroup& sourceGroup = this->Makefile->FindSourceGroup(source.c_str(), sourceGroups); sourceGroup.AssignSource(*i); // while we are at it, if it is a .rule file then for visual studio 6 we @@ -326,11 +326,11 @@ void cmLocalVisualStudio6Generator::WriteDSPFile(std::ostream& fout, { cmSystemTools::ReplaceString(source, "$(IntDir)/", ""); #if defined(_WIN32) || defined(__CYGWIN__) - std::ofstream fout(source.c_str(), - std::ios::binary | std::ios::out + std::ofstream fout(source.c_str(), + std::ios::binary | std::ios::out | std::ios::trunc); #else - std::ofstream fout(source.c_str(), + std::ofstream fout(source.c_str(), std::ios::out | std::ios::trunc); #endif if(fout) @@ -345,14 +345,14 @@ void cmLocalVisualStudio6Generator::WriteDSPFile(std::ostream& fout, // Write the DSP file's header. this->WriteDSPHeader(fout, libName, target, sourceGroups); - + // Loop through every source group. for(std::vector::const_iterator sg = sourceGroups.begin(); sg != sourceGroups.end(); ++sg) { this->WriteGroup(&(*sg), target, fout, libName); - } + } // Write the DSP file's footer. this->WriteDSPFooter(fout); @@ -364,15 +364,15 @@ ::WriteGroup(const cmSourceGroup *sg, cmTarget& target, { cmGeneratorTarget* gt = this->GlobalGenerator->GetGeneratorTarget(&target); - const std::vector &sourceFiles = + const std::vector &sourceFiles = sg->GetSourceFiles(); // If the group is empty, don't write it at all. - + if(sourceFiles.empty() && sg->GetGroupChildren().empty()) - { - return; + { + return; } - + // If the group has a name, write the header. std::string name = sg->GetName(); if(name != "") @@ -385,7 +385,7 @@ ::WriteGroup(const cmSourceGroup *sg, cmTarget& target, sourceFiles.begin(); sf != sourceFiles.end(); ++sf) { std::string source = (*sf)->GetFullPath(); - const cmCustomCommand *command = + const cmCustomCommand *command = (*sf)->GetCustomCommand(); std::string compileFlags; std::vector depends; @@ -441,7 +441,7 @@ ::WriteGroup(const cmSourceGroup *sg, cmTarget& target, bool excludedFromBuild = (lang && (*sf)->GetPropertyAsBool("HEADER_FILE_ONLY")); - + // Check for extra object-file dependencies. const char* dependsValue = (*sf)->GetProperty("OBJECT_DEPENDS"); if(dependsValue) @@ -453,10 +453,10 @@ ::WriteGroup(const cmSourceGroup *sg, cmTarget& target, target.GetType() == cmTarget::GLOBAL_TARGET) { fout << "# Begin Source File\n\n"; - + // Tell MS-Dev what the source is. If the compiler knows how to // build it, then it will. - fout << "SOURCE=" << + fout << "SOURCE=" << this->ConvertToOptionallyRelativeOutputPath(source.c_str()) << "\n\n"; if(!depends.empty()) { @@ -464,8 +464,8 @@ ::WriteGroup(const cmSourceGroup *sg, cmTarget& target, fout << "USERDEP__HACK="; for(std::vector::const_iterator d = depends.begin(); d != depends.end(); ++d) - { - fout << "\\\n\t" << + { + fout << "\\\n\t" << this->ConvertToOptionallyRelativeOutputPath(d->c_str()); } fout << "\n"; @@ -479,16 +479,16 @@ ::WriteGroup(const cmSourceGroup *sg, cmTarget& target, excludedFromBuild || !cdmap.empty()) { for(std::vector::iterator i - = this->Configurations.begin(); + = this->Configurations.begin(); i != this->Configurations.end(); ++i) - { + { // Strip the subdirectory name out of the configuration name. std::string config = this->GetConfigName(*i); if (i == this->Configurations.begin()) { fout << "!IF \"$(CFG)\" == " << i->c_str() << std::endl; } - else + else { fout << "!ELSEIF \"$(CFG)\" == " << i->c_str() << std::endl; } @@ -512,7 +512,7 @@ ::WriteGroup(const cmSourceGroup *sg, cmTarget& target, fout << "\n# PROP Intermediate_Dir \"" << config << "/" << objectNameDir << "\"\n\n"; } - } + } fout << "!ENDIF\n\n"; } fout << "# End Source File\n"; @@ -528,7 +528,7 @@ ::WriteGroup(const cmSourceGroup *sg, cmTarget& target, - + // If the group has a name, write the footer. if(name != "") { @@ -586,7 +586,7 @@ ::WriteCustomRule(std::ostream& fout, { comment = ""; } - + // Write the rule for each configuration. std::vector::iterator i; for(i = this->Configurations.begin(); i != this->Configurations.end(); ++i) @@ -594,12 +594,12 @@ ::WriteCustomRule(std::ostream& fout, std::string config = this->GetConfigName(*i); std::string script = this->ConstructScript(command, config.c_str(), "\\\n\t"); - + if (i == this->Configurations.begin()) { fout << "!IF \"$(CFG)\" == " << i->c_str() << std::endl; } - else + else { fout << "!ELSEIF \"$(CFG)\" == " << i->c_str() << std::endl; } @@ -609,9 +609,9 @@ ::WriteCustomRule(std::ostream& fout, } // Write out the dependencies for the rule. fout << "USERDEP__HACK="; - for(std::vector::const_iterator d = + for(std::vector::const_iterator d = command.GetDepends().begin(); - d != command.GetDepends().end(); + d != command.GetDepends().end(); ++d) { // Lookup the real name of the dependency in case it is a CMake target. @@ -633,15 +633,15 @@ ::WriteCustomRule(std::ostream& fout, fout << "\n\n"; if(command.GetOutputs().empty()) { - fout << source + fout << source << "_force : \"$(SOURCE)\" \"$(INTDIR)\" \"$(OUTDIR)\"\n\t"; fout << script.c_str() << "\n\n"; } else { - for(std::vector::const_iterator o = + for(std::vector::const_iterator o = command.GetOutputs().begin(); - o != command.GetOutputs().end(); + o != command.GetOutputs().end(); ++o) { // Write a rule for every output generated by this command. @@ -652,12 +652,12 @@ ::WriteCustomRule(std::ostream& fout, } fout << "# End Custom Build\n\n"; } - + fout << "!ENDIF\n\n"; } -void cmLocalVisualStudio6Generator::WriteDSPBeginGroup(std::ostream& fout, +void cmLocalVisualStudio6Generator::WriteDSPBeginGroup(std::ostream& fout, const char* group, const char* filter) { @@ -679,7 +679,7 @@ void cmLocalVisualStudio6Generator::SetBuildType(BuildType b, cmTarget& target) { std::string root= this->Makefile->GetRequiredDefinition("CMAKE_ROOT"); - const char *def= + const char *def= this->Makefile->GetDefinition( "MSPROJECT_TEMPLATE_DIRECTORY"); if( def) @@ -690,7 +690,7 @@ void cmLocalVisualStudio6Generator::SetBuildType(BuildType b, { root += "/Templates"; } - + switch(b) { case STATIC_LIBRARY: @@ -740,7 +740,7 @@ void cmLocalVisualStudio6Generator::SetBuildType(BuildType b, } // reset this->Configurations - this->Configurations.erase(this->Configurations.begin(), + this->Configurations.erase(this->Configurations.begin(), this->Configurations.end()); // now add all the configurations possible @@ -785,9 +785,9 @@ cmLocalVisualStudio6Generator::MaybeCreateOutputDir(cmTarget& target, } // look for custom rules on a target and collect them together -std::string -cmLocalVisualStudio6Generator::CreateTargetRules(cmTarget &target, - const char* configName, +std::string +cmLocalVisualStudio6Generator::CreateTargetRules(cmTarget &target, + const char* configName, const char * /* libName */) { if (target.GetType() >= cmTarget::UTILITY ) @@ -895,8 +895,8 @@ cmLocalVisualStudio6Generator::GetTargetIncludeOptions(cmTarget &target) #define CM_USE_OLD_VS6 void cmLocalVisualStudio6Generator -::WriteDSPHeader(std::ostream& fout, - const char *libName, cmTarget &target, +::WriteDSPHeader(std::ostream& fout, + const char *libName, cmTarget &target, std::vector &) { bool targetBuilds = (target.GetType() >= cmTarget::EXECUTABLE && @@ -931,7 +931,7 @@ ::WriteDSPHeader(std::ostream& fout, } std::set pathEmitted; - + // determine the link directories std::string libOptions; std::string libDebugOptions; @@ -944,14 +944,14 @@ ::WriteDSPHeader(std::ostream& fout, if(libPath.size()) { - std::string lpath = + std::string lpath = this->ConvertToOptionallyRelativeOutputPath(libPath.c_str()); if(lpath.size() == 0) { lpath = "."; } std::string lpathIntDir = libPath + "$(INTDIR)"; - lpathIntDir = + lpathIntDir = this->ConvertToOptionallyRelativeOutputPath(lpathIntDir.c_str()); if(pathEmitted.insert(lpath).second) { @@ -977,7 +977,7 @@ ::WriteDSPHeader(std::ostream& fout, } if(exePath.size()) { - std::string lpath = + std::string lpath = this->ConvertToOptionallyRelativeOutputPath(exePath.c_str()); if(lpath.size() == 0) { @@ -986,7 +986,7 @@ ::WriteDSPHeader(std::ostream& fout, std::string lpathIntDir = exePath + "$(INTDIR)"; lpathIntDir = this->ConvertToOptionallyRelativeOutputPath(lpathIntDir.c_str()); - + if(pathEmitted.insert(lpath).second) { libOptions += " /LIBPATH:"; @@ -1018,7 +1018,7 @@ ::WriteDSPHeader(std::ostream& fout, { path += "/"; } - std::string lpath = + std::string lpath = this->ConvertToOptionallyRelativeOutputPath(path.c_str()); if(lpath.size() == 0) { @@ -1035,7 +1035,7 @@ ::WriteDSPHeader(std::ostream& fout, libOptions += " /LIBPATH:"; libOptions += lpath; libOptions += " "; - + libMultiLineOptions += "# ADD LINK32 /LIBPATH:"; libMultiLineOptions += lpathIntDir; libMultiLineOptions += " "; @@ -1059,8 +1059,8 @@ ::WriteDSPHeader(std::ostream& fout, // a library in a library, bad recursion) // NEVER LINK STATIC LIBRARIES TO OTHER STATIC LIBRARIES if ((target.GetType() != cmTarget::SHARED_LIBRARY - && target.GetType() != cmTarget::STATIC_LIBRARY - && target.GetType() != cmTarget::MODULE_LIBRARY) || + && target.GetType() != cmTarget::STATIC_LIBRARY + && target.GetType() != cmTarget::MODULE_LIBRARY) || (target.GetType()==cmTarget::SHARED_LIBRARY && libName != GetVS6TargetName(j->first)) || (target.GetType()==cmTarget::MODULE_LIBRARY @@ -1090,7 +1090,7 @@ ::WriteDSPHeader(std::ostream& fout, } } lib = this->ConvertToOptionallyRelativeOutputPath(lib.c_str()); - libDebug = + libDebug = this->ConvertToOptionallyRelativeOutputPath(libDebug.c_str()); if (j->second == cmTarget::GENERAL) @@ -1121,7 +1121,7 @@ ::WriteDSPHeader(std::ostream& fout, libMultiLineOptimizedOptions += "# ADD LINK32 "; libMultiLineOptimizedOptions += lib; libMultiLineOptimizedOptions += "\n"; - } + } } } #endif @@ -1137,17 +1137,17 @@ ::WriteDSPHeader(std::ostream& fout, std::string extraLinkOptionsRelWithDebInfo; if(target.GetType() == cmTarget::EXECUTABLE) { - extraLinkOptions = + extraLinkOptions = this->Makefile->GetRequiredDefinition("CMAKE_EXE_LINKER_FLAGS"); } if(target.GetType() == cmTarget::SHARED_LIBRARY) { - extraLinkOptions = + extraLinkOptions = this->Makefile->GetRequiredDefinition("CMAKE_SHARED_LINKER_FLAGS"); } if(target.GetType() == cmTarget::MODULE_LIBRARY) { - extraLinkOptions = + extraLinkOptions = this->Makefile->GetRequiredDefinition("CMAKE_MODULE_LINKER_FLAGS"); } @@ -1229,7 +1229,7 @@ ::WriteDSPHeader(std::ostream& fout, } // Compute the real name of the target. - std::string outputName = + std::string outputName = "(OUTPUT_NAME is for libraries and executables only)"; std::string outputNameDebug = outputName; std::string outputNameRelease = outputName; @@ -1380,13 +1380,13 @@ ::WriteDSPHeader(std::ostream& fout, // are there any custom rules on the target itself // only if the target is a lib or exe - std::string customRuleCodeRelease + std::string customRuleCodeRelease = this->CreateTargetRules(target, "RELEASE", libName); - std::string customRuleCodeDebug + std::string customRuleCodeDebug = this->CreateTargetRules(target, "DEBUG", libName); - std::string customRuleCodeMinSizeRel + std::string customRuleCodeMinSizeRel = this->CreateTargetRules(target, "MINSIZEREL", libName); - std::string customRuleCodeRelWithDebInfo + std::string customRuleCodeRelWithDebInfo = this->CreateTargetRules(target, "RELWITHDEBINFO", libName); std::ifstream fin(this->DSPHeaderTemplate.c_str()); @@ -1400,7 +1400,7 @@ ::WriteDSPHeader(std::ostream& fout, std::string staticLibOptionsMinSizeRel; std::string staticLibOptionsRelWithDebInfo; if(target.GetType() == cmTarget::STATIC_LIBRARY ) - { + { if(const char* libflags = target.GetProperty("STATIC_LIBRARY_FLAGS")) { staticLibOptions = libflags; @@ -1484,7 +1484,7 @@ ::WriteDSPHeader(std::ostream& fout, staticLibOptionsRelWithDebInfo.c_str()); cmSystemTools::ReplaceString(line, "CM_STATIC_LIB_ARGS", staticLibOptions.c_str()); - } + } if(this->Makefile->IsOn("CMAKE_VERBOSE_MAKEFILE")) { cmSystemTools::ReplaceString(line, "/nologo", ""); @@ -1506,8 +1506,8 @@ ::WriteDSPHeader(std::ostream& fout, cmSystemTools::ReplaceString(line, "CM_MULTILINE_OPTIMIZED_LIBRARIES", libMultiLineOptimizedOptions.c_str()); #endif - - // Substitute the rules for custom command. When specifying just the + + // Substitute the rules for custom command. When specifying just the // target name for the command the command can be different for // different configs cmSystemTools::ReplaceString(line, "CMAKE_CUSTOM_RULE_CODE_RELEASE", @@ -1520,24 +1520,24 @@ ::WriteDSPHeader(std::ostream& fout, customRuleCodeRelWithDebInfo.c_str()); // Substitute the real output name into the template. - cmSystemTools::ReplaceString(line, "OUTPUT_NAME_DEBUG", + cmSystemTools::ReplaceString(line, "OUTPUT_NAME_DEBUG", outputNameDebug.c_str()); - cmSystemTools::ReplaceString(line, "OUTPUT_NAME_RELEASE", + cmSystemTools::ReplaceString(line, "OUTPUT_NAME_RELEASE", outputNameRelease.c_str()); cmSystemTools::ReplaceString(line, "OUTPUT_NAME_MINSIZEREL", outputNameMinSizeRel.c_str()); - cmSystemTools::ReplaceString(line, "OUTPUT_NAME_RELWITHDEBINFO", + cmSystemTools::ReplaceString(line, "OUTPUT_NAME_RELWITHDEBINFO", outputNameRelWithDebInfo.c_str()); cmSystemTools::ReplaceString(line, "OUTPUT_NAME", outputName.c_str()); // Substitute the proper link information into the template. - cmSystemTools::ReplaceString(line, "CM_MULTILINE_OPTIONS_DEBUG", + cmSystemTools::ReplaceString(line, "CM_MULTILINE_OPTIONS_DEBUG", optionsDebug.c_str()); - cmSystemTools::ReplaceString(line, "CM_MULTILINE_OPTIONS_RELEASE", + cmSystemTools::ReplaceString(line, "CM_MULTILINE_OPTIONS_RELEASE", optionsRelease.c_str()); cmSystemTools::ReplaceString(line, "CM_MULTILINE_OPTIONS_MINSIZEREL", optionsMinSizeRel.c_str()); - cmSystemTools::ReplaceString(line, "CM_MULTILINE_OPTIONS_RELWITHDEBINFO", + cmSystemTools::ReplaceString(line, "CM_MULTILINE_OPTIONS_RELWITHDEBINFO", optionsRelWithDebInfo.c_str()); cmSystemTools::ReplaceString(line, "BUILD_INCLUDES", @@ -1588,12 +1588,12 @@ ::WriteDSPHeader(std::ostream& fout, } } - cmSystemTools::ReplaceString(line, - "EXTRA_DEFINES", + cmSystemTools::ReplaceString(line, + "EXTRA_DEFINES", this->Makefile->GetDefineFlags()); const char* debugPostfix = this->Makefile->GetDefinition("CMAKE_DEBUG_POSTFIX"); - cmSystemTools::ReplaceString(line, "DEBUG_POSTFIX", + cmSystemTools::ReplaceString(line, "DEBUG_POSTFIX", debugPostfix?debugPostfix:""); // store flags for each configuration std::string flags = " "; @@ -1601,7 +1601,7 @@ ::WriteDSPHeader(std::ostream& fout, std::string flagsMinSize = " "; std::string flagsDebug = " "; std::string flagsDebugRel = " "; - if(target.GetType() >= cmTarget::EXECUTABLE && + if(target.GetType() >= cmTarget::EXECUTABLE && target.GetType() <= cmTarget::OBJECT_LIBRARY) { const char* linkLanguage = target.GetLinkerLanguage(); @@ -1617,7 +1617,7 @@ ::WriteDSPHeader(std::ostream& fout, baseFlagVar += linkLanguage; baseFlagVar += "_FLAGS"; flags = this->Makefile->GetSafeDefinition(baseFlagVar.c_str()); - + std::string flagVar = baseFlagVar + "_RELEASE"; flagsRelease = this->Makefile->GetSafeDefinition(flagVar.c_str()); flagsRelease += " -DCMAKE_INTDIR=\\\"Release\\\" "; @@ -1695,28 +1695,28 @@ ::WriteDSPHeader(std::ostream& fout, flagsRelease += releaseDefines; flagsMinSize += minsizeDefines; flagsDebugRel += debugrelDefines; - + // The template files have CXX FLAGS in them, that need to be replaced. // There are not separate CXX and C template files, so we use the same // variable names. The previous code sets up flags* variables to contain // the correct C or CXX flags cmSystemTools::ReplaceString(line, "CMAKE_CXX_FLAGS_MINSIZEREL", flagsMinSize.c_str()); - cmSystemTools::ReplaceString(line, "CMAKE_CXX_FLAGS_DEBUG", + cmSystemTools::ReplaceString(line, "CMAKE_CXX_FLAGS_DEBUG", flagsDebug.c_str()); - cmSystemTools::ReplaceString(line, "CMAKE_CXX_FLAGS_RELWITHDEBINFO", + cmSystemTools::ReplaceString(line, "CMAKE_CXX_FLAGS_RELWITHDEBINFO", flagsDebugRel.c_str()); - cmSystemTools::ReplaceString(line, "CMAKE_CXX_FLAGS_RELEASE", + cmSystemTools::ReplaceString(line, "CMAKE_CXX_FLAGS_RELEASE", flagsRelease.c_str()); cmSystemTools::ReplaceString(line, "CMAKE_CXX_FLAGS", flags.c_str()); cmSystemTools::ReplaceString(line, "COMPILE_DEFINITIONS_MINSIZEREL", minsizeDefines.c_str()); - cmSystemTools::ReplaceString(line, "COMPILE_DEFINITIONS_DEBUG", + cmSystemTools::ReplaceString(line, "COMPILE_DEFINITIONS_DEBUG", debugDefines.c_str()); - cmSystemTools::ReplaceString(line, "COMPILE_DEFINITIONS_RELWITHDEBINFO", + cmSystemTools::ReplaceString(line, "COMPILE_DEFINITIONS_RELWITHDEBINFO", debugrelDefines.c_str()); - cmSystemTools::ReplaceString(line, "COMPILE_DEFINITIONS_RELEASE", + cmSystemTools::ReplaceString(line, "COMPILE_DEFINITIONS_RELEASE", releaseDefines.c_str()); cmSystemTools::ReplaceString(line, "COMPILE_DEFINITIONS", defines.c_str()); @@ -1725,7 +1725,7 @@ ::WriteDSPHeader(std::ostream& fout, } void cmLocalVisualStudio6Generator::WriteDSPFooter(std::ostream& fout) -{ +{ std::ifstream fin(this->DSPFooterTemplate.c_str()); if(!fin) { diff --git a/Source/cmLocalVisualStudio6Generator.h b/Source/cmLocalVisualStudio6Generator.h index 1decc353141..9315d9700a5 100644 --- a/Source/cmLocalVisualStudio6Generator.h +++ b/Source/cmLocalVisualStudio6Generator.h @@ -37,7 +37,7 @@ class cmLocalVisualStudio6Generator : public cmLocalVisualStudioGenerator virtual void AddCMakeListsRules(); /** - * Generate the makefile for this directory. + * Generate the makefile for this directory. */ virtual void Generate(); @@ -57,9 +57,9 @@ class cmLocalVisualStudio6Generator : public cmLocalVisualStudioGenerator std::string DSPFooterTemplate; void CreateSingleDSP(const char *lname, cmTarget &tgt); - void WriteDSPFile(std::ostream& fout, const char *libName, + void WriteDSPFile(std::ostream& fout, const char *libName, cmTarget &tgt); - void WriteDSPBeginGroup(std::ostream& fout, + void WriteDSPBeginGroup(std::ostream& fout, const char* group, const char* filter); void WriteDSPEndGroup(std::ostream& fout); @@ -82,8 +82,8 @@ class cmLocalVisualStudio6Generator : public cmLocalVisualStudioGenerator friend class EventWriter; cmsys::auto_ptr MaybeCreateOutputDir(cmTarget& target, const char* config); - std::string CreateTargetRules(cmTarget &target, - const char* configName, + std::string CreateTargetRules(cmTarget &target, + const char* configName, const char *libName); void ComputeLinkOptions(cmTarget& target, const char* configName, const std::string extraOptions, diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index f2ab79d7efa..2dfca025c70 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -291,7 +291,7 @@ cmSourceFile* cmLocalVisualStudio7Generator::CreateVCProjBuildRule() comment += makefileIn; std::string args; args = "-H"; - args += this->Convert(this->Makefile->GetHomeDirectory(), + args += this->Convert(this->Makefile->GetHomeDirectory(), START_OUTPUT, UNCHANGED, true); commandLine.push_back(args); args = "-B"; @@ -343,8 +343,8 @@ void cmLocalVisualStudio7Generator::WriteConfigurations(std::ostream& fout, fout << "\t\n"; } cmVS7FlagTable cmLocalVisualStudio7GeneratorFortranFlagTable[] = -{ - {"Preprocess", "fpp", "Run Preprocessor on files", "preprocessYes", 0}, +{ + {"Preprocess", "fpp", "Run Preprocessor on files", "preprocessYes", 0}, {"SuppressStartupBanner", "nologo", "SuppressStartupBanner", "true", 0}, {"SourceFileFormat", "fixed", "Use Fixed Format", "fileFormatFixed", 0}, {"SourceFileFormat", "free", "Use Free Format", "fileFormatFree", 0}, @@ -376,15 +376,15 @@ cmVS7FlagTable cmLocalVisualStudio7GeneratorFortranFlagTable[] = {"OptimizeForProcessor", "QxO", "", "codeExclusivelyCore2StreamingSIMD", 0}, {"OptimizeForProcessor", "QxS", "", "codeExclusivelyCore2StreamingSIMD4", 0}, - {"ModulePath", "module:", "", "", + {"ModulePath", "module:", "", "", cmVS7FlagTable::UserValueRequired}, - {"LoopUnrolling", "Qunroll:", "", "", + {"LoopUnrolling", "Qunroll:", "", "", cmVS7FlagTable::UserValueRequired}, - {"AutoParallelThreshold", "Qpar-threshold:", "", "", + {"AutoParallelThreshold", "Qpar-threshold:", "", "", cmVS7FlagTable::UserValueRequired}, - {"HeapArrays", "heap-arrays:", "", "", + {"HeapArrays", "heap-arrays:", "", "", cmVS7FlagTable::UserValueRequired}, - {"ObjectText", "bintext:", "", "", + {"ObjectText", "bintext:", "", "", cmVS7FlagTable::UserValueRequired}, {"Parallelization", "Qparallel", "", "true", 0}, {"PrefetchInsertion", "Qprefetch-", "", "false", 0}, @@ -476,7 +476,7 @@ cmVS7FlagTable cmLocalVisualStudio7GeneratorFlagTable[] = // boolean flags {"BufferSecurityCheck", "GS", "Buffer security check", "TRUE", 0}, {"BufferSecurityCheck", "GS-", "Turn off Buffer security check", "FALSE", 0}, - {"Detect64BitPortabilityProblems", "Wp64", + {"Detect64BitPortabilityProblems", "Wp64", "Detect 64-bit Portability Problems", "TRUE", 0}, {"EnableFiberSafeOptimizations", "GT", "Enable Fiber-safe Optimizations", "TRUE", 0}, @@ -566,7 +566,7 @@ cmVS7FlagTable cmLocalVisualStudio7GeneratorLinkFlagTable[] = {"TurnOffAssemblyGeneration", "NOASSEMBLY", "No assembly even if CLR information is present in objects.", "true", 0}, {"ModuleDefinitionFile", "DEF:", "add an export def file", "", - cmVS7FlagTable::UserValue}, + cmVS7FlagTable::UserValue}, {"GenerateMapFile", "MAP", "enable generation of map file", "TRUE", 0}, {0,0,0,0,0} }; @@ -800,7 +800,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout, if(this->FortranProject) { const char* target_mod_dir = - target.GetProperty("Fortran_MODULE_DIRECTORY"); + target.GetProperty("Fortran_MODULE_DIRECTORY"); std::string modDir; if(target_mod_dir) { @@ -812,7 +812,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout, { modDir = "."; } - fout << "\t\t\t\tModulePath=\"" + fout << "\t\t\t\tModulePath=\"" << this->ConvertToXMLOutputPath(modDir.c_str()) << "\\$(ConfigurationName)\"\n"; } @@ -826,7 +826,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout, // output the include path std::string ipath = this->ConvertToXMLOutputPath(i->c_str()); fout << ipath << ";"; - // if this is fortran then output the include with + // if this is fortran then output the include with // a ConfigurationName on the end of it. if(this->FortranProject) { @@ -918,7 +918,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout, // Add a flag telling the manifest tool to use a workaround // for FAT32 file systems, which can cause an empty manifest // to be embedded into the resulting executable. See CMake - // bug #2617. + // bug #2617. const char* tool = "VCManifestTool"; if(this->FortranProject) { @@ -941,7 +941,7 @@ cmLocalVisualStudio7Generator ::GetBuildTypeLinkerFlags(std::string rootLinkerFlags, const char* configName) { std::string configTypeUpper = cmSystemTools::UpperCase(configName); - std::string extraLinkOptionsBuildTypeDef = + std::string extraLinkOptionsBuildTypeDef = rootLinkerFlags + "_" + configTypeUpper; std::string extraLinkOptionsBuildType = @@ -962,23 +962,23 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout, std::string extraLinkOptions; if(target.GetType() == cmTarget::EXECUTABLE) { - extraLinkOptions = - this->Makefile->GetRequiredDefinition("CMAKE_EXE_LINKER_FLAGS") - + std::string(" ") + extraLinkOptions = + this->Makefile->GetRequiredDefinition("CMAKE_EXE_LINKER_FLAGS") + + std::string(" ") + GetBuildTypeLinkerFlags("CMAKE_EXE_LINKER_FLAGS", configName); } if(target.GetType() == cmTarget::SHARED_LIBRARY) { - extraLinkOptions = - this->Makefile->GetRequiredDefinition("CMAKE_SHARED_LINKER_FLAGS") - + std::string(" ") + extraLinkOptions = + this->Makefile->GetRequiredDefinition("CMAKE_SHARED_LINKER_FLAGS") + + std::string(" ") + GetBuildTypeLinkerFlags("CMAKE_SHARED_LINKER_FLAGS", configName); } if(target.GetType() == cmTarget::MODULE_LIBRARY) { - extraLinkOptions = - this->Makefile->GetRequiredDefinition("CMAKE_MODULE_LINKER_FLAGS") - + std::string(" ") + extraLinkOptions = + this->Makefile->GetRequiredDefinition("CMAKE_MODULE_LINKER_FLAGS") + + std::string(" ") + GetBuildTypeLinkerFlags("CMAKE_MODULE_LINKER_FLAGS", configName); } @@ -1203,7 +1203,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout, temp = target.GetDirectory(configName); temp += "/"; temp += targetNameFull; - fout << "\t\t\t\tOutputFile=\"" + fout << "\t\t\t\tOutputFile=\"" << this->ConvertToXMLOutputPathSingle(temp.c_str()) << "\"\n"; this->WriteTargetVersionAttribute(fout, target); linkOptions.OutputFlagMap(fout, "\t\t\t\t"); @@ -1594,7 +1594,7 @@ ::ComputeLongestObjectDirectory(cmTarget& target) const void cmLocalVisualStudio7Generator ::WriteGroup(const cmSourceGroup *sg, cmTarget& target, - std::ostream &fout, const char *libName, + std::ostream &fout, const char *libName, std::vector *configs) { const std::vector &sourceFiles = @@ -1652,7 +1652,7 @@ ::WriteGroup(const cmSourceGroup *sg, cmTarget& target, } if(ext == "rc") { - aCompilerTool = "VCResourceCompilerTool"; + aCompilerTool = "VCResourceCompilerTool"; lang = "RC"; if(this->FortranProject) { @@ -1744,7 +1744,7 @@ WriteCustomRule(std::ostream& fout, FCInfo& fcinfo) { std::string comment = this->ConstructComment(command); - + // Write the rule for each configuration. std::vector::iterator i; std::vector *configs = @@ -1780,9 +1780,9 @@ WriteCustomRule(std::ostream& fout, } fout << "\t\t\t\t\tEscapeForXML(comment.c_str()) << "\"\n" - << "\t\t\t\t\tCommandLine=\"" + << "\t\t\t\t\tCommandLine=\"" << this->EscapeForXML(script.c_str()) << "\"\n" << "\t\t\t\t\tAdditionalDependencies=\""; if(command.GetDepends().empty()) @@ -1799,9 +1799,9 @@ WriteCustomRule(std::ostream& fout, else { // Write out the dependencies for the rule. - for(std::vector::const_iterator d = + for(std::vector::const_iterator d = command.GetDepends().begin(); - d != command.GetDepends().end(); + d != command.GetDepends().end(); ++d) { // Get the real name of the dependency in case it is a CMake target. @@ -1823,9 +1823,9 @@ WriteCustomRule(std::ostream& fout, { // Write a rule for the output generated by this command. const char* sep = ""; - for(std::vector::const_iterator o = - command.GetOutputs().begin(); - o != command.GetOutputs().end(); + for(std::vector::const_iterator o = + command.GetOutputs().begin(); + o != command.GetOutputs().end(); ++o) { fout << sep << this->ConvertToXMLOutputPathSingle(o->c_str()); @@ -1922,7 +1922,7 @@ ::WriteProjectStartFortran(std::ostream& fout, const char *libName, cmTarget & target) { - + cmGlobalVisualStudio7Generator* gg = static_cast(this->GlobalGenerator); @@ -1954,7 +1954,7 @@ ::WriteProjectStartFortran(std::ostream& fout, if(!keyword) { keyword = "Console Application"; - } + } const char* projectType = 0; switch(target.GetType()) { @@ -1990,7 +1990,7 @@ ::WriteProjectStartFortran(std::ostream& fout, fout << "\tProjectType=\"" << projectType << "\"\n"; } this->WriteProjectSCC(fout, target); - fout<< "\tKeyword=\"" << keyword << "\">\n" + fout<< "\tKeyword=\"" << keyword << "\">\n" << "\tProjectGUID=\"{" << gg->GetGUID(libName) << "}\">\n" << "\t\n" << "\t\tPlatformName << "\"/>\n" @@ -2110,7 +2110,7 @@ ::ConvertToXMLOutputPathSingle(const char* path) // This class is used to parse an existing vs 7 project -// and extract the GUID +// and extract the GUID class cmVS7XMLParser : public cmXMLParser { public: @@ -2130,7 +2130,7 @@ class cmVS7XMLParser : public cmXMLParser while(atts[i]) { if(strcmp(atts[i], "ProjectGUID") == 0) - { + { if(atts[i+1]) { this->GUID = atts[i+1]; @@ -2144,7 +2144,7 @@ class cmVS7XMLParser : public cmXMLParser } ++i; } - } + } } int InitializeParser() { @@ -2153,7 +2153,7 @@ class cmVS7XMLParser : public cmXMLParser { return ret; } - // visual studio projects have a strange encoding, but it is + // visual studio projects have a strange encoding, but it is // really utf-8 XML_SetEncoding(static_cast(this->Parser), "utf-8"); return 1; diff --git a/Source/cmLocalVisualStudio7Generator.h b/Source/cmLocalVisualStudio7Generator.h index 9aa408edaeb..95db2cc8c83 100644 --- a/Source/cmLocalVisualStudio7Generator.h +++ b/Source/cmLocalVisualStudio7Generator.h @@ -42,7 +42,7 @@ class cmLocalVisualStudio7Generator : public cmLocalVisualStudioGenerator virtual void AddHelperCommands(); /** - * Generate the makefile for this directory. + * Generate the makefile for this directory. */ virtual void Generate(); @@ -77,17 +77,17 @@ class cmLocalVisualStudio7Generator : public cmLocalVisualStudioGenerator void WriteVCProjHeader(std::ostream& fout, const char *libName, cmTarget &tgt, std::vector &sgs); void WriteVCProjFooter(std::ostream& fout, cmTarget &target); - void WriteVCProjFile(std::ostream& fout, const char *libName, + void WriteVCProjFile(std::ostream& fout, const char *libName, cmTarget &tgt); void WriteConfigurations(std::ostream& fout, const char *libName, cmTarget &tgt); void WriteConfiguration(std::ostream& fout, const char* configName, - const char* libName, cmTarget &tgt); + const char* libName, cmTarget &tgt); std::string EscapeForXML(const char* s); std::string ConvertToXMLOutputPath(const char* path); std::string ConvertToXMLOutputPathSingle(const char* path); - void OutputTargetRules(std::ostream& fout, const char* configName, + void OutputTargetRules(std::ostream& fout, const char* configName, cmTarget &target, const char *libName); void OutputBuildTool(std::ostream& fout, const char* configName, cmTarget& t, bool debug); @@ -98,18 +98,18 @@ class cmLocalVisualStudio7Generator : public cmLocalVisualStudioGenerator cmTarget &tgt, std::vector &sgs); void WriteProjectStartFortran(std::ostream& fout, const char *libName, cmTarget &tgt); - void WriteVCProjBeginGroup(std::ostream& fout, + void WriteVCProjBeginGroup(std::ostream& fout, const char* group, const char* filter); void WriteVCProjEndGroup(std::ostream& fout); - + void WriteCustomRule(std::ostream& fout, const char* source, const cmCustomCommand& command, FCInfo& fcinfo); void WriteTargetVersionAttribute(std::ostream& fout, cmTarget& target); - void WriteGroup(const cmSourceGroup *sg, + void WriteGroup(const cmSourceGroup *sg, cmTarget& target, std::ostream &fout, const char *libName, std::vector *configs); @@ -122,7 +122,7 @@ class cmLocalVisualStudio7Generator : public cmLocalVisualStudioGenerator cmVS7FlagTable const* ExtraFlagTable; std::string ModuleDefinitionFile; bool FortranProject; - std::string PlatformName; // Win32 or x64 + std::string PlatformName; // Win32 or x64 cmLocalVisualStudio7GeneratorInternals* Internal; }; diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx index 2599227593e..bd7ec004be5 100644 --- a/Source/cmMacroCommand.cxx +++ b/Source/cmMacroCommand.cxx @@ -56,7 +56,7 @@ class cmMacroHelperCommand : public cmCommand * This is called when the command is first encountered in * the CMakeLists.txt file. */ - virtual bool InvokeInitialPass(const std::vector& args, + virtual bool InvokeInitialPass(const std::vector& args, cmExecutionStatus &); virtual bool InitialPass(std::vector const&, @@ -66,7 +66,7 @@ class cmMacroHelperCommand : public cmCommand * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() const { return this->Args[0].c_str(); } - + /** * Succinct documentation. */ @@ -164,7 +164,7 @@ bool cmMacroHelperCommand::InvokeInitialPass { variable = "${"; variable += this->Args[j]; - variable += "}"; + variable += "}"; cmSystemTools::ReplaceString(tmps, variable.c_str(), expandedArgs[j-1].c_str()); } @@ -270,7 +270,7 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf, else if(!cmSystemTools::Strucmp(lff.Name.c_str(),"endmacro")) { // if this is the endmacro for this macro then execute - if (!this->Depth) + if (!this->Depth) { std::string name = this->Args[0]; std::vector::size_type cc; @@ -287,7 +287,7 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf, f->Functions = this->Functions; mf.RecordPolicies(f->Policies); std::string newName = "_" + this->Args[0]; - mf.GetCMakeInstance()->RenameCommand(this->Args[0].c_str(), + mf.GetCMakeInstance()->RenameCommand(this->Args[0].c_str(), newName.c_str()); mf.AddCommand(f); @@ -341,7 +341,7 @@ bool cmMacroCommand::InitialPass(std::vector const& args, cmMacroFunctionBlocker *f = new cmMacroFunctionBlocker(); for(std::vector::const_iterator j = args.begin(); j != args.end(); ++j) - { + { f->Args.push_back(*j); } this->Makefile->AddFunctionBlocker(f); diff --git a/Source/cmMacroCommand.h b/Source/cmMacroCommand.h index 36e4b2f6bc5..f8c40c00290 100644 --- a/Source/cmMacroCommand.h +++ b/Source/cmMacroCommand.h @@ -20,11 +20,11 @@ class cmMacroFunctionBlocker : public cmFunctionBlocker public: cmMacroFunctionBlocker() {this->Depth=0;} virtual ~cmMacroFunctionBlocker() {} - virtual bool IsFunctionBlocked(const cmListFileFunction&, + virtual bool IsFunctionBlocked(const cmListFileFunction&, cmMakefile &mf, cmExecutionStatus &); virtual bool ShouldRemove(const cmListFileFunction&, cmMakefile &mf); - + std::vector Args; std::vector Functions; int Depth; diff --git a/Source/cmMakeDepend.cxx b/Source/cmMakeDepend.cxx index 6055c5585ea..a68b57c2367 100644 --- a/Source/cmMakeDepend.cxx +++ b/Source/cmMakeDepend.cxx @@ -31,8 +31,8 @@ cmMakeDepend::cmMakeDepend() cmMakeDepend::~cmMakeDepend() -{ - for(DependInformationMapType::iterator i = +{ + for(DependInformationMapType::iterator i = this->DependInformationMap.begin(); i != this->DependInformationMap.end(); ++i) { @@ -162,7 +162,7 @@ void cmMakeDepend::GenerateDependInformation(cmDependInformation* info) else { //try to guess which include path to use - for(std::vector::iterator t = + for(std::vector::iterator t = this->IncludeDirectories.begin(); t != this->IncludeDirectories.end(); ++t) { @@ -175,7 +175,7 @@ void cmMakeDepend::GenerateDependInformation(cmDependInformation* info) if (srcFile->GetFullPath() == incpath) { // set the path to the guessed path - info->FullPath = incpath; + info->FullPath = incpath; found=true; } } @@ -243,7 +243,7 @@ void cmMakeDepend::DependWalk(cmDependInformation* info) void cmMakeDepend::AddDependency(cmDependInformation* info, const char* file) { - cmDependInformation* dependInfo = + cmDependInformation* dependInfo = this->GetDependInformation(file, info->PathOnly.c_str()); this->GenerateDependInformation(dependInfo); info->AddDependencies(dependInfo); @@ -288,7 +288,7 @@ std::string cmMakeDepend::FullPath(const char* fname, const char *extraPath) { m = this->DirectoryToFileToPathMap.find(""); } - + if(m != this->DirectoryToFileToPathMap.end()) { FileToPathMapType& map = m->second; @@ -305,7 +305,7 @@ std::string cmMakeDepend::FullPath(const char* fname, const char *extraPath) this->DirectoryToFileToPathMap[extraPath? extraPath: ""][fname] = fp; return fp; } - + for(std::vector::iterator i = this->IncludeDirectories.begin(); i != this->IncludeDirectories.end(); ++i) { diff --git a/Source/cmMakeDepend.h b/Source/cmMakeDepend.h index 185f4e3566c..b6e3928e9bf 100644 --- a/Source/cmMakeDepend.h +++ b/Source/cmMakeDepend.h @@ -48,26 +48,26 @@ class cmDependInformation * to it. */ const cmSourceFile *SourceFile; - + /** * Full path to this file. */ std::string FullPath; - + /** * Full path not including file name. */ std::string PathOnly; - + /** * Name used to #include this file. */ std::string IncludeName; - + /** * This method adds the dependencies of another file to this one. */ - void AddDependencies(cmDependInformation*); + void AddDependencies(cmDependInformation*); }; @@ -85,11 +85,11 @@ class cmMakeDepend * Destructor. */ virtual ~cmMakeDepend(); - - /** + + /** * Set the makefile that is used as a source of classes. */ - virtual void SetMakefile(cmMakefile* makefile); + virtual void SetMakefile(cmMakefile* makefile); /** * Add a directory to the search path for include files. @@ -107,26 +107,26 @@ class cmMakeDepend * Compute the depend information for this class. */ virtual void DependWalk(cmDependInformation* info); - + /** * Add a dependency. Possibly walk it for more dependencies. */ virtual void AddDependency(cmDependInformation* info, const char* file); - + /** * Fill in the given object with dependency information. If the * information is already complete, nothing is done. */ void GenerateDependInformation(cmDependInformation* info); - + /** * Get an instance of cmDependInformation corresponding to the given file * name. */ - cmDependInformation* GetDependInformation(const char* file, - const char *extraPath); - - /** + cmDependInformation* GetDependInformation(const char* file, + const char *extraPath); + + /** * Find the full path name for the given file name. * This uses the include directories. * TODO: Cache path conversions to reduce FileExists calls. @@ -139,9 +139,9 @@ class cmMakeDepend cmsys::RegularExpression ComplainFileRegularExpression; std::vector IncludeDirectories; typedef std::map FileToPathMapType; - typedef std::map + typedef std::map DirectoryToFileToPathMapType; - typedef std::map + typedef std::map DependInformationMapType; DependInformationMapType DependInformationMap; DirectoryToFileToPathMapType DirectoryToFileToPathMap; diff --git a/Source/cmMakeDirectoryCommand.h b/Source/cmMakeDirectoryCommand.h index 4e6e1d5abac..a0f866a5f3d 100644 --- a/Source/cmMakeDirectoryCommand.h +++ b/Source/cmMakeDirectoryCommand.h @@ -29,7 +29,7 @@ class cmMakeDirectoryCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmMakeDirectoryCommand; } @@ -45,7 +45,7 @@ class cmMakeDirectoryCommand : public cmCommand * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() const { return "make_directory";} - + /** * This determines if the command is invoked when in script mode. */ @@ -58,7 +58,7 @@ class cmMakeDirectoryCommand : public cmCommand { return "Deprecated. Use the file(MAKE_DIRECTORY ) command instead."; } - + /** * More documentation. */ @@ -70,7 +70,7 @@ class cmMakeDirectoryCommand : public cmCommand "parent directories that do not exist will also be created. Use with " "care."; } - + /** This command is kept for compatibility with older CMake versions. */ virtual bool IsDiscouraged() const { diff --git a/Source/cmMarkAsAdvancedCommand.cxx b/Source/cmMarkAsAdvancedCommand.cxx index a80f7ecd66c..4236d102c7a 100644 --- a/Source/cmMarkAsAdvancedCommand.cxx +++ b/Source/cmMarkAsAdvancedCommand.cxx @@ -37,7 +37,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) { std::string variable = args[i]; cmCacheManager* manager = this->Makefile->GetCacheManager(); - cmCacheManager::CacheIterator it = + cmCacheManager::CacheIterator it = manager->GetCacheIterator(variable.c_str()); if ( it.IsAtEnd() ) { diff --git a/Source/cmMarkAsAdvancedCommand.h b/Source/cmMarkAsAdvancedCommand.h index 3658dbbd3a6..246eb8aa3ee 100644 --- a/Source/cmMarkAsAdvancedCommand.h +++ b/Source/cmMarkAsAdvancedCommand.h @@ -25,7 +25,7 @@ class cmMarkAsAdvancedCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmMarkAsAdvancedCommand; } @@ -41,7 +41,7 @@ class cmMarkAsAdvancedCommand : public cmCommand * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() const {return "mark_as_advanced";} - + /** * Succinct documentation. */ @@ -49,7 +49,7 @@ class cmMarkAsAdvancedCommand : public cmCommand { return "Mark cmake cached variables as advanced."; } - + /** * More documentation. */ diff --git a/Source/cmMathCommand.cxx b/Source/cmMathCommand.cxx index 3c1129d047e..9fc42659a7e 100644 --- a/Source/cmMathCommand.cxx +++ b/Source/cmMathCommand.cxx @@ -43,7 +43,7 @@ bool cmMathCommand::HandleExprCommand(std::vector const& args) const std::string& outputVariable = args[1]; const std::string& expression = args[2]; - + cmExprParserHelper helper; if ( !helper.ParseString(expression.c_str(), 0) ) { diff --git a/Source/cmMathCommand.h b/Source/cmMathCommand.h index d6229042801..27c5b6a3beb 100644 --- a/Source/cmMathCommand.h +++ b/Source/cmMathCommand.h @@ -21,7 +21,7 @@ class cmMathCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmMathCommand; } @@ -50,7 +50,7 @@ class cmMathCommand : public cmCommand { return "Mathematical expressions."; } - + /** * More documentation. */ @@ -64,10 +64,10 @@ class cmMathCommand : public cmCommand "+ - * / % | & ^ ~ << >> * / %. They have the same meaning " " as they do in c code."; } - + cmTypeMacro(cmMathCommand, cmCommand); protected: - + bool HandleExprCommand(std::vector const& args); }; diff --git a/Source/cmMessageCommand.h b/Source/cmMessageCommand.h index 03ab94b1cb8..9f01eaf24eb 100644 --- a/Source/cmMessageCommand.h +++ b/Source/cmMessageCommand.h @@ -24,7 +24,7 @@ class cmMessageCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmMessageCommand; } @@ -53,7 +53,7 @@ class cmMessageCommand : public cmCommand { return "Display a message to the user."; } - + /** * More documentation. */ @@ -83,7 +83,7 @@ class cmMessageCommand : public cmCommand "Indented text is considered pre-formatted." ; } - + cmTypeMacro(cmMessageCommand, cmCommand); }; diff --git a/Source/cmObject.h b/Source/cmObject.h index 1a39aa76a83..ca6a54fd033 100644 --- a/Source/cmObject.h +++ b/Source/cmObject.h @@ -27,7 +27,7 @@ class cmObject * Need virtual destructor to destroy real command type. */ virtual ~cmObject() {} - + /** * The class name of the command. */ @@ -38,7 +38,7 @@ class cmObject */ static bool IsTypeOf(const char *type) { return !strcmp("cmObject", type); } - + /** * Returns true if this object is an instance of the given class or * a subclass of it. diff --git a/Source/cmOptionCommand.cxx b/Source/cmOptionCommand.cxx index af9d94bcf09..776a3a44398 100644 --- a/Source/cmOptionCommand.cxx +++ b/Source/cmOptionCommand.cxx @@ -42,11 +42,11 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) this->SetError(m.c_str()); return false; } - + std::string initialValue = "Off"; // Now check and see if the value has been stored in the cache // already, if so use that value and don't look for the program - cmCacheManager::CacheIterator it = + cmCacheManager::CacheIterator it = this->Makefile->GetCacheManager()->GetCacheIterator(args[0].c_str()); if(!it.IsAtEnd()) { diff --git a/Source/cmOptionCommand.h b/Source/cmOptionCommand.h index da3133237f0..7d0240050ab 100644 --- a/Source/cmOptionCommand.h +++ b/Source/cmOptionCommand.h @@ -25,7 +25,7 @@ class cmOptionCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmOptionCommand; } @@ -41,7 +41,7 @@ class cmOptionCommand : public cmCommand * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() const {return "option";} - + /** * Succinct documentation. */ @@ -49,7 +49,7 @@ class cmOptionCommand : public cmCommand { return "Provides an option that the user can optionally select."; } - + /** * More documentation. */ diff --git a/Source/cmOutputRequiredFilesCommand.cxx b/Source/cmOutputRequiredFilesCommand.cxx index be079c096c7..01fc2cf8a58 100644 --- a/Source/cmOutputRequiredFilesCommand.cxx +++ b/Source/cmOutputRequiredFilesCommand.cxx @@ -28,7 +28,7 @@ void cmLBDepend::DependWalk(cmDependInformation* info) cmSystemTools::Error("error can not open ", info->FullPath.c_str()); return; } - + std::string line; while(cmSystemTools::GetLineFromStream(fin, line)) { @@ -45,7 +45,7 @@ void cmLBDepend::DependWalk(cmDependInformation* info) // if a < is not found then move on if(qstart == std::string::npos) { - cmSystemTools::Error("unknown include directive ", + cmSystemTools::Error("unknown include directive ", currentline.c_str() ); continue; } @@ -73,7 +73,7 @@ void cmLBDepend::DependWalk(cmDependInformation* info) } continue; } - + // Add this file and all its dependencies. this->AddDependency(info, includeFile.c_str()); /// add the cxx file if it exists @@ -89,7 +89,7 @@ void cmLBDepend::DependWalk(cmDependInformation* info) { found = true; } - for(std::vector::iterator i = + for(std::vector::iterator i = this->IncludeDirectories.begin(); i != this->IncludeDirectories.end(); ++i) { @@ -108,7 +108,7 @@ void cmLBDepend::DependWalk(cmDependInformation* info) { found = true; } - for(std::vector::iterator i = + for(std::vector::iterator i = this->IncludeDirectories.begin(); i != this->IncludeDirectories.end(); ++i) { @@ -128,7 +128,7 @@ void cmLBDepend::DependWalk(cmDependInformation* info) { found = true; } - for(std::vector::iterator i = + for(std::vector::iterator i = this->IncludeDirectories.begin(); i != this->IncludeDirectories.end(); ++i) { @@ -148,7 +148,7 @@ void cmLBDepend::DependWalk(cmDependInformation* info) { found = true; } - for(std::vector::iterator i = + for(std::vector::iterator i = this->IncludeDirectories.begin(); i != this->IncludeDirectories.end(); ++i) { @@ -183,7 +183,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) // store the arg for final pass this->File = args[0]; this->OutputFile = args[1]; - + // compute the list of files cmLBDepend md; md.SetMakefile(this->Makefile); @@ -217,7 +217,7 @@ ListDependencies(cmDependInformation const *info, // add info to the visited set visited->insert(info); // now recurse with info's dependencies - for(cmDependInformation::DependencySetType::const_iterator d = + for(cmDependInformation::DependencySetType::const_iterator d = info->DependencySet.begin(); d != info->DependencySet.end(); ++d) { diff --git a/Source/cmOutputRequiredFilesCommand.h b/Source/cmOutputRequiredFilesCommand.h index 85d9095e205..1d7e39457a5 100644 --- a/Source/cmOutputRequiredFilesCommand.h +++ b/Source/cmOutputRequiredFilesCommand.h @@ -25,7 +25,7 @@ class cmOutputRequiredFilesCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmOutputRequiredFilesCommand; } @@ -49,7 +49,7 @@ class cmOutputRequiredFilesCommand : public cmCommand { return "Deprecated. Approximate C preprocessor dependency scanning."; } - + /** * More documentation. */ @@ -72,7 +72,7 @@ class cmOutputRequiredFilesCommand : public cmCommand return true; } - + cmTypeMacro(cmOutputRequiredFilesCommand, cmCommand); void ListDependencies(cmDependInformation const *info, FILE *fout, diff --git a/Source/cmProjectCommand.cxx b/Source/cmProjectCommand.cxx index fcf0a4903c5..11f9a76213d 100644 --- a/Source/cmProjectCommand.cxx +++ b/Source/cmProjectCommand.cxx @@ -19,14 +19,14 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) { this->SetError("PROJECT called with incorrect number of arguments"); return false; - } + } this->Makefile->SetProjectName(args[0].c_str()); std::string bindir = args[0]; bindir += "_BINARY_DIR"; std::string srcdir = args[0]; srcdir += "_SOURCE_DIR"; - + this->Makefile->AddCacheDefinition (bindir.c_str(), this->Makefile->GetCurrentOutputDirectory(), @@ -35,7 +35,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) (srcdir.c_str(), this->Makefile->GetCurrentDirectory(), "Value Computed by CMake", cmCacheManager::STATIC); - + bindir = "PROJECT_BINARY_DIR"; srcdir = "PROJECT_SOURCE_DIR"; diff --git a/Source/cmProjectCommand.h b/Source/cmProjectCommand.h index 88a1944b4e5..a53cb3fb82c 100644 --- a/Source/cmProjectCommand.h +++ b/Source/cmProjectCommand.h @@ -28,7 +28,7 @@ class cmProjectCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmProjectCommand; } @@ -39,7 +39,7 @@ class cmProjectCommand : public cmCommand */ virtual bool InitialPass(std::vector const& args, cmExecutionStatus &status); - + /** * The name of the command as specified in CMakeList.txt. */ @@ -52,7 +52,7 @@ class cmProjectCommand : public cmCommand { return "Set a name for the entire project."; } - + /** * More documentation. */ @@ -73,7 +73,7 @@ class cmProjectCommand : public cmCommand "the file pointed to by that variable will be included as the last step " "of the project command."; } - + cmTypeMacro(cmProjectCommand, cmCommand); }; diff --git a/Source/cmProperty.h b/Source/cmProperty.h index e0fcd631e8a..bb75bb0b953 100644 --- a/Source/cmProperty.h +++ b/Source/cmProperty.h @@ -14,7 +14,7 @@ #include "cmStandardIncludes.h" -class cmProperty +class cmProperty { public: enum ScopeType { TARGET, SOURCE_FILE, DIRECTORY, GLOBAL, CACHE, diff --git a/Source/cmPropertyDefinition.h b/Source/cmPropertyDefinition.h index 16bd148a725..296366dcaf3 100644 --- a/Source/cmPropertyDefinition.h +++ b/Source/cmPropertyDefinition.h @@ -29,7 +29,7 @@ class cmPropertyDefinition /// Define this property void DefineProperty(const char *name, cmProperty::ScopeType scope, const char *ShortDescription, - const char *FullDescription, + const char *FullDescription, const char *DocumentationSection, bool chained); @@ -44,7 +44,7 @@ class cmPropertyDefinition /// Get the section if any const std::string &GetDocumentationSection() const { - return this->DocumentationSection; }; + return this->DocumentationSection; }; /// Get the scope cmProperty::ScopeType GetScope() const { @@ -56,7 +56,7 @@ class cmPropertyDefinition /// Get the documentation (full version) const std::string &GetFullDescription() const { - return this->FullDescription; }; + return this->FullDescription; }; protected: std::string Name; diff --git a/Source/cmPropertyDefinitionMap.cxx b/Source/cmPropertyDefinitionMap.cxx index fcdb937769c..20fa07c43a2 100644 --- a/Source/cmPropertyDefinitionMap.cxx +++ b/Source/cmPropertyDefinitionMap.cxx @@ -30,7 +30,7 @@ ::DefineProperty(const char *name, cmProperty::ScopeType scope, if (it == this->end()) { prop = &(*this)[name]; - prop->DefineProperty(name,scope,ShortDescription, FullDescription, + prop->DefineProperty(name,scope,ShortDescription, FullDescription, DocumentationSection, chain); } } @@ -49,10 +49,10 @@ ::GetPropertiesDocumentation(std::mapsecond.GetScope()) { - case cmProperty::GLOBAL: + case cmProperty::GLOBAL: secName = "Properties of Global Scope"; break; - case cmProperty::TARGET: + case cmProperty::TARGET: secName = "Properties on Targets"; break; case cmProperty::SOURCE_FILE: @@ -80,7 +80,7 @@ ::GetPropertiesDocumentation(std::map { public: diff --git a/Source/cmPropertyMap.cxx b/Source/cmPropertyMap.cxx index a4d0bf3d8c9..78f378ab78d 100644 --- a/Source/cmPropertyMap.cxx +++ b/Source/cmPropertyMap.cxx @@ -43,7 +43,7 @@ void cmPropertyMap::SetProperty(const char *name, const char *value, #ifdef CMAKE_STRICT if (!this->CMakeInstance) { - cmSystemTools::Error("CMakeInstance not set on a property map!"); + cmSystemTools::Error("CMakeInstance not set on a property map!"); abort(); } else @@ -85,10 +85,10 @@ void cmPropertyMap::AppendProperty(const char* name, const char* value, } const char *cmPropertyMap -::GetPropertyValue(const char *name, - cmProperty::ScopeType scope, +::GetPropertyValue(const char *name, + cmProperty::ScopeType scope, bool &chain) const -{ +{ chain = false; if (!name) { @@ -99,7 +99,7 @@ ::GetPropertyValue(const char *name, #ifdef CMAKE_STRICT if (!this->CMakeInstance) { - cmSystemTools::Error("CMakeInstance not set on a property map!"); + cmSystemTools::Error("CMakeInstance not set on a property map!"); abort(); } else diff --git a/Source/cmPropertyMap.h b/Source/cmPropertyMap.h index 94275e2ac6e..0c3aad4619b 100644 --- a/Source/cmPropertyMap.h +++ b/Source/cmPropertyMap.h @@ -21,13 +21,13 @@ class cmPropertyMap : public std::map public: cmProperty *GetOrCreateProperty(const char *name); - void SetProperty(const char *name, const char *value, + void SetProperty(const char *name, const char *value, cmProperty::ScopeType scope); void AppendProperty(const char* name, const char* value, cmProperty::ScopeType scope, bool asString=false); - const char *GetPropertyValue(const char *name, + const char *GetPropertyValue(const char *name, cmProperty::ScopeType scope, bool &chain) const; diff --git a/Source/cmQTWrapCPPCommand.cxx b/Source/cmQTWrapCPPCommand.cxx index 1f1aed72ffe..0d3c9941cbe 100644 --- a/Source/cmQTWrapCPPCommand.cxx +++ b/Source/cmQTWrapCPPCommand.cxx @@ -12,7 +12,7 @@ #include "cmQTWrapCPPCommand.h" // cmQTWrapCPPCommand -bool cmQTWrapCPPCommand::InitialPass(std::vector const& argsIn, +bool cmQTWrapCPPCommand::InitialPass(std::vector const& argsIn, cmExecutionStatus &) { if(argsIn.size() < 3 ) diff --git a/Source/cmQTWrapCPPCommand.h b/Source/cmQTWrapCPPCommand.h index 0184927c91a..1af08406511 100644 --- a/Source/cmQTWrapCPPCommand.h +++ b/Source/cmQTWrapCPPCommand.h @@ -30,7 +30,7 @@ class cmQTWrapCPPCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmQTWrapCPPCommand; } @@ -54,7 +54,7 @@ class cmQTWrapCPPCommand : public cmCommand { return "Create Qt Wrappers."; } - + /** * More documentation. */ diff --git a/Source/cmQTWrapUICommand.cxx b/Source/cmQTWrapUICommand.cxx index bbecd8dccac..a6a4b515848 100644 --- a/Source/cmQTWrapUICommand.cxx +++ b/Source/cmQTWrapUICommand.cxx @@ -12,7 +12,7 @@ #include "cmQTWrapUICommand.h" // cmQTWrapUICommand -bool cmQTWrapUICommand::InitialPass(std::vector const& argsIn, +bool cmQTWrapUICommand::InitialPass(std::vector const& argsIn, cmExecutionStatus &) { if(argsIn.size() < 4 ) diff --git a/Source/cmQTWrapUICommand.h b/Source/cmQTWrapUICommand.h index 744ae983837..1fff041628c 100644 --- a/Source/cmQTWrapUICommand.h +++ b/Source/cmQTWrapUICommand.h @@ -28,7 +28,7 @@ class cmQTWrapUICommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmQTWrapUICommand; } @@ -52,7 +52,7 @@ class cmQTWrapUICommand : public cmCommand { return "Create Qt user interfaces Wrappers."; } - + /** * More documentation. */ diff --git a/Source/cmRemoveCommand.cxx b/Source/cmRemoveCommand.cxx index d80b3fe9f5a..bcb856438ec 100644 --- a/Source/cmRemoveCommand.cxx +++ b/Source/cmRemoveCommand.cxx @@ -30,13 +30,13 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) { return true; } - + // expand the variable std::vector varArgsExpanded; cmSystemTools::ExpandListArgument(cacheValue, varArgsExpanded); - + // expand the args - // check for REMOVE(VAR v1 v2 ... vn) + // check for REMOVE(VAR v1 v2 ... vn) std::vector argsExpanded; std::vector temp; for(unsigned int j = 1; j < args.size(); ++j) @@ -44,7 +44,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) temp.push_back(args[j]); } cmSystemTools::ExpandList(temp, argsExpanded); - + // now create the new value std::string value; for(unsigned int j = 0; j < varArgsExpanded.size(); ++j) @@ -67,7 +67,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) value += varArgsExpanded[j]; } } - + // add the definition this->Makefile->AddDefinition(variable, value.c_str()); diff --git a/Source/cmRemoveCommand.h b/Source/cmRemoveCommand.h index c62d58f640b..5aedc26e54e 100644 --- a/Source/cmRemoveCommand.h +++ b/Source/cmRemoveCommand.h @@ -25,7 +25,7 @@ class cmRemoveCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmRemoveCommand; } @@ -46,7 +46,7 @@ class cmRemoveCommand : public cmCommand * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() const {return "remove";} - + /** * Succinct documentation. */ @@ -54,7 +54,7 @@ class cmRemoveCommand : public cmCommand { return "Deprecated. Use the list(REMOVE_ITEM ) command instead."; } - + /** * More documentation. */ @@ -66,13 +66,13 @@ class cmRemoveCommand : public cmCommand "This is typically used to remove entries from a vector " "(e.g. semicolon separated list). VALUE is expanded."; } - + /** This command is kept for compatibility with older CMake versions. */ virtual bool IsDiscouraged() const { return true; } - + cmTypeMacro(cmRemoveCommand, cmCommand); }; diff --git a/Source/cmRemoveDefinitionsCommand.h b/Source/cmRemoveDefinitionsCommand.h index f0e906d1531..18f61712423 100644 --- a/Source/cmRemoveDefinitionsCommand.h +++ b/Source/cmRemoveDefinitionsCommand.h @@ -17,9 +17,9 @@ /** \class cmRemoveDefinitionsCommand * \brief Specify a list of compiler defines * - * cmRemoveDefinitionsCommand specifies a list of compiler defines. + * cmRemoveDefinitionsCommand specifies a list of compiler defines. * These defines will - * be removed from the compile command. + * be removed from the compile command. */ class cmRemoveDefinitionsCommand : public cmCommand { @@ -27,7 +27,7 @@ class cmRemoveDefinitionsCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmRemoveDefinitionsCommand; } @@ -43,7 +43,7 @@ class cmRemoveDefinitionsCommand : public cmCommand * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() const {return "remove_definitions";} - + /** * Succinct documentation. */ @@ -51,7 +51,7 @@ class cmRemoveDefinitionsCommand : public cmCommand { return "Removes -D define flags added by add_definitions."; } - + /** * More documentation. */ @@ -62,7 +62,7 @@ class cmRemoveDefinitionsCommand : public cmCommand "Removes flags (added by add_definitions) from the compiler command " "line for sources in the current directory and below."; } - + cmTypeMacro(cmRemoveDefinitionsCommand, cmCommand); }; diff --git a/Source/cmReturnCommand.h b/Source/cmReturnCommand.h index 690ab79ca3c..a6e87eff3ea 100644 --- a/Source/cmReturnCommand.h +++ b/Source/cmReturnCommand.h @@ -25,7 +25,7 @@ class cmReturnCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmReturnCommand; } @@ -46,7 +46,7 @@ class cmReturnCommand : public cmCommand * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() const {return "return";} - + /** * Succinct documentation. */ @@ -54,7 +54,7 @@ class cmReturnCommand : public cmCommand { return "Return from a file, directory or function."; } - + /** * More documentation. */ @@ -72,7 +72,7 @@ class cmReturnCommand : public cmCommand "of the function. Note that a macro " "is not a function and does not handle return like a function does."; } - + cmTypeMacro(cmReturnCommand, cmCommand); }; diff --git a/Source/cmSeparateArgumentsCommand.h b/Source/cmSeparateArgumentsCommand.h index 6a51a9223e6..d62baf787d5 100644 --- a/Source/cmSeparateArgumentsCommand.h +++ b/Source/cmSeparateArgumentsCommand.h @@ -25,7 +25,7 @@ class cmSeparateArgumentsCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmSeparateArgumentsCommand; } @@ -46,16 +46,16 @@ class cmSeparateArgumentsCommand : public cmCommand * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() const {return "separate_arguments";} - + /** * Succinct documentation. */ virtual const char* GetTerseDocumentation() const { - return + return "Parse space-separated arguments into a semicolon-separated list."; } - + /** * More documentation. */ @@ -83,7 +83,7 @@ class cmSeparateArgumentsCommand : public cmCommand "All spaces are replaced with ';'. This helps with generating " "command lines."; } - + cmTypeMacro(cmSeparateArgumentsCommand, cmCommand); }; diff --git a/Source/cmSetCommand.cxx b/Source/cmSetCommand.cxx index d00fc86cff3..20f38be1053 100644 --- a/Source/cmSetCommand.cxx +++ b/Source/cmSetCommand.cxx @@ -20,7 +20,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) this->SetError("called with incorrect number of arguments"); return false; } - + // watch for ENV signatures const char* variable = args[0].c_str(); // VAR is always first if (!strncmp(variable,"ENV{",4) && strlen(variable) > 5) @@ -31,7 +31,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) varName[strlen(variable)-5] = '\0'; std::string putEnvArg = varName; putEnvArg += "="; - + // what is the current value if any const char *currValue = getenv(varName); delete [] varName; @@ -47,7 +47,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) } return true; } - + // if it will be cleared, then clear it if it isn;t already clear if (currValue) { @@ -55,7 +55,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) } return true; } - + // SET (VAR) // Removes the definition of VAR. if (args.size() == 1) { @@ -63,7 +63,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) return true; } - // here are the remaining options + // here are the remaining options // SET (VAR value ) // SET (VAR CACHE TYPE "doc String" [FORCE]) // SET (VAR value CACHE TYPE "doc string" [FORCE]) @@ -71,10 +71,10 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) bool cache = false; // optional bool force = false; // optional bool parentScope = false; - cmCacheManager::CacheEntryType type + cmCacheManager::CacheEntryType type = cmCacheManager::STRING; // required if cache const char* docstring = 0; // required if cache - + unsigned int ignoreLastArgs = 0; // look for PARENT_SCOPE argument if (args.size() > 1 && args[args.size()-1] == "PARENT_SCOPE") @@ -136,7 +136,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) this->SetError("given invalid arguments for CACHE mode."); return false; } - + if(cache) { std::string::size_type cacheStart = args.size() - 3 - (force ? 1 : 0); @@ -145,7 +145,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) } // see if this is already in the cache - cmCacheManager::CacheIterator it = + cmCacheManager::CacheIterator it = this->Makefile->GetCacheManager()->GetCacheIterator(variable); if(!it.IsAtEnd() && (it.GetType() != cmCacheManager::UNINITIALIZED)) { @@ -158,7 +158,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) return true; } } - + // if it is meant to be in the cache then define it in the cache if(cache) { diff --git a/Source/cmSetCommand.h b/Source/cmSetCommand.h index 2dd80e37f72..fe1d58df609 100644 --- a/Source/cmSetCommand.h +++ b/Source/cmSetCommand.h @@ -17,7 +17,7 @@ /** \class cmSetCommand * \brief Set a CMAKE variable * - * cmSetCommand sets a variable to a value with expansion. + * cmSetCommand sets a variable to a value with expansion. */ class cmSetCommand : public cmCommand { @@ -25,7 +25,7 @@ class cmSetCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmSetCommand; } @@ -46,7 +46,7 @@ class cmSetCommand : public cmCommand * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() const {return "set";} - + /** * Succinct documentation. */ @@ -54,7 +54,7 @@ class cmSetCommand : public cmCommand { return "Set a CMake, cache or environment variable to a given value."; } - + /** * More documentation. */ @@ -154,7 +154,7 @@ class cmSetCommand : public cmCommand "variable will use the value from the normal variable, which hides the " "cache variable."; } - + cmTypeMacro(cmSetCommand, cmCommand); }; diff --git a/Source/cmSetDirectoryPropertiesCommand.cxx b/Source/cmSetDirectoryPropertiesCommand.cxx index b956313a0ea..62c9b87c75b 100644 --- a/Source/cmSetDirectoryPropertiesCommand.cxx +++ b/Source/cmSetDirectoryPropertiesCommand.cxx @@ -22,11 +22,11 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) this->SetError("called with incorrect number of arguments"); return false; } - + std::string errors; - bool ret = - cmSetDirectoryPropertiesCommand::RunCommand(this->Makefile, - args.begin() + 1, + bool ret = + cmSetDirectoryPropertiesCommand::RunCommand(this->Makefile, + args.begin() + 1, args.end(), errors); if (!ret) { @@ -52,19 +52,19 @@ ::RunCommand(cmMakefile *mf, const std::string& value = *(ait+1); if ( prop == "VARIABLES" ) { - errors = + errors = "Variables and cache variables should be set using SET command"; return false; } else if ( prop == "MACROS" ) { - errors = + errors = "Commands and macros cannot be set using SET_CMAKE_PROPERTIES"; return false; } mf->SetProperty(prop.c_str(), value.c_str()); } - + return true; } diff --git a/Source/cmSetDirectoryPropertiesCommand.h b/Source/cmSetDirectoryPropertiesCommand.h index ee401582a98..8a50c60ffe0 100644 --- a/Source/cmSetDirectoryPropertiesCommand.h +++ b/Source/cmSetDirectoryPropertiesCommand.h @@ -17,7 +17,7 @@ class cmSetDirectoryPropertiesCommand : public cmCommand { public: - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmSetDirectoryPropertiesCommand; } @@ -46,7 +46,7 @@ class cmSetDirectoryPropertiesCommand : public cmCommand { return "Set a property of the directory."; } - + /** * Static entry point for use by other commands */ @@ -69,7 +69,7 @@ class cmSetDirectoryPropertiesCommand : public cmCommand "ADDITIONAL_MAKE_CLEAN_FILES is a list of files that will be cleaned " "as a part of \"make clean\" stage."; } - + cmTypeMacro(cmSetDirectoryPropertiesCommand, cmCommand); }; diff --git a/Source/cmSetSourceFilesPropertiesCommand.cxx b/Source/cmSetSourceFilesPropertiesCommand.cxx index 89ff4b18b19..619dfc5a5c8 100644 --- a/Source/cmSetSourceFilesPropertiesCommand.cxx +++ b/Source/cmSetSourceFilesPropertiesCommand.cxx @@ -40,14 +40,14 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) ++j; } - // now call the worker function + // now call the worker function std::string errors; - bool ret = + bool ret = cmSetSourceFilesPropertiesCommand - ::RunCommand(this->Makefile, + ::RunCommand(this->Makefile, args.begin(), args.begin() + numFiles, - args.begin() + numFiles, + args.begin() + numFiles, args.end(), errors); if (!ret) { diff --git a/Source/cmSetSourceFilesPropertiesCommand.h b/Source/cmSetSourceFilesPropertiesCommand.h index 2a67bc09f59..f7009e781dd 100644 --- a/Source/cmSetSourceFilesPropertiesCommand.h +++ b/Source/cmSetSourceFilesPropertiesCommand.h @@ -17,7 +17,7 @@ class cmSetSourceFilesPropertiesCommand : public cmCommand { public: - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmSetSourceFilesPropertiesCommand; } @@ -41,7 +41,7 @@ class cmSetSourceFilesPropertiesCommand : public cmCommand { return "Source files can have properties that affect how they are built."; } - + /** * Longer documentation. */ @@ -58,7 +58,7 @@ class cmSetSourceFilesPropertiesCommand : public cmCommand "Source file properties are visible only to targets " "added in the same directory (CMakeLists.txt)."; } - + cmTypeMacro(cmSetSourceFilesPropertiesCommand, cmCommand); static bool RunCommand(cmMakefile *mf, diff --git a/Source/cmSetTargetPropertiesCommand.cxx b/Source/cmSetTargetPropertiesCommand.cxx index 45a305e3256..a2b50a8eff0 100644 --- a/Source/cmSetTargetPropertiesCommand.cxx +++ b/Source/cmSetTargetPropertiesCommand.cxx @@ -67,11 +67,11 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) "a PROPERTIES specifier?"); return false; } - + // now loop over all the targets int i; for(i = 0; i < numFiles; ++i) - { + { bool ret = cmSetTargetPropertiesCommand::SetOneTarget (args[i].c_str(),propertyPairs,this->Makefile); if (!ret) @@ -86,7 +86,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) } bool cmSetTargetPropertiesCommand -::SetOneTarget(const char *tname, +::SetOneTarget(const char *tname, std::vector &propertyPairs, cmMakefile *mf) { @@ -103,7 +103,7 @@ ::SetOneTarget(const char *tname, } // if file is not already in the makefile, then add it else - { + { return false; } return true; diff --git a/Source/cmSetTargetPropertiesCommand.h b/Source/cmSetTargetPropertiesCommand.h index 1bc429cfd3e..e04f7eb78b0 100644 --- a/Source/cmSetTargetPropertiesCommand.h +++ b/Source/cmSetTargetPropertiesCommand.h @@ -17,7 +17,7 @@ class cmSetTargetPropertiesCommand : public cmCommand { public: - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmSetTargetPropertiesCommand; } @@ -41,12 +41,12 @@ class cmSetTargetPropertiesCommand : public cmCommand { return "Targets can have properties that affect how they are built."; } - + /** * Used by this command and cmSetPropertiesCommand */ - static bool SetOneTarget(const char *tname, - std::vector &propertyPairs, + static bool SetOneTarget(const char *tname, + std::vector &propertyPairs, cmMakefile *mf); /** @@ -159,7 +159,7 @@ class cmSetTargetPropertiesCommand : public cmCommand "part of the default build when you select \"Build Solution\"." ; } - + cmTypeMacro(cmSetTargetPropertiesCommand, cmCommand); }; diff --git a/Source/cmSetTestsPropertiesCommand.cxx b/Source/cmSetTestsPropertiesCommand.cxx index e4fee18f137..3d52cf24298 100644 --- a/Source/cmSetTestsPropertiesCommand.cxx +++ b/Source/cmSetTestsPropertiesCommand.cxx @@ -73,10 +73,10 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) // now loop over all the targets int i; for(i = 0; i < numFiles; ++i) - { + { std::string errors; - bool ret = - cmSetTestsPropertiesCommand::SetOneTest(args[i].c_str(), + bool ret = + cmSetTestsPropertiesCommand::SetOneTest(args[i].c_str(), propertyPairs, this->Makefile, errors); if (!ret) @@ -91,7 +91,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) bool cmSetTestsPropertiesCommand -::SetOneTest(const char *tname, +::SetOneTest(const char *tname, std::vector &propertyPairs, cmMakefile *mf, std::string &errors) { @@ -106,11 +106,11 @@ ::SetOneTest(const char *tname, } } else - { + { errors = "Can not find test to add properties to: "; errors += tname; return false; - } + } return true; } diff --git a/Source/cmSetTestsPropertiesCommand.h b/Source/cmSetTestsPropertiesCommand.h index 10df17dd8c0..3a592189be7 100644 --- a/Source/cmSetTestsPropertiesCommand.h +++ b/Source/cmSetTestsPropertiesCommand.h @@ -17,7 +17,7 @@ class cmSetTestsPropertiesCommand : public cmCommand { public: - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmSetTestsPropertiesCommand; } @@ -70,7 +70,7 @@ class cmSetTestsPropertiesCommand : public cmCommand cmTypeMacro(cmSetTestsPropertiesCommand, cmCommand); - static bool SetOneTest(const char *tname, + static bool SetOneTest(const char *tname, std::vector &propertyPairs, cmMakefile *mf, std::string &errors); diff --git a/Source/cmSiteNameCommand.cxx b/Source/cmSiteNameCommand.cxx index 04e357ca8fd..2bdd1ad282a 100644 --- a/Source/cmSiteNameCommand.cxx +++ b/Source/cmSiteNameCommand.cxx @@ -29,25 +29,25 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) paths.push_back("/bin"); paths.push_back("/sbin"); paths.push_back("/usr/local/bin"); - + const char* cacheValue = this->Makefile->GetDefinition(args[0].c_str()); if(cacheValue) { return true; } - + const char *temp = this->Makefile->GetDefinition("HOSTNAME"); std::string hostname_cmd; if(temp) { hostname_cmd = temp; } - else + else { hostname_cmd = cmSystemTools::FindProgram("hostname", paths); } - + std::string siteName = "unknown"; #if defined(_WIN32) && !defined(__CYGWIN__) std::string host; @@ -64,7 +64,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) std::string host; cmSystemTools::RunSingleCommand(hostname_cmd.c_str(), &host, 0, 0, cmSystemTools::OUTPUT_NONE); - + // got the hostname if (host.length()) { diff --git a/Source/cmSiteNameCommand.h b/Source/cmSiteNameCommand.h index 532710cc11f..52a63bc9c44 100644 --- a/Source/cmSiteNameCommand.h +++ b/Source/cmSiteNameCommand.h @@ -25,7 +25,7 @@ class cmSiteNameCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmSiteNameCommand; } @@ -46,7 +46,7 @@ class cmSiteNameCommand : public cmCommand * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() const {return "site_name";} - + /** * Succinct documentation. */ @@ -54,7 +54,7 @@ class cmSiteNameCommand : public cmCommand { return "Set the given variable to the name of the computer."; } - + /** * More documentation. */ @@ -63,7 +63,7 @@ class cmSiteNameCommand : public cmCommand return " site_name(variable)\n"; } - + cmTypeMacro(cmSiteNameCommand, cmCommand); }; diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx index cd94753cb3f..cc3b6d60349 100644 --- a/Source/cmSourceFile.cxx +++ b/Source/cmSourceFile.cxx @@ -346,7 +346,7 @@ const char* cmSourceFile::GetProperty(const char* prop) const } bool chain = false; - const char *retVal = + const char *retVal = this->Properties.GetPropertyValue(prop, cmProperty::SOURCE_FILE, chain); if (chain) { @@ -354,7 +354,7 @@ const char* cmSourceFile::GetProperty(const char* prop) const return mf->GetProperty(prop,cmProperty::SOURCE_FILE); } - return retVal; + return retVal; } //---------------------------------------------------------------------------- @@ -388,7 +388,7 @@ void cmSourceFile::DefineProperties(cmake *cm) { // define properties cm->DefineProperty - ("ABSTRACT", cmProperty::SOURCE_FILE, + ("ABSTRACT", cmProperty::SOURCE_FILE, "Is this source file an abstract class.", "A property on a source file that indicates if the source file " "represents a class that is abstract. This only makes sense for " @@ -396,7 +396,7 @@ void cmSourceFile::DefineProperties(cmake *cm) "only used by some tools that wrap classes into other languages."); cm->DefineProperty - ("COMPILE_FLAGS", cmProperty::SOURCE_FILE, + ("COMPILE_FLAGS", cmProperty::SOURCE_FILE, "Additional flags to be added when compiling this source file.", "These flags will be added to the list of compile flags when " "this source file builds. Use COMPILE_DEFINITIONS to pass additional " @@ -430,7 +430,7 @@ void cmSourceFile::DefineProperties(cmake *cm) "be ignored by the Xcode generator."); cm->DefineProperty - ("EXTERNAL_OBJECT", cmProperty::SOURCE_FILE, + ("EXTERNAL_OBJECT", cmProperty::SOURCE_FILE, "If set to true then this is an object file.", "If this property is set to true then the source file " "is really an object file and should not be compiled. " @@ -446,14 +446,14 @@ void cmSourceFile::DefineProperties(cmake *cm) "source files in a target share the same format."); cm->DefineProperty - ("GENERATED", cmProperty::SOURCE_FILE, + ("GENERATED", cmProperty::SOURCE_FILE, "Is this source file generated as part of the build process.", "If a source file is generated by the build process CMake will " "handle it differently in terms of dependency checking etc. " "Otherwise having a non-existent source file could create problems."); cm->DefineProperty - ("HEADER_FILE_ONLY", cmProperty::SOURCE_FILE, + ("HEADER_FILE_ONLY", cmProperty::SOURCE_FILE, "Is this source file only a header file.", "A property on a source file that indicates if the source file " "is a header file with no associated implementation. This is " @@ -462,7 +462,7 @@ void cmSourceFile::DefineProperties(cmake *cm) "computed."); cm->DefineProperty - ("KEEP_EXTENSION", cmProperty::SOURCE_FILE, + ("KEEP_EXTENSION", cmProperty::SOURCE_FILE, "Make the output file have the same extension as the source file.", "If this property is set then the file extension of the output " "file will be the same as that of the source file. Normally " @@ -477,7 +477,7 @@ void cmSourceFile::DefineProperties(cmake *cm) "No other semantics are currently specified."); cm->DefineProperty - ("LANGUAGE", cmProperty::SOURCE_FILE, + ("LANGUAGE", cmProperty::SOURCE_FILE, "What programming language is the file.", "A property that can be set to indicate what programming language " "the source file is. If it is not set the language is determined " @@ -486,13 +486,13 @@ void cmSourceFile::DefineProperties(cmake *cm) "Do not set this for header or files that should not be compiled."); cm->DefineProperty - ("LOCATION", cmProperty::SOURCE_FILE, + ("LOCATION", cmProperty::SOURCE_FILE, "The full path to a source file.", "A read only property on a SOURCE FILE that contains the full path " "to the source file."); cm->DefineProperty - ("MACOSX_PACKAGE_LOCATION", cmProperty::SOURCE_FILE, + ("MACOSX_PACKAGE_LOCATION", cmProperty::SOURCE_FILE, "Place a source file inside a Mac OS X bundle, CFBundle, or framework.", "Executable targets with the MACOSX_BUNDLE property set are built " "as Mac OS X application bundles on Apple platforms. " @@ -531,7 +531,7 @@ void cmSourceFile::DefineProperties(cmake *cm) "command (if one does not already exist due to linking relationships)."); cm->DefineProperty - ("OBJECT_OUTPUTS", cmProperty::SOURCE_FILE, + ("OBJECT_OUTPUTS", cmProperty::SOURCE_FILE, "Additional outputs for a Makefile rule.", "Additional outputs created by compilation of this source file. " "If any of these outputs is missing the object will be recompiled. " @@ -539,14 +539,14 @@ void cmSourceFile::DefineProperties(cmake *cm) "on other generators."); cm->DefineProperty - ("SYMBOLIC", cmProperty::SOURCE_FILE, + ("SYMBOLIC", cmProperty::SOURCE_FILE, "Is this just a name for a rule.", "If SYMBOLIC (boolean) is set to true the build system will be " "informed that the source file is not actually created on disk but " "instead used as a symbolic name for a build rule."); - + cm->DefineProperty - ("WRAP_EXCLUDE", cmProperty::SOURCE_FILE, + ("WRAP_EXCLUDE", cmProperty::SOURCE_FILE, "Exclude this source file from any code wrapping techniques.", "Some packages can wrap source files into alternate languages " "to provide additional functionality. For example, C++ code " diff --git a/Source/cmSourceFile.h b/Source/cmSourceFile.h index ae012747d62..6c68b874579 100644 --- a/Source/cmSourceFile.h +++ b/Source/cmSourceFile.h @@ -21,7 +21,7 @@ class cmake; /** \class cmSourceFile * \brief Represent a class loaded from a makefile. * - * cmSourceFile is represents a class loaded from + * cmSourceFile is represents a class loaded from * a makefile. */ class cmSourceFile diff --git a/Source/cmSourceGroup.cxx b/Source/cmSourceGroup.cxx index 2b34f2bfc96..4fd98518b44 100644 --- a/Source/cmSourceGroup.cxx +++ b/Source/cmSourceGroup.cxx @@ -71,13 +71,13 @@ void cmSourceGroup::SetGroupRegex(const char* regex) this->GroupRegex.compile("^$"); } } - + //---------------------------------------------------------------------------- void cmSourceGroup::AddGroupFile(const char* name) { this->GroupFiles.insert(name); } - + //---------------------------------------------------------------------------- const char* cmSourceGroup::GetName() const { @@ -89,7 +89,7 @@ const char* cmSourceGroup::GetFullName() const { return this->FullName.c_str(); } - + //---------------------------------------------------------------------------- bool cmSourceGroup::MatchesRegex(const char* name) { @@ -137,12 +137,12 @@ cmSourceGroup *cmSourceGroup::lookupChild(const char* name) // st for(;iter!=end; ++iter) { - std::string sgName = iter->GetName(); + std::string sgName = iter->GetName(); // look if descenened is the one were looking for if(sgName == name) { - return &(*iter); // if it so return it + return &(*iter); // if it so return it } } diff --git a/Source/cmSourceGroup.h b/Source/cmSourceGroup.h index 641dcbd57f3..11a0c74ae98 100644 --- a/Source/cmSourceGroup.h +++ b/Source/cmSourceGroup.h @@ -37,12 +37,12 @@ class cmSourceGroup cmSourceGroup(cmSourceGroup const& r); ~cmSourceGroup(); cmSourceGroup& operator=(cmSourceGroup const&); - + /** * Set the regular expression for this group. */ void SetGroupRegex(const char* regex); - + /** * Add a file name to the explicit list of files for this group. */ @@ -57,7 +57,7 @@ class cmSourceGroup * Looks up child and returns it */ cmSourceGroup *lookupChild(const char *name); - + /** * Get the name of this group. */ @@ -67,12 +67,12 @@ class cmSourceGroup * Get the full path name for group. */ const char* GetFullName() const; - + /** * Check if the given name matches this group's regex. */ bool MatchesRegex(const char* name); - + /** * Check if the given name matches this group's explicit file list. */ @@ -88,8 +88,8 @@ class cmSourceGroup * Check if the given name matches this group's regex in children. */ cmSourceGroup *MatchChildrenRegex(const char *name); - - /** + + /** * Assign the given source file to this group. Used only by * generators. */ @@ -100,7 +100,7 @@ class cmSourceGroup * source group. */ const std::vector& GetSourceFiles() const; - + std::vector const& GetGroupChildren() const; private: /** @@ -109,17 +109,17 @@ class cmSourceGroup std::string Name; // Full path to group std::string FullName; - + /** * The regular expression matching the files in the group. */ cmsys::RegularExpression GroupRegex; - + /** * Set of file names explicitly added to this group. */ std::set GroupFiles; - + /** * Vector of all source files that have been assigned to * this group. diff --git a/Source/cmSourceGroupCommand.cxx b/Source/cmSourceGroupCommand.cxx index 8e61d0a15a3..9cb80f617e3 100644 --- a/Source/cmSourceGroupCommand.cxx +++ b/Source/cmSourceGroupCommand.cxx @@ -19,7 +19,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) { this->SetError("called with incorrect number of arguments"); return false; - } + } std::string delimiter = "\\"; if(this->Makefile->GetDefinition("SOURCE_GROUP_DELIMITER")) @@ -29,7 +29,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) std::vector folders = cmSystemTools::tokenize(args[0], delimiter); - + cmSourceGroup* sg = 0; sg = this->Makefile->GetSourceGroup(folders); if(!sg) @@ -50,7 +50,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) sg->SetGroupRegex(args[1].c_str()); return true; } - + // Process arguments. bool doingFiles = false; for(unsigned int i=1; i < args.size(); ++i) @@ -97,6 +97,6 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) return false; } } - + return true; } diff --git a/Source/cmSourceGroupCommand.h b/Source/cmSourceGroupCommand.h index 6a29fc81081..6c87b71012a 100644 --- a/Source/cmSourceGroupCommand.h +++ b/Source/cmSourceGroupCommand.h @@ -26,7 +26,7 @@ class cmSourceGroupCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmSourceGroupCommand; } @@ -37,7 +37,7 @@ class cmSourceGroupCommand : public cmCommand */ virtual bool InitialPass(std::vector const& args, cmExecutionStatus &status); - + /** * The name of the command as specified in CMakeList.txt. */ @@ -50,7 +50,7 @@ class cmSourceGroupCommand : public cmCommand { return "Define a grouping for sources in the makefile."; } - + /** * More documentation. */ @@ -72,7 +72,7 @@ class cmSourceGroupCommand : public cmCommand "format:\n" " source_group(name regex)"; } - + cmTypeMacro(cmSourceGroupCommand, cmCommand); }; diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h index ea299ca903d..a4aec2e12ea 100644 --- a/Source/cmStandardIncludes.h +++ b/Source/cmStandardIncludes.h @@ -152,10 +152,10 @@ extern int putenv (char *__string) __THROW; // if std:: is not supported, then just #define it away #ifdef CMAKE_NO_STD_NAMESPACE -#define std +#define std #endif -// if the compiler does not support ansi for scoping of vars use a +// if the compiler does not support ansi for scoping of vars use a // #define hack #ifdef CMAKE_NO_ANSI_FOR_SCOPE #define for if(false) {} else for @@ -178,7 +178,7 @@ namespace std { typedef ios ios_base; } #endif #ifdef __DECCXX_VER -# if __DECCXX_VER <= 60390008 +# if __DECCXX_VER <= 60390008 # define CM_HAS_STD_BUT_NOT_FOR_IOSTREAM # endif #endif @@ -200,7 +200,7 @@ using ::cerr; using ::cin; using ::ifstream; using ::ofstream; - + #if !defined(CMAKE_NO_ANSI_STRING_STREAM) using ::ostringstream; using ::istringstream; @@ -208,7 +208,7 @@ using ::ofstream; using ::ostrstream; using ::istrstream; #endif - + using ::endl; using ::ends; using ::flush; @@ -324,8 +324,8 @@ struct cmDocumentationEntry std::string Full; cmDocumentationEntry(){}; cmDocumentationEntry(const char *doc[3]) - { if (doc[0]) this->Name = doc[0]; - if (doc[1]) this->Brief = doc[1]; + { if (doc[0]) this->Name = doc[0]; + if (doc[1]) this->Brief = doc[1]; if (doc[2]) this->Full = doc[2]; }; cmDocumentationEntry(const char *n, const char *b, const char *f) { if (n) this->Name = n; if (b) this->Brief = b; if (f) this->Full = f; }; @@ -353,7 +353,7 @@ class cmCustomCommandLines: public std::vector # pragma reset woff 1375 /* base class destructor not virtual */ #endif -// All subclasses of cmCommand or cmCTestGenericHandler should +// All subclasses of cmCommand or cmCTestGenericHandler should // invoke this macro. #define cmTypeMacro(thisClass,superclass) \ virtual const char* GetNameOfClass() { return #thisClass; } \ diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx index ec10d571fc1..0193dc9e73e 100644 --- a/Source/cmStringCommand.cxx +++ b/Source/cmStringCommand.cxx @@ -28,7 +28,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) this->SetError("must be called with at least one argument."); return false; } - + const std::string &subCommand = args[0]; if(subCommand == "REGEX") { @@ -134,11 +134,11 @@ bool cmStringCommand::HandleToUpperLowerCommand( std::string outvar = args[2]; std::string output; - if (toUpper) + if (toUpper) { output = cmSystemTools::UpperCase(args[1]); - } - else + } + else { output = cmSystemTools::LowerCase(args[1]); } @@ -266,7 +266,7 @@ bool cmStringCommand::HandleRegexCommand(std::vector const& args) } return this->RegexReplace(args); } - + std::string e = "sub-command REGEX does not recognize mode "+mode; this->SetError(e.c_str()); return false; @@ -279,25 +279,25 @@ bool cmStringCommand::RegexMatch(std::vector const& args) // [...])\n"; std::string regex = args[2]; std::string outvar = args[3]; - + // Concatenate all the last arguments together. std::string input = args[4]; for(unsigned int i=5; i < args.size(); ++i) { input += args[i]; } - + this->ClearMatches(this->Makefile); // Compile the regular expression. cmsys::RegularExpression re; if(!re.compile(regex.c_str())) { - std::string e = + std::string e = "sub-command REGEX, mode MATCH failed to compile regex \""+regex+"\"."; this->SetError(e.c_str()); return false; } - + // Scan through the input for all matches. std::string output; if(re.find(input.c_str())) @@ -307,7 +307,7 @@ bool cmStringCommand::RegexMatch(std::vector const& args) std::string::size_type r = re.end(); if(r-l == 0) { - std::string e = + std::string e = "sub-command REGEX, mode MATCH regex \""+regex+ "\" matched an empty string."; this->SetError(e.c_str()); @@ -315,7 +315,7 @@ bool cmStringCommand::RegexMatch(std::vector const& args) } output = input.substr(l, r-l); } - + // Store the output in the provided variable. this->Makefile->AddDefinition(outvar.c_str(), output.c_str()); return true; @@ -324,18 +324,18 @@ bool cmStringCommand::RegexMatch(std::vector const& args) //---------------------------------------------------------------------------- bool cmStringCommand::RegexMatchAll(std::vector const& args) { - //"STRING(REGEX MATCHALL + //"STRING(REGEX MATCHALL // [...])\n"; std::string regex = args[2]; std::string outvar = args[3]; - + // Concatenate all the last arguments together. std::string input = args[4]; for(unsigned int i=5; i < args.size(); ++i) { input += args[i]; } - + this->ClearMatches(this->Makefile); // Compile the regular expression. cmsys::RegularExpression re; @@ -347,7 +347,7 @@ bool cmStringCommand::RegexMatchAll(std::vector const& args) this->SetError(e.c_str()); return false; } - + // Scan through the input for all matches. std::string output; const char* p = input.c_str(); @@ -370,7 +370,7 @@ bool cmStringCommand::RegexMatchAll(std::vector const& args) output += std::string(p+l, r-l); p += r; } - + // Store the output in the provided variable. this->Makefile->AddDefinition(outvar.c_str(), output.c_str()); return true; @@ -379,12 +379,12 @@ bool cmStringCommand::RegexMatchAll(std::vector const& args) //---------------------------------------------------------------------------- bool cmStringCommand::RegexReplace(std::vector const& args) { - //"STRING(REGEX REPLACE + //"STRING(REGEX REPLACE // [...])\n" std::string regex = args[2]; - std::string replace = args[3]; + std::string replace = args[3]; std::string outvar = args[4]; - + // Pull apart the replace expression to find the escaped [0-9] values. std::vector replacement; std::string::size_type l = 0; @@ -432,26 +432,26 @@ bool cmStringCommand::RegexReplace(std::vector const& args) } l = r; } - + // Concatenate all the last arguments together. std::string input = args[5]; for(unsigned int i=6; i < args.size(); ++i) { input += args[i]; } - + this->ClearMatches(this->Makefile); // Compile the regular expression. cmsys::RegularExpression re; if(!re.compile(regex.c_str())) { - std::string e = + std::string e = "sub-command REGEX, mode REPLACE failed to compile regex \""+ regex+"\"."; this->SetError(e.c_str()); return false; } - + // Scan through the input for all matches. std::string output; std::string::size_type base = 0; @@ -460,10 +460,10 @@ bool cmStringCommand::RegexReplace(std::vector const& args) this->StoreMatches(this->Makefile, re); std::string::size_type l2 = re.start(); std::string::size_type r = re.end(); - + // Concatenate the part of the input that was not matched. output += input.substr(base, l2); - + // Make sure the match had some text. if(r-l2 == 0) { @@ -472,7 +472,7 @@ bool cmStringCommand::RegexReplace(std::vector const& args) this->SetError(e.c_str()); return false; } - + // Concatenate the replacement for the match. for(unsigned int i=0; i < replacement.size(); ++i) { @@ -504,14 +504,14 @@ bool cmStringCommand::RegexReplace(std::vector const& args) } } } - + // Move past the match. base += r; } - + // Concatenate the text after the last match. output += input.substr(base, input.length()-base); - + // Store the output in the provided variable. this->Makefile->AddDefinition(outvar.c_str(), output.c_str()); return true; @@ -624,9 +624,9 @@ bool cmStringCommand::HandleCompareCommand(std::vector const& this->SetError(e.c_str()); return false; } - + const std::string& left = args[2]; - const std::string& right = args[3]; + const std::string& right = args[3]; const std::string& outvar = args[4]; bool result; if(mode == "LESS") @@ -654,7 +654,7 @@ bool cmStringCommand::HandleCompareCommand(std::vector const& this->Makefile->AddDefinition(outvar.c_str(), "0"); } return true; - } + } std::string e = "sub-command COMPARE does not recognize mode "+mode; this->SetError(e.c_str()); return false; @@ -680,7 +680,7 @@ bool cmStringCommand::HandleReplaceCommand(std::vector const& input += args[i]; } - cmsys::SystemTools::ReplaceString(input, matchExpression.c_str(), + cmsys::SystemTools::ReplaceString(input, matchExpression.c_str(), replaceExpression.c_str()); this->Makefile->AddDefinition(variableName.c_str(), input.c_str()); @@ -688,7 +688,7 @@ bool cmStringCommand::HandleReplaceCommand(std::vector const& } //---------------------------------------------------------------------------- -bool cmStringCommand::HandleSubstringCommand(std::vector const& +bool cmStringCommand::HandleSubstringCommand(std::vector const& args) { if(args.size() != 5) @@ -722,7 +722,7 @@ bool cmStringCommand::HandleSubstringCommand(std::vector const& return false; } - this->Makefile->AddDefinition(variableName.c_str(), + this->Makefile->AddDefinition(variableName.c_str(), stringValue.substr(begin, end).c_str()); return true; } @@ -780,7 +780,7 @@ bool cmStringCommand::HandleStripCommand( size_t outLength = 0; - // if the input string didn't contain any non-space characters, return + // if the input string didn't contain any non-space characters, return // an empty string if (startPos > inStringLength) { diff --git a/Source/cmStringCommand.h b/Source/cmStringCommand.h index 3e585a5b30c..43a0dbe1f87 100644 --- a/Source/cmStringCommand.h +++ b/Source/cmStringCommand.h @@ -30,7 +30,7 @@ class cmStringCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmStringCommand; } @@ -59,7 +59,7 @@ class cmStringCommand : public cmCommand { return "String operations."; } - + /** * More documentation. */ @@ -143,7 +143,7 @@ class cmStringCommand : public cmCommand " by all regular expression-related commands, including \n" " e.g. if( MATCHES ), in the variables CMAKE_MATCH_(0..9)."; } - + cmTypeMacro(cmStringCommand, cmCommand); static void ClearMatches(cmMakefile* mf); static void StoreMatches(cmMakefile* mf, cmsys::RegularExpression& re); diff --git a/Source/cmSubdirCommand.cxx b/Source/cmSubdirCommand.cxx index 9fcbe77ecb5..0cfe7722da7 100644 --- a/Source/cmSubdirCommand.cxx +++ b/Source/cmSubdirCommand.cxx @@ -39,13 +39,13 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) } // if they specified a relative path then compute the full - std::string srcPath = - std::string(this->Makefile->GetCurrentDirectory()) + + std::string srcPath = + std::string(this->Makefile->GetCurrentDirectory()) + "/" + i->c_str(); if (cmSystemTools::FileIsDirectory(srcPath.c_str())) { - std::string binPath = - std::string(this->Makefile->GetCurrentOutputDirectory()) + + std::string binPath = + std::string(this->Makefile->GetCurrentOutputDirectory()) + "/" + i->c_str(); this->Makefile->AddSubDirectory(srcPath.c_str(), binPath.c_str(), excludeFromAll, preorder, false); @@ -55,8 +55,8 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) { // we must compute the binPath from the srcPath, we just take the last // element from the source path and use that - std::string binPath = - std::string(this->Makefile->GetCurrentOutputDirectory()) + + std::string binPath = + std::string(this->Makefile->GetCurrentOutputDirectory()) + "/" + cmSystemTools::GetFilenameName(i->c_str()); this->Makefile->AddSubDirectory(i->c_str(), binPath.c_str(), excludeFromAll, preorder, false); @@ -65,7 +65,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) { std::string error = "Incorrect SUBDIRS command. Directory: "; error += *i + " does not exists."; - this->SetError(error.c_str()); + this->SetError(error.c_str()); res = false; } } diff --git a/Source/cmSubdirCommand.h b/Source/cmSubdirCommand.h index eedbfff926b..618d5ff2ba2 100644 --- a/Source/cmSubdirCommand.h +++ b/Source/cmSubdirCommand.h @@ -27,7 +27,7 @@ class cmSubdirCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmSubdirCommand; } @@ -51,7 +51,7 @@ class cmSubdirCommand : public cmCommand { return "Deprecated. Use the add_subdirectory() command instead."; } - + /** * More documentation. */ @@ -68,7 +68,7 @@ class cmSubdirCommand : public cmCommand "This will cause any CMakeLists.txt files in the sub directories " "to be processed by CMake. Any directories after the PREORDER flag " "are traversed first by makefile builds, the PREORDER flag has no " - "effect on IDE projects. " + "effect on IDE projects. " " Any directories after the EXCLUDE_FROM_ALL marker " "will not be included in the top level makefile or project file. " "This is useful for having CMake create makefiles or projects for " @@ -77,7 +77,7 @@ class cmSubdirCommand : public cmCommand "the same time, but you would not want them to show up in the " "top level project or be built each time make is run from the top."; } - + /** This command is kept for compatibility with older CMake versions. */ virtual bool IsDiscouraged() const { diff --git a/Source/cmSubdirDependsCommand.h b/Source/cmSubdirDependsCommand.h index daf97cd2f0b..b274d0196b0 100644 --- a/Source/cmSubdirDependsCommand.h +++ b/Source/cmSubdirDependsCommand.h @@ -27,7 +27,7 @@ class cmSubdirDependsCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmSubdirDependsCommand; } @@ -51,7 +51,7 @@ class cmSubdirDependsCommand : public cmCommand { return "Deprecated. Does nothing."; } - + /** * More documentation. */ @@ -62,7 +62,7 @@ class cmSubdirDependsCommand : public cmCommand "Does not do anything. This command used to help projects order " "parallel builds correctly. This functionality is now automatic."; } - + /** This command is kept for compatibility with older CMake versions. */ virtual bool IsDiscouraged() const { diff --git a/Source/cmTest.cxx b/Source/cmTest.cxx index 502c1740d2d..912ec7634af 100644 --- a/Source/cmTest.cxx +++ b/Source/cmTest.cxx @@ -57,7 +57,7 @@ void cmTest::SetCommand(std::vector const& command) const char *cmTest::GetProperty(const char* prop) const { bool chain = false; - const char *retVal = + const char *retVal = this->Properties.GetPropertyValue(prop, cmProperty::TEST, chain); if (chain) { @@ -149,14 +149,14 @@ void cmTest::DefineProperties(cmake *cm) "not to run concurrently."); cm->DefineProperty - ("MEASUREMENT", cmProperty::TEST, + ("MEASUREMENT", cmProperty::TEST, "Specify a CDASH measurement and value to be reported for a test.", "If set to a name then that name will be reported to CDASH as a " "named measurement with a value of 1. You may also specify a value " "by setting MEASUREMENT to \"measurement=value\"."); cm->DefineProperty - ("PASS_REGULAR_EXPRESSION", cmProperty::TEST, + ("PASS_REGULAR_EXPRESSION", cmProperty::TEST, "The output must match this regular expression for the test to pass.", "If set, the test output will be checked " "against the specified regular expressions and at least one of the" @@ -183,7 +183,7 @@ void cmTest::DefineProperties(cmake *cm) "any other tests."); cm->DefineProperty - ("TIMEOUT", cmProperty::TEST, + ("TIMEOUT", cmProperty::TEST, "How many seconds to allow for this test.", "This property if set will limit a test to not take more than " "the specified number of seconds to run. If it exceeds that the " @@ -192,7 +192,7 @@ void cmTest::DefineProperties(cmake *cm) "CTEST_TESTING_TIMEOUT."); cm->DefineProperty - ("WILL_FAIL", cmProperty::TEST, + ("WILL_FAIL", cmProperty::TEST, "If set to true, this will invert the pass/fail flag of the test.", "This property can be used for tests that are expected to fail and " "return a non zero return code."); diff --git a/Source/cmTest.h b/Source/cmTest.h index 6223a01ea83..73ac133f159 100644 --- a/Source/cmTest.h +++ b/Source/cmTest.h @@ -51,7 +51,7 @@ class cmTest const char *GetProperty(const char *prop) const; bool GetPropertyAsBool(const char *prop) const; cmPropertyMap &GetProperties() { return this->Properties; }; - + // Define the properties static void DefineProperties(cmake *cm); diff --git a/Source/cmTryRunCommand.h b/Source/cmTryRunCommand.h index 06a9118b637..7878729d960 100644 --- a/Source/cmTryRunCommand.h +++ b/Source/cmTryRunCommand.h @@ -25,7 +25,7 @@ class cmTryRunCommand : public cmCoreTryCompile /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmTryRunCommand; } @@ -49,7 +49,7 @@ class cmTryRunCommand : public cmCoreTryCompile { return "Try compiling and then running some code."; } - + /** * More documentation. */ @@ -101,10 +101,10 @@ class cmTryRunCommand : public cmCoreTryCompile cmTypeMacro(cmTryRunCommand, cmCoreTryCompile); private: - void RunExecutable(const std::string& runArgs, + void RunExecutable(const std::string& runArgs, std::string* runOutputContents); - void DoNotRunExecutable(const std::string& runArgs, - const std::string& srcFile, + void DoNotRunExecutable(const std::string& runArgs, + const std::string& srcFile, std::string* runOutputContents); std::string CompileResultVariable; diff --git a/Source/cmUseMangledMesaCommand.cxx b/Source/cmUseMangledMesaCommand.cxx index 0e6f28aeb11..4c189e665d2 100644 --- a/Source/cmUseMangledMesaCommand.cxx +++ b/Source/cmUseMangledMesaCommand.cxx @@ -17,7 +17,7 @@ // cmUseMangledMesaCommand bool cmUseMangledMesaCommand ::InitialPass(std::vector const& args, cmExecutionStatus &) -{ +{ // expected two arguments: // arguement one: the full path to gl_mangle.h // arguement two : directory for output of edited headers @@ -55,11 +55,11 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) path += *i; this->CopyAndFullPathMesaHeader(path.c_str(), destDir); } - + return true; } -void +void cmUseMangledMesaCommand:: CopyAndFullPathMesaHeader(const char* source, const char* outdir) @@ -74,7 +74,7 @@ CopyAndFullPathMesaHeader(const char* source, std::ofstream fout(tempOutputFile.c_str()); if(!fout) { - cmSystemTools::Error("Could not open file for write in copy operation: ", + cmSystemTools::Error("Could not open file for write in copy operation: ", tempOutputFile.c_str(), outdir); cmSystemTools::ReportLastSystemError(""); return; @@ -88,7 +88,7 @@ CopyAndFullPathMesaHeader(const char* source, } // now copy input to output and expand variables in the // input file at the same time - std::string inLine; + std::string inLine; // regular expression for any #include line cmsys::RegularExpression includeLine( "^[ \t]*#[ \t]*include[ \t]*[<\"]([^\">]+)[\">]"); @@ -108,7 +108,7 @@ CopyAndFullPathMesaHeader(const char* source, } else if(glLine.find(includeFile.c_str())) { - fout << "#include \"" << outdir << "/" << + fout << "#include \"" << outdir << "/" << includeLine.match(1).c_str() << "\"\n"; } else diff --git a/Source/cmUtilitySourceCommand.cxx b/Source/cmUtilitySourceCommand.cxx index 41c82c2bad0..6ea3dfac8cd 100644 --- a/Source/cmUtilitySourceCommand.cxx +++ b/Source/cmUtilitySourceCommand.cxx @@ -22,7 +22,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) } std::vector::const_iterator arg = args.begin(); - + // The first argument is the cache entry name. std::string cacheEntry = *arg++; const char* cacheValue = @@ -30,7 +30,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) // If it exists already and appears up to date then we are done. If // the string contains "(IntDir)" but that is not the // CMAKE_CFG_INTDIR setting then the value is out of date. - const char* intDir = + const char* intDir = this->Makefile->GetRequiredDefinition("CMAKE_CFG_INTDIR"); bool haveCacheValue = false; @@ -60,21 +60,21 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) { return true; } - + // The second argument is the utility's executable name, which will be // needed later. std::string utilityName = *arg++; - + // The third argument specifies the relative directory of the source // of the utility. std::string relativeSource = *arg++; std::string utilitySource = this->Makefile->GetCurrentDirectory(); utilitySource = utilitySource+"/"+relativeSource; - + // If the directory doesn't exist, the source has not been included. if(!cmSystemTools::FileExists(utilitySource.c_str())) { return true; } - + // Make sure all the files exist in the source directory. while(arg != args.end()) { @@ -82,9 +82,9 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) if(!cmSystemTools::FileExists(file.c_str())) { return true; } } - + // The source exists. - std::string cmakeCFGout = + std::string cmakeCFGout = this->Makefile->GetRequiredDefinition("CMAKE_CFG_INTDIR"); std::string utilityDirectory = this->Makefile->GetCurrentOutputDirectory(); std::string exePath; @@ -100,7 +100,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) { utilityDirectory += "/"+relativeSource; } - + // Construct the cache entry for the executable's location. std::string utilityExecutable = utilityDirectory+"/"+cmakeCFGout+"/" @@ -108,7 +108,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) // make sure we remove any /./ in the name cmSystemTools::ReplaceString(utilityExecutable, "/./", "/"); - + // Enter the value into the cache. this->Makefile->AddCacheDefinition(cacheEntry.c_str(), utilityExecutable.c_str(), @@ -121,7 +121,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) utilityName.c_str(), "Executable to project name.", cmCacheManager::INTERNAL); - + return true; } diff --git a/Source/cmUtilitySourceCommand.h b/Source/cmUtilitySourceCommand.h index 32afddadc28..195f605f2dc 100644 --- a/Source/cmUtilitySourceCommand.h +++ b/Source/cmUtilitySourceCommand.h @@ -29,7 +29,7 @@ class cmUtilitySourceCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmUtilitySourceCommand; } @@ -53,7 +53,7 @@ class cmUtilitySourceCommand : public cmCommand { return "Specify the source tree of a third-party utility."; } - + /** * More documentation. */ diff --git a/Source/cmVariableRequiresCommand.cxx b/Source/cmVariableRequiresCommand.cxx index 0e97a832a17..747e9be5eef 100644 --- a/Source/cmVariableRequiresCommand.cxx +++ b/Source/cmVariableRequiresCommand.cxx @@ -22,7 +22,7 @@ ::InitialPass(std::vectorconst& args, cmExecutionStatus &) return false; } - std::string testVariable = args[0]; + std::string testVariable = args[0]; if(!this->Makefile->IsOn(testVariable.c_str())) { return true; @@ -38,7 +38,7 @@ ::InitialPass(std::vectorconst& args, cmExecutionStatus &) requirementsMet = false; notSet += args[i]; notSet += "\n"; - cmCacheManager::CacheIterator it = + cmCacheManager::CacheIterator it = this->Makefile->GetCacheManager()->GetCacheIterator(args[i].c_str()); if(!it.IsAtEnd() && it.GetPropertyAsBool("ADVANCED")) { @@ -47,7 +47,7 @@ ::InitialPass(std::vectorconst& args, cmExecutionStatus &) } } const char* reqVar = this->Makefile->GetDefinition(resultVariable.c_str()); - // if reqVar is unset, then set it to requirementsMet + // if reqVar is unset, then set it to requirementsMet // if reqVar is set to true, but requirementsMet is false , then // set reqVar to false. if(!reqVar || (!requirementsMet && this->Makefile->IsOn(reqVar))) @@ -58,14 +58,14 @@ ::InitialPass(std::vectorconst& args, cmExecutionStatus &) if(!requirementsMet) { std::string message = "Variable assertion failed:\n"; - message += testVariable + + message += testVariable + " Requires that the following unset variables are set:\n"; message += notSet; message += "\nPlease set them, or set "; message += testVariable + " to false, and re-configure.\n"; if(hasAdvanced) { - message += + message += "One or more of the required variables is advanced." " To set the variable, you must turn on advanced mode in cmake."; } diff --git a/Source/cmVariableRequiresCommand.h b/Source/cmVariableRequiresCommand.h index 91c351e60c9..c86f43dc675 100644 --- a/Source/cmVariableRequiresCommand.h +++ b/Source/cmVariableRequiresCommand.h @@ -24,7 +24,7 @@ class cmVariableRequiresCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmVariableRequiresCommand; } @@ -35,7 +35,7 @@ class cmVariableRequiresCommand : public cmCommand */ virtual bool InitialPass(std::vector const& args, cmExecutionStatus &status); - + /** * The name of the command as specified in CMakeList.txt. */ @@ -48,7 +48,7 @@ class cmVariableRequiresCommand : public cmCommand { return "Deprecated. Use the if() command instead."; } - + /** * More documentation. */ @@ -63,12 +63,12 @@ class cmVariableRequiresCommand : public cmCommand "tested, if that variable is false nothing else is done. If " "TEST_VARIABLE is true, then " "the next argument (RESULT_VARIABLE) is a variable that is set to true " - "if all the required variables are set. " + "if all the required variables are set. " "The rest of the arguments are variables that must be true or not " "set to NOTFOUND to avoid an error. If any are not true, an error " "is reported."; } - + /** This command is kept for compatibility with older CMake versions. */ virtual bool IsDiscouraged() const { diff --git a/Source/cmVariableWatch.cxx b/Source/cmVariableWatch.cxx index 47bab15306a..f5fdca46520 100644 --- a/Source/cmVariableWatch.cxx +++ b/Source/cmVariableWatch.cxx @@ -38,7 +38,7 @@ cmVariableWatch::~cmVariableWatch() { } -void cmVariableWatch::AddWatch(const std::string& variable, +void cmVariableWatch::AddWatch(const std::string& variable, WatchMethod method, void* client_data /*=0*/) { cmVariableWatch::Pair p; @@ -58,7 +58,7 @@ void cmVariableWatch::AddWatch(const std::string& variable, vp->push_back(p); } -void cmVariableWatch::RemoveWatch(const std::string& variable, +void cmVariableWatch::RemoveWatch(const std::string& variable, WatchMethod method) { cmVariableWatch::VectorOfPairs* vp = &this->WatchMap[variable]; @@ -73,12 +73,12 @@ void cmVariableWatch::RemoveWatch(const std::string& variable, } } -void cmVariableWatch::VariableAccessed(const std::string& variable, +void cmVariableWatch::VariableAccessed(const std::string& variable, int access_type, const char* newValue, const cmMakefile* mf) const { - cmVariableWatch::StringToVectorOfPairs::const_iterator mit = + cmVariableWatch::StringToVectorOfPairs::const_iterator mit = this->WatchMap.find(variable); if ( mit != this->WatchMap.end() ) { diff --git a/Source/cmVariableWatch.h b/Source/cmVariableWatch.h index 83e9e9799e1..7dd4ac5e601 100644 --- a/Source/cmVariableWatch.h +++ b/Source/cmVariableWatch.h @@ -36,7 +36,7 @@ class cmVariableWatch void AddWatch(const std::string& variable, WatchMethod method, void* client_data=0); void RemoveWatch(const std::string& variable, WatchMethod method); - + /** * This method is called when variable is accessed */ @@ -61,7 +61,7 @@ class cmVariableWatch * Return the access as string */ static const char* GetAccessAsString(int access_type); - + protected: struct Pair { diff --git a/Source/cmVariableWatchCommand.cxx b/Source/cmVariableWatchCommand.cxx index 93c05afb739..a432943ae1e 100644 --- a/Source/cmVariableWatchCommand.cxx +++ b/Source/cmVariableWatchCommand.cxx @@ -95,7 +95,7 @@ void cmVariableWatchCommand::VariableAccessed(const std::string& variable, cmListFileArgument(currentListFile, true, "unknown", 9999)); newLFF.Arguments.push_back( cmListFileArgument(stack, true, "unknown", 9999)); - newLFF.Name = command; + newLFF.Name = command; newLFF.FilePath = "Some weird path"; newLFF.Line = 9999; cmExecutionStatus status; diff --git a/Source/cmVariableWatchCommand.h b/Source/cmVariableWatchCommand.h index cb80736e667..3abc08894ab 100644 --- a/Source/cmVariableWatchCommand.h +++ b/Source/cmVariableWatchCommand.h @@ -31,7 +31,7 @@ class cmVariableWatchCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmVariableWatchCommand; } @@ -67,7 +67,7 @@ class cmVariableWatchCommand : public cmCommand { return "Watch the CMake variable for change."; } - + /** * More documentation. */ @@ -80,7 +80,7 @@ class cmVariableWatchCommand : public cmCommand "will be executed. The command will receive the following arguments:" " COMMAND( )"; } - + cmTypeMacro(cmVariableWatchCommand, cmCommand); void VariableAccessed(const std::string& variable, int access_type, diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 9a97ab0e3a0..53b6a9bb7a3 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -65,7 +65,7 @@ cmVisualStudio10TargetGenerator(cmTarget* target, this->Target = target; this->GeneratorTarget = gg->GetGeneratorTarget(target); this->Makefile = target->GetMakefile(); - this->LocalGenerator = + this->LocalGenerator = (cmLocalVisualStudio7Generator*) this->Makefile->GetLocalGenerator(); this->Name = this->Target->GetName(); @@ -108,9 +108,9 @@ void cmVisualStudio10TargetGenerator::WritePlatformConfigTag( stream = this->BuildFileStream; } stream->fill(' '); - stream->width(indentLevel*2 ); + stream->width(indentLevel*2 ); (*stream ) << ""; - (*stream ) << "<" << tag + (*stream ) << "<" << tag << " Condition=\"'$(Configuration)|$(Platform)'=='"; (*stream ) << config << "|" << this->Platform << "'\""; if(attribute) @@ -164,7 +164,7 @@ void cmVisualStudio10TargetGenerator::Generate() new cmGeneratedFileStream(path.c_str()); this->PathToVcxproj = path; this->BuildFileStream->SetCopyIfDifferent(true); - + // Write the encoding header into the file char magic[] = {0xEF,0xBB, 0xBF}; this->BuildFileStream->write(magic, 3); @@ -370,9 +370,9 @@ void cmVisualStudio10TargetGenerator::WriteProjectConfigurationValues() break; } configType += "\n"; - this->WriteString(configType.c_str(), 2); + this->WriteString(configType.c_str(), 2); - const char* mfcFlag = + const char* mfcFlag = this->Target->GetMakefile()->GetDefinition("CMAKE_MFC_FLAG"); std::string mfcFlagValue = mfcFlag ? mfcFlag : "0"; @@ -453,9 +453,9 @@ void cmVisualStudio10TargetGenerator::WriteCustomCommand(cmSourceFile* sf) } } -void +void cmVisualStudio10TargetGenerator::WriteCustomRule(cmSourceFile* source, - cmCustomCommand const & + cmCustomCommand const & command) { std::string sourcePath = source->GetFullPath(); @@ -490,7 +490,7 @@ cmVisualStudio10TargetGenerator::WriteCustomRule(cmSourceFile* source, comment = cmVS10EscapeComment(comment); std::vector *configs = static_cast - (this->GlobalGenerator)->GetConfigurations(); + (this->GlobalGenerator)->GetConfigurations(); this->WriteSource("CustomBuild", source, ">\n"); @@ -504,11 +504,11 @@ cmVisualStudio10TargetGenerator::WriteCustomRule(cmSourceFile* source, this->WritePlatformConfigTag("Command", i->c_str(), 3); (*this->BuildFileStream ) << script << "\n"; this->WritePlatformConfigTag("AdditionalInputs", i->c_str(), 3); - + (*this->BuildFileStream ) << source->GetFullPath(); - for(std::vector::const_iterator d = + for(std::vector::const_iterator d = command.GetDepends().begin(); - d != command.GetDepends().end(); + d != command.GetDepends().end(); ++d) { std::string dep; @@ -521,9 +521,9 @@ cmVisualStudio10TargetGenerator::WriteCustomRule(cmSourceFile* source, (*this->BuildFileStream ) << ";%(AdditionalInputs)\n"; this->WritePlatformConfigTag("Outputs", i->c_str(), 3); const char* sep = ""; - for(std::vector::const_iterator o = + for(std::vector::const_iterator o = command.GetOutputs().begin(); - o != command.GetOutputs().end(); + o != command.GetOutputs().end(); ++o) { std::string out = *o; @@ -559,19 +559,19 @@ void cmVisualStudio10TargetGenerator::ConvertToWindowsSlash(std::string& s) } } void cmVisualStudio10TargetGenerator::WriteGroups() -{ +{ // collect up group information - std::vector sourceGroups = + std::vector sourceGroups = this->Makefile->GetSourceGroups(); std::vector classes = this->Target->GetSourceFiles(); - + std::set groupsUsed; - for(std::vector::const_iterator s = classes.begin(); + for(std::vector::const_iterator s = classes.begin(); s != classes.end(); s++) { - cmSourceFile* sf = *s; + cmSourceFile* sf = *s; std::string const& source = sf->GetFullPath(); - cmSourceGroup& sourceGroup = + cmSourceGroup& sourceGroup = this->Makefile->FindSourceGroup(source.c_str(), sourceGroups); groupsUsed.insert(&sourceGroup); } @@ -634,9 +634,9 @@ void cmVisualStudio10TargetGenerator::WriteGroups() guidName += name; this->GlobalGenerator->CreateGUID(guidName.c_str()); this->WriteString("", 3); - std::string guid + std::string guid = this->GlobalGenerator->GetGUID(guidName.c_str()); - (*this->BuildFileStream) + (*this->BuildFileStream) << "{" << guid << "}" << "\n"; @@ -724,10 +724,10 @@ WriteGroupSources(const char* name, { cmSourceFile* sf = s->SourceFile; std::string const& source = sf->GetFullPath(); - cmSourceGroup& sourceGroup = + cmSourceGroup& sourceGroup = this->Makefile->FindSourceGroup(source.c_str(), sourceGroups); const char* filter = sourceGroup.GetFullName(); - this->WriteString("<", 2); + this->WriteString("<", 2); std::string path = this->ConvertPath(source, s->RelativePath); this->ConvertToWindowsSlash(path); (*this->BuildFileStream) << name << " Include=\"" @@ -868,7 +868,7 @@ void cmVisualStudio10TargetGenerator::WriteAllSources() bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags( cmSourceFile* source) -{ +{ cmSourceFile& sf = *source; cmLocalVisualStudio7Generator* lg = this->LocalGenerator; @@ -883,7 +883,7 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags( if(const char* cflags = sf.GetProperty("COMPILE_FLAGS")) { flags += cflags; - } + } if(const char* cdefs = sf.GetProperty("COMPILE_DEFINITIONS")) { defines += cdefs; @@ -899,7 +899,7 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags( { needForceLang = true; lang = sourceLang; - } + } // if the source file does not match the linker language // then force c or c++ if(needForceLang || (linkLanguage && lang @@ -923,7 +923,7 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags( if(objectName.size()) { (*this->BuildFileStream ) << firstString; - firstString = ""; + firstString = ""; hasFlags = true; this->WriteString("", 3); (*this->BuildFileStream ) @@ -934,7 +934,7 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags( (this->GlobalGenerator)->GetConfigurations(); for( std::vector::iterator config = configs->begin(); config != configs->end(); ++config) - { + { std::string configUpper = cmSystemTools::UpperCase(*config); std::string configDefines = defines; std::string defPropName = "COMPILE_DEFINITIONS_"; @@ -947,14 +947,14 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags( } configDefines += ccdefs; } - // if we have flags or defines for this config then + // if we have flags or defines for this config then // use them if(flags.size() || configDefines.size()) { (*this->BuildFileStream ) << firstString; firstString = ""; // only do firstString once hasFlags = true; - cmVisualStudioGeneratorOptions + cmVisualStudioGeneratorOptions clOptions(this->LocalGenerator, cmVisualStudioGeneratorOptions::Compiler, cmVS10CLFlagTable, 0, this); @@ -962,7 +962,7 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags( clOptions.AddDefines(configDefines.c_str()); clOptions.SetConfiguration((*config).c_str()); clOptions.OutputAdditionalOptions(*this->BuildFileStream, " ", ""); - clOptions.OutputFlagMap(*this->BuildFileStream, " "); + clOptions.OutputFlagMap(*this->BuildFileStream, " "); clOptions.OutputPreprocessorDefinitions(*this->BuildFileStream, " ", "\n", lang); } @@ -1045,10 +1045,10 @@ void cmVisualStudio10TargetGenerator::WritePathAndIncrementalLinkOptions() -void +void cmVisualStudio10TargetGenerator:: OutputLinkIncremental(std::string const& configName) -{ +{ std::string CONFIG = cmSystemTools::UpperCase(configName); // static libraries and things greater than modules do not need // to set this option @@ -1062,7 +1062,7 @@ OutputLinkIncremental(std::string const& configName) { linkType = "EXE"; } - + // assume incremental linking const char* incremental = "true"; const char* linkLanguage = @@ -1091,9 +1091,9 @@ OutputLinkIncremental(std::string const& configName) flags += this-> Target->GetMakefile()->GetRequiredDefinition(baseFlagVar.c_str()); std::string flagVar = baseFlagVar + std::string("_") + CONFIG; - flags += + flags += Target->GetMakefile()->GetRequiredDefinition(flagVar.c_str()); - } + } const char* targetLinkFlags = this->Target->GetProperty("LINK_FLAGS"); if(targetLinkFlags) { @@ -1113,7 +1113,7 @@ OutputLinkIncremental(std::string const& configName) } this->WritePlatformConfigTag("LinkIncremental", configName.c_str(), 3); *this->BuildFileStream << incremental - << "\n"; + << "\n"; const char* manifest = "true"; if(flags.find("MANIFEST:NO") != flags.npos) @@ -1155,7 +1155,7 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions( Options& clOptions = *pOptions; std::string flags; - // collect up flags for + // collect up flags for if(this->Target->GetType() < cmTarget::UTILITY) { const char* linkLanguage = @@ -1247,10 +1247,10 @@ void cmVisualStudio10TargetGenerator::WriteClOptions( "\n", 3); } - clOptions.OutputPreprocessorDefinitions(*this->BuildFileStream, " ", + clOptions.OutputPreprocessorDefinitions(*this->BuildFileStream, " ", "\n", "CXX"); this->WriteString("", 3); - *this->BuildFileStream << configName + *this->BuildFileStream << configName << "\n"; this->WriteString("$(IntDir)\n", 3); if(this->Target->GetType() != cmTarget::OBJECT_LIBRARY) @@ -1277,7 +1277,7 @@ OutputIncludes(std::vector const & includes) this->WriteString("%(AdditionalIncludeDirectories)" "\n", 0); } - + void cmVisualStudio10TargetGenerator:: @@ -1315,7 +1315,7 @@ cmVisualStudio10TargetGenerator::WriteLibOptions(std::string const& config) libOptions.Parse(libflags?libflags:""); libOptions.Parse(libflagsConfig?libflagsConfig:""); libOptions.OutputAdditionalOptions(*this->BuildFileStream, " ", ""); - libOptions.OutputFlagMap(*this->BuildFileStream, " "); + libOptions.OutputFlagMap(*this->BuildFileStream, " "); this->WriteString("\n", 2); } } @@ -1324,7 +1324,7 @@ cmVisualStudio10TargetGenerator::WriteLibOptions(std::string const& config) void cmVisualStudio10TargetGenerator::WriteLinkOptions(std::string const& config) { - + // static libraries and things greater than modules do not need // to set this option if(this->Target->GetType() == cmTarget::STATIC_LIBRARY @@ -1344,7 +1344,7 @@ void cmVisualStudio10TargetGenerator::WriteLinkOptions(std::string const& this->WriteString("\n", 2); std::string CONFIG = cmSystemTools::UpperCase(config); - + const char* linkType = "SHARED"; if(this->Target->GetType() == cmTarget::MODULE_LIBRARY) { @@ -1405,7 +1405,7 @@ void cmVisualStudio10TargetGenerator::WriteLinkOptions(std::string const& std::string standardLibsVar = "CMAKE_"; standardLibsVar += linkLanguage; standardLibsVar += "_STANDARD_LIBRARIES"; - std::string + std::string libs = this->Makefile->GetSafeDefinition(standardLibsVar.c_str()); // Remove trailing spaces from libs std::string::size_type pos = libs.size()-1; @@ -1463,7 +1463,7 @@ void cmVisualStudio10TargetGenerator::WriteLinkOptions(std::string const& else { linkOptions.AddFlag("GenerateDebugInformation", "false"); - } + } std::string targetName; std::string targetNameSO; std::string targetNameFull; @@ -1472,13 +1472,13 @@ void cmVisualStudio10TargetGenerator::WriteLinkOptions(std::string const& if(this->Target->GetType() == cmTarget::EXECUTABLE) { this->Target->GetExecutableNames(targetName, targetNameFull, - targetNameImport, targetNamePDB, + targetNameImport, targetNamePDB, config.c_str()); } else { this->Target->GetLibraryNames(targetName, targetNameSO, targetNameFull, - targetNameImport, targetNamePDB, + targetNameImport, targetNamePDB, config.c_str()); } @@ -1502,7 +1502,7 @@ void cmVisualStudio10TargetGenerator::WriteLinkOptions(std::string const& linkOptions.RemoveFlag("GenerateManifest"); linkOptions.OutputAdditionalOptions(*this->BuildFileStream, " ", ""); linkOptions.OutputFlagMap(*this->BuildFileStream, " "); - + this->WriteString("\n", 2); if(!this->GlobalGenerator->NeedLinkLibraryDependencies(*this->Target)) { @@ -1516,7 +1516,7 @@ void cmVisualStudio10TargetGenerator::WriteLinkOptions(std::string const& void cmVisualStudio10TargetGenerator::AddLibraries( cmComputeLinkInformation& cli, std::string& libstring) -{ +{ typedef cmComputeLinkInformation::ItemVector ItemVector; ItemVector libs = cli.GetItems(); const char* sep = ";"; @@ -1582,15 +1582,15 @@ void cmVisualStudio10TargetGenerator::WriteItemDefinitionGroups() this->WriteMidlOptions(*i, includes); // write events this->WriteEvents(*i); - // output link flags + // output link flags this->WriteLinkOptions(*i); - // output lib flags + // output lib flags this->WriteLibOptions(*i); this->WriteString("\n", 1); } } -void +void cmVisualStudio10TargetGenerator::WriteEvents(std::string const& configName) { this->WriteEvent("PreLinkEvent", @@ -1618,7 +1618,7 @@ void cmVisualStudio10TargetGenerator::WriteEvent( std::string comment; for(std::vector::iterator i = commands.begin(); i != commands.end(); ++i) - { + { cmCustomCommand& command = *i; comment += pre; comment += lg->ConstructComment(command); @@ -1675,7 +1675,7 @@ void cmVisualStudio10TargetGenerator::WriteProjectReferences() } (*this->BuildFileStream) << path << "\">\n"; this->WriteString("", 3); - (*this->BuildFileStream) + (*this->BuildFileStream) << this->GlobalGenerator->GetGUID(name.c_str()) << "\n"; this->WriteString("\n", 2); diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h index 2d5ec2a6bd2..308b9bd9476 100644 --- a/Source/cmVisualStudio10TargetGenerator.h +++ b/Source/cmVisualStudio10TargetGenerator.h @@ -28,20 +28,20 @@ class cmVisualStudioGeneratorOptions; class cmVisualStudio10TargetGenerator { public: - cmVisualStudio10TargetGenerator(cmTarget* target, + cmVisualStudio10TargetGenerator(cmTarget* target, cmGlobalVisualStudio10Generator* gg); ~cmVisualStudio10TargetGenerator(); void Generate(); - // used by cmVisualStudioGeneratorOptions - void WritePlatformConfigTag( + // used by cmVisualStudioGeneratorOptions + void WritePlatformConfigTag( const char* tag, - const char* config, + const char* config, int indentLevel, const char* attribute = 0, const char* end = 0, std::ostream* strm = 0 ); - + private: struct ToolSource { diff --git a/Source/cmVisualStudioGeneratorOptions.cxx b/Source/cmVisualStudioGeneratorOptions.cxx index 9369af60c8b..1df0d9ed134 100644 --- a/Source/cmVisualStudioGeneratorOptions.cxx +++ b/Source/cmVisualStudioGeneratorOptions.cxx @@ -342,10 +342,10 @@ ::OutputAdditionalOptions(std::ostream& fout, if(!this->FlagString.empty()) { if(this->Version >= cmLocalVisualStudioGenerator::VS10) - { + { fout << prefix; if(this->Configuration.size()) - { + { this->TargetGenerator->WritePlatformConfigTag( "AdditionalOptions", this->Configuration.c_str(), diff --git a/Source/cmWhileCommand.h b/Source/cmWhileCommand.h index e111ae40dd4..1bdf27af389 100644 --- a/Source/cmWhileCommand.h +++ b/Source/cmWhileCommand.h @@ -25,7 +25,7 @@ class cmWhileFunctionBlocker : public cmFunctionBlocker cmMakefile &mf, cmExecutionStatus &); virtual bool ShouldRemove(const cmListFileFunction& lff, cmMakefile &mf); - + std::vector Args; std::vector Functions; private: @@ -39,7 +39,7 @@ class cmWhileCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmWhileCommand; } @@ -50,7 +50,7 @@ class cmWhileCommand : public cmCommand */ virtual bool InvokeInitialPass(const std::vector& args, cmExecutionStatus &); - + /** * This is called when the command is first encountered in * the CMakeLists.txt file. @@ -75,7 +75,7 @@ class cmWhileCommand : public cmCommand { return "Evaluate a group of commands while a condition is true"; } - + /** * More documentation. */ @@ -93,7 +93,7 @@ class cmWhileCommand : public cmCommand "is true. The condition is evaluated using the same logic as the " "if command."; } - + cmTypeMacro(cmWhileCommand, cmCommand); }; diff --git a/Source/cmWin32ProcessExecution.cxx b/Source/cmWin32ProcessExecution.cxx index f37e0ff4e56..9a536c159a0 100644 --- a/Source/cmWin32ProcessExecution.cxx +++ b/Source/cmWin32ProcessExecution.cxx @@ -11,7 +11,7 @@ ============================================================================*/ #include "cmWin32ProcessExecution.h" -#include "cmSystemTools.h" +#include "cmSystemTools.h" #include #include @@ -48,26 +48,26 @@ void DisplayErrorMessage() { LPVOID lpMsgBuf; - FormatMessage( - FORMAT_MESSAGE_ALLOCATE_BUFFER | - FORMAT_MESSAGE_FROM_SYSTEM | + FormatMessage( + FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language (LPTSTR) &lpMsgBuf, 0, - NULL + NULL ); // Process any inserts in lpMsgBuf. - // ... + // ... // Display the string. MessageBox( NULL, (LPCTSTR)lpMsgBuf, "Error", MB_OK | MB_ICONINFORMATION ); // Free the buffer. LocalFree( lpMsgBuf ); } - -// Code from a Borland web site with the following explaination : + +// Code from a Borland web site with the following explaination : /* In this article, I will explain how to spawn a console application * and redirect its standard input/output using anonymous pipes. An * anonymous pipe is a pipe that goes only in one direction (read @@ -93,74 +93,74 @@ void DisplayErrorMessage() * monitor the read end of the stdout pipe to check for display on our * child process. Every time there is something availabe for reading, * we will display it in our app. Consequently, we check for input in - * our app and send it off to the write end of the stdin pipe. */ + * our app and send it off to the write end of the stdin pipe. */ -inline bool IsWinNT() -//check if we're running NT +inline bool IsWinNT() +//check if we're running NT { OSVERSIONINFO osv; osv.dwOSVersionInfoSize = sizeof(osv); GetVersionEx(&osv); - return (osv.dwPlatformId == VER_PLATFORM_WIN32_NT); + return (osv.dwPlatformId == VER_PLATFORM_WIN32_NT); } -//--------------------------------------------------------------------------- +//--------------------------------------------------------------------------- bool cmWin32ProcessExecution::BorlandRunCommand( - const char* command, const char* dir, - std::string& output, int& retVal, bool verbose, int /* timeout */, - bool hideWindows) + const char* command, const char* dir, + std::string& output, int& retVal, bool verbose, int /* timeout */, + bool hideWindows) { //verbose = true; - //std::cerr << std::endl - // << "WindowsRunCommand(" << command << ")" << std::endl + //std::cerr << std::endl + // << "WindowsRunCommand(" << command << ")" << std::endl // << std::flush; const int BUFFER_SIZE = 4096; char buf[BUFFER_SIZE]; - -//i/o buffer + +//i/o buffer STARTUPINFO si; SECURITY_ATTRIBUTES sa; SECURITY_DESCRIPTOR sd; - -//security information for pipes + +//security information for pipes PROCESS_INFORMATION pi; HANDLE newstdin,newstdout,read_stdout,write_stdin; - -//pipe handles - if (IsWinNT()) -//initialize security descriptor (Windows NT) + +//pipe handles + if (IsWinNT()) +//initialize security descriptor (Windows NT) { InitializeSecurityDescriptor(&sd,SECURITY_DESCRIPTOR_REVISION); SetSecurityDescriptorDacl(&sd, true, NULL, false); sa.lpSecurityDescriptor = &sd; - + } else sa.lpSecurityDescriptor = NULL; sa.nLength = sizeof(SECURITY_ATTRIBUTES); sa.bInheritHandle = true; - -//allow inheritable handles - if (!CreatePipe(&newstdin,&write_stdin,&sa,0)) -//create stdin pipe + +//allow inheritable handles + if (!CreatePipe(&newstdin,&write_stdin,&sa,0)) +//create stdin pipe { return false; } - if (!CreatePipe(&read_stdout,&newstdout,&sa,0)) -//create stdout pipe + if (!CreatePipe(&read_stdout,&newstdout,&sa,0)) +//create stdout pipe { CloseHandle(newstdin); CloseHandle(write_stdin); return false; - + } GetStartupInfo(&si); - -//set startupinfo for the spawned process + +//set startupinfo for the spawned process /* The dwFlags member tells CreateProcess how to make the * process. STARTF_USESTDHANDLES validates the hStd* * members. STARTF_USESHOWWINDOW validates the wShowWindow - * member. */ - + * member. */ + si.cb = sizeof(STARTUPINFO); si.dwFlags = STARTF_USESTDHANDLES|STARTF_USESHOWWINDOW; si.hStdOutput = newstdout; @@ -170,12 +170,12 @@ bool cmWin32ProcessExecution::BorlandRunCommand( { si.wShowWindow = SW_HIDE; } - + //set the new handles for the child process si.hStdInput = newstdin; char* commandAndArgs = strcpy(new char[strlen(command)+1], command); if (!CreateProcess(NULL,commandAndArgs,NULL,NULL,TRUE, - 0, // CREATE_NEW_CONSOLE, - NULL,dir,&si,&pi)) + 0, // CREATE_NEW_CONSOLE, + NULL,dir,&si,&pi)) { std::cerr << "CreateProcess failed " << commandAndArgs << std::endl; CloseHandle(newstdin); @@ -184,37 +184,37 @@ bool cmWin32ProcessExecution::BorlandRunCommand( CloseHandle(write_stdin); delete [] commandAndArgs; return false; - + } delete [] commandAndArgs; unsigned long exit=0; - -//process exit code unsigned + +//process exit code unsigned unsigned long bread; - -//bytes read unsigned + +//bytes read unsigned unsigned long avail; - -//bytes available + +//bytes available memset(buf, 0, sizeof(buf)); - for(;;) -//main program loop + for(;;) +//main program loop { Sleep(10); -//check to see if there is any data to read from stdout +//check to see if there is any data to read from stdout //std::cout << "Peek for data..." << std::endl; PeekNamedPipe(read_stdout,buf,1023,&bread,&avail,NULL); - if (bread != 0) + if (bread != 0) { memset(buf, 0, sizeof(buf)); - if (avail > 1023) + if (avail > 1023) { - while (bread >= 1023) + while (bread >= 1023) { //std::cout << "Read data..." << std::endl; ReadFile(read_stdout,buf,1023,&bread,NULL); - - //read the stdout pipe + + //read the stdout pipe memset(buf, 0, sizeof(buf)); output += buf; if (verbose) @@ -223,39 +223,39 @@ bool cmWin32ProcessExecution::BorlandRunCommand( } } } - else + else { ReadFile(read_stdout,buf,1023,&bread,NULL); output += buf; - if(verbose) + if(verbose) { cmSystemTools::Stdout(buf); } - + } - + } - + //std::cout << "Check for process..." << std::endl; GetExitCodeProcess(pi.hProcess,&exit); - -//while the process is running + +//while the process is running if (exit != STILL_ACTIVE) break; - + } WaitForSingleObject(pi.hProcess, INFINITE); GetExitCodeProcess(pi.hProcess,&exit); CloseHandle(pi.hThread); CloseHandle(pi.hProcess); CloseHandle(newstdin); - -//clean stuff up + +//clean stuff up CloseHandle(newstdout); CloseHandle(read_stdout); CloseHandle(write_stdin); retVal = exit; return true; - + } bool cmWin32ProcessExecution::StartProcess( @@ -279,7 +279,7 @@ bool cmWin32ProcessExecution::Wait(int timeout) static void *_PyPopenProcs = NULL; static BOOL RealPopenCreateProcess(const char *cmdstring, - const char *path, + const char *path, const char *szConsoleSpawn, HANDLE hStdin, HANDLE hStdout, @@ -314,7 +314,7 @@ static BOOL RealPopenCreateProcess(const char *cmdstring, ++comshell; if (GetVersion() < 0x80000000 && - STRICMP(comshell, "command.com") != 0) + STRICMP(comshell, "command.com") != 0) { /* NT/2000 and not using command.com. */ x = i + (int)strlen(s3) + (int)strlen(cmdstring) + 1; @@ -323,7 +323,7 @@ static BOOL RealPopenCreateProcess(const char *cmdstring, //sprintf(s2, "%s%s%s", s1, s3, cmdstring); sprintf(s2, "%s", cmdstring); } - else + else { /* * Oh gag, we're on Win9x or using COMMAND.COM. Use @@ -337,22 +337,22 @@ static BOOL RealPopenCreateProcess(const char *cmdstring, x = i+1; modulepath[x] = '\0'; /* Create the full-name to w9xpopen, so we can test it exists */ - strncat(modulepath, - szConsoleSpawn, + strncat(modulepath, + szConsoleSpawn, (sizeof(modulepath)/sizeof(modulepath[0])) -strlen(modulepath)); - if (stat(modulepath, &statinfo) != 0) + if (stat(modulepath, &statinfo) != 0) { - /* Eeek - file-not-found - possibly an embedding - situation - see if we can locate it in sys.prefix + /* Eeek - file-not-found - possibly an embedding + situation - see if we can locate it in sys.prefix */ - strncpy(modulepath, - ".", + strncpy(modulepath, + ".", sizeof(modulepath)/sizeof(modulepath[0])); if (modulepath[strlen(modulepath)-1] != '\\') strcat(modulepath, "\\"); - strncat(modulepath, - szConsoleSpawn, + strncat(modulepath, + szConsoleSpawn, (sizeof(modulepath)/sizeof(modulepath[0])) -strlen(modulepath)); /* No where else to look - raise an easily identifiable @@ -361,20 +361,20 @@ static BOOL RealPopenCreateProcess(const char *cmdstring, unaware this shim EXE is used, and it will confuse them. (well, it confused me for a while ;-) */ - if (stat(modulepath, &statinfo) != 0) + if (stat(modulepath, &statinfo) != 0) { - std::cout + std::cout << "Can not locate '" << modulepath << "' which is needed " "for popen to work with your shell " - "or platform." << std::endl; + "or platform." << std::endl; free(s1); free(s2); return FALSE; } } x = i + (int)strlen(s3) + (int)strlen(cmdstring) + 1 + - (int)strlen(modulepath) + + (int)strlen(modulepath) + (int)strlen(szConsoleSpawn) + 1; if(s2) { @@ -399,22 +399,22 @@ static BOOL RealPopenCreateProcess(const char *cmdstring, /* Could be an else here to try cmd.exe / command.com in the path Now we'll just error out.. */ - else + else { std::cout << "Cannot locate a COMSPEC environment variable to " - << "use as the shell" << std::endl; + << "use as the shell" << std::endl; free(s2); free(s1); return FALSE; } - + ZeroMemory(&siStartInfo, sizeof(STARTUPINFO)); siStartInfo.cb = sizeof(STARTUPINFO); siStartInfo.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW; siStartInfo.hStdInput = hStdin; siStartInfo.hStdOutput = hStdout; siStartInfo.hStdError = hStderr; - siStartInfo.wShowWindow = SW_SHOWDEFAULT; + siStartInfo.wShowWindow = SW_SHOWDEFAULT; if(hideWindows) { siStartInfo.wShowWindow = SW_HIDE; @@ -430,7 +430,7 @@ static BOOL RealPopenCreateProcess(const char *cmdstring, NULL, path, &siStartInfo, - &piProcInfo) ) + &piProcInfo) ) { /* Close the handles now so anyone waiting is woken. */ CloseHandle(piProcInfo.hThread); @@ -477,9 +477,9 @@ static BOOL RealPopenCreateProcess(const char *cmdstring, /* The following code is based off of KB: Q190351 */ -bool cmWin32ProcessExecution::PrivateOpen(const char *cmdstring, +bool cmWin32ProcessExecution::PrivateOpen(const char *cmdstring, const char* path, - int mode, + int mode, int n) { HANDLE hProcess; @@ -496,11 +496,11 @@ bool cmWin32ProcessExecution::PrivateOpen(const char *cmdstring, this->hChildStdinWrDup = 0; this->hChildStdoutRdDup = 0; this->hChildStderrRdDup = 0; - + saAttr.nLength = sizeof(SECURITY_ATTRIBUTES); saAttr.bInheritHandle = TRUE; saAttr.lpSecurityDescriptor = NULL; - + fd1 = 0; fd2 = 0; fd3 = 0; @@ -510,7 +510,7 @@ bool cmWin32ProcessExecution::PrivateOpen(const char *cmdstring, this->Output += "CreatePipeError\n"; return false; } - + /* Create new output read handle and the input write handle. Set * the inheritance properties to FALSE. Otherwise, the child inherits * the these handles; resulting in non-closeable handles to the pipes @@ -549,7 +549,7 @@ bool cmWin32ProcessExecution::PrivateOpen(const char *cmdstring, that we're using. */ CloseHandle(hChildStdoutRd); - if (n != POPEN_4) + if (n != POPEN_4) { if (!CreatePipe(&this->hChildStderrRd, &this->hChildStderrWr, &saAttr, 0)) { @@ -570,11 +570,11 @@ bool cmWin32ProcessExecution::PrivateOpen(const char *cmdstring, CloseHandle(hChildStderrRd); } - - switch (n) + + switch (n) { case POPEN_1: - switch (mode & (_O_RDONLY | _O_TEXT | _O_BINARY | _O_WRONLY)) + switch (mode & (_O_RDONLY | _O_TEXT | _O_BINARY | _O_WRONLY)) { case _O_WRONLY | _O_TEXT: /* Case for writing to child Stdin in text mode. */ @@ -606,18 +606,18 @@ bool cmWin32ProcessExecution::PrivateOpen(const char *cmdstring, break; } break; - + case POPEN_2: - case POPEN_4: - //if ( 1 ) + case POPEN_4: + //if ( 1 ) { fd1 = _open_osfhandle(TO_INTPTR(this->hChildStdinWrDup), mode); fd2 = _open_osfhandle(TO_INTPTR(this->hChildStdoutRdDup), mode); break; } - + case POPEN_3: - //if ( 1) + //if ( 1) { fd1 = _open_osfhandle(TO_INTPTR(this->hChildStdinWrDup), mode); fd2 = _open_osfhandle(TO_INTPTR(this->hChildStdoutRdDup), mode); @@ -626,7 +626,7 @@ bool cmWin32ProcessExecution::PrivateOpen(const char *cmdstring, } } - if (n == POPEN_4) + if (n == POPEN_4) { if (!RealPopenCreateProcess(cmdstring, path, @@ -652,7 +652,7 @@ bool cmWin32ProcessExecution::PrivateOpen(const char *cmdstring, return 0; } } - else + else { if (!RealPopenCreateProcess(cmdstring, path, @@ -852,15 +852,15 @@ bool cmWin32ProcessExecution::PrivateClose(int /* timeout */) break; } } - } + } + - if (WaitForSingleObject(hProcess, INFINITE) != WAIT_FAILED && - GetExitCodeProcess(hProcess, &exit_code)) + GetExitCodeProcess(hProcess, &exit_code)) { result = exit_code; - } - else + } + else { /* Indicate failure - this will cause the file object * to raise an I/O error and translate the last Win32 @@ -868,7 +868,7 @@ bool cmWin32ProcessExecution::PrivateClose(int /* timeout */) * last errors that overlap the normal errno table, * but that's a consistent problem with the file object. */ - if (result != EOF) + if (result != EOF) { /* If the error wasn't from the fclose(), then * set errno for the file object error handling. @@ -897,7 +897,7 @@ int cmWin32ProcessExecution::Windows9xHack(const char* command) PROCESS_INFORMATION pi; DWORD exit_code=0; - if (!command) + if (!command) { cmSystemTools::Error("Windows9xHack: Command not specified"); return 1; @@ -911,7 +911,7 @@ int cmWin32ProcessExecution::Windows9xHack(const char* command) si.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE); si.hStdError = GetStdHandle(STD_ERROR_HANDLE); - + char * app = 0; char* cmd = new char[ strlen(command) + 1 ]; strcpy(cmd, command); @@ -925,9 +925,9 @@ int cmWin32ProcessExecution::Windows9xHack(const char* command) ); delete [] cmd; - if (bRet) + if (bRet) { - if (WaitForSingleObject(pi.hProcess, INFINITE) != WAIT_FAILED) + if (WaitForSingleObject(pi.hProcess, INFINITE) != WAIT_FAILED) { GetExitCodeProcess(pi.hProcess, &exit_code); } diff --git a/Source/cmWin32ProcessExecution.h b/Source/cmWin32ProcessExecution.h index def69a8cca4..98b6bda986e 100644 --- a/Source/cmWin32ProcessExecution.h +++ b/Source/cmWin32ProcessExecution.h @@ -47,12 +47,12 @@ class cmWin32ProcessExecution ~cmWin32ProcessExecution(); ///! If true windows will be created hidden. void SetHideWindows(bool v) { this->HideWindows = v; } - + /** * Initialize the process execution datastructure. Do not call while * running the process. */ - void Initialize() + void Initialize() { this->ProcessHandle = 0; this->ExitValue = -1; @@ -65,7 +65,7 @@ class cmWin32ProcessExecution this->pStdOut = -1; this->pStdErr = -1; } - + /** * Start the process in the directory path. Make sure that the * executable is either in the path or specify the full path. The @@ -129,10 +129,10 @@ class cmWin32ProcessExecution * process. Every time there is something availabe for reading, we * will display it in our app. Consequently, we check for input in * our app and send it off to the write end of the stdin pipe. - */ - static bool BorlandRunCommand(const char* command, - const char* dir, - std::string& output, int& retVal, + */ + static bool BorlandRunCommand(const char* command, + const char* dir, + std::string& output, int& retVal, bool verbose, int timeout, bool hideWindows); @@ -151,8 +151,8 @@ class cmWin32ProcessExecution HANDLE hChildStdinWrDup; HANDLE hChildStdoutRdDup; HANDLE hChildStderrRdDup; - - + + int pStdIn; int pStdOut; int pStdErr; diff --git a/Source/cmWriteFileCommand.cxx b/Source/cmWriteFileCommand.cxx index b2acb2bc157..3642c6fba75 100644 --- a/Source/cmWriteFileCommand.cxx +++ b/Source/cmWriteFileCommand.cxx @@ -71,7 +71,7 @@ ::InitialPass(std::vector const& args, cmExecutionStatus &) } // If GetPermissions fails, pretend like it is ok. File open will fail if // the file is not writable - std::ofstream file(fileName.c_str(), + std::ofstream file(fileName.c_str(), overwrite?std::ios::out : std::ios::app); if ( !file ) { diff --git a/Source/cmWriteFileCommand.h b/Source/cmWriteFileCommand.h index 8808d32bbd4..771ef5a1b39 100644 --- a/Source/cmWriteFileCommand.h +++ b/Source/cmWriteFileCommand.h @@ -24,7 +24,7 @@ class cmWriteFileCommand : public cmCommand /** * This is a virtual constructor for the command. */ - virtual cmCommand* Clone() + virtual cmCommand* Clone() { return new cmWriteFileCommand; } @@ -53,7 +53,7 @@ class cmWriteFileCommand : public cmCommand { return "Deprecated. Use the file(WRITE ) command instead."; } - + /** * More documentation. */ @@ -71,7 +71,7 @@ class cmWriteFileCommand : public cmCommand "lead to an infinite loop. Use configure_file if you want to generate " "input files to CMake."; } - + /** This command is kept for compatibility with older CMake versions. */ virtual bool IsDiscouraged() const { diff --git a/Source/cmXCode21Object.cxx b/Source/cmXCode21Object.cxx index c679cd8bfe7..855e1ad2fff 100644 --- a/Source/cmXCode21Object.cxx +++ b/Source/cmXCode21Object.cxx @@ -79,20 +79,20 @@ void cmXCode21Object::PrintList(std::vector const& v, cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXBuildStyle); cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXContainerItemProxy); cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXFileReference); - cmXCode21Object::PrintList(v, out, + cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXFrameworksBuildPhase); cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXGroup); cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXHeadersBuildPhase); cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXNativeTarget); cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXProject); - cmXCode21Object::PrintList(v, out, + cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXShellScriptBuildPhase); cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXResourcesBuildPhase); cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXSourcesBuildPhase); cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXCopyFilesBuildPhase); - cmXCode21Object::PrintList(v, out, + cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXApplicationReference); - cmXCode21Object::PrintList(v, out, + cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXExecutableFileReference); cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXLibraryReference); cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXToolTarget); diff --git a/Source/cmXCodeObject.cxx b/Source/cmXCodeObject.cxx index 30ade9637d9..de150ee0fda 100644 --- a/Source/cmXCodeObject.cxx +++ b/Source/cmXCodeObject.cxx @@ -16,13 +16,13 @@ //---------------------------------------------------------------------------- const char* cmXCodeObject::PBXTypeNames[] = { - "PBXGroup", "PBXBuildStyle", "PBXProject", "PBXHeadersBuildPhase", + "PBXGroup", "PBXBuildStyle", "PBXProject", "PBXHeadersBuildPhase", "PBXSourcesBuildPhase", "PBXFrameworksBuildPhase", "PBXNativeTarget", - "PBXFileReference", "PBXBuildFile", "PBXContainerItemProxy", - "PBXTargetDependency", "PBXShellScriptBuildPhase", + "PBXFileReference", "PBXBuildFile", "PBXContainerItemProxy", + "PBXTargetDependency", "PBXShellScriptBuildPhase", "PBXResourcesBuildPhase", "PBXApplicationReference", "PBXExecutableFileReference", "PBXLibraryReference", "PBXToolTarget", - "PBXLibraryTarget", "PBXAggregateTarget", "XCBuildConfiguration", + "PBXLibraryTarget", "PBXAggregateTarget", "XCBuildConfiguration", "XCConfigurationList", "PBXCopyFilesBuildPhase", "None" @@ -92,7 +92,7 @@ void cmXCodeObject::Print(std::ostream& out) { std::string separator = "\n"; int indentFactor = 1; - if(this->Version > 15 + if(this->Version > 15 && (this->IsA == PBXFileReference || this->IsA == PBXBuildFile)) { separator = " "; @@ -112,12 +112,12 @@ void cmXCodeObject::Print(std::ostream& out) std::map::iterator i; cmXCodeObject::Indent(3*indentFactor, out); out << "isa = " << PBXTypeNames[this->IsA] << ";" << separator; - for(i = this->ObjectAttributes.begin(); + for(i = this->ObjectAttributes.begin(); i != this->ObjectAttributes.end(); ++i) - { + { cmXCodeObject* object = i->second; if(i->first != "isa") - { + { cmXCodeObject::Indent(3*indentFactor, out); } else @@ -133,7 +133,7 @@ void cmXCodeObject::Print(std::ostream& out) out << i->second->List[k]->Id << " "; i->second->List[k]->PrintComment(out); out << "," << separator; - } + } cmXCodeObject::Indent(3*indentFactor, out); out << ");" << separator; } @@ -141,7 +141,7 @@ void cmXCodeObject::Print(std::ostream& out) { std::map::iterator j; out << i->first << " = {" << separator; - for(j = object->ObjectAttributes.begin(); j != + for(j = object->ObjectAttributes.begin(); j != object->ObjectAttributes.end(); ++j) { cmXCodeObject::Indent(4 *indentFactor, out); @@ -209,11 +209,11 @@ void cmXCodeObject::Print(std::ostream& out) cmXCodeObject::Indent(2*indentFactor, out); out << "};\n"; } - + //---------------------------------------------------------------------------- void cmXCodeObject::PrintList(std::vector const& objs, std::ostream& out) -{ +{ cmXCodeObject::Indent(1, out); out << "objects = {\n"; for(unsigned int i = 0; i < objs.size(); ++i) diff --git a/Source/cmXCodeObject.h b/Source/cmXCodeObject.h index 2fb96f30ef5..bb2d5b225d5 100644 --- a/Source/cmXCodeObject.h +++ b/Source/cmXCodeObject.h @@ -19,13 +19,13 @@ class cmXCodeObject { public: enum Type { OBJECT_LIST, STRING, ATTRIBUTE_GROUP, OBJECT_REF, OBJECT }; - enum PBXType { PBXGroup, PBXBuildStyle, PBXProject, PBXHeadersBuildPhase, - PBXSourcesBuildPhase, PBXFrameworksBuildPhase, - PBXNativeTarget, PBXFileReference, PBXBuildFile, + enum PBXType { PBXGroup, PBXBuildStyle, PBXProject, PBXHeadersBuildPhase, + PBXSourcesBuildPhase, PBXFrameworksBuildPhase, + PBXNativeTarget, PBXFileReference, PBXBuildFile, PBXContainerItemProxy, PBXTargetDependency, PBXShellScriptBuildPhase, PBXResourcesBuildPhase, - PBXApplicationReference, PBXExecutableFileReference, - PBXLibraryReference, PBXToolTarget, PBXLibraryTarget, + PBXApplicationReference, PBXExecutableFileReference, + PBXLibraryReference, PBXToolTarget, PBXLibraryTarget, PBXAggregateTarget,XCBuildConfiguration,XCConfigurationList, PBXCopyFilesBuildPhase, None @@ -38,16 +38,16 @@ class cmXCodeObject PBXType GetIsA() { return this->IsA;} void SetString(const char* s); - const char* GetString() + const char* GetString() { return this->String.c_str(); } - + void AddAttribute(const char* name, cmXCodeObject* value) { this->ObjectAttributes[name] = value; } - + void SetObject(cmXCodeObject* value) { this->Object = value; @@ -60,14 +60,14 @@ class cmXCodeObject { this->List.push_back(value); } - bool HasObject(cmXCodeObject* o) + bool HasObject(cmXCodeObject* o) { - return !(std::find(this->List.begin(), this->List.end(), o) + return !(std::find(this->List.begin(), this->List.end(), o) == this->List.end()); } void AddUniqueObject(cmXCodeObject* value) { - if(std::find(this->List.begin(), this->List.end(), value) + if(std::find(this->List.begin(), this->List.end(), value) == this->List.end()) { this->List.push_back(value); @@ -77,7 +77,7 @@ class cmXCodeObject void Print(std::ostream& out); virtual void PrintComment(std::ostream&) {}; - static void PrintList(std::vector const&, + static void PrintList(std::vector const&, std::ostream& out); const char* GetId() { @@ -119,7 +119,7 @@ class cmXCodeObject } return 0; } - + cmXCodeObject* GetPBXTargetDependency() { return this->PBXTargetDependencyValue; @@ -129,7 +129,7 @@ class cmXCodeObject this->PBXTargetDependencyValue = d; } void CopyAttributes(cmXCodeObject* ); - + void AddDependLibrary(const char* configName, const char* l) { diff --git a/Source/cmXMLParser.cxx b/Source/cmXMLParser.cxx index 46a1ca4aaea..882fc172eb8 100644 --- a/Source/cmXMLParser.cxx +++ b/Source/cmXMLParser.cxx @@ -34,7 +34,7 @@ cmXMLParser::~cmXMLParser() int cmXMLParser::Parse(const char* string) { return (int)this->InitializeParser() && - this->ParseChunk(string, strlen(string)) && + this->ParseChunk(string, strlen(string)) && this->CleanupParser(); } @@ -79,7 +79,7 @@ int cmXMLParser::InitializeParser() } //---------------------------------------------------------------------------- -int cmXMLParser::ParseChunk(const char* inputString, +int cmXMLParser::ParseChunk(const char* inputString, std::string::size_type length) { if ( !this->Parser ) @@ -116,11 +116,11 @@ int cmXMLParser::CleanupParser() result = 0; } } - + // Clean up the parser. XML_ParserFree(static_cast(this->Parser)); this->Parser = 0; - + return result; } @@ -128,7 +128,7 @@ int cmXMLParser::CleanupParser() int cmXMLParser::ParseBuffer(const char* buffer, std::string::size_type count) { // Pass the buffer to the expat XML parser. - if(!XML_Parse(static_cast(this->Parser), buffer, + if(!XML_Parse(static_cast(this->Parser), buffer, static_cast(count), 0)) { this->ReportXmlParseError(); diff --git a/Source/cmXMLParser.h b/Source/cmXMLParser.h index c72be575171..d916075e543 100644 --- a/Source/cmXMLParser.h +++ b/Source/cmXMLParser.h @@ -18,7 +18,7 @@ extern "C" { void cmXMLParserStartElement(void*, const char*, const char**); void cmXMLParserEndElement(void*, const char*); - void cmXMLParserCharacterDataHandler(void*, const char*, int); + void cmXMLParserCharacterDataHandler(void*, const char*, int); } /** \class cmXMLParser @@ -37,7 +37,7 @@ class cmXMLParser //! Parse given XML file virtual int ParseFile(const char* file); - + /** * When parsing fragments of XML or streaming XML, use the following * three methods. InitializeParser method initialize parser but does @@ -47,7 +47,7 @@ class cmXMLParser * them. */ virtual int InitializeParser(); - virtual int ParseChunk(const char* inputString, + virtual int ParseChunk(const char* inputString, std::string::size_type length); virtual int CleanupParser(); @@ -65,7 +65,7 @@ class cmXMLParser * terminating condition for parsing. Parsing always stops when the end of * file is reached in the stream. */ - + virtual int ParsingComplete(); /** @@ -75,28 +75,28 @@ class cmXMLParser * Even indices are attribute names, and odd indices are values. */ virtual void StartElement(const char* name, const char** atts); - + //! Called at the end of an element in the XML source opened when //StartElement was called. virtual void EndElement(const char* name); - + //! Called when there is character data to handle. - virtual void CharacterDataHandler(const char* data, int length); + virtual void CharacterDataHandler(const char* data, int length); //! Called by Parse to report an XML syntax error. - virtual void ReportXmlParseError(); + virtual void ReportXmlParseError(); /** Called by ReportXmlParseError with basic error info. */ virtual void ReportError(int line, int column, const char* msg); //! Utility for convenience of subclasses. Wraps isspace C library // routine. - static int IsSpace(char c); - + static int IsSpace(char c); + //! Send the given buffer to the XML parser. - virtual int ParseBuffer(const char* buffer, + virtual int ParseBuffer(const char* buffer, std::string::size_type length); - + //! Send the given c-style string to the XML parser. int ParseBuffer(const char* buffer); diff --git a/Source/cmakewizard.cxx b/Source/cmakewizard.cxx index cd427cb4064..749f669d0de 100644 --- a/Source/cmakewizard.cxx +++ b/Source/cmakewizard.cxx @@ -137,7 +137,7 @@ int cmakewizard::RunWizard(std::vector const& args) } } else - { + { if(this->ShowAdvanced || !i.GetPropertyAsBool("ADVANCED")) { this->AskUser(key.c_str(), i); diff --git a/Source/cmakewizard.h b/Source/cmakewizard.h index fcb2c7ae264..0c8dba93cf1 100644 --- a/Source/cmakewizard.h +++ b/Source/cmakewizard.h @@ -18,24 +18,24 @@ class cmakewizard public: cmakewizard(); virtual ~cmakewizard() {} - /** + /** * Prompt the user to see if they want to see advanced entries. */ virtual bool AskAdvanced(); - + /** * Prompt the User for a new value for key, the answer is put in entry. */ virtual void AskUser(const char* key, cmCacheManager::CacheIterator& iter); ///! Show a message to wait for cmake to run. virtual void ShowMessage(const char*); - - /** - * Run cmake in wizard mode. This will coninue to ask the user questions + + /** + * Run cmake in wizard mode. This will coninue to ask the user questions * until there are no more entries in the cache. */ int RunWizard(std::vectorconst& args); - + private: bool ShowAdvanced; }; diff --git a/Source/cmakexbuild.cxx b/Source/cmakexbuild.cxx index 8eaae479528..9aaeeaa4d7b 100644 --- a/Source/cmakexbuild.cxx +++ b/Source/cmakexbuild.cxx @@ -33,7 +33,7 @@ int RunXCode(std::vector& argv, bool& hitbug) int pipe = cmSystemTools::WaitForLine(cp, line, 100.0, out, err); while(pipe != cmsysProcess_Pipe_None) { - if(line.find("/bin/sh: bad interpreter: Text file busy") + if(line.find("/bin/sh: bad interpreter: Text file busy") != line.npos) { hitbug = true; @@ -69,7 +69,7 @@ int RunXCode(std::vector& argv, bool& hitbug) } int main(int ac, char*av[]) -{ +{ std::vector argv; argv.push_back("xcodebuild"); for(int i =1; i < ac; i++) diff --git a/Source/cmparseMSBuildXML.py b/Source/cmparseMSBuildXML.py index 4877e591343..a0c7ec44ae6 100755 --- a/Source/cmparseMSBuildXML.py +++ b/Source/cmparseMSBuildXML.py @@ -9,7 +9,7 @@ # # BoolProperty true|false # simple example: -# # # @@ -67,7 +67,7 @@ # MaxSpeed # example for O1 would be this: # MinSpace -# +# # StringListProperty # # @@ -130,7 +130,7 @@ def __init__(self,type,attributeNames,document=None): if document is not None: self.populate(document) pass - + #document = the dom file that's root node is the Property node (ex. if you were parsing a BoolProperty the root node should be something like #spaces = do not use def populate(self,document, spaces = ""): @@ -155,9 +155,9 @@ def populate(self,document, spaces = ""): self.populate(child,spaces+"----") pass - #toString function + #toString function def __str__(self): - toReturn = self.prefix_type+self.suffix_type+":" + toReturn = self.prefix_type+self.suffix_type+":" for i in self.attributeNames: toReturn += "\n "+i+": "+self.attributes[i] if self.argumentProperty != "": @@ -191,7 +191,7 @@ def __init__(self,document=None): # self.Properties.append(Property("",[],child)) # #Replace with the name of the new property (ex. if property is StringProperty replace with String) - #Replace with a list of attributes in your property's root node + #Replace with a list of attributes in your property's root node #in the __init__ function add the line self.Properties = [] # #That is all that is required to add new properties @@ -236,7 +236,7 @@ def toCMake(self): for j in lastProp.values: toReturn+=" {\""+lastProp.attributes["Name"]+"\", \""+j.attributes["Switch"]+"\",\n \""+j.DisplayName+"\", \""+j.attributes["Name"]+"\", 0},\n" toReturn += "\n" - + toReturn += "\n //Bool Properties\n" for i in self.boolProperties: if i.argumentProperty == "": @@ -254,7 +254,7 @@ def toCMake(self): if i.attributes["Switch"] != "": toReturn += " {\""+i.attributes["Name"]+"\", \""+i.attributes["Switch"]+"\", \"\", \"true\",\n cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue},\n" toReturn += " {\""+i.argumentProperty+"\", \""+i.attributes["Switch"]+"\", \""+i.DisplayName+"\", \"\",\n cmVS7FlagTable::UserValueRequired},\n" - + toReturn += "\n //String List Properties\n" for i in self.stringListProperties: if i.attributes["Switch"] == "": @@ -289,7 +289,7 @@ def __str__(self): for p in allList: for i in p: toReturn += "==================================================\n"+str(i).replace("\n","\n ")+"\n==================================================\n" - + return toReturn ########################################################################################### @@ -305,8 +305,8 @@ def main(argv): for i in range(0,len(argv)): if argv[i] == "-x": xml_file = argv[i+1] - if argv[i] == "-h": - print help + if argv[i] == "-h": + print help sys.exit(0) pass if xml_file == None: diff --git a/Source/cmw9xcom.cxx b/Source/cmw9xcom.cxx index 4ba27496527..e6014b3257e 100644 --- a/Source/cmw9xcom.cxx +++ b/Source/cmw9xcom.cxx @@ -22,7 +22,7 @@ int main (int argc, char *argv[]) return 1; } std::string arg = argv[1]; - if ( (arg.find_first_of(" ") != arg.npos) && + if ( (arg.find_first_of(" ") != arg.npos) && (arg.find_first_of("\"") == arg.npos) ) { arg = "\"" + arg + "\""; @@ -32,7 +32,7 @@ int main (int argc, char *argv[]) for ( cc = 2; cc < argc; cc ++ ) { std::string arg = argv[cc]; - if ( (arg.find_first_of(" ") != arg.npos) && + if ( (arg.find_first_of(" ") != arg.npos) && (arg.find_first_of("\"") == arg.npos) ) { arg = "\"" + arg + "\""; diff --git a/Templates/CMakeVisualStudio6Configurations.cmake b/Templates/CMakeVisualStudio6Configurations.cmake index a9db2eebaca..b8e79742794 100644 --- a/Templates/CMakeVisualStudio6Configurations.cmake +++ b/Templates/CMakeVisualStudio6Configurations.cmake @@ -1,3 +1,3 @@ -# When the dll templates are changed, this list should be +# When the dll templates are changed, this list should be # updated with the list of possible configurations. SET(CMAKE_CONFIGURATION_TYPES Debug Release MinSizeRel RelWithDebInfo) diff --git a/Templates/TestDriver.cxx.in b/Templates/TestDriver.cxx.in index 9e5303004a7..f4510bb5578 100644 --- a/Templates/TestDriver.cxx.in +++ b/Templates/TestDriver.cxx.in @@ -64,7 +64,7 @@ int main(int ac, char *av[]) int testToRun = -1; @CMAKE_TESTDRIVER_ARGVC_FUNCTION@ - + for(count =0; cmakeGeneratedFunctionMapEntries[count].name != 0; count++) { } @@ -141,8 +141,8 @@ int main(int ac, char *av[]) @CMAKE_TESTDRIVER_AFTER_TESTMAIN@ return result; } - - + + /* Nothing was run, display the test names. */ printf("Available tests:\n"); for (i =0; i < NumTests; ++i) @@ -150,6 +150,6 @@ int main(int ac, char *av[]) printf("%3d. %s\n", i, cmakeGeneratedFunctionMapEntries[i].name); } printf("Failed: %s is an invalid test name.\n", av[1]); - + return -1; } diff --git a/Templates/cygwin-package.sh.in b/Templates/cygwin-package.sh.in index 8482e7e4dc4..69b6c0f6fce 100755 --- a/Templates/cygwin-package.sh.in +++ b/Templates/cygwin-package.sh.in @@ -10,11 +10,11 @@ TOP_DIR=`cd \`echo "$0" | sed -n '/\//{s/\/[^\/]*$//;p;}'\`;pwd` mkdirs() { ( - mkdir -p "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" + mkdir -p "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" ) } -# cd into +# cd into # untar source tree and apply patch prep() { @@ -31,7 +31,7 @@ prep() conf() { ( - cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" && + cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" && cmake .. ) } @@ -60,8 +60,8 @@ pkg() { ( cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" && - cpack && - mv @CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@.tar.bz2 "$TOP_DIR" + cpack && + mv @CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@.tar.bz2 "$TOP_DIR" ) } @@ -71,7 +71,7 @@ spkg() ( cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" && cpack --config CPackSourceConfig.cmake && - mv @CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@-src.tar.bz2 "$TOP_DIR" + mv @CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@-src.tar.bz2 "$TOP_DIR" ) } diff --git a/Tests/BuildDepends/CMakeLists.txt b/Tests/BuildDepends/CMakeLists.txt index 5e36d11b447..045acb8c097 100644 --- a/Tests/BuildDepends/CMakeLists.txt +++ b/Tests/BuildDepends/CMakeLists.txt @@ -1,9 +1,9 @@ # this test creates a static library and an executable -# the source to the library is then changed +# the source to the library is then changed # and the build is done on the executable and if things # are working the executable should relink with the new # value. The subdir Project contains the CMakelists.txt -# and source files for the test project. +# and source files for the test project. cmake_minimum_required (VERSION 2.6) project(BuildDepends) @@ -48,7 +48,7 @@ list(APPEND _cmake_options "-DCMAKE_FORCE_DEPFILES=1") file(MAKE_DIRECTORY ${BuildDepends_BINARY_DIR}/Project) message("Creating Project/foo.cxx") -write_file(${BuildDepends_BINARY_DIR}/Project/foo.cxx +write_file(${BuildDepends_BINARY_DIR}/Project/foo.cxx "const char* foo() { return \"foo\";}" ) file(WRITE ${BuildDepends_BINARY_DIR}/Project/zot.hxx.in @@ -63,19 +63,19 @@ file(WRITE ${BuildDepends_BINARY_DIR}/Project/zot_macro_tgt.hxx help_xcode_depends() message("Building project first time") -try_compile(RESULT +try_compile(RESULT ${BuildDepends_BINARY_DIR}/Project ${BuildDepends_SOURCE_DIR}/Project testRebuild CMAKE_FLAGS ${_cmake_options} OUTPUT_VARIABLE OUTPUT) if(HELP_XCODE) - try_compile(RESULT + try_compile(RESULT ${BuildDepends_BINARY_DIR}/Project ${BuildDepends_SOURCE_DIR}/Project testRebuild OUTPUT_VARIABLE OUTPUT) - try_compile(RESULT + try_compile(RESULT ${BuildDepends_BINARY_DIR}/Project ${BuildDepends_SOURCE_DIR}/Project testRebuild @@ -88,20 +88,20 @@ if(NOT RESULT) endif(NOT RESULT) set(bar ${BuildDepends_BINARY_DIR}/Project/bar${CMAKE_EXECUTABLE_SUFFIX}) -if(EXISTS +if(EXISTS "${BuildDepends_BINARY_DIR}/Project/Debug/bar${CMAKE_EXECUTABLE_SUFFIX}" ) message("found debug") - set(bar + set(bar "${BuildDepends_BINARY_DIR}/Project/Debug/bar${CMAKE_EXECUTABLE_SUFFIX}") -endif(EXISTS +endif(EXISTS "${BuildDepends_BINARY_DIR}/Project/Debug/bar${CMAKE_EXECUTABLE_SUFFIX}") set(zot ${BuildDepends_BINARY_DIR}/Project/zot${CMAKE_EXECUTABLE_SUFFIX}) -if(EXISTS +if(EXISTS "${BuildDepends_BINARY_DIR}/Project/Debug/zot${CMAKE_EXECUTABLE_SUFFIX}" ) message("found debug") - set(zot + set(zot "${BuildDepends_BINARY_DIR}/Project/Debug/zot${CMAKE_EXECUTABLE_SUFFIX}") -endif(EXISTS +endif(EXISTS "${BuildDepends_BINARY_DIR}/Project/Debug/zot${CMAKE_EXECUTABLE_SUFFIX}") message("Running ${bar} ") @@ -150,7 +150,7 @@ endif() help_xcode_depends() message("Building project second time") -try_compile(RESULT +try_compile(RESULT ${BuildDepends_BINARY_DIR}/Project ${BuildDepends_SOURCE_DIR}/Project testRebuild @@ -159,12 +159,12 @@ try_compile(RESULT # Xcode is in serious need of help here if(HELP_XCODE OR HELP_NINJA) - try_compile(RESULT + try_compile(RESULT ${BuildDepends_BINARY_DIR}/Project ${BuildDepends_SOURCE_DIR}/Project testRebuild OUTPUT_VARIABLE OUTPUT) - try_compile(RESULT + try_compile(RESULT ${BuildDepends_BINARY_DIR}/Project ${BuildDepends_SOURCE_DIR}/Project testRebuild @@ -175,15 +175,15 @@ message("Output from second build:\n${OUTPUT}") if(NOT RESULT) message(SEND_ERROR "Could not build test project (2)!") endif(NOT RESULT) -if(EXISTS +if(EXISTS "${BuildDepends_BINARY_DIR}/Project/Debug/bar${CMAKE_EXECUTABLE_SUFFIX}" ) message("found debug") -endif(EXISTS +endif(EXISTS "${BuildDepends_BINARY_DIR}/Project/Debug/bar${CMAKE_EXECUTABLE_SUFFIX}") -if(EXISTS +if(EXISTS "${BuildDepends_BINARY_DIR}/Project/Debug/zot${CMAKE_EXECUTABLE_SUFFIX}" ) message("found debug") -endif(EXISTS +endif(EXISTS "${BuildDepends_BINARY_DIR}/Project/Debug/zot${CMAKE_EXECUTABLE_SUFFIX}") message("Running ${bar} ") diff --git a/Tests/CMakeBuildTest.cmake.in b/Tests/CMakeBuildTest.cmake.in index a8bb75090e3..02206deba57 100644 --- a/Tests/CMakeBuildTest.cmake.in +++ b/Tests/CMakeBuildTest.cmake.in @@ -7,10 +7,10 @@ make_directory("@CMAKE_BUILD_TEST_BINARY_DIR@") message("Remove: @CMAKE_BUILD_TEST_SOURCE_DIR@/CMakeCache.txt") file(REMOVE "@CMAKE_BUILD_TEST_SOURCE_DIR@/CMakeCache.txt") -# run cmake in the binary directory +# run cmake in the binary directory message("running: ${CMAKE_COMMAND}") execute_process(COMMAND "${CMAKE_COMMAND}" - "@CMAKE_BUILD_TEST_SOURCE_DIR@" + "@CMAKE_BUILD_TEST_SOURCE_DIR@" "-G@CMAKE_TEST_GENERATOR@" WORKING_DIRECTORY "@CMAKE_BUILD_TEST_BINARY_DIR@" RESULT_VARIABLE RESULT) @@ -20,7 +20,7 @@ endif(RESULT) # Now use the --build option to build the project message("running: ${CMAKE_COMMAND} --build") -execute_process(COMMAND "${CMAKE_COMMAND}" +execute_process(COMMAND "${CMAKE_COMMAND}" --build "@CMAKE_BUILD_TEST_BINARY_DIR@" --config Debug RESULT_VARIABLE RESULT) if(RESULT) @@ -29,7 +29,7 @@ endif(RESULT) # check for configuration types set(CMAKE_CONFIGURATION_TYPES @CMAKE_CONFIGURATION_TYPES@) -# run the executable out of the Debug directory if there +# run the executable out of the Debug directory if there # are configuration types if(CMAKE_CONFIGURATION_TYPES) set(RUN_TEST "@CMAKE_BUILD_TEST_BINARY_DIR@/Debug/@CMAKE_BUILD_TEST_EXE@") @@ -44,15 +44,15 @@ if(RESULT) endif(RESULT) # build it again with clean and only @CMAKE_BUILD_TEST_EXE@ target -execute_process(COMMAND "${CMAKE_COMMAND}" - --build "@CMAKE_BUILD_TEST_BINARY_DIR@" --config Debug +execute_process(COMMAND "${CMAKE_COMMAND}" + --build "@CMAKE_BUILD_TEST_BINARY_DIR@" --config Debug --clean-first --target @CMAKE_BUILD_TEST_EXE@ RESULT_VARIABLE RESULT) if(RESULT) message(FATAL_ERROR "Error running cmake --build") endif(RESULT) -# run it again after clean +# run it again after clean execute_process(COMMAND "${RUN_TEST}" RESULT_VARIABLE RESULT) if(RESULT) message(FATAL_ERROR "Error running test @CMAKE_BUILD_TEST_EXE@ after clean ") diff --git a/Tests/CMakeTests/ToolchainTest.cmake.in b/Tests/CMakeTests/ToolchainTest.cmake.in index e4a2e481335..17994564695 100644 --- a/Tests/CMakeTests/ToolchainTest.cmake.in +++ b/Tests/CMakeTests/ToolchainTest.cmake.in @@ -55,7 +55,7 @@ set(CMAKE_HOST_SYSTEM_PROCESSOR) ############################################################ -# now define a toolchain file and check that everything is +# now define a toolchain file and check that everything is # detected correctly and nothing predefined is overwritten set(CMAKE_TOOLCHAIN_FILE "${MY_SOURCE_DIR}/DummyToolchain.cmake") diff --git a/Tests/COnly/libc2.h b/Tests/COnly/libc2.h index a99d8984e7b..2713d71ae74 100644 --- a/Tests/COnly/libc2.h +++ b/Tests/COnly/libc2.h @@ -5,7 +5,7 @@ # define CM_TEST_LIB_EXPORT __declspec( dllimport ) # endif #else -# define CM_TEST_LIB_EXPORT +# define CM_TEST_LIB_EXPORT #endif CM_TEST_LIB_EXPORT float LibC2Func(); diff --git a/Tests/CPackComponents/CMakeLists.txt b/Tests/CPackComponents/CMakeLists.txt index 58f5bdffeef..1cb86696a7e 100644 --- a/Tests/CPackComponents/CMakeLists.txt +++ b/Tests/CPackComponents/CMakeLists.txt @@ -36,7 +36,7 @@ endif() # Create installation targets. Note that we put each kind of file # into a different component via COMPONENT. These components will # be used to create the installation components. -install(TARGETS mylib +install(TARGETS mylib ARCHIVE DESTINATION lib COMPONENT libraries) diff --git a/Tests/CTestScriptMode/CTestTestScriptMode.cmake.in b/Tests/CTestScriptMode/CTestTestScriptMode.cmake.in index 0c4394faa43..7731710b4fc 100644 --- a/Tests/CTestScriptMode/CTestTestScriptMode.cmake.in +++ b/Tests/CTestScriptMode/CTestTestScriptMode.cmake.in @@ -7,7 +7,7 @@ if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "${CMAKE_CMAKE_SYSTEM_NAME}") message(FATAL_ERROR "Error: CMAKE_SYSTEM_NAME is \"${CMAKE_SYSTEM_NAME}\", but should be \"@CMAKE_SYSTEM_NAME@\"") endif(NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "${CMAKE_CMAKE_SYSTEM_NAME}") -# this seems to be necessary, otherwise ctest complains that these +# this seems to be necessary, otherwise ctest complains that these # variables are not set: set(CTEST_COMMAND "\"@CMAKE_CTEST_COMMAND@\"") set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestScriptMode/") diff --git a/Tests/CTestTest/test.cmake.in b/Tests/CTestTest/test.cmake.in index eac5eab204b..5fede3390b1 100644 --- a/Tests/CTestTest/test.cmake.in +++ b/Tests/CTestTest/test.cmake.in @@ -6,13 +6,13 @@ # this is the cvs module name that should be checked out SET (CTEST_MODULE_NAME SmallAndFast) -# these are the the name of the source and binary directory on disk. +# these are the the name of the source and binary directory on disk. # They will be appended to DASHBOARD_ROOT SET (CTEST_SOURCE_NAME SmallAndFast) SET (CTEST_BINARY_NAME SmallAndFastBuild) # which ctest command to use for running the dashboard -SET (CTEST_COMMAND +SET (CTEST_COMMAND "\"${CTEST_EXECUTABLE_NAME}\" --version" "\"${CTEST_EXECUTABLE_NAME}\" -D Experimental -A \"${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}\"" ) @@ -54,7 +54,7 @@ MEMORYCHECK_COMMAND_OPTIONS:STRING=@MEMORYCHECK_COMMAND_OPTIONS@ COVERAGE_COMMAND:FILEPATH=@COVERAGE_COMMAND@ ") -# if you do not want to use the default location for a +# if you do not want to use the default location for a # dashboard then set this variable to the directory # the dashboard should be in SET (CTEST_DASHBOARD_ROOT "@CMAKE_CURRENT_BINARY_DIR@/Tests/CTestTest") diff --git a/Tests/Complex/CMakeLists.txt b/Tests/Complex/CMakeLists.txt index ec3ad3985f2..080428d58fa 100644 --- a/Tests/Complex/CMakeLists.txt +++ b/Tests/Complex/CMakeLists.txt @@ -27,7 +27,7 @@ MACRO(ASSERT value msg) MESSAGE ("Assertion failure:" ${msg} ) ENDIF (NOT ${value}) ENDMACRO(ASSERT) - + # invoke the macro ASSERT(Complex_BINARY_DIR "The PROJECT command is broken") @@ -40,7 +40,7 @@ MACRO(TEST_ARGC value1 value2) ADD_DEFINITIONS(${ARGV2} ${ARGV3}) ENDIF (${ARGC} MATCHES 4) ENDMACRO(TEST_ARGC) - + # invoke the macro TEST_ARGC(-DCMAKE_ARGV1 -DCMAKE_ARGV2 -DCMAKE_ARGV3 -DCMAKE_ARGV4) @@ -111,7 +111,7 @@ ENDIF(${fooCACHE_TEST_VAR2} MATCHES bar) # -# Specify include and lib dirs +# Specify include and lib dirs # (BEFORE is for coverage) # INCLUDE_DIRECTORIES( @@ -151,9 +151,9 @@ MESSAGE("\nIgnore this message") OPTION(NO_EXEC_PROGRAM "Do not test EXEC_PROGRAM" 0) IF (NOT NO_EXEC_PROGRAM) EXEC_PROGRAM(${CMAKE_COMMAND} ARGS -E echo NO_EXEC_PROGRAM "${Complex_BINARY_DIR}") -ELSE (NOT NO_EXEC_PROGRAM) +ELSE (NOT NO_EXEC_PROGRAM) MESSAGE("Set this option ON") -ENDIF (NOT NO_EXEC_PROGRAM) +ENDIF (NOT NO_EXEC_PROGRAM) MARK_AS_ADVANCED(NO_EXEC_PROGRAM) MARK_AS_ADVANCED(CLEAR NO_EXEC_PROGRAM) @@ -247,12 +247,12 @@ IF(NOT FIND_DUMMY_STLIB_VERSIONED MATCHES "/libdummylib${CMAKE_STATIC_LIBRARY_SU ENDIF() # -# Test SET_SOURCE_FILES_PROPERTIES +# Test SET_SOURCE_FILES_PROPERTIES # -SET_SOURCE_FILES_PROPERTIES(nonexisting_file2 - GENERATED - ABSTRACT - WRAP_EXCLUDE +SET_SOURCE_FILES_PROPERTIES(nonexisting_file2 + GENERATED + ABSTRACT + WRAP_EXCLUDE COMPILE_FLAGS "-foo -bar") GET_SOURCE_FILE_PROPERTY(FILE_HAS_ABSTRACT nonexisting_file2 ABSTRACT) @@ -320,7 +320,7 @@ ENDWHILE(while_var LESS 1000) SET(SHOULD_BE_ZERO ) SET(SHOULD_BE_ONE 1) -# test elseif functionality, the mess below tries to catch problem +# test elseif functionality, the mess below tries to catch problem # of clauses being executed early or late etc set (RESULT 3) if (RESULT EQUAL 1) @@ -328,7 +328,7 @@ if (RESULT EQUAL 1) set (ELSEIF_RESULT 1) elseif (RESULT EQUAL 3) set (ELSEIF_RESULT 1) - endif (RESULT EQUAL 2) + endif (RESULT EQUAL 2) elseif (RESULT EQUAL 2) set (ELSEIF_RESULT 1) elseif (RESULT EQUAL 3) @@ -337,20 +337,20 @@ elseif (RESULT EQUAL 3) elseif (RESULT EQUAL 3) if (NOT ELSEIF_RESULT EQUAL 1) set (ELSEIF_RESULT 2) - endif (NOT ELSEIF_RESULT EQUAL 1) - endif (RESULT EQUAL 2) + endif (NOT ELSEIF_RESULT EQUAL 1) + endif (RESULT EQUAL 2) elseif (RESULT EQUAL 4) if (RESULT EQUAL 2) set (ELSEIF_RESULT 1) elseif (RESULT EQUAL 3) set (ELSEIF_RESULT 1) - endif (RESULT EQUAL 2) + endif (RESULT EQUAL 2) else (RESULT EQUAL 1) if (RESULT EQUAL 2) set (ELSEIF_RESULT 1) elseif (RESULT EQUAL 3) set (ELSEIF_RESULT 1) - endif (RESULT EQUAL 2) + endif (RESULT EQUAL 2) endif (RESULT EQUAL 1) if (NOT ELSEIF_RESULT EQUAL 2) @@ -364,7 +364,7 @@ endif() # -# Configure file +# Configure file # (plug vars to #define so that they can be tested) # CONFIGURE_FILE( diff --git a/Tests/Complex/Executable/CMakeLists.txt b/Tests/Complex/Executable/CMakeLists.txt index 345836257f9..6ccdaf02611 100644 --- a/Tests/Complex/Executable/CMakeLists.txt +++ b/Tests/Complex/Executable/CMakeLists.txt @@ -1,6 +1,6 @@ CMAKE_MINIMUM_REQUIRED(VERSION 1.3) # -# Create exe. +# Create exe. # SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTEST_CXX_FLAGS") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DTEST_C_FLAGS") @@ -22,7 +22,7 @@ IF(TARGET NotATarget) MESSAGE(FATAL_ERROR "IF(TARGET NotATarget) returned true!") ENDIF(TARGET NotATarget) - # Use LINK_LIBRARIES instead of TARGET_LINK_LIBRARIES to + # Use LINK_LIBRARIES instead of TARGET_LINK_LIBRARIES to SET(COMPLEX_LIBS CMakeTestLibrary;CMakeTestLibraryShared;CMakeTestCLibraryShared) LINK_LIBRARIES(${COMPLEX_LIBS}) diff --git a/Tests/Complex/Executable/Temp/CMakeLists.txt b/Tests/Complex/Executable/Temp/CMakeLists.txt index f0095502922..989765e3ab0 100644 --- a/Tests/Complex/Executable/Temp/CMakeLists.txt +++ b/Tests/Complex/Executable/Temp/CMakeLists.txt @@ -4,5 +4,5 @@ # The contents of this file is not tested (absolute paths). # OUTPUT_REQUIRED_FILES( - ${Complex_SOURCE_DIR}/Executable/complex.cxx - ${Complex_BINARY_DIR}/Executable/Temp/complex-required.txt) + ${Complex_SOURCE_DIR}/Executable/complex.cxx + ${Complex_BINARY_DIR}/Executable/Temp/complex-required.txt) diff --git a/Tests/Complex/Executable/complex.cxx b/Tests/Complex/Executable/complex.cxx index 1901d9914ad..27d70adc817 100644 --- a/Tests/Complex/Executable/complex.cxx +++ b/Tests/Complex/Executable/complex.cxx @@ -33,7 +33,7 @@ int cm_failed = 0; void cmFailed(const char* Message, const char* m2= "", const char* m3 = "") { - std::cout << "FAILED: " << Message << m2 << m3 << "\n"; + std::cout << "FAILED: " << Message << m2 << m3 << "\n"; cm_failed++; } @@ -41,7 +41,7 @@ void cmFailed(const char* Message, const char* m2= "", const char* m3 = "") void cmPassed(const char* Message, const char* m2="") { - std::cout << "Passed: " << Message << m2 << "\n"; + std::cout << "Passed: " << Message << m2 << "\n"; cm_passed++; } @@ -67,7 +67,7 @@ void cmPassed(const char* Message, const char* m2="") // ====================================================================== -void TestAndRemoveFile(const char* filename) +void TestAndRemoveFile(const char* filename) { struct stat st; if(stat(filename, &st) < 0) @@ -89,7 +89,7 @@ void TestAndRemoveFile(const char* filename) // ====================================================================== -void TestDir(const char* filename) +void TestDir(const char* filename) { struct stat st; if(stat(filename, &st) < 0 || !S_ISDIR(st.st_mode)) @@ -113,7 +113,7 @@ void ForceStringUse() std::string cachetest = CACHE_TEST_VAR_INTERNAL; v.push_back(cachetest); v2 = v; - std::string x(5,'x'); + std::string x(5,'x'); char buff[5]; x.copy(buff, 1, 0); x[0] = 'a'; @@ -165,7 +165,7 @@ int main() #else cmPassed("COMPILE_FLAGS did work with SET_TARGET_PROPERTIES"); #endif - + #ifdef ELSEIF_RESULT cmPassed("ELSEIF did work"); #else @@ -228,8 +228,8 @@ int main() #else cmPassed("CMAKE_IS_FUN is defined."); #endif - -#if defined(CMAKE_ARGV1) && defined(CMAKE_ARGV2) && defined(CMAKE_ARGV3) && defined(CMAKE_ARGV4) + +#if defined(CMAKE_ARGV1) && defined(CMAKE_ARGV2) && defined(CMAKE_ARGV3) && defined(CMAKE_ARGV4) cmPassed("Variable args for MACROs are working."); #else cmFailed("Variable args for MACROs are failing."); @@ -250,7 +250,7 @@ int main() #else cmPassed("CMake found the parent directory properly"); #endif - + // ---------------------------------------------------------------------- // Test GET_DIRECTORY_PROPERTY for listfiles #ifndef CMAKE_FOUND_LISTFILE_STACK @@ -258,7 +258,7 @@ int main() #else cmPassed("CMake found the listfile stack properly"); #endif - + // ---------------------------------------------------------------------- // Test SET, VARIABLE_REQUIRES @@ -267,38 +267,38 @@ int main() #else cmPassed("SHOULD_NOT_BE_DEFINED is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED cmFailed("IF or SET is broken, SHOULD_BE_DEFINED is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED is defined."); #endif - + #ifndef ONE_VAR cmFailed("cmakedefine is broken, ONE_VAR is not defined."); #else cmPassed("ONE_VAR is defined."); #endif - + #ifndef ONE_VAR_IS_DEFINED cmFailed("cmakedefine, SET or VARIABLE_REQUIRES is broken, " "ONE_VAR_IS_DEFINED is not defined."); #else cmPassed("ONE_VAR_IS_DEFINED is defined."); #endif - + #ifdef ZERO_VAR cmFailed("cmakedefine is broken, ZERO_VAR is defined."); #else cmPassed("ZERO_VAR is not defined."); #endif - + #ifndef STRING_VAR cmFailed("the CONFIGURE_FILE command is broken, STRING_VAR is not defined."); #else if(strcmp(STRING_VAR, "CMake is great") != 0) { - cmFailed("the SET or CONFIGURE_FILE command is broken. STRING_VAR == ", + cmFailed("the SET or CONFIGURE_FILE command is broken. STRING_VAR == ", STRING_VAR); } else @@ -315,145 +315,145 @@ int main() #else cmPassed("SHOULD_NOT_BE_DEFINED_NOT is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED_NOT cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_NOT is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED_NOT is defined."); #endif - + #ifdef SHOULD_NOT_BE_DEFINED_NOT2 cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_NOT2 is defined."); #else cmPassed("SHOULD_NOT_BE_DEFINED_NOT2 is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED_NOT2 cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_NOT2 is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED_NOT2 is defined."); #endif - + #ifdef SHOULD_NOT_BE_DEFINED_AND cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_AND is defined."); #else cmPassed("SHOULD_NOT_BE_DEFINED_AND is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED_AND cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_AND is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED_AND is defined."); #endif - + #ifdef SHOULD_NOT_BE_DEFINED_AND2 cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_AND2 is defined."); #else cmPassed("SHOULD_NOT_BE_DEFINED_AND2 is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED_AND2 cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_AND2 is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED_AND2 is defined."); #endif - + #ifdef SHOULD_NOT_BE_DEFINED_OR cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_OR is defined."); #else cmPassed("SHOULD_NOT_BE_DEFINED_OR is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED_OR cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_OR is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED_OR is defined."); #endif - + #ifdef SHOULD_NOT_BE_DEFINED_OR2 cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_OR2 is defined."); #else cmPassed("SHOULD_NOT_BE_DEFINED_OR2 is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED_OR2 cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_OR2 is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED_OR2 is defined."); #endif - + #ifdef SHOULD_NOT_BE_DEFINED_MATCHES cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_MATCHES is defined."); #else cmPassed("SHOULD_NOT_BE_DEFINED_MATCHES is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED_MATCHES cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_MATCHES is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED_MATCHES is defined."); #endif - + #ifdef SHOULD_NOT_BE_DEFINED_MATCHES2 cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_MATCHES2 is defined."); #else cmPassed("SHOULD_NOT_BE_DEFINED_MATCHES2 is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED_MATCHES2 cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_MATCHES2 is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED_MATCHES2 is defined."); #endif - + #ifdef SHOULD_NOT_BE_DEFINED_COMMAND cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_COMMAND is defined."); #else cmPassed("SHOULD_NOT_BE_DEFINED_COMMAND is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED_COMMAND cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_COMMAND is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED_COMMAND is defined."); #endif - + #ifdef SHOULD_NOT_BE_DEFINED_COMMAND2 cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_COMMAND2 is defined."); #else cmPassed("SHOULD_NOT_BE_DEFINED_COMMAND2 is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED_COMMAND2 cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_COMMAND2 is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED_COMMAND2 is defined."); #endif - + #ifdef SHOULD_NOT_BE_DEFINED_EXISTS cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_EXISTS is defined."); #else cmPassed("SHOULD_NOT_BE_DEFINED_EXISTS is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED_EXISTS cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_EXISTS is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED_EXISTS is defined."); #endif - + #ifdef SHOULD_NOT_BE_DEFINED_EXISTS2 cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_EXISTS2 is defined."); #else cmPassed("SHOULD_NOT_BE_DEFINED_EXISTS2 is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED_EXISTS2 cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_EXISTS2 is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED_EXISTS2 is defined."); #endif - + #ifndef SHOULD_BE_DEFINED_IS_DIRECTORY cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_IS_DIRECTORY is not defined.\n"); #else @@ -471,31 +471,31 @@ int main() #else cmPassed("SHOULD_NOT_BE_DEFINED_LESS is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED_LESS cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_LESS is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED_LESS is defined."); #endif - + #ifdef SHOULD_NOT_BE_DEFINED_LESS2 cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_LESS2 is defined."); #else cmPassed("SHOULD_NOT_BE_DEFINED_LESS2 is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED_LESS2 cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_LESS2 is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED_LESS2 is defined."); #endif - + #ifdef SHOULD_NOT_BE_DEFINED_GREATER cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_GREATER is defined."); #else cmPassed("SHOULD_NOT_BE_DEFINED_GREATER is not defined."); #endif - + #ifdef SHOULD_NOT_BE_DEFINED_EQUAL cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_EQUAL is defined."); #else @@ -513,67 +513,67 @@ int main() #else cmPassed("SHOULD_BE_DEFINED_GREATER is defined."); #endif - + #ifdef SHOULD_NOT_BE_DEFINED_GREATER2 cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_GREATER2 is defined."); #else cmPassed("SHOULD_NOT_BE_DEFINED_GREATER2 is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED_GREATER2 cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_GREATER2 is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED_GREATER2 is defined."); #endif - + #ifdef SHOULD_NOT_BE_DEFINED_STRLESS cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_STRLESS is defined."); #else cmPassed("SHOULD_NOT_BE_DEFINED_STRLESS is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED_STRLESS cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_STRLESS is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED_STRLESS is defined."); #endif - + #ifdef SHOULD_NOT_BE_DEFINED_STRLESS2 cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_STRLESS2 is defined."); #else cmPassed("SHOULD_NOT_BE_DEFINED_STRLESS2 is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED_STRLESS2 cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_STRLESS2 is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED_STRLESS2 is defined."); #endif - + #ifdef SHOULD_NOT_BE_DEFINED_STRGREATER cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_STRGREATER is defined."); #else cmPassed("SHOULD_NOT_BE_DEFINED_STRGREATER is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED_STRGREATER cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_STRGREATER is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED_STRGREATER is defined."); #endif - + #ifdef SHOULD_NOT_BE_DEFINED_STRGREATER2 cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_STRGREATER2 is defined."); #else cmPassed("SHOULD_NOT_BE_DEFINED_STRGREATER2 is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED_STRGREATER2 cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_STRGREATER2 is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED_STRGREATER2 is defined."); #endif - + // ---------------------------------------------------------------------- // Test FOREACH @@ -624,7 +624,7 @@ int main() // ---------------------------------------------------------------------- // Test WHILE - + if(WHILE_VALUE != 1000) { cmFailed("WHILE command is not working"); @@ -814,7 +814,7 @@ int main() // only created during a build. TestAndRemoveFile(BINARY_DIR "/Library/custom_target1.txt"); - + // ---------------------------------------------------------------------- // A directory has been created. @@ -890,7 +890,7 @@ int main() #else if(strcmp(FILE_COMPILE_FLAGS, "-foo -bar") != 0) { - cmFailed("the SET_SOURCE_FILES_PROPERTIES or CONFIGURE_FILE command is broken. FILE_COMPILE_FLAGS == ", + cmFailed("the SET_SOURCE_FILES_PROPERTIES or CONFIGURE_FILE command is broken. FILE_COMPILE_FLAGS == ", FILE_COMPILE_FLAGS); } else @@ -908,7 +908,7 @@ int main() std::cout << "REGISTRY_TEST_PATH == " << REGISTRY_TEST_PATH << "\n"; if(stricmp(REGISTRY_TEST_PATH, BINARY_DIR "/registry_dir") != 0) { - cmFailed("the 'read registry value' function or CONFIGURE_FILE command is broken. REGISTRY_TEST_PATH == ", + cmFailed("the 'read registry value' function or CONFIGURE_FILE command is broken. REGISTRY_TEST_PATH == ", REGISTRY_TEST_PATH, " is not " BINARY_DIR "/registry_dir"); } else @@ -937,7 +937,7 @@ int main() { cmFailed("REMOVE is not working"); } - + // ---------------------------------------------------------------------- // Test SEPARATE_ARGUMENTS if(strcmp("a;b;c", TEST_SEP) == 0) @@ -948,7 +948,7 @@ int main() { cmFailed("SEPARATE_ARGUMENTS is not working"); } - + // ---------------------------------------------------------------------- // Test Escape Quotes if(strcmp("\"hello world\"", STRING_WITH_QUOTES) == 0) @@ -959,8 +959,8 @@ int main() { cmFailed("ESCAPE_QUOTES is not working"); } - - + + // ---------------------------------------------------------------------- // Test if IF command inside a FOREACH works. #if defined(IF_INSIDE_FOREACH_THEN_EXECUTED) && !defined(IF_INSIDE_FOREACH_ELSE_EXECUTED) @@ -981,7 +981,7 @@ int main() else { cmFailed("cmakedefine01 is not working for 0"); - } + } if(SHOULD_BE_ONE == 1) { cmPassed("cmakedefine01 is working for 1"); @@ -989,7 +989,7 @@ int main() else { cmFailed("cmakedefine01 is not working for 1"); - } + } #ifdef FORCE_TEST cmFailed("CMake SET CACHE FORCE"); #else diff --git a/Tests/Complex/Executable/testcflags.c b/Tests/Complex/Executable/testcflags.c index f4d58484429..6c2dd5db323 100644 --- a/Tests/Complex/Executable/testcflags.c +++ b/Tests/Complex/Executable/testcflags.c @@ -18,7 +18,7 @@ int TestCFlags(char* m) return 0; #endif /* TEST_C_FLAGS should be defined in a c file */ -#ifndef TEST_C_FLAGS +#ifndef TEST_C_FLAGS strcpy(m, "CMake CMAKE_C_FLAGS (TEST_C_FLAGS) not found in c file."); return 0; #endif diff --git a/Tests/Complex/Library/CMakeLists.txt b/Tests/Complex/Library/CMakeLists.txt index c8efc302268..becf6720782 100644 --- a/Tests/Complex/Library/CMakeLists.txt +++ b/Tests/Complex/Library/CMakeLists.txt @@ -15,12 +15,12 @@ SET_TARGET_PROPERTIES(create_file PROPERTIES RUNTIME_OUTPUT_DIRECTORY ".") # AUX_SOURCE_DIRECTORY(ExtraSources LibrarySources) SET(LibrarySources ${LibrarySources} - file2 - empty - create_file.cxx - GENERATED + file2 + empty + create_file.cxx + GENERATED nonexisting_file) -REMOVE(LibrarySources create_file.cxx GENERATED nonexisting_file) +REMOVE(LibrarySources create_file.cxx GENERATED nonexisting_file) ADD_LIBRARY(CMakeTestLibrary ${LibrarySources}) IF(WIN32) @@ -28,10 +28,10 @@ IF(WIN32) IF(NOT BORLAND) IF(NOT MINGW) TARGET_LINK_LIBRARIES(CMakeTestLibrary - debug + debug user32.lib) TARGET_LINK_LIBRARIES(CMakeTestLibrary - optimized + optimized kernel32.lib) ENDIF(NOT MINGW) ENDIF(NOT BORLAND) @@ -97,7 +97,7 @@ ADD_CUSTOM_COMMAND(TARGET CMakeTestLibraryShared POST_BUILD # ADD_CUSTOM_TARGET(custom_target1 ALL - ${CREATE_FILE_EXE} + ${CREATE_FILE_EXE} "${Complex_BINARY_DIR}/Library/custom_target1.txt") ADD_DEPENDENCIES(custom_target1 create_file) diff --git a/Tests/Complex/Library/create_file.cxx b/Tests/Complex/Library/create_file.cxx index d41551980a3..050ed0bac33 100644 --- a/Tests/Complex/Library/create_file.cxx +++ b/Tests/Complex/Library/create_file.cxx @@ -8,7 +8,7 @@ int main (int argc, char *argv[]) fprintf(stderr, "Missing name of file to create.\n"); return EXIT_FAILURE; } - + FILE *stream = fopen(argv[1], "w"); if(stream == NULL) { @@ -23,6 +23,6 @@ int main (int argc, char *argv[]) } fprintf(stdout, ">> Creating %s!\n", argv[1]); - + return EXIT_SUCCESS; } diff --git a/Tests/Complex/Library/testConly.c b/Tests/Complex/Library/testConly.c index 2d83f778e0c..a7d20b0b58c 100644 --- a/Tests/Complex/Library/testConly.c +++ b/Tests/Complex/Library/testConly.c @@ -7,7 +7,7 @@ int CsharedFunction() printf("TEST_C_FLAGS failed\n"); return 0; #else - printf("Passed: TEST_C_FLAGS passed\n"); -#endif + printf("Passed: TEST_C_FLAGS passed\n"); +#endif return 1; } diff --git a/Tests/Complex/Library/testConly.h b/Tests/Complex/Library/testConly.h index f1470a8d7e1..ba8458923d0 100644 --- a/Tests/Complex/Library/testConly.h +++ b/Tests/Complex/Library/testConly.h @@ -10,4 +10,4 @@ #endif CMakeTest_EXPORT int CsharedFunction(); - + diff --git a/Tests/ComplexOneConfig/CMakeLists.txt b/Tests/ComplexOneConfig/CMakeLists.txt index b50501905c3..500431cf273 100644 --- a/Tests/ComplexOneConfig/CMakeLists.txt +++ b/Tests/ComplexOneConfig/CMakeLists.txt @@ -27,7 +27,7 @@ MACRO(ASSERT value msg) MESSAGE ("Assertion failure:" ${msg} ) ENDIF (NOT ${value}) ENDMACRO(ASSERT) - + # invoke the macro ASSERT(Complex_BINARY_DIR "The PROJECT command is broken") @@ -40,7 +40,7 @@ MACRO(TEST_ARGC value1 value2) ADD_DEFINITIONS(${ARGV2} ${ARGV3}) ENDIF (${ARGC} MATCHES 4) ENDMACRO(TEST_ARGC) - + # invoke the macro TEST_ARGC(-DCMAKE_ARGV1 -DCMAKE_ARGV2 -DCMAKE_ARGV3 -DCMAKE_ARGV4) @@ -111,7 +111,7 @@ ENDIF(${fooCACHE_TEST_VAR2} MATCHES bar) # -# Specify include and lib dirs +# Specify include and lib dirs # (BEFORE is for coverage) # INCLUDE_DIRECTORIES( @@ -151,9 +151,9 @@ MESSAGE("\nIgnore this message") OPTION(NO_EXEC_PROGRAM "Do not test EXEC_PROGRAM" 0) IF (NOT NO_EXEC_PROGRAM) EXEC_PROGRAM(${CMAKE_COMMAND} ARGS -E echo NO_EXEC_PROGRAM "${Complex_BINARY_DIR}") -ELSE (NOT NO_EXEC_PROGRAM) +ELSE (NOT NO_EXEC_PROGRAM) MESSAGE("Set this option ON") -ENDIF (NOT NO_EXEC_PROGRAM) +ENDIF (NOT NO_EXEC_PROGRAM) MARK_AS_ADVANCED(NO_EXEC_PROGRAM) MARK_AS_ADVANCED(CLEAR NO_EXEC_PROGRAM) @@ -217,12 +217,12 @@ FIND_LIBRARY(FIND_DUMMY_LIB ${Complex_BINARY_DIR}/Library DOC "find dummy lib") # -# Test SET_SOURCE_FILES_PROPERTIES +# Test SET_SOURCE_FILES_PROPERTIES # -SET_SOURCE_FILES_PROPERTIES(nonexisting_file2 - GENERATED - ABSTRACT - WRAP_EXCLUDE +SET_SOURCE_FILES_PROPERTIES(nonexisting_file2 + GENERATED + ABSTRACT + WRAP_EXCLUDE COMPILE_FLAGS "-foo -bar") GET_SOURCE_FILE_PROPERTY(FILE_HAS_ABSTRACT nonexisting_file2 ABSTRACT) @@ -290,7 +290,7 @@ ENDWHILE(while_var LESS 1000) SET(SHOULD_BE_ZERO ) SET(SHOULD_BE_ONE 1) -# test elseif functionality, the mess below tries to catch problem +# test elseif functionality, the mess below tries to catch problem # of clauses being executed early or late etc set (RESULT 3) if (RESULT EQUAL 1) @@ -298,7 +298,7 @@ if (RESULT EQUAL 1) set (ELSEIF_RESULT 1) elseif (RESULT EQUAL 3) set (ELSEIF_RESULT 1) - endif (RESULT EQUAL 2) + endif (RESULT EQUAL 2) elseif (RESULT EQUAL 2) set (ELSEIF_RESULT 1) elseif (RESULT EQUAL 3) @@ -307,20 +307,20 @@ elseif (RESULT EQUAL 3) elseif (RESULT EQUAL 3) if (NOT ELSEIF_RESULT EQUAL 1) set (ELSEIF_RESULT 2) - endif (NOT ELSEIF_RESULT EQUAL 1) - endif (RESULT EQUAL 2) + endif (NOT ELSEIF_RESULT EQUAL 1) + endif (RESULT EQUAL 2) elseif (RESULT EQUAL 4) if (RESULT EQUAL 2) set (ELSEIF_RESULT 1) elseif (RESULT EQUAL 3) set (ELSEIF_RESULT 1) - endif (RESULT EQUAL 2) + endif (RESULT EQUAL 2) else (RESULT EQUAL 1) if (RESULT EQUAL 2) set (ELSEIF_RESULT 1) elseif (RESULT EQUAL 3) set (ELSEIF_RESULT 1) - endif (RESULT EQUAL 2) + endif (RESULT EQUAL 2) endif (RESULT EQUAL 1) if (NOT ELSEIF_RESULT EQUAL 2) @@ -334,7 +334,7 @@ endif() # -# Configure file +# Configure file # (plug vars to #define so that they can be tested) # CONFIGURE_FILE( diff --git a/Tests/ComplexOneConfig/Executable/CMakeLists.txt b/Tests/ComplexOneConfig/Executable/CMakeLists.txt index 345836257f9..6ccdaf02611 100644 --- a/Tests/ComplexOneConfig/Executable/CMakeLists.txt +++ b/Tests/ComplexOneConfig/Executable/CMakeLists.txt @@ -1,6 +1,6 @@ CMAKE_MINIMUM_REQUIRED(VERSION 1.3) # -# Create exe. +# Create exe. # SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTEST_CXX_FLAGS") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DTEST_C_FLAGS") @@ -22,7 +22,7 @@ IF(TARGET NotATarget) MESSAGE(FATAL_ERROR "IF(TARGET NotATarget) returned true!") ENDIF(TARGET NotATarget) - # Use LINK_LIBRARIES instead of TARGET_LINK_LIBRARIES to + # Use LINK_LIBRARIES instead of TARGET_LINK_LIBRARIES to SET(COMPLEX_LIBS CMakeTestLibrary;CMakeTestLibraryShared;CMakeTestCLibraryShared) LINK_LIBRARIES(${COMPLEX_LIBS}) diff --git a/Tests/ComplexOneConfig/Executable/Temp/CMakeLists.txt b/Tests/ComplexOneConfig/Executable/Temp/CMakeLists.txt index f0095502922..989765e3ab0 100644 --- a/Tests/ComplexOneConfig/Executable/Temp/CMakeLists.txt +++ b/Tests/ComplexOneConfig/Executable/Temp/CMakeLists.txt @@ -4,5 +4,5 @@ # The contents of this file is not tested (absolute paths). # OUTPUT_REQUIRED_FILES( - ${Complex_SOURCE_DIR}/Executable/complex.cxx - ${Complex_BINARY_DIR}/Executable/Temp/complex-required.txt) + ${Complex_SOURCE_DIR}/Executable/complex.cxx + ${Complex_BINARY_DIR}/Executable/Temp/complex-required.txt) diff --git a/Tests/ComplexOneConfig/Executable/complex.cxx b/Tests/ComplexOneConfig/Executable/complex.cxx index 1901d9914ad..27d70adc817 100644 --- a/Tests/ComplexOneConfig/Executable/complex.cxx +++ b/Tests/ComplexOneConfig/Executable/complex.cxx @@ -33,7 +33,7 @@ int cm_failed = 0; void cmFailed(const char* Message, const char* m2= "", const char* m3 = "") { - std::cout << "FAILED: " << Message << m2 << m3 << "\n"; + std::cout << "FAILED: " << Message << m2 << m3 << "\n"; cm_failed++; } @@ -41,7 +41,7 @@ void cmFailed(const char* Message, const char* m2= "", const char* m3 = "") void cmPassed(const char* Message, const char* m2="") { - std::cout << "Passed: " << Message << m2 << "\n"; + std::cout << "Passed: " << Message << m2 << "\n"; cm_passed++; } @@ -67,7 +67,7 @@ void cmPassed(const char* Message, const char* m2="") // ====================================================================== -void TestAndRemoveFile(const char* filename) +void TestAndRemoveFile(const char* filename) { struct stat st; if(stat(filename, &st) < 0) @@ -89,7 +89,7 @@ void TestAndRemoveFile(const char* filename) // ====================================================================== -void TestDir(const char* filename) +void TestDir(const char* filename) { struct stat st; if(stat(filename, &st) < 0 || !S_ISDIR(st.st_mode)) @@ -113,7 +113,7 @@ void ForceStringUse() std::string cachetest = CACHE_TEST_VAR_INTERNAL; v.push_back(cachetest); v2 = v; - std::string x(5,'x'); + std::string x(5,'x'); char buff[5]; x.copy(buff, 1, 0); x[0] = 'a'; @@ -165,7 +165,7 @@ int main() #else cmPassed("COMPILE_FLAGS did work with SET_TARGET_PROPERTIES"); #endif - + #ifdef ELSEIF_RESULT cmPassed("ELSEIF did work"); #else @@ -228,8 +228,8 @@ int main() #else cmPassed("CMAKE_IS_FUN is defined."); #endif - -#if defined(CMAKE_ARGV1) && defined(CMAKE_ARGV2) && defined(CMAKE_ARGV3) && defined(CMAKE_ARGV4) + +#if defined(CMAKE_ARGV1) && defined(CMAKE_ARGV2) && defined(CMAKE_ARGV3) && defined(CMAKE_ARGV4) cmPassed("Variable args for MACROs are working."); #else cmFailed("Variable args for MACROs are failing."); @@ -250,7 +250,7 @@ int main() #else cmPassed("CMake found the parent directory properly"); #endif - + // ---------------------------------------------------------------------- // Test GET_DIRECTORY_PROPERTY for listfiles #ifndef CMAKE_FOUND_LISTFILE_STACK @@ -258,7 +258,7 @@ int main() #else cmPassed("CMake found the listfile stack properly"); #endif - + // ---------------------------------------------------------------------- // Test SET, VARIABLE_REQUIRES @@ -267,38 +267,38 @@ int main() #else cmPassed("SHOULD_NOT_BE_DEFINED is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED cmFailed("IF or SET is broken, SHOULD_BE_DEFINED is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED is defined."); #endif - + #ifndef ONE_VAR cmFailed("cmakedefine is broken, ONE_VAR is not defined."); #else cmPassed("ONE_VAR is defined."); #endif - + #ifndef ONE_VAR_IS_DEFINED cmFailed("cmakedefine, SET or VARIABLE_REQUIRES is broken, " "ONE_VAR_IS_DEFINED is not defined."); #else cmPassed("ONE_VAR_IS_DEFINED is defined."); #endif - + #ifdef ZERO_VAR cmFailed("cmakedefine is broken, ZERO_VAR is defined."); #else cmPassed("ZERO_VAR is not defined."); #endif - + #ifndef STRING_VAR cmFailed("the CONFIGURE_FILE command is broken, STRING_VAR is not defined."); #else if(strcmp(STRING_VAR, "CMake is great") != 0) { - cmFailed("the SET or CONFIGURE_FILE command is broken. STRING_VAR == ", + cmFailed("the SET or CONFIGURE_FILE command is broken. STRING_VAR == ", STRING_VAR); } else @@ -315,145 +315,145 @@ int main() #else cmPassed("SHOULD_NOT_BE_DEFINED_NOT is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED_NOT cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_NOT is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED_NOT is defined."); #endif - + #ifdef SHOULD_NOT_BE_DEFINED_NOT2 cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_NOT2 is defined."); #else cmPassed("SHOULD_NOT_BE_DEFINED_NOT2 is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED_NOT2 cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_NOT2 is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED_NOT2 is defined."); #endif - + #ifdef SHOULD_NOT_BE_DEFINED_AND cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_AND is defined."); #else cmPassed("SHOULD_NOT_BE_DEFINED_AND is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED_AND cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_AND is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED_AND is defined."); #endif - + #ifdef SHOULD_NOT_BE_DEFINED_AND2 cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_AND2 is defined."); #else cmPassed("SHOULD_NOT_BE_DEFINED_AND2 is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED_AND2 cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_AND2 is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED_AND2 is defined."); #endif - + #ifdef SHOULD_NOT_BE_DEFINED_OR cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_OR is defined."); #else cmPassed("SHOULD_NOT_BE_DEFINED_OR is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED_OR cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_OR is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED_OR is defined."); #endif - + #ifdef SHOULD_NOT_BE_DEFINED_OR2 cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_OR2 is defined."); #else cmPassed("SHOULD_NOT_BE_DEFINED_OR2 is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED_OR2 cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_OR2 is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED_OR2 is defined."); #endif - + #ifdef SHOULD_NOT_BE_DEFINED_MATCHES cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_MATCHES is defined."); #else cmPassed("SHOULD_NOT_BE_DEFINED_MATCHES is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED_MATCHES cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_MATCHES is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED_MATCHES is defined."); #endif - + #ifdef SHOULD_NOT_BE_DEFINED_MATCHES2 cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_MATCHES2 is defined."); #else cmPassed("SHOULD_NOT_BE_DEFINED_MATCHES2 is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED_MATCHES2 cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_MATCHES2 is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED_MATCHES2 is defined."); #endif - + #ifdef SHOULD_NOT_BE_DEFINED_COMMAND cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_COMMAND is defined."); #else cmPassed("SHOULD_NOT_BE_DEFINED_COMMAND is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED_COMMAND cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_COMMAND is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED_COMMAND is defined."); #endif - + #ifdef SHOULD_NOT_BE_DEFINED_COMMAND2 cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_COMMAND2 is defined."); #else cmPassed("SHOULD_NOT_BE_DEFINED_COMMAND2 is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED_COMMAND2 cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_COMMAND2 is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED_COMMAND2 is defined."); #endif - + #ifdef SHOULD_NOT_BE_DEFINED_EXISTS cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_EXISTS is defined."); #else cmPassed("SHOULD_NOT_BE_DEFINED_EXISTS is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED_EXISTS cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_EXISTS is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED_EXISTS is defined."); #endif - + #ifdef SHOULD_NOT_BE_DEFINED_EXISTS2 cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_EXISTS2 is defined."); #else cmPassed("SHOULD_NOT_BE_DEFINED_EXISTS2 is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED_EXISTS2 cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_EXISTS2 is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED_EXISTS2 is defined."); #endif - + #ifndef SHOULD_BE_DEFINED_IS_DIRECTORY cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_IS_DIRECTORY is not defined.\n"); #else @@ -471,31 +471,31 @@ int main() #else cmPassed("SHOULD_NOT_BE_DEFINED_LESS is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED_LESS cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_LESS is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED_LESS is defined."); #endif - + #ifdef SHOULD_NOT_BE_DEFINED_LESS2 cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_LESS2 is defined."); #else cmPassed("SHOULD_NOT_BE_DEFINED_LESS2 is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED_LESS2 cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_LESS2 is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED_LESS2 is defined."); #endif - + #ifdef SHOULD_NOT_BE_DEFINED_GREATER cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_GREATER is defined."); #else cmPassed("SHOULD_NOT_BE_DEFINED_GREATER is not defined."); #endif - + #ifdef SHOULD_NOT_BE_DEFINED_EQUAL cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_EQUAL is defined."); #else @@ -513,67 +513,67 @@ int main() #else cmPassed("SHOULD_BE_DEFINED_GREATER is defined."); #endif - + #ifdef SHOULD_NOT_BE_DEFINED_GREATER2 cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_GREATER2 is defined."); #else cmPassed("SHOULD_NOT_BE_DEFINED_GREATER2 is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED_GREATER2 cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_GREATER2 is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED_GREATER2 is defined."); #endif - + #ifdef SHOULD_NOT_BE_DEFINED_STRLESS cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_STRLESS is defined."); #else cmPassed("SHOULD_NOT_BE_DEFINED_STRLESS is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED_STRLESS cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_STRLESS is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED_STRLESS is defined."); #endif - + #ifdef SHOULD_NOT_BE_DEFINED_STRLESS2 cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_STRLESS2 is defined."); #else cmPassed("SHOULD_NOT_BE_DEFINED_STRLESS2 is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED_STRLESS2 cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_STRLESS2 is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED_STRLESS2 is defined."); #endif - + #ifdef SHOULD_NOT_BE_DEFINED_STRGREATER cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_STRGREATER is defined."); #else cmPassed("SHOULD_NOT_BE_DEFINED_STRGREATER is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED_STRGREATER cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_STRGREATER is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED_STRGREATER is defined."); #endif - + #ifdef SHOULD_NOT_BE_DEFINED_STRGREATER2 cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_STRGREATER2 is defined."); #else cmPassed("SHOULD_NOT_BE_DEFINED_STRGREATER2 is not defined."); #endif - + #ifndef SHOULD_BE_DEFINED_STRGREATER2 cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_STRGREATER2 is not defined.\n"); #else cmPassed("SHOULD_BE_DEFINED_STRGREATER2 is defined."); #endif - + // ---------------------------------------------------------------------- // Test FOREACH @@ -624,7 +624,7 @@ int main() // ---------------------------------------------------------------------- // Test WHILE - + if(WHILE_VALUE != 1000) { cmFailed("WHILE command is not working"); @@ -814,7 +814,7 @@ int main() // only created during a build. TestAndRemoveFile(BINARY_DIR "/Library/custom_target1.txt"); - + // ---------------------------------------------------------------------- // A directory has been created. @@ -890,7 +890,7 @@ int main() #else if(strcmp(FILE_COMPILE_FLAGS, "-foo -bar") != 0) { - cmFailed("the SET_SOURCE_FILES_PROPERTIES or CONFIGURE_FILE command is broken. FILE_COMPILE_FLAGS == ", + cmFailed("the SET_SOURCE_FILES_PROPERTIES or CONFIGURE_FILE command is broken. FILE_COMPILE_FLAGS == ", FILE_COMPILE_FLAGS); } else @@ -908,7 +908,7 @@ int main() std::cout << "REGISTRY_TEST_PATH == " << REGISTRY_TEST_PATH << "\n"; if(stricmp(REGISTRY_TEST_PATH, BINARY_DIR "/registry_dir") != 0) { - cmFailed("the 'read registry value' function or CONFIGURE_FILE command is broken. REGISTRY_TEST_PATH == ", + cmFailed("the 'read registry value' function or CONFIGURE_FILE command is broken. REGISTRY_TEST_PATH == ", REGISTRY_TEST_PATH, " is not " BINARY_DIR "/registry_dir"); } else @@ -937,7 +937,7 @@ int main() { cmFailed("REMOVE is not working"); } - + // ---------------------------------------------------------------------- // Test SEPARATE_ARGUMENTS if(strcmp("a;b;c", TEST_SEP) == 0) @@ -948,7 +948,7 @@ int main() { cmFailed("SEPARATE_ARGUMENTS is not working"); } - + // ---------------------------------------------------------------------- // Test Escape Quotes if(strcmp("\"hello world\"", STRING_WITH_QUOTES) == 0) @@ -959,8 +959,8 @@ int main() { cmFailed("ESCAPE_QUOTES is not working"); } - - + + // ---------------------------------------------------------------------- // Test if IF command inside a FOREACH works. #if defined(IF_INSIDE_FOREACH_THEN_EXECUTED) && !defined(IF_INSIDE_FOREACH_ELSE_EXECUTED) @@ -981,7 +981,7 @@ int main() else { cmFailed("cmakedefine01 is not working for 0"); - } + } if(SHOULD_BE_ONE == 1) { cmPassed("cmakedefine01 is working for 1"); @@ -989,7 +989,7 @@ int main() else { cmFailed("cmakedefine01 is not working for 1"); - } + } #ifdef FORCE_TEST cmFailed("CMake SET CACHE FORCE"); #else diff --git a/Tests/ComplexOneConfig/Executable/testcflags.c b/Tests/ComplexOneConfig/Executable/testcflags.c index f4d58484429..6c2dd5db323 100644 --- a/Tests/ComplexOneConfig/Executable/testcflags.c +++ b/Tests/ComplexOneConfig/Executable/testcflags.c @@ -18,7 +18,7 @@ int TestCFlags(char* m) return 0; #endif /* TEST_C_FLAGS should be defined in a c file */ -#ifndef TEST_C_FLAGS +#ifndef TEST_C_FLAGS strcpy(m, "CMake CMAKE_C_FLAGS (TEST_C_FLAGS) not found in c file."); return 0; #endif diff --git a/Tests/ComplexOneConfig/Library/CMakeLists.txt b/Tests/ComplexOneConfig/Library/CMakeLists.txt index c8efc302268..becf6720782 100644 --- a/Tests/ComplexOneConfig/Library/CMakeLists.txt +++ b/Tests/ComplexOneConfig/Library/CMakeLists.txt @@ -15,12 +15,12 @@ SET_TARGET_PROPERTIES(create_file PROPERTIES RUNTIME_OUTPUT_DIRECTORY ".") # AUX_SOURCE_DIRECTORY(ExtraSources LibrarySources) SET(LibrarySources ${LibrarySources} - file2 - empty - create_file.cxx - GENERATED + file2 + empty + create_file.cxx + GENERATED nonexisting_file) -REMOVE(LibrarySources create_file.cxx GENERATED nonexisting_file) +REMOVE(LibrarySources create_file.cxx GENERATED nonexisting_file) ADD_LIBRARY(CMakeTestLibrary ${LibrarySources}) IF(WIN32) @@ -28,10 +28,10 @@ IF(WIN32) IF(NOT BORLAND) IF(NOT MINGW) TARGET_LINK_LIBRARIES(CMakeTestLibrary - debug + debug user32.lib) TARGET_LINK_LIBRARIES(CMakeTestLibrary - optimized + optimized kernel32.lib) ENDIF(NOT MINGW) ENDIF(NOT BORLAND) @@ -97,7 +97,7 @@ ADD_CUSTOM_COMMAND(TARGET CMakeTestLibraryShared POST_BUILD # ADD_CUSTOM_TARGET(custom_target1 ALL - ${CREATE_FILE_EXE} + ${CREATE_FILE_EXE} "${Complex_BINARY_DIR}/Library/custom_target1.txt") ADD_DEPENDENCIES(custom_target1 create_file) diff --git a/Tests/ComplexOneConfig/Library/create_file.cxx b/Tests/ComplexOneConfig/Library/create_file.cxx index d41551980a3..050ed0bac33 100644 --- a/Tests/ComplexOneConfig/Library/create_file.cxx +++ b/Tests/ComplexOneConfig/Library/create_file.cxx @@ -8,7 +8,7 @@ int main (int argc, char *argv[]) fprintf(stderr, "Missing name of file to create.\n"); return EXIT_FAILURE; } - + FILE *stream = fopen(argv[1], "w"); if(stream == NULL) { @@ -23,6 +23,6 @@ int main (int argc, char *argv[]) } fprintf(stdout, ">> Creating %s!\n", argv[1]); - + return EXIT_SUCCESS; } diff --git a/Tests/ComplexOneConfig/Library/testConly.c b/Tests/ComplexOneConfig/Library/testConly.c index 2d83f778e0c..a7d20b0b58c 100644 --- a/Tests/ComplexOneConfig/Library/testConly.c +++ b/Tests/ComplexOneConfig/Library/testConly.c @@ -7,7 +7,7 @@ int CsharedFunction() printf("TEST_C_FLAGS failed\n"); return 0; #else - printf("Passed: TEST_C_FLAGS passed\n"); -#endif + printf("Passed: TEST_C_FLAGS passed\n"); +#endif return 1; } diff --git a/Tests/ComplexOneConfig/Library/testConly.h b/Tests/ComplexOneConfig/Library/testConly.h index f1470a8d7e1..ba8458923d0 100644 --- a/Tests/ComplexOneConfig/Library/testConly.h +++ b/Tests/ComplexOneConfig/Library/testConly.h @@ -10,4 +10,4 @@ #endif CMakeTest_EXPORT int CsharedFunction(); - + diff --git a/Tests/CrossCompile/CMakeLists.txt b/Tests/CrossCompile/CMakeLists.txt index 96a57a051f1..fb9a0d732eb 100644 --- a/Tests/CrossCompile/CMakeLists.txt +++ b/Tests/CrossCompile/CMakeLists.txt @@ -9,5 +9,5 @@ SET(CMAKE_CROSSCOMPILING ON) ADD_EXECUTABLE(CrossCompile main.c) TRY_RUN(run_result compile_result - ${CrossCompile_BINARY_DIR} + ${CrossCompile_BINARY_DIR} ${CrossCompile_SOURCE_DIR}/main.c) diff --git a/Tests/CustComDepend/CMakeLists.txt b/Tests/CustComDepend/CMakeLists.txt index d5266842da0..46276b2ef69 100644 --- a/Tests/CustComDepend/CMakeLists.txt +++ b/Tests/CustComDepend/CMakeLists.txt @@ -10,5 +10,5 @@ add_custom_command( ${CustComDepend_BINARY_DIR}/bar.c DEPENDS ${CustComDepend_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/foo ) - + add_library(bar SHARED ${CustComDepend_BINARY_DIR}/bar.c) diff --git a/Tests/CustComDepend/bar.h b/Tests/CustComDepend/bar.h index d462c9b5bd1..d1794642847 100644 --- a/Tests/CustComDepend/bar.h +++ b/Tests/CustComDepend/bar.h @@ -5,5 +5,5 @@ # define BAR_EXPORT __declspec( dllimport ) # endif #else -# define BAR_EXPORT +# define BAR_EXPORT #endif diff --git a/Tests/CustComDepend/foo.cxx b/Tests/CustComDepend/foo.cxx index 3c204f8a2df..19dfcb1430e 100644 --- a/Tests/CustComDepend/foo.cxx +++ b/Tests/CustComDepend/foo.cxx @@ -12,4 +12,4 @@ int main(int ac, char** av) fclose(fout); return 0; } - + diff --git a/Tests/CustomCommand/CMakeLists.txt b/Tests/CustomCommand/CMakeLists.txt index b7c9ea268b2..c1d2ae09d65 100644 --- a/Tests/CustomCommand/CMakeLists.txt +++ b/Tests/CustomCommand/CMakeLists.txt @@ -56,9 +56,9 @@ ADD_CUSTOM_COMMAND( # ################################################################ ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_BINARY_DIR}//doc1.dvi # test 2 slashes - DEPENDS ${PROJECT_SOURCE_DIR}/doc1.tex - COMMAND ${CMAKE_COMMAND} - ARGS -E copy ${PROJECT_SOURCE_DIR}/doc1.tex + DEPENDS ${PROJECT_SOURCE_DIR}/doc1.tex + COMMAND ${CMAKE_COMMAND} + ARGS -E copy ${PROJECT_SOURCE_DIR}/doc1.tex ${PROJECT_BINARY_DIR}/doc1.dvi ) @@ -131,13 +131,13 @@ ADD_CUSTOM_COMMAND( ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_BINARY_DIR}/foo.pre DEPENDS ${PROJECT_SOURCE_DIR}/foo.in TDocument # Ensure doc1.h generates before this target - COMMAND ${CMAKE_COMMAND} - ARGS -E copy ${PROJECT_SOURCE_DIR}/foo.in + COMMAND ${CMAKE_COMMAND} + ARGS -E copy ${PROJECT_SOURCE_DIR}/foo.in ${PROJECT_BINARY_DIR}/foo.pre ) ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_BINARY_DIR}/foo.c - DEPENDS ${PROJECT_BINARY_DIR}/foo.pre + DEPENDS ${PROJECT_BINARY_DIR}/foo.pre COMMAND ${CMAKE_COMMAND} ARGS -E copy ${PROJECT_BINARY_DIR}/foo.pre ${PROJECT_BINARY_DIR}/foo.c @@ -161,7 +161,7 @@ CONFIGURE_FILE( ) # add the executable -ADD_EXECUTABLE(CustomCommand +ADD_EXECUTABLE(CustomCommand ${PROJECT_BINARY_DIR}/foo.h ${PROJECT_BINARY_DIR}/foo.c ${PROJECT_BINARY_DIR}/wrapped.c @@ -186,7 +186,7 @@ TARGET_LINK_LIBRARIES(CustomCommand GeneratedHeader) # Test for using just the target name as executable in the COMMAND # section. Has to be recognized and replaced by CMake with the output # actual location of the executable. -# Additionally the generator is created in an extra subdir after the +# Additionally the generator is created in an extra subdir after the # ADD_CUSTOM_COMMAND() is used. # # Test the same for ADD_CUSTOM_TARGET() @@ -197,11 +197,11 @@ ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/generated_extern.cxx ADD_EXECUTABLE(CustomCommandUsingTargetTest main.cxx ${CMAKE_CURRENT_BINARY_DIR}/generated_extern.cxx ) -ADD_CUSTOM_TARGET(RunTarget +ADD_CUSTOM_TARGET(RunTarget COMMAND generator_extern ${CMAKE_CURRENT_BINARY_DIR}/run_target.cxx ) -ADD_CUSTOM_COMMAND(TARGET CustomCommandUsingTargetTest POST_BUILD +ADD_CUSTOM_COMMAND(TARGET CustomCommandUsingTargetTest POST_BUILD COMMAND dummy_generator ${CMAKE_CURRENT_BINARY_DIR}/generated_dummy.cxx) ADD_SUBDIRECTORY(GeneratorInExtraDir) diff --git a/Tests/CustomCommand/GeneratedHeader/CMakeLists.txt b/Tests/CustomCommand/GeneratedHeader/CMakeLists.txt index 2d47d8749b8..2ba8e68c135 100644 --- a/Tests/CustomCommand/GeneratedHeader/CMakeLists.txt +++ b/Tests/CustomCommand/GeneratedHeader/CMakeLists.txt @@ -2,12 +2,12 @@ # builds. SET(CMAKE_INCLUDE_CURRENT_DIR 1) -ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/generated.h - COMMAND +ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/generated.h + COMMAND ${CMAKE_COMMAND} ARGS -E - copy ${CMAKE_CURRENT_SOURCE_DIR}/generated.h.in - ${CMAKE_CURRENT_BINARY_DIR}/generated.h + copy ${CMAKE_CURRENT_SOURCE_DIR}/generated.h.in + ${CMAKE_CURRENT_BINARY_DIR}/generated.h ) -ADD_LIBRARY(GeneratedHeader main.cpp ${CMAKE_CURRENT_BINARY_DIR}/generated.h) - +ADD_LIBRARY(GeneratedHeader main.cpp ${CMAKE_CURRENT_BINARY_DIR}/generated.h) + diff --git a/Tests/CustomCommand/foo.in b/Tests/CustomCommand/foo.in index 08c559df4df..0c5021caac1 100644 --- a/Tests/CustomCommand/foo.in +++ b/Tests/CustomCommand/foo.in @@ -22,7 +22,7 @@ int main () return -2; } } - + return -1; } diff --git a/Tests/CustomCommandWorkingDirectory/CMakeLists.txt b/Tests/CustomCommandWorkingDirectory/CMakeLists.txt index 36d32e4a09d..f647064858f 100644 --- a/Tests/CustomCommandWorkingDirectory/CMakeLists.txt +++ b/Tests/CustomCommandWorkingDirectory/CMakeLists.txt @@ -13,7 +13,7 @@ SET_SOURCE_FILES_PROPERTIES( "${TestWorkingDir_BINARY_DIR}/customTarget2.c" PROPERTIES GENERATED 1) -ADD_EXECUTABLE(working "${TestWorkingDir_BINARY_DIR}/working.c" +ADD_EXECUTABLE(working "${TestWorkingDir_BINARY_DIR}/working.c" "${TestWorkingDir_BINARY_DIR}/customTarget.c") ADD_CUSTOM_TARGET( diff --git a/Tests/Dependency/Exec2/CMakeLists.txt b/Tests/Dependency/Exec2/CMakeLists.txt index ee0c74d1322..84d630ae1a8 100644 --- a/Tests/Dependency/Exec2/CMakeLists.txt +++ b/Tests/Dependency/Exec2/CMakeLists.txt @@ -2,7 +2,7 @@ # If the dependencies of Five are emitted, and then we attempt to emit the # dependencies of Seven, then we find that they have already been done. So: # Original line: Eight Five -# Add deps of Five: Eight Five Two ... NoDepA +# Add deps of Five: Eight Five Two ... NoDepA # Now, we must make sure that Seven gets inserted between Five and Two, and # not at the end. Unfortunately, if we get it wrong, the test will only # fail on a platform where the link order makes a difference. diff --git a/Tests/DocTest/DocTest.cxx b/Tests/DocTest/DocTest.cxx index 2263cbd7316..a8a62ab6c5a 100644 --- a/Tests/DocTest/DocTest.cxx +++ b/Tests/DocTest/DocTest.cxx @@ -13,7 +13,7 @@ int main () fprintf(stderr,"failed to find undefined properties file"); return 1; } - + char buffer[1024]; while ( fin ) { @@ -28,6 +28,6 @@ int main () } } fin.close(); - + return result; } diff --git a/Tests/Fortran/CMakeLists.txt b/Tests/Fortran/CMakeLists.txt index a995f68dd05..679ec832418 100644 --- a/Tests/Fortran/CMakeLists.txt +++ b/Tests/Fortran/CMakeLists.txt @@ -121,7 +121,7 @@ else() message("Fortran does not match c compiler") message("Fortran = ${CMAKE_Fortran_COMPILER_ID}") message("C = ${CMAKE_C_COMPILER_ID}") - # hack to make g77 work after CL has been enabled + # hack to make g77 work after CL has been enabled # as a languge, cmake needs language specific versions # of these variables.... if(WIN32 AND "${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU") @@ -154,11 +154,11 @@ if(CMAKE_Fortran_COMPILER_SUPPORTS_F90) add_executable(test_use_in_comment_fixedform test_use_in_comment_fixedform.f) set_property(SOURCE test_use_in_comment_fixedform.f PROPERTY Fortran_FORMAT FIXED) - add_executable(test_use_in_comment_freeform + add_executable(test_use_in_comment_freeform test_use_in_comment_freeform.f90) set_property(SOURCE test_use_in_comment_freeform.f90 PROPERTY Fortran_FORMAT FREE) - add_executable(test_in_interface + add_executable(test_in_interface in_interface/main.f90 in_interface/module.f90) diff --git a/Tests/Fortran/foo.f b/Tests/Fortran/foo.f index dbbb3a4e95b..ece0df44cea 100644 --- a/Tests/Fortran/foo.f +++ b/Tests/Fortran/foo.f @@ -5,5 +5,5 @@ module test_mod contains subroutine sub end subroutine - + end module test_mod diff --git a/Tests/Fortran/test_use_in_comment_freeform.f90 b/Tests/Fortran/test_use_in_comment_freeform.f90 index c992a041b0c..48bcd5a210f 100644 --- a/Tests/Fortran/test_use_in_comment_freeform.f90 +++ b/Tests/Fortran/test_use_in_comment_freeform.f90 @@ -1,7 +1,7 @@ PROGRAM foo -! USE bar -! use bar -! Use bar +! USE bar +! use bar +! Use bar WRITE(*,*) 'Hello, Fortran world.' END PROGRAM diff --git a/Tests/Framework/foo.cxx b/Tests/Framework/foo.cxx index b249ce34825..e5c19738cdc 100644 --- a/Tests/Framework/foo.cxx +++ b/Tests/Framework/foo.cxx @@ -1,7 +1,7 @@ #include #if defined(_WIN32) && defined(foo_EXPORTS) # define CM_TEST_LIB_EXPORT __declspec( dllexport ) -#else +#else # define CM_TEST_LIB_EXPORT #endif CM_TEST_LIB_EXPORT void foo() diff --git a/Tests/JCTest/CMakeLists.txt b/Tests/JCTest/CMakeLists.txt index a0f590e57fa..17cea0f08ee 100644 --- a/Tests/JCTest/CMakeLists.txt +++ b/Tests/JCTest/CMakeLists.txt @@ -3,7 +3,7 @@ project(TestTime) enable_testing() add_executable(TestTime TestTime.cxx) -foreach(f 1 2 3 4 5 6 7 8 9 10 11 12 12 14 15 16 17 18 19 +foreach(f 1 2 3 4 5 6 7 8 9 10 11 12 12 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30) add_test(TestTime${f} TestTime 50000000) endforeach(f) diff --git a/Tests/Java/A.java b/Tests/Java/A.java index e34b7046a4b..403a7f889d8 100644 --- a/Tests/Java/A.java +++ b/Tests/Java/A.java @@ -1,11 +1,11 @@ class A { - public A() + public A() { } - + public void printName() - { + { System.out.println("A"); } } diff --git a/Tests/Java/HelloWorld.java b/Tests/Java/HelloWorld.java index 54246ec2676..378e37193d2 100644 --- a/Tests/Java/HelloWorld.java +++ b/Tests/Java/HelloWorld.java @@ -1,5 +1,5 @@ class HelloWorld -{ +{ public static void main(String args[]) { A a; diff --git a/Tests/KDE4StableBranchTest/test_kde4.sh.in b/Tests/KDE4StableBranchTest/test_kde4.sh.in index 81badcd79f0..bc90b9d0d51 100755 --- a/Tests/KDE4StableBranchTest/test_kde4.sh.in +++ b/Tests/KDE4StableBranchTest/test_kde4.sh.in @@ -2,9 +2,9 @@ # This shell script tests whether cmake is able to build the latest # stable KDE4 release, or at least some part of it. -# It downloads automoc from KDE svn, builds and installs it, then it +# It downloads automoc from KDE svn, builds and installs it, then it # downloads phonon from KDE svn, builds and installs it, and finally -# it downloads kdelibs (currently from the 4.3 branch), and builds +# it downloads kdelibs (currently from the 4.3 branch), and builds # a (small) part of it, i.e. libkdecore and one unit test depending on it. # # diff --git a/Tests/LibName/CMakeLists.txt b/Tests/LibName/CMakeLists.txt index 07499a14daa..75dec4eb33b 100644 --- a/Tests/LibName/CMakeLists.txt +++ b/Tests/LibName/CMakeLists.txt @@ -1,5 +1,5 @@ project(LibName) -# this is a test to make sure that relative path +# this is a test to make sure that relative path # LIBRARY_OUTPUT_PATH and EXECUTABLE_OUTPUT_PATH work set(LIBRARY_OUTPUT_PATH lib) set(EXECUTABLE_OUTPUT_PATH lib) diff --git a/Tests/LibName/bar.c b/Tests/LibName/bar.c index 9607180380b..f82aa28e835 100644 --- a/Tests/LibName/bar.c +++ b/Tests/LibName/bar.c @@ -1,7 +1,7 @@ #ifdef _WIN32 -__declspec(dllexport) +__declspec(dllexport) #endif - + extern void foo() { } diff --git a/Tests/LibName/foo.c b/Tests/LibName/foo.c index a68970405e8..6d258e0e967 100644 --- a/Tests/LibName/foo.c +++ b/Tests/LibName/foo.c @@ -1,9 +1,9 @@ #ifdef _WIN32 -__declspec(dllimport) +__declspec(dllimport) #endif extern void foo(); #ifdef _WIN32 -__declspec(dllexport) +__declspec(dllexport) #endif void bar() { diff --git a/Tests/LibName/foobar.c b/Tests/LibName/foobar.c index 73b4b415640..2f8a3ff087e 100644 --- a/Tests/LibName/foobar.c +++ b/Tests/LibName/foobar.c @@ -1,5 +1,5 @@ #ifdef _WIN32 -__declspec(dllimport) +__declspec(dllimport) #endif extern void bar(); diff --git a/Tests/LoadCommand/CMakeCommands/cmTestCommand.c b/Tests/LoadCommand/CMakeCommands/cmTestCommand.c index 6b4f48f7b51..fc04934dd99 100644 --- a/Tests/LoadCommand/CMakeCommands/cmTestCommand.c +++ b/Tests/LoadCommand/CMakeCommands/cmTestCommand.c @@ -3,7 +3,7 @@ #include #include -typedef struct +typedef struct { char *LibraryName; int Argc; @@ -24,8 +24,8 @@ static int CCONV InitialPass(void *inf, void *mf, int argc, char *argv[]) char *ccDep[1]; char *ccOut[1]; cmLoadedCommandInfo *info = (cmLoadedCommandInfo *)inf; - - cmVTKWrapTclData *cdata = + + cmVTKWrapTclData *cdata = (cmVTKWrapTclData *)malloc(sizeof(cmVTKWrapTclData)); cdata->LibraryName = "BOO"; cdata->Argc = argc; @@ -36,33 +36,33 @@ static int CCONV InitialPass(void *inf, void *mf, int argc, char *argv[]) /* already, if so use that value and don't look for the program */ if(!info->CAPI->IsOn(mf,"TEST_COMMAND_TEST1")) { - info->CAPI->AddDefinition(mf, "TEST_DEF", "HOO"); + info->CAPI->AddDefinition(mf, "TEST_DEF", "HOO"); return 1; } - - info->CAPI->AddDefinition(mf, "TEST_DEF", "HOO"); + + info->CAPI->AddDefinition(mf, "TEST_DEF", "HOO"); cdata->LibraryName = "HOO"; - info->CAPI->AddCacheDefinition(mf, "SOME_CACHE_VARIABLE", "ON", + info->CAPI->AddCacheDefinition(mf, "SOME_CACHE_VARIABLE", "ON", "Test cache variable", CM_CACHE_BOOL); - info->CAPI->AddCacheDefinition(mf, "SOME_CACHE_VARIABLE1", "", + info->CAPI->AddCacheDefinition(mf, "SOME_CACHE_VARIABLE1", "", "Test cache variable 1", CM_CACHE_PATH); - info->CAPI->AddCacheDefinition(mf, "SOME_CACHE_VARIABLE2", "", + info->CAPI->AddCacheDefinition(mf, "SOME_CACHE_VARIABLE2", "", "Test cache variable 2", CM_CACHE_FILEPATH); - info->CAPI->AddCacheDefinition(mf, "SOME_CACHE_VARIABLE3", "", + info->CAPI->AddCacheDefinition(mf, "SOME_CACHE_VARIABLE3", "", "Test cache variable 3", CM_CACHE_STRING); - info->CAPI->AddCacheDefinition(mf, "SOME_CACHE_VARIABLE4", "", + info->CAPI->AddCacheDefinition(mf, "SOME_CACHE_VARIABLE4", "", "Test cache variable 4", CM_CACHE_INTERNAL); - info->CAPI->AddCacheDefinition(mf, "SOME_CACHE_VARIABLE5", "", + info->CAPI->AddCacheDefinition(mf, "SOME_CACHE_VARIABLE5", "", "Test cache variable 5", CM_CACHE_STATIC); - + file = info->CAPI->ExpandVariablesInString(mf, "${CMAKE_COMMAND}", 0, 0); str = info->CAPI->GetFilenameWithoutExtension(file); @@ -140,7 +140,7 @@ static int CCONV InitialPass(void *inf, void *mf, int argc, char *argv[]) 1, ccDep, 1, ccOut, "LoadedCommand"); - + ccArgs[2] = argv[1]; ccArgs[3] = argv[2]; @@ -171,22 +171,22 @@ static int CCONV InitialPass(void *inf, void *mf, int argc, char *argv[]) return 0; } info->CAPI->ExecuteCommand(mf,"SET",2,args); - + /* make sure we can find the source file */ if (!info->CAPI->GetSource(mf,argv[1])) { info->CAPI->SetError(mf, "Source file could not be found!"); - return 0; + return 0; } return 1; } -static void CCONV FinalPass(void *inf, void *mf) +static void CCONV FinalPass(void *inf, void *mf) { cmLoadedCommandInfo *info = (cmLoadedCommandInfo *)inf; /* get our client data from initial pass */ - cmVTKWrapTclData *cdata = + cmVTKWrapTclData *cdata = (cmVTKWrapTclData *)info->CAPI->GetClientData(info); if (strcmp(info->CAPI->GetDefinition(mf, "TEST_DEF"),"HOO") || strcmp(cdata->LibraryName,"HOO")) @@ -194,11 +194,11 @@ static void CCONV FinalPass(void *inf, void *mf) fprintf(stderr,"*** Failed LOADED COMMAND Final Pass\n"); } } -static void CCONV Destructor(void *inf) +static void CCONV Destructor(void *inf) { cmLoadedCommandInfo *info = (cmLoadedCommandInfo *)inf; /* get our client data from initial pass */ - cmVTKWrapTclData *cdata = + cmVTKWrapTclData *cdata = (cmVTKWrapTclData *)info->CAPI->GetClientData(info); free(cdata); } diff --git a/Tests/LoadCommand/CMakeLists.txt b/Tests/LoadCommand/CMakeLists.txt index 846cbb08498..32e73f00c55 100644 --- a/Tests/LoadCommand/CMakeLists.txt +++ b/Tests/LoadCommand/CMakeLists.txt @@ -21,16 +21,16 @@ INCLUDE_DIRECTORIES(${LoadCommand_BINARY_DIR}) # make sure it is not already loaded IF(COMMAND CMAKE_TEST_COMMAND) ELSE(COMMAND CMAKE_TEST_COMMAND) - TRY_COMPILE(COMPILE_OK - ${LoadCommand_BINARY_DIR}/CMakeCommands - ${LoadCommand_SOURCE_DIR}/CMakeCommands + TRY_COMPILE(COMPILE_OK + ${LoadCommand_BINARY_DIR}/CMakeCommands + ${LoadCommand_SOURCE_DIR}/CMakeCommands CMAKE_LOADED_COMMANDS CMAKE_FLAGS -DMUDSLIDE_TYPE:STRING=MUCHO OUTPUT_VARIABLE OUTPUT ) # do another TRY_COMPILE to get around make # problem on hp - TRY_COMPILE(COMPILE_OK - ${LoadCommand_BINARY_DIR}/CMakeCommands - ${LoadCommand_SOURCE_DIR}/CMakeCommands + TRY_COMPILE(COMPILE_OK + ${LoadCommand_BINARY_DIR}/CMakeCommands + ${LoadCommand_SOURCE_DIR}/CMakeCommands CMAKE_LOADED_COMMANDS CMAKE_FLAGS -DMUDSLIDE_TYPE:STRING=MUCHO OUTPUT_VARIABLE OUTPUT ) ENDIF(COMMAND CMAKE_TEST_COMMAND) @@ -39,8 +39,8 @@ MESSAGE("Output from try compile: ${OUTPUT}") # if the compile was OK, try loading the command IF (COMPILE_OK) - LOAD_COMMAND(CMAKE_TEST_COMMAND - ${LoadCommand_BINARY_DIR}/CMakeCommands + LOAD_COMMAND(CMAKE_TEST_COMMAND + ${LoadCommand_BINARY_DIR}/CMakeCommands ${LoadCommand_BINARY_DIR}/CMakeCommands/Debug ${LoadCommand_BINARY_DIR}/CMakeCommands/Development ) diff --git a/Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c b/Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c index 6b4f48f7b51..fc04934dd99 100644 --- a/Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c +++ b/Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c @@ -3,7 +3,7 @@ #include #include -typedef struct +typedef struct { char *LibraryName; int Argc; @@ -24,8 +24,8 @@ static int CCONV InitialPass(void *inf, void *mf, int argc, char *argv[]) char *ccDep[1]; char *ccOut[1]; cmLoadedCommandInfo *info = (cmLoadedCommandInfo *)inf; - - cmVTKWrapTclData *cdata = + + cmVTKWrapTclData *cdata = (cmVTKWrapTclData *)malloc(sizeof(cmVTKWrapTclData)); cdata->LibraryName = "BOO"; cdata->Argc = argc; @@ -36,33 +36,33 @@ static int CCONV InitialPass(void *inf, void *mf, int argc, char *argv[]) /* already, if so use that value and don't look for the program */ if(!info->CAPI->IsOn(mf,"TEST_COMMAND_TEST1")) { - info->CAPI->AddDefinition(mf, "TEST_DEF", "HOO"); + info->CAPI->AddDefinition(mf, "TEST_DEF", "HOO"); return 1; } - - info->CAPI->AddDefinition(mf, "TEST_DEF", "HOO"); + + info->CAPI->AddDefinition(mf, "TEST_DEF", "HOO"); cdata->LibraryName = "HOO"; - info->CAPI->AddCacheDefinition(mf, "SOME_CACHE_VARIABLE", "ON", + info->CAPI->AddCacheDefinition(mf, "SOME_CACHE_VARIABLE", "ON", "Test cache variable", CM_CACHE_BOOL); - info->CAPI->AddCacheDefinition(mf, "SOME_CACHE_VARIABLE1", "", + info->CAPI->AddCacheDefinition(mf, "SOME_CACHE_VARIABLE1", "", "Test cache variable 1", CM_CACHE_PATH); - info->CAPI->AddCacheDefinition(mf, "SOME_CACHE_VARIABLE2", "", + info->CAPI->AddCacheDefinition(mf, "SOME_CACHE_VARIABLE2", "", "Test cache variable 2", CM_CACHE_FILEPATH); - info->CAPI->AddCacheDefinition(mf, "SOME_CACHE_VARIABLE3", "", + info->CAPI->AddCacheDefinition(mf, "SOME_CACHE_VARIABLE3", "", "Test cache variable 3", CM_CACHE_STRING); - info->CAPI->AddCacheDefinition(mf, "SOME_CACHE_VARIABLE4", "", + info->CAPI->AddCacheDefinition(mf, "SOME_CACHE_VARIABLE4", "", "Test cache variable 4", CM_CACHE_INTERNAL); - info->CAPI->AddCacheDefinition(mf, "SOME_CACHE_VARIABLE5", "", + info->CAPI->AddCacheDefinition(mf, "SOME_CACHE_VARIABLE5", "", "Test cache variable 5", CM_CACHE_STATIC); - + file = info->CAPI->ExpandVariablesInString(mf, "${CMAKE_COMMAND}", 0, 0); str = info->CAPI->GetFilenameWithoutExtension(file); @@ -140,7 +140,7 @@ static int CCONV InitialPass(void *inf, void *mf, int argc, char *argv[]) 1, ccDep, 1, ccOut, "LoadedCommand"); - + ccArgs[2] = argv[1]; ccArgs[3] = argv[2]; @@ -171,22 +171,22 @@ static int CCONV InitialPass(void *inf, void *mf, int argc, char *argv[]) return 0; } info->CAPI->ExecuteCommand(mf,"SET",2,args); - + /* make sure we can find the source file */ if (!info->CAPI->GetSource(mf,argv[1])) { info->CAPI->SetError(mf, "Source file could not be found!"); - return 0; + return 0; } return 1; } -static void CCONV FinalPass(void *inf, void *mf) +static void CCONV FinalPass(void *inf, void *mf) { cmLoadedCommandInfo *info = (cmLoadedCommandInfo *)inf; /* get our client data from initial pass */ - cmVTKWrapTclData *cdata = + cmVTKWrapTclData *cdata = (cmVTKWrapTclData *)info->CAPI->GetClientData(info); if (strcmp(info->CAPI->GetDefinition(mf, "TEST_DEF"),"HOO") || strcmp(cdata->LibraryName,"HOO")) @@ -194,11 +194,11 @@ static void CCONV FinalPass(void *inf, void *mf) fprintf(stderr,"*** Failed LOADED COMMAND Final Pass\n"); } } -static void CCONV Destructor(void *inf) +static void CCONV Destructor(void *inf) { cmLoadedCommandInfo *info = (cmLoadedCommandInfo *)inf; /* get our client data from initial pass */ - cmVTKWrapTclData *cdata = + cmVTKWrapTclData *cdata = (cmVTKWrapTclData *)info->CAPI->GetClientData(info); free(cdata); } diff --git a/Tests/LoadCommandOneConfig/CMakeLists.txt b/Tests/LoadCommandOneConfig/CMakeLists.txt index e99105a7494..4bfa5996470 100644 --- a/Tests/LoadCommandOneConfig/CMakeLists.txt +++ b/Tests/LoadCommandOneConfig/CMakeLists.txt @@ -27,16 +27,16 @@ INCLUDE_DIRECTORIES(${LoadCommand_BINARY_DIR}) # make sure it is not already loaded IF(COMMAND CMAKE_TEST_COMMAND) ELSE(COMMAND CMAKE_TEST_COMMAND) - TRY_COMPILE(COMPILE_OK - ${LoadCommand_BINARY_DIR}/CMakeCommands - ${LoadCommand_SOURCE_DIR}/CMakeCommands + TRY_COMPILE(COMPILE_OK + ${LoadCommand_BINARY_DIR}/CMakeCommands + ${LoadCommand_SOURCE_DIR}/CMakeCommands CMAKE_LOADED_COMMANDS CMAKE_FLAGS -DMUDSLIDE_TYPE:STRING=MUCHO OUTPUT_VARIABLE OUTPUT ) # do another TRY_COMPILE to get around make # problem on hp - TRY_COMPILE(COMPILE_OK - ${LoadCommand_BINARY_DIR}/CMakeCommands - ${LoadCommand_SOURCE_DIR}/CMakeCommands + TRY_COMPILE(COMPILE_OK + ${LoadCommand_BINARY_DIR}/CMakeCommands + ${LoadCommand_SOURCE_DIR}/CMakeCommands CMAKE_LOADED_COMMANDS CMAKE_FLAGS -DMUDSLIDE_TYPE:STRING=MUCHO OUTPUT_VARIABLE OUTPUT ) ENDIF(COMMAND CMAKE_TEST_COMMAND) @@ -45,8 +45,8 @@ MESSAGE("Output from try compile: ${OUTPUT}") # if the compile was OK, try loading the command IF (COMPILE_OK) - LOAD_COMMAND(CMAKE_TEST_COMMAND - ${LoadCommand_BINARY_DIR}/CMakeCommands + LOAD_COMMAND(CMAKE_TEST_COMMAND + ${LoadCommand_BINARY_DIR}/CMakeCommands ${LoadCommand_BINARY_DIR}/CMakeCommands/Debug ${LoadCommand_BINARY_DIR}/CMakeCommands/Development ) diff --git a/Tests/NewlineArgs/CMakeLists.txt b/Tests/NewlineArgs/CMakeLists.txt index a182304883a..7551601024e 100644 --- a/Tests/NewlineArgs/CMakeLists.txt +++ b/Tests/NewlineArgs/CMakeLists.txt @@ -5,10 +5,10 @@ project (NewlineArgs CXX) add_definitions("-DTEST_FLAG_1 -DTEST_FLAG_2") -include_directories(" ${NewlineArgs_BINARY_DIR} +include_directories(" ${NewlineArgs_BINARY_DIR} ${NewlineArgs_SOURCE_DIR} ") -configure_file("${NewlineArgs_SOURCE_DIR}/libcxx2.h.in" +configure_file("${NewlineArgs_SOURCE_DIR}/libcxx2.h.in" "${NewlineArgs_BINARY_DIR}/libcxx2.h") add_library(testcxx1 libcxx1.cxx) diff --git a/Tests/ObjC++/objc++.mm b/Tests/ObjC++/objc++.mm index f0be2568252..258ebaa52f5 100644 --- a/Tests/ObjC++/objc++.mm +++ b/Tests/ObjC++/objc++.mm @@ -5,7 +5,7 @@ int main() { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - + NSMutableSet *mySet = [NSMutableSet set]; cout<<"Adding values to the set."< -class Foo +class Foo { public: Foo() diff --git a/Tests/SimpleCOnly/main.c b/Tests/SimpleCOnly/main.c index e4df685cb0d..022a8e88d03 100644 --- a/Tests/SimpleCOnly/main.c +++ b/Tests/SimpleCOnly/main.c @@ -3,7 +3,7 @@ extern int foo(); extern int bar(); -int main() +int main() { int i=foo(); int k=bar(); diff --git a/Tests/SimpleInstall/CMakeLists.txt b/Tests/SimpleInstall/CMakeLists.txt index 378b5292b8f..a47c546e704 100644 --- a/Tests/SimpleInstall/CMakeLists.txt +++ b/Tests/SimpleInstall/CMakeLists.txt @@ -53,15 +53,15 @@ IF(STAGE2) SET(TEST2_LIBRARY "TEST2_LIBRARY-NOTFOUND" CACHE FILEPATH "Force find." FORCE) SET(TEST4_LIBRARY "TEST4_LIBRARY-NOTFOUND" CACHE FILEPATH "Force find." FORCE) - FIND_LIBRARY(TEST1_LIBRARY + FIND_LIBRARY(TEST1_LIBRARY NAMES ${t1NAMES} PATHS ${LIBPATHS} DOC "First library") - FIND_LIBRARY(TEST2_LIBRARY + FIND_LIBRARY(TEST2_LIBRARY NAMES ${t2NAMES} PATHS ${LIBPATHS} DOC "Second library") - FIND_LIBRARY(TEST4_LIBRARY + FIND_LIBRARY(TEST4_LIBRARY NAMES ${t4NAMES} PATHS ${LIBPATHS} DOC "Fourth library") @@ -200,7 +200,7 @@ ELSE(STAGE2) RUNTIME DESTINATION MyTest/bin COMPONENT Runtime # .exe, .dll LIBRARY DESTINATION MyTest/lib COMPONENT Runtime # .so, mod.dll ARCHIVE DESTINATION MyTest/lib/static COMPONENT Development # .a, .lib - PUBLIC_HEADER DESTINATION MyTest/include COMPONENT Development + PUBLIC_HEADER DESTINATION MyTest/include COMPONENT Development ) INSTALL(TARGETS test4 PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE @@ -227,11 +227,11 @@ ELSE(STAGE2) scripts/sample_script scripts/sample_script.bat) # "export" the targets collected in "SimpleInstallS1" - INSTALL(EXPORT SimpleInstallS1 FILE SimpleInstallS1Config.cmake - DESTINATION MyTest/lib + INSTALL(EXPORT SimpleInstallS1 FILE SimpleInstallS1Config.cmake + DESTINATION MyTest/lib NAMESPACE S1_ ) - EXPORT(TARGETS SimpleInstall test1 test2 test3 + EXPORT(TARGETS SimpleInstall test1 test2 test3 FILE "${CMAKE_CURRENT_BINARY_DIR}/SimpleInstallS1Config.cmake" NAMESPACE S2_ ) @@ -299,9 +299,9 @@ ELSE(STAGE2) ADDITIONAL_MAKE_CLEAN_FILES "${CMAKE_INSTALL_PREFIX}/InstallScriptOut.cmake;${CMAKE_INSTALL_PREFIX}/InstallScript4Out.cmake") - SET_TARGET_PROPERTIES(SimpleInstall PROPERTIES PRE_INSTALL_SCRIPT + SET_TARGET_PROPERTIES(SimpleInstall PROPERTIES PRE_INSTALL_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/PreInstall.cmake) - SET_TARGET_PROPERTIES(SimpleInstall PROPERTIES POST_INSTALL_SCRIPT + SET_TARGET_PROPERTIES(SimpleInstall PROPERTIES POST_INSTALL_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/PostInstall.cmake) SET_TARGET_PROPERTIES(test4 PROPERTIES VERSION 1.2 SOVERSION 3 INSTALL_NAME_DIR @executable_path/../lib) diff --git a/Tests/SimpleInstall/PackageScript.cmake b/Tests/SimpleInstall/PackageScript.cmake index 3567a2f43b5..36429e2f757 100644 --- a/Tests/SimpleInstall/PackageScript.cmake +++ b/Tests/SimpleInstall/PackageScript.cmake @@ -4,7 +4,7 @@ MESSAGE("It writes a file with all variables available in ${CMAKE_INSTALL_PREFIX FILE(WRITE ${CMAKE_INSTALL_PREFIX}/AllVariables.txt "") GET_CMAKE_PROPERTY(res VARIABLES) FOREACH(var ${res}) - FILE(APPEND ${CMAKE_INSTALL_PREFIX}/AllVariables.txt + FILE(APPEND ${CMAKE_INSTALL_PREFIX}/AllVariables.txt "${var} \"${${var}}\"\n") ENDFOREACH(var ${res}) diff --git a/Tests/SimpleInstall/lib2.h b/Tests/SimpleInstall/lib2.h index ea5a6f7ea7f..d69b786131a 100644 --- a/Tests/SimpleInstall/lib2.h +++ b/Tests/SimpleInstall/lib2.h @@ -5,7 +5,7 @@ # define CM_TEST_LIB_EXPORT __declspec( dllimport ) # endif #else -# define CM_TEST_LIB_EXPORT +# define CM_TEST_LIB_EXPORT #endif CM_TEST_LIB_EXPORT float Lib2Func(); diff --git a/Tests/SimpleInstall/lib3.h b/Tests/SimpleInstall/lib3.h index c250ed7698d..66bc52a7fc2 100644 --- a/Tests/SimpleInstall/lib3.h +++ b/Tests/SimpleInstall/lib3.h @@ -5,7 +5,7 @@ # define CM_TEST_LIB_EXPORT __declspec( dllimport ) # endif #else -# define CM_TEST_LIB_EXPORT +# define CM_TEST_LIB_EXPORT #endif CM_TEST_LIB_EXPORT float Lib3Func(); diff --git a/Tests/SimpleInstall/lib4.h b/Tests/SimpleInstall/lib4.h index 4b94ea20725..11c127247bf 100644 --- a/Tests/SimpleInstall/lib4.h +++ b/Tests/SimpleInstall/lib4.h @@ -5,7 +5,7 @@ # define CM_TEST_LIB_EXPORT __declspec( dllimport ) # endif #else -# define CM_TEST_LIB_EXPORT +# define CM_TEST_LIB_EXPORT #endif CM_TEST_LIB_EXPORT float Lib4Func(); diff --git a/Tests/SimpleInstallS2/CMakeLists.txt b/Tests/SimpleInstallS2/CMakeLists.txt index 378b5292b8f..a47c546e704 100644 --- a/Tests/SimpleInstallS2/CMakeLists.txt +++ b/Tests/SimpleInstallS2/CMakeLists.txt @@ -53,15 +53,15 @@ IF(STAGE2) SET(TEST2_LIBRARY "TEST2_LIBRARY-NOTFOUND" CACHE FILEPATH "Force find." FORCE) SET(TEST4_LIBRARY "TEST4_LIBRARY-NOTFOUND" CACHE FILEPATH "Force find." FORCE) - FIND_LIBRARY(TEST1_LIBRARY + FIND_LIBRARY(TEST1_LIBRARY NAMES ${t1NAMES} PATHS ${LIBPATHS} DOC "First library") - FIND_LIBRARY(TEST2_LIBRARY + FIND_LIBRARY(TEST2_LIBRARY NAMES ${t2NAMES} PATHS ${LIBPATHS} DOC "Second library") - FIND_LIBRARY(TEST4_LIBRARY + FIND_LIBRARY(TEST4_LIBRARY NAMES ${t4NAMES} PATHS ${LIBPATHS} DOC "Fourth library") @@ -200,7 +200,7 @@ ELSE(STAGE2) RUNTIME DESTINATION MyTest/bin COMPONENT Runtime # .exe, .dll LIBRARY DESTINATION MyTest/lib COMPONENT Runtime # .so, mod.dll ARCHIVE DESTINATION MyTest/lib/static COMPONENT Development # .a, .lib - PUBLIC_HEADER DESTINATION MyTest/include COMPONENT Development + PUBLIC_HEADER DESTINATION MyTest/include COMPONENT Development ) INSTALL(TARGETS test4 PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE @@ -227,11 +227,11 @@ ELSE(STAGE2) scripts/sample_script scripts/sample_script.bat) # "export" the targets collected in "SimpleInstallS1" - INSTALL(EXPORT SimpleInstallS1 FILE SimpleInstallS1Config.cmake - DESTINATION MyTest/lib + INSTALL(EXPORT SimpleInstallS1 FILE SimpleInstallS1Config.cmake + DESTINATION MyTest/lib NAMESPACE S1_ ) - EXPORT(TARGETS SimpleInstall test1 test2 test3 + EXPORT(TARGETS SimpleInstall test1 test2 test3 FILE "${CMAKE_CURRENT_BINARY_DIR}/SimpleInstallS1Config.cmake" NAMESPACE S2_ ) @@ -299,9 +299,9 @@ ELSE(STAGE2) ADDITIONAL_MAKE_CLEAN_FILES "${CMAKE_INSTALL_PREFIX}/InstallScriptOut.cmake;${CMAKE_INSTALL_PREFIX}/InstallScript4Out.cmake") - SET_TARGET_PROPERTIES(SimpleInstall PROPERTIES PRE_INSTALL_SCRIPT + SET_TARGET_PROPERTIES(SimpleInstall PROPERTIES PRE_INSTALL_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/PreInstall.cmake) - SET_TARGET_PROPERTIES(SimpleInstall PROPERTIES POST_INSTALL_SCRIPT + SET_TARGET_PROPERTIES(SimpleInstall PROPERTIES POST_INSTALL_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/PostInstall.cmake) SET_TARGET_PROPERTIES(test4 PROPERTIES VERSION 1.2 SOVERSION 3 INSTALL_NAME_DIR @executable_path/../lib) diff --git a/Tests/SimpleInstallS2/PackageScript.cmake b/Tests/SimpleInstallS2/PackageScript.cmake index 3567a2f43b5..36429e2f757 100644 --- a/Tests/SimpleInstallS2/PackageScript.cmake +++ b/Tests/SimpleInstallS2/PackageScript.cmake @@ -4,7 +4,7 @@ MESSAGE("It writes a file with all variables available in ${CMAKE_INSTALL_PREFIX FILE(WRITE ${CMAKE_INSTALL_PREFIX}/AllVariables.txt "") GET_CMAKE_PROPERTY(res VARIABLES) FOREACH(var ${res}) - FILE(APPEND ${CMAKE_INSTALL_PREFIX}/AllVariables.txt + FILE(APPEND ${CMAKE_INSTALL_PREFIX}/AllVariables.txt "${var} \"${${var}}\"\n") ENDFOREACH(var ${res}) diff --git a/Tests/SimpleInstallS2/lib2.h b/Tests/SimpleInstallS2/lib2.h index ea5a6f7ea7f..d69b786131a 100644 --- a/Tests/SimpleInstallS2/lib2.h +++ b/Tests/SimpleInstallS2/lib2.h @@ -5,7 +5,7 @@ # define CM_TEST_LIB_EXPORT __declspec( dllimport ) # endif #else -# define CM_TEST_LIB_EXPORT +# define CM_TEST_LIB_EXPORT #endif CM_TEST_LIB_EXPORT float Lib2Func(); diff --git a/Tests/SimpleInstallS2/lib3.h b/Tests/SimpleInstallS2/lib3.h index c250ed7698d..66bc52a7fc2 100644 --- a/Tests/SimpleInstallS2/lib3.h +++ b/Tests/SimpleInstallS2/lib3.h @@ -5,7 +5,7 @@ # define CM_TEST_LIB_EXPORT __declspec( dllimport ) # endif #else -# define CM_TEST_LIB_EXPORT +# define CM_TEST_LIB_EXPORT #endif CM_TEST_LIB_EXPORT float Lib3Func(); diff --git a/Tests/SimpleInstallS2/lib4.h b/Tests/SimpleInstallS2/lib4.h index 4b94ea20725..11c127247bf 100644 --- a/Tests/SimpleInstallS2/lib4.h +++ b/Tests/SimpleInstallS2/lib4.h @@ -5,7 +5,7 @@ # define CM_TEST_LIB_EXPORT __declspec( dllimport ) # endif #else -# define CM_TEST_LIB_EXPORT +# define CM_TEST_LIB_EXPORT #endif CM_TEST_LIB_EXPORT float Lib4Func(); diff --git a/Tests/SourceGroups/CMakeLists.txt b/Tests/SourceGroups/CMakeLists.txt index c3cf38c7a69..6573c8241b0 100644 --- a/Tests/SourceGroups/CMakeLists.txt +++ b/Tests/SourceGroups/CMakeLists.txt @@ -2,9 +2,9 @@ cmake_minimum_required (VERSION 2.6) project(SourceGroups) # this is not really a test which can fail -# it is more an example with several source_group() +# it is more an example with several source_group() # commands. -# The created projects have to be loaded manually +# The created projects have to be loaded manually # in Visual Studio/Xcode/Eclipse/... # to see whether the correct groups have been created. @@ -19,7 +19,7 @@ source_group(Base\\Sub1\\Sub2 FILES sub1/foobar.c) # a group with empty name source_group("" FILES foo.c) -# a group, whose name consists only of the delimiter +# a group, whose name consists only of the delimiter #should be handled the same way as an empty name source_group("\\" FILES baz.c) diff --git a/Tests/SourceGroups/README.txt b/Tests/SourceGroups/README.txt index 1a4baf536d7..8b137891791 100644 --- a/Tests/SourceGroups/README.txt +++ b/Tests/SourceGroups/README.txt @@ -1 +1 @@ - + diff --git a/Tests/StringFileTest/CMakeLists.txt b/Tests/StringFileTest/CMakeLists.txt index 7792a353d24..13283d0c277 100644 --- a/Tests/StringFileTest/CMakeLists.txt +++ b/Tests/StringFileTest/CMakeLists.txt @@ -149,8 +149,8 @@ IF(NOT "$ENV{x+(y)}" STREQUAL "Obscure environment variable value") ENDIF() # Make directories test -FILE(MAKE_DIRECTORY - "${CMAKE_CURRENT_BINARY_DIR}/Includes" +FILE(MAKE_DIRECTORY + "${CMAKE_CURRENT_BINARY_DIR}/Includes" "${CMAKE_CURRENT_BINARY_DIR}/Directory1" "${CMAKE_CURRENT_BINARY_DIR}/Directory2" ) diff --git a/Tests/StringFileTest/InputFile.h.in b/Tests/StringFileTest/InputFile.h.in index 3e70a36e86a..0f01ccfc600 100644 --- a/Tests/StringFileTest/InputFile.h.in +++ b/Tests/StringFileTest/InputFile.h.in @@ -3,7 +3,7 @@ /* This should be configured to a define. */ #cmakedefine TEST_DEFINED @TEST_DEFINED@ /* This should be configured to a commented undef with the curlies in place */ -#cmakedefine TEST_NOT_DEFINED ${TEST_NOT_DEFINED} +#cmakedefine TEST_NOT_DEFINED ${TEST_NOT_DEFINED} /* This complicated line should be configured unchanged: */ static const char* configvar = @@ -34,5 +34,5 @@ int CheckMethod(const char* var, const char* val ) return 1; #else return 0; -#endif +#endif } diff --git a/Tests/StringFileTest/StringFile.cxx b/Tests/StringFileTest/StringFile.cxx index 609ebaf20c7..9eba6bff970 100644 --- a/Tests/StringFileTest/StringFile.cxx +++ b/Tests/StringFileTest/StringFile.cxx @@ -26,6 +26,6 @@ int main(int, char*[]) res += CheckMethod(relpath, "../../X11R6/bin/xnest"); res += CheckMethod(configvar, "@$@$junk =~ s/#$xyz#/$foo_bar{$wibble}->{$xyz}/;@@"); - + return res; } diff --git a/Tests/SubDir/CMakeLists.txt b/Tests/SubDir/CMakeLists.txt index 9cfbe25ce05..cf8fe97faa1 100644 --- a/Tests/SubDir/CMakeLists.txt +++ b/Tests/SubDir/CMakeLists.txt @@ -4,11 +4,11 @@ SUBDIRS(Executable EXCLUDE_FROM_ALL Examples) WRITE_FILE(${SUBDIR_BINARY_DIR}/ShouldBeHere "This file should exist.") #WATCOM WMAKE does not support + in the name of a file! IF(WATCOM) - SET(PLUS_NAME_FILES + SET(PLUS_NAME_FILES AnotherSubdir/pair_int.int.c vcl_algorithm_vcl_pair_double.foo.c) ELSE(WATCOM) - SET(PLUS_NAME_FILES + SET(PLUS_NAME_FILES AnotherSubdir/pair+int.int.c vcl_algorithm+vcl_pair+double.foo.c) ENDIF(WATCOM) @@ -28,7 +28,7 @@ IF(WATCOM) ENDIF("${f}" STREQUAL "ThirdSubDir/pair+int.int1.c") ENDFOREACH(f) SET(SOURCES ${SOURCES2}) - SET(SOURCES ${SOURCES} + SET(SOURCES ${SOURCES} vcl_algorithm_vcl_pair_double.foo.c) ELSE(WATCOM) FOREACH(f ${SOURCES}) @@ -39,8 +39,8 @@ ELSE(WATCOM) ENDIF("${f}" STREQUAL "ThirdSubDir/pair_int.int1.c") ENDFOREACH(f) SET(SOURCES ${SOURCES2}) - SET(SOURCES ${SOURCES} + SET(SOURCES ${SOURCES} vcl_algorithm+vcl_pair+double.foo.c) -ENDIF(WATCOM) +ENDIF(WATCOM) MESSAGE("Sources: ${SOURCES}") ADD_EXECUTABLE(TestWithAuxSourceDir ${SOURCES}) diff --git a/Tests/SubDirSpaces/CMakeLists.txt b/Tests/SubDirSpaces/CMakeLists.txt index 879530b566d..a0053a236e8 100644 --- a/Tests/SubDirSpaces/CMakeLists.txt +++ b/Tests/SubDirSpaces/CMakeLists.txt @@ -33,11 +33,11 @@ ENDIF(CMAKE_PAREN) WRITE_FILE(${SUBDIR_BINARY_DIR}/ShouldBeHere "This file should exist.") #WATCOM WMAKE does not support + in the name of a file! IF(WATCOM) - SET(PLUS_NAME_FILES + SET(PLUS_NAME_FILES "Another Subdir/pair_int.int.c" vcl_algorithm_vcl_pair_double.foo.c) ELSE(WATCOM) - SET(PLUS_NAME_FILES + SET(PLUS_NAME_FILES "Another Subdir/pair+int.int.c" vcl_algorithm+vcl_pair+double.foo.c) ENDIF(WATCOM) @@ -57,7 +57,7 @@ IF(WATCOM) ENDIF("${f}" STREQUAL "ThirdSubDir/pair+int.int1.c") ENDFOREACH(f) SET(SOURCES ${SOURCES2}) - SET(SOURCES ${SOURCES} + SET(SOURCES ${SOURCES} vcl_algorithm_vcl_pair_double.foo.c) ELSE(WATCOM) FOREACH(f ${SOURCES}) @@ -67,9 +67,9 @@ ELSE(WATCOM) ENDIF("${f}" STREQUAL "ThirdSubDir/pair_int.int1.c") ENDFOREACH(f) SET(SOURCES ${SOURCES2}) - SET(SOURCES ${SOURCES} + SET(SOURCES ${SOURCES} vcl_algorithm+vcl_pair+double.foo.c) -ENDIF(WATCOM) +ENDIF(WATCOM) ADD_EXECUTABLE(TestWithAuxSourceDir ${SOURCES}) IF(CMAKE_PAREN) target_link_libraries(TestWithAuxSourceDir testOddPath) diff --git a/Tests/SwigTest/CMakeLists.txt b/Tests/SwigTest/CMakeLists.txt index 5a8e61922ae..7e216446d4b 100644 --- a/Tests/SwigTest/CMakeLists.txt +++ b/Tests/SwigTest/CMakeLists.txt @@ -30,7 +30,7 @@ IF(${language} MATCHES ruby) ENDIF(${language} MATCHES ruby) IF(${language} MATCHES php4) FIND_PACKAGE(PHP4) - INCLUDE_DIRECTORIES(${PHP4_INCLUDE_PATH}) + INCLUDE_DIRECTORIES(${PHP4_INCLUDE_PATH}) SET(SWIG_LANG_LIBRARIES ${PHP4_LIBRARY}) ENDIF(${language} MATCHES php4) IF(${language} MATCHES pike) diff --git a/Tests/SwigTest/example.h b/Tests/SwigTest/example.h index 46d90136108..c9d59f22bbf 100644 --- a/Tests/SwigTest/example.h +++ b/Tests/SwigTest/example.h @@ -8,7 +8,7 @@ class Shape { virtual ~Shape() { nshapes--; }; - double x, y; + double x, y; void move(double dx, double dy); virtual double area(void) = 0; virtual double perimeter(void) = 0; @@ -36,4 +36,4 @@ class Square : public Shape { - + diff --git a/Tests/SwigTest/runme.pike b/Tests/SwigTest/runme.pike index a6377600ebb..ec28dd70e18 100755 --- a/Tests/SwigTest/runme.pike +++ b/Tests/SwigTest/runme.pike @@ -42,12 +42,12 @@ int main() /* See if we can force 's' to be garbage-collected */ s = 0; - + /* Now we should be down to only 1 shape */ write("%d shapes remain\n", Shape_nshapes_get()); - + /* Done */ write("Goodbye\n"); - + return 0; } diff --git a/Tests/SwigTest/runme.py b/Tests/SwigTest/runme.py index 42a5aa36349..ed3909e3025 100644 --- a/Tests/SwigTest/runme.py +++ b/Tests/SwigTest/runme.py @@ -3,7 +3,7 @@ # This file illustrates the shadow-class C++ interface generated # by SWIG. -import example +import example # ----- Object creation ----- diff --git a/Tests/SystemInformation/CMakeLists.txt b/Tests/SystemInformation/CMakeLists.txt index c4285758eb7..6654664a108 100644 --- a/Tests/SystemInformation/CMakeLists.txt +++ b/Tests/SystemInformation/CMakeLists.txt @@ -8,9 +8,9 @@ SET_DIRECTORY_PROPERTIES(PROPERTIES INCLUDE_DIRECTORIES "${SystemInformation_BIN MESSAGE("To prevent CTest from stripping output, you have to display: CTEST_FULL_OUTPUT") -CONFIGURE_FILE(${SystemInformation_SOURCE_DIR}/SystemInformation.in +CONFIGURE_FILE(${SystemInformation_SOURCE_DIR}/SystemInformation.in ${SystemInformation_BINARY_DIR}/SystemInformation.out) -CONFIGURE_FILE(${SystemInformation_SOURCE_DIR}/DumpInformation.h.in +CONFIGURE_FILE(${SystemInformation_SOURCE_DIR}/DumpInformation.h.in ${SystemInformation_BINARY_DIR}/DumpInformation.h) ADD_EXECUTABLE(SystemInformation DumpInformation.cxx) @@ -23,21 +23,21 @@ FOO(lala) FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/AllVariables.txt "") GET_CMAKE_PROPERTY(res VARIABLES) FOREACH(var ${res}) - FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/AllVariables.txt + FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/AllVariables.txt "${var} \"${${var}}\"\n") ENDFOREACH(var ${res}) FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/AllCommands.txt "") GET_CMAKE_PROPERTY(res COMMANDS) FOREACH(var ${res}) - FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/AllCommands.txt + FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/AllCommands.txt "${var}\n") ENDFOREACH(var ${res}) FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/AllMacros.txt "") GET_CMAKE_PROPERTY(res MACROS) FOREACH(var ${res}) - FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/AllMacros.txt + FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/AllMacros.txt "${var}\n") ENDFOREACH(var ${res}) diff --git a/Tests/SystemInformation/DumpInformation.cxx b/Tests/SystemInformation/DumpInformation.cxx index 579dcbcf2aa..acafa874d97 100644 --- a/Tests/SystemInformation/DumpInformation.cxx +++ b/Tests/SystemInformation/DumpInformation.cxx @@ -15,7 +15,7 @@ void cmDumpInformationPrintFile(const char* name, FILE* fout) fflush(fout); return; } - + FILE* fin = fopen(name, "r"); if(fin) { @@ -59,7 +59,7 @@ int main(int,char *[]) DumpInformation_BINARY_DIR "/AllMacros.txt", DumpInformation_BINARY_DIR "/OtherProperties.txt", DumpInformation_BINARY_DIR "/../../Source/cmConfigure.h", - DumpInformation_BINARY_DIR "/../../CMakeCache.txt", + DumpInformation_BINARY_DIR "/../../CMakeCache.txt", DumpInformation_BINARY_DIR "/../../CMakeFiles/CMakeOutput.log", DumpInformation_BINARY_DIR "/../../CMakeFiles/CMakeError.log", DumpInformation_BINARY_DIR "/../../Bootstrap.cmk/cmake_bootstrap.log", @@ -75,6 +75,6 @@ int main(int,char *[]) { cmDumpInformationPrintFile(*f, stdout); } - + return 0; -} +} diff --git a/Tests/TargetName/scripts/CMakeLists.txt b/Tests/TargetName/scripts/CMakeLists.txt index 40d4e2fb0a1..a693e403ece 100644 --- a/Tests/TargetName/scripts/CMakeLists.txt +++ b/Tests/TargetName/scripts/CMakeLists.txt @@ -1,7 +1,7 @@ if(NOT CMAKE_BINARY_DIR STREQUAL "${CMAKE_SOURCE_DIR}") add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/hello_world - COMMAND ${CMAKE_COMMAND} -E copy + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/hello_world ${CMAKE_CURRENT_BINARY_DIR} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/hello_world ) diff --git a/Tests/TestDriver/CMakeLists.txt b/Tests/TestDriver/CMakeLists.txt index bd5e97414dc..cc953ce3f72 100644 --- a/Tests/TestDriver/CMakeLists.txt +++ b/Tests/TestDriver/CMakeLists.txt @@ -4,11 +4,11 @@ PROJECT(TestDriverTest) SET(Extra_SRCS testExtraStuff.cxx testExtraStuff2.cxx ) SET(Extra_SRCS ${Extra_SRCS};testExtraStuff3.cxx ) INCLUDE_DIRECTORIES(${TestDriverTest_SOURCE_DIR}) -CREATE_TEST_SOURCELIST(testSrcs - TestDriverTest.cxx - test1.cxx - test2.cxx - subdir/test3.cxx +CREATE_TEST_SOURCELIST(testSrcs + TestDriverTest.cxx + test1.cxx + test2.cxx + subdir/test3.cxx EXTRA_INCLUDE testArgs.h FUNCTION testProccessArgs) ADD_EXECUTABLE(TestDriverTest ${testSrcs} ${Extra_SRCS}) diff --git a/Tests/TestDriver/test1.cxx b/Tests/TestDriver/test1.cxx index ac82f8ae9a1..b998fdae6d8 100644 --- a/Tests/TestDriver/test1.cxx +++ b/Tests/TestDriver/test1.cxx @@ -17,7 +17,7 @@ int test1(int ac, char* av[]) { return -1; } - + printf("test1\n"); for(int i =0; i < ac; i++) printf("arg %d is %s\n", ac, av[i]); diff --git a/Tests/Testing/CMakeLists.txt b/Tests/Testing/CMakeLists.txt index 815b52b5804..5c6f37c6e88 100644 --- a/Tests/Testing/CMakeLists.txt +++ b/Tests/Testing/CMakeLists.txt @@ -7,12 +7,12 @@ PROJECT (Testing) # # Lib and exe path # -SET (LIBRARY_OUTPUT_PATH - ${Testing_BINARY_DIR}/bin/ CACHE PATH +SET (LIBRARY_OUTPUT_PATH + ${Testing_BINARY_DIR}/bin/ CACHE PATH "Single output directory for building all libraries.") -SET (EXECUTABLE_OUTPUT_PATH - ${Testing_BINARY_DIR}/bin/ CACHE PATH +SET (EXECUTABLE_OUTPUT_PATH + ${Testing_BINARY_DIR}/bin/ CACHE PATH "Single output directory for building all executables.") # diff --git a/Tests/Testing/DartConfig.cmake b/Tests/Testing/DartConfig.cmake index 26af720acb0..9494eeccb1d 100644 --- a/Tests/Testing/DartConfig.cmake +++ b/Tests/Testing/DartConfig.cmake @@ -9,7 +9,7 @@ SET (DROP_SITE_USER "") SET (DROP_SITE_PASSWORD "") SET (TRIGGER_SITE "") -# Dart server configuration +# Dart server configuration # SET (CVS_WEB_URL "") # SET (CVS_WEB_CVSROOT "") # SET (USE_DOXYGEN "Off") diff --git a/Tests/TryCompile/CMakeLists.txt b/Tests/TryCompile/CMakeLists.txt index 938c092c0c8..8bfb61eef34 100644 --- a/Tests/TryCompile/CMakeLists.txt +++ b/Tests/TryCompile/CMakeLists.txt @@ -29,7 +29,7 @@ ENDMACRO(TEST_EXPECT_CONTAINS command expected) # try to compile a file that should compile # also check that COPY_FILE works TRY_COMPILE(SHOULD_PASS - ${TryCompile_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp + ${TryCompile_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp ${TryCompile_SOURCE_DIR}/pass.c OUTPUT_VARIABLE TRY_OUT COPY_FILE ${TryCompile_BINARY_DIR}/CopyOfPass @@ -46,7 +46,7 @@ ENDIF(NOT EXISTS "${TryCompile_BINARY_DIR}/CopyOfPass") # try to compile a file that should not compile TRY_COMPILE(SHOULD_FAIL - ${TryCompile_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp + ${TryCompile_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp ${TryCompile_SOURCE_DIR}/fail.c OUTPUT_VARIABLE TRY_OUT) IF(SHOULD_FAIL) @@ -55,7 +55,7 @@ ENDIF(SHOULD_FAIL) # try to compile a file that should compile TRY_COMPILE(SHOULD_PASS - ${TryCompile_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp + ${TryCompile_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp ${TryCompile_SOURCE_DIR}/pass.c OUTPUT_VARIABLE TRY_OUT) IF(NOT SHOULD_PASS) @@ -64,7 +64,7 @@ ENDIF(NOT SHOULD_PASS) # try to compile a file that should not compile TRY_COMPILE(SHOULD_FAIL - ${TryCompile_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp + ${TryCompile_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp ${TryCompile_SOURCE_DIR}/fail.c OUTPUT_VARIABLE TRY_OUT) IF(SHOULD_FAIL) @@ -80,8 +80,8 @@ IF(NOT SHOULD_FAIL) ELSE(NOT SHOULD_FAIL) MESSAGE("Test failed") ENDIF(NOT SHOULD_FAIL) -TRY_COMPILE(CMAKE_ANSI_FOR_SCOPE - ${TryCompile_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp +TRY_COMPILE(CMAKE_ANSI_FOR_SCOPE + ${TryCompile_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp ${CMAKE_ROOT}/Modules/TestForAnsiForScope.cxx OUTPUT_VARIABLE OUT) IF (CMAKE_ANSI_FOR_SCOPE) MESSAGE("Compiler supports ansi for") @@ -90,13 +90,13 @@ ELSE(CMAKE_ANSI_FOR_SCOPE) ENDIF(CMAKE_ANSI_FOR_SCOPE) TRY_COMPILE(CMAKE_ANSI_FOR_SCOPE - ${TryCompile_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp + ${TryCompile_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp ${CMAKE_ROOT}/Modules/TestForAnsiForScope.cxx OUTPUT_VARIABLE OUT) IF (CMAKE_ANSI_FOR_SCOPE) MESSAGE("Compiler supports ansi for") ELSE(CMAKE_ANSI_FOR_SCOPE) MESSAGE("Compiler does not support ansi for scope") -ENDIF(CMAKE_ANSI_FOR_SCOPE) +ENDIF(CMAKE_ANSI_FOR_SCOPE) MESSAGE("use the module now") INCLUDE(${CMAKE_ROOT}/Modules/TestForANSIForScope.cmake) @@ -124,7 +124,7 @@ ADD_EXECUTABLE(TryCompile pass.c) # also check that OUTPUT_VARIABLE contains both the compile output # and the run output TRY_RUN(SHOULD_RUN SHOULD_COMPILE - ${TryCompile_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp + ${TryCompile_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp ${TryCompile_SOURCE_DIR}/exit_success.c OUTPUT_VARIABLE TRY_OUT) IF(NOT SHOULD_COMPILE) @@ -143,7 +143,7 @@ IF(NOT "${TRY_OUT}" MATCHES "hello world") ENDIF(NOT "${TRY_OUT}" MATCHES "hello world") TRY_RUN(ARG_TEST_RUN ARG_TEST_COMPILE - ${TryCompile_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp + ${TryCompile_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp ${TryCompile_SOURCE_DIR}/expect_arg.c OUTPUT_VARIABLE TRY_OUT ARGS arg1 arg2) @@ -156,7 +156,7 @@ ENDIF(NOT "${ARG_TEST_RUN}" STREQUAL "0") # try to run a file that should compile and run, but return an error TRY_RUN(SHOULD_EXIT_WITH_ERROR SHOULD_COMPILE - ${TryCompile_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp + ${TryCompile_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp ${TryCompile_SOURCE_DIR}/exit_with_error.c COMPILE_OUTPUT_VARIABLE COMPILE_OUTPUT RUN_OUTPUT_VARIABLE RUN_OUTPUT) diff --git a/Tests/TryCompile/expect_arg.c b/Tests/TryCompile/expect_arg.c index 7ca49aa43ea..f18e03f60b7 100644 --- a/Tests/TryCompile/expect_arg.c +++ b/Tests/TryCompile/expect_arg.c @@ -10,7 +10,7 @@ int main(int ac, char*av[]) } if(ac == 3) { - if(strcmp(av[1], "arg1") ==0 + if(strcmp(av[1], "arg1") ==0 && strcmp(av[2], "arg2") ==0) { printf("arg1 and arg2 present and accounted for!\n"); diff --git a/Tests/TryCompile/pass.c b/Tests/TryCompile/pass.c index 40bc5e2dd28..43e8a7ee032 100644 --- a/Tests/TryCompile/pass.c +++ b/Tests/TryCompile/pass.c @@ -3,4 +3,4 @@ int main() return 0; } - + diff --git a/Tests/Tutorial/Step2/MathFunctions/mysqrt.cxx b/Tests/Tutorial/Step2/MathFunctions/mysqrt.cxx index 76b8e2d9db1..62523f69fb0 100644 --- a/Tests/Tutorial/Step2/MathFunctions/mysqrt.cxx +++ b/Tests/Tutorial/Step2/MathFunctions/mysqrt.cxx @@ -8,9 +8,9 @@ double mysqrt(double x) { return 0; } - + double result; - double delta; + double delta; result = x; // do ten iterations diff --git a/Tests/Tutorial/Step3/CMakeLists.txt b/Tests/Tutorial/Step3/CMakeLists.txt index 0b05fd73737..22d71504127 100644 --- a/Tests/Tutorial/Step3/CMakeLists.txt +++ b/Tests/Tutorial/Step3/CMakeLists.txt @@ -32,7 +32,7 @@ target_link_libraries (Tutorial ${EXTRA_LIBS}) # add the install targets install (TARGETS Tutorial DESTINATION bin) -install (FILES "${PROJECT_BINARY_DIR}/TutorialConfig.h" +install (FILES "${PROJECT_BINARY_DIR}/TutorialConfig.h" DESTINATION include) @@ -44,7 +44,7 @@ add_test (TutorialRuns Tutorial 25) # does it sqrt of 25 add_test (TutorialComp25 Tutorial 25) -set_tests_properties (TutorialComp25 +set_tests_properties (TutorialComp25 PROPERTIES PASS_REGULAR_EXPRESSION "25 is 5" ) @@ -63,6 +63,6 @@ set_tests_properties (TutorialSmall # does the usage message work? add_test (TutorialUsage Tutorial) set_tests_properties (TutorialUsage - PROPERTIES + PROPERTIES PASS_REGULAR_EXPRESSION "Usage:.*number" ) diff --git a/Tests/Tutorial/Step3/MathFunctions/mysqrt.cxx b/Tests/Tutorial/Step3/MathFunctions/mysqrt.cxx index 76b8e2d9db1..62523f69fb0 100644 --- a/Tests/Tutorial/Step3/MathFunctions/mysqrt.cxx +++ b/Tests/Tutorial/Step3/MathFunctions/mysqrt.cxx @@ -8,9 +8,9 @@ double mysqrt(double x) { return 0; } - + double result; - double delta; + double delta; result = x; // do ten iterations diff --git a/Tests/Tutorial/Step4/CMakeLists.txt b/Tests/Tutorial/Step4/CMakeLists.txt index 3b24b441696..fbceedbcbb1 100644 --- a/Tests/Tutorial/Step4/CMakeLists.txt +++ b/Tests/Tutorial/Step4/CMakeLists.txt @@ -37,7 +37,7 @@ target_link_libraries (Tutorial ${EXTRA_LIBS}) # add the install targets install (TARGETS Tutorial DESTINATION bin) -install (FILES "${PROJECT_BINARY_DIR}/TutorialConfig.h" +install (FILES "${PROJECT_BINARY_DIR}/TutorialConfig.h" DESTINATION include) # enable testing @@ -49,7 +49,7 @@ add_test (TutorialRuns Tutorial 25) # does the usage message work? add_test (TutorialUsage Tutorial) set_tests_properties (TutorialUsage - PROPERTIES + PROPERTIES PASS_REGULAR_EXPRESSION "Usage:.*number" ) diff --git a/Tests/Tutorial/Step4/MathFunctions/mysqrt.cxx b/Tests/Tutorial/Step4/MathFunctions/mysqrt.cxx index 0cf7db480d3..d081d11d20a 100644 --- a/Tests/Tutorial/Step4/MathFunctions/mysqrt.cxx +++ b/Tests/Tutorial/Step4/MathFunctions/mysqrt.cxx @@ -11,7 +11,7 @@ double mysqrt(double x) { return 0; } - + double result; // if we have both log and exp then use them @@ -19,7 +19,7 @@ double mysqrt(double x) result = exp(log(x)*0.5); fprintf(stdout,"Computing sqrt of %g to be %g using log\n",x,result); #else - double delta; + double delta; result = x; // do ten iterations diff --git a/Tests/Tutorial/Step5/CMakeLists.txt b/Tests/Tutorial/Step5/CMakeLists.txt index 3002ea0846f..dcd735bd25a 100644 --- a/Tests/Tutorial/Step5/CMakeLists.txt +++ b/Tests/Tutorial/Step5/CMakeLists.txt @@ -37,7 +37,7 @@ target_link_libraries (Tutorial ${EXTRA_LIBS}) # add the install targets install (TARGETS Tutorial DESTINATION bin) -install (FILES "${PROJECT_BINARY_DIR}/TutorialConfig.h" +install (FILES "${PROJECT_BINARY_DIR}/TutorialConfig.h" DESTINATION include) # enable testing @@ -49,7 +49,7 @@ add_test (TutorialRuns Tutorial 25) # does the usage message work? add_test (TutorialUsage Tutorial) set_tests_properties (TutorialUsage - PROPERTIES + PROPERTIES PASS_REGULAR_EXPRESSION "Usage:.*number" ) diff --git a/Tests/Tutorial/Step5/MathFunctions/MakeTable.cxx b/Tests/Tutorial/Step5/MathFunctions/MakeTable.cxx index 540254271f4..ef98d5fdcb5 100644 --- a/Tests/Tutorial/Step5/MathFunctions/MakeTable.cxx +++ b/Tests/Tutorial/Step5/MathFunctions/MakeTable.cxx @@ -1,4 +1,4 @@ -// A simple program that builds a sqrt table +// A simple program that builds a sqrt table #include #include @@ -12,14 +12,14 @@ int main (int argc, char *argv[]) { return 1; } - + // open the output file FILE *fout = fopen(argv[1],"w"); if (!fout) { return 1; } - + // create a source file with a table of square roots fprintf(fout,"double sqrtTable[] = {\n"); for (i = 0; i < 10; ++i) diff --git a/Tests/Tutorial/Step5/MathFunctions/mysqrt.cxx b/Tests/Tutorial/Step5/MathFunctions/mysqrt.cxx index 33659b74086..1f9b8871911 100644 --- a/Tests/Tutorial/Step5/MathFunctions/mysqrt.cxx +++ b/Tests/Tutorial/Step5/MathFunctions/mysqrt.cxx @@ -14,11 +14,11 @@ double mysqrt(double x) { return 0; } - + double result; // if we have both log and exp then use them - double delta; + double delta; // use the table to help find an initial value result = x; diff --git a/Tests/Tutorial/Step6/CMakeLists.txt b/Tests/Tutorial/Step6/CMakeLists.txt index 4f70f4fc499..92a29fa3773 100644 --- a/Tests/Tutorial/Step6/CMakeLists.txt +++ b/Tests/Tutorial/Step6/CMakeLists.txt @@ -37,7 +37,7 @@ target_link_libraries (Tutorial ${EXTRA_LIBS}) # add the install targets install (TARGETS Tutorial DESTINATION bin) -install (FILES "${PROJECT_BINARY_DIR}/TutorialConfig.h" +install (FILES "${PROJECT_BINARY_DIR}/TutorialConfig.h" DESTINATION include) # enable testing @@ -49,7 +49,7 @@ add_test (TutorialRuns Tutorial 25) # does the usage message work? add_test (TutorialUsage Tutorial) set_tests_properties (TutorialUsage - PROPERTIES + PROPERTIES PASS_REGULAR_EXPRESSION "Usage:.*number" ) diff --git a/Tests/Tutorial/Step6/MathFunctions/CMakeLists.txt b/Tests/Tutorial/Step6/MathFunctions/CMakeLists.txt index d606ac03e62..9961e69451a 100644 --- a/Tests/Tutorial/Step6/MathFunctions/CMakeLists.txt +++ b/Tests/Tutorial/Step6/MathFunctions/CMakeLists.txt @@ -12,7 +12,7 @@ add_custom_command ( ) set_source_files_properties ( - mysqrt.cxx PROPERTIES + mysqrt.cxx PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Table.h ) diff --git a/Tests/Tutorial/Step6/MathFunctions/MakeTable.cxx b/Tests/Tutorial/Step6/MathFunctions/MakeTable.cxx index 540254271f4..ef98d5fdcb5 100644 --- a/Tests/Tutorial/Step6/MathFunctions/MakeTable.cxx +++ b/Tests/Tutorial/Step6/MathFunctions/MakeTable.cxx @@ -1,4 +1,4 @@ -// A simple program that builds a sqrt table +// A simple program that builds a sqrt table #include #include @@ -12,14 +12,14 @@ int main (int argc, char *argv[]) { return 1; } - + // open the output file FILE *fout = fopen(argv[1],"w"); if (!fout) { return 1; } - + // create a source file with a table of square roots fprintf(fout,"double sqrtTable[] = {\n"); for (i = 0; i < 10; ++i) diff --git a/Tests/Tutorial/Step6/MathFunctions/mysqrt.cxx b/Tests/Tutorial/Step6/MathFunctions/mysqrt.cxx index 33659b74086..1f9b8871911 100644 --- a/Tests/Tutorial/Step6/MathFunctions/mysqrt.cxx +++ b/Tests/Tutorial/Step6/MathFunctions/mysqrt.cxx @@ -14,11 +14,11 @@ double mysqrt(double x) { return 0; } - + double result; // if we have both log and exp then use them - double delta; + double delta; // use the table to help find an initial value result = x; diff --git a/Tests/Tutorial/Step7/CMakeLists.txt b/Tests/Tutorial/Step7/CMakeLists.txt index 42f73f221be..898723ab9b7 100644 --- a/Tests/Tutorial/Step7/CMakeLists.txt +++ b/Tests/Tutorial/Step7/CMakeLists.txt @@ -37,7 +37,7 @@ target_link_libraries (Tutorial ${EXTRA_LIBS}) # add the install targets install (TARGETS Tutorial DESTINATION bin) -install (FILES "${PROJECT_BINARY_DIR}/TutorialConfig.h" +install (FILES "${PROJECT_BINARY_DIR}/TutorialConfig.h" DESTINATION include) # enable testing @@ -49,7 +49,7 @@ add_test (TutorialRuns Tutorial 25) # does the usage message work? add_test (TutorialUsage Tutorial) set_tests_properties (TutorialUsage - PROPERTIES + PROPERTIES PASS_REGULAR_EXPRESSION "Usage:.*number" ) diff --git a/Tests/Tutorial/Step7/MathFunctions/CMakeLists.txt b/Tests/Tutorial/Step7/MathFunctions/CMakeLists.txt index d606ac03e62..9961e69451a 100644 --- a/Tests/Tutorial/Step7/MathFunctions/CMakeLists.txt +++ b/Tests/Tutorial/Step7/MathFunctions/CMakeLists.txt @@ -12,7 +12,7 @@ add_custom_command ( ) set_source_files_properties ( - mysqrt.cxx PROPERTIES + mysqrt.cxx PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Table.h ) diff --git a/Tests/Tutorial/Step7/MathFunctions/MakeTable.cxx b/Tests/Tutorial/Step7/MathFunctions/MakeTable.cxx index 540254271f4..ef98d5fdcb5 100644 --- a/Tests/Tutorial/Step7/MathFunctions/MakeTable.cxx +++ b/Tests/Tutorial/Step7/MathFunctions/MakeTable.cxx @@ -1,4 +1,4 @@ -// A simple program that builds a sqrt table +// A simple program that builds a sqrt table #include #include @@ -12,14 +12,14 @@ int main (int argc, char *argv[]) { return 1; } - + // open the output file FILE *fout = fopen(argv[1],"w"); if (!fout) { return 1; } - + // create a source file with a table of square roots fprintf(fout,"double sqrtTable[] = {\n"); for (i = 0; i < 10; ++i) diff --git a/Tests/Tutorial/Step7/MathFunctions/mysqrt.cxx b/Tests/Tutorial/Step7/MathFunctions/mysqrt.cxx index 33659b74086..1f9b8871911 100644 --- a/Tests/Tutorial/Step7/MathFunctions/mysqrt.cxx +++ b/Tests/Tutorial/Step7/MathFunctions/mysqrt.cxx @@ -14,11 +14,11 @@ double mysqrt(double x) { return 0; } - + double result; // if we have both log and exp then use them - double delta; + double delta; // use the table to help find an initial value result = x; diff --git a/Tests/VSExternalInclude/CMakeLists.txt b/Tests/VSExternalInclude/CMakeLists.txt index a2fd61973e0..4a413d59873 100644 --- a/Tests/VSExternalInclude/CMakeLists.txt +++ b/Tests/VSExternalInclude/CMakeLists.txt @@ -18,12 +18,12 @@ SET(LIB2_BINARY_DIR ${VSExternalInclude_BINARY_DIR}/Lib2) MAKE_DIRECTORY("${LIB2_BINARY_DIR}") # generate lib1 -EXEC_PROGRAM("${CMAKE_COMMAND}" "${LIB1_BINARY_DIR}" ARGS -G\"${CMAKE_GENERATOR}\" +EXEC_PROGRAM("${CMAKE_COMMAND}" "${LIB1_BINARY_DIR}" ARGS -G\"${CMAKE_GENERATOR}\" \"${VSExternalInclude_SOURCE_DIR}/Lib1\" OUTPUT_VARIABLE OUT) MESSAGE("CMAKE Ran with the following output:\n\"${OUT}\"") # generate lib2 -EXEC_PROGRAM("${CMAKE_COMMAND}" "${LIB2_BINARY_DIR}" ARGS -G\"${CMAKE_GENERATOR}\" +EXEC_PROGRAM("${CMAKE_COMMAND}" "${LIB2_BINARY_DIR}" ARGS -G\"${CMAKE_GENERATOR}\" \"${VSExternalInclude_SOURCE_DIR}/Lib2\" OUTPUT_VARIABLE OUT) MESSAGE("CMAKE Ran with the following output:\n\"${OUT}\"") diff --git a/Tests/Wrapping/CMakeLists.txt b/Tests/Wrapping/CMakeLists.txt index c84dedc4780..5f441dd9ecb 100644 --- a/Tests/Wrapping/CMakeLists.txt +++ b/Tests/Wrapping/CMakeLists.txt @@ -11,12 +11,12 @@ SET_DIRECTORY_PROPERTIES(PROPERTIES CLEAN_NO_CUSTOM 1) # # Lib and exe path # -SET (LIBRARY_OUTPUT_PATH - ${Wrapping_BINARY_DIR}/bin/ CACHE INTERNAL +SET (LIBRARY_OUTPUT_PATH + ${Wrapping_BINARY_DIR}/bin/ CACHE INTERNAL "Single output directory for building all libraries.") -SET (EXECUTABLE_OUTPUT_PATH - ${Wrapping_BINARY_DIR}/bin/ CACHE INTERNAL +SET (EXECUTABLE_OUTPUT_PATH + ${Wrapping_BINARY_DIR}/bin/ CACHE INTERNAL "Single output directory for building all executables.") # diff --git a/Tests/Wrapping/qtnoqtmain.cxx b/Tests/Wrapping/qtnoqtmain.cxx index 8b7334a187c..92594d52e03 100644 --- a/Tests/Wrapping/qtnoqtmain.cxx +++ b/Tests/Wrapping/qtnoqtmain.cxx @@ -2,4 +2,4 @@ int main(int ac, char** av) { return 0; } - + diff --git a/Tests/X11/CMakeLists.txt b/Tests/X11/CMakeLists.txt index 03aa09578c5..3859ba2293e 100644 --- a/Tests/X11/CMakeLists.txt +++ b/Tests/X11/CMakeLists.txt @@ -8,8 +8,8 @@ MESSAGE("X11_FOUND: ${X11_FOUND}") ADD_EXECUTABLE (UseX11 X11.c) install(TARGETS UseX11 DESTINATION bin) -# so for universal binaries this test will fail if -# +# so for universal binaries this test will fail if +# IF(APPLE) LIST(LENGTH CMAKE_OSX_ARCHITECTURES NUMARCH) IF(NUMARCH GREATER 1) diff --git a/Tests/X11/HelloWorldX11.cxx b/Tests/X11/HelloWorldX11.cxx index e3c9dd9cf77..f2b8bdd473b 100644 --- a/Tests/X11/HelloWorldX11.cxx +++ b/Tests/X11/HelloWorldX11.cxx @@ -9,7 +9,7 @@ * Copyright (c) 2004 __MyCompanyName__. All rights reserved. * */ - + #ifndef MAIN_H #define MAIN_H 1 @@ -28,10 +28,10 @@ class Main { // constructor Main(int argc, char * const argv[]); //virtual ~Main(); - + private: - + /* here are our X variables */ Display *dis; @@ -53,7 +53,7 @@ class Main { /*** START MAIN.CPP ***/ -// modified from Brian Hammond's Howdy program at +// modified from Brian Hammond's Howdy program at // http://www.insanityengine.com/doc/x11/xintro.html // jeff louie 02.05.2004 @@ -73,11 +73,11 @@ Main::Main (int argc, char * const argv[]) { init_x(); // event loop - while(1) { + while(1) { // get the next event and stuff it into our event variable. // Note: only events we set the mask for are detected! XNextEvent(dis, &event); - + switch (event.type) { int x; @@ -115,19 +115,19 @@ Main::Main (int argc, char * const argv[]) { } } -void Main::init_x() { +void Main::init_x() { unsigned long black,white; dis=XOpenDisplay(NULL); screen=DefaultScreen(dis); black=BlackPixel(dis,screen), white=WhitePixel(dis, screen); - win=XCreateSimpleWindow(dis,DefaultRootWindow(dis),0,0, + win=XCreateSimpleWindow(dis,DefaultRootWindow(dis),0,0, 300, 300, 5,black, white); XSetStandardProperties(dis,win,"Hello World","Hi",None,NULL,0,NULL); XSelectInput(dis, win, ExposureMask|ButtonPressMask|KeyPressMask); // get Graphics Context - gc=XCreateGC(dis, win, 0,0); + gc=XCreateGC(dis, win, 0,0); XSetBackground(dis,gc,white); XSetForeground(dis,gc,black); XClearWindow(dis, win); @@ -137,8 +137,8 @@ void Main::init_x() { void Main::close_x() { XFreeGC(dis, gc); XDestroyWindow(dis,win); - XCloseDisplay(dis); - exit(1); + XCloseDisplay(dis); + exit(1); }; void Main::redraw() { diff --git a/Utilities/CMakeLists.txt b/Utilities/CMakeLists.txt index 798c1639755..8a52e22b355 100644 --- a/Utilities/CMakeLists.txt +++ b/Utilities/CMakeLists.txt @@ -96,7 +96,7 @@ ADD_DOCS(cmake-gui ${CMake_SOURCE_DIR}/Utilities/Doxygen/doxyfile.in) GET_TARGET_PROPERTY(CMD cmake LOCATION) ADD_CUSTOM_COMMAND( OUTPUT ${CMake_BINARY_DIR}/Docs/cmake.txt - COMMAND ${CMD} + COMMAND ${CMD} ARGS --copyright ${CMake_BINARY_DIR}/Docs/Copyright.txt --help-full ${CMake_BINARY_DIR}/Docs/cmake.txt --help-full ${CMake_BINARY_DIR}/Docs/cmake.html diff --git a/Utilities/Doxygen/doc_makeall.sh.in b/Utilities/Doxygen/doc_makeall.sh.in index a1b00e7d015..ed7b521e456 100755 --- a/Utilities/Doxygen/doc_makeall.sh.in +++ b/Utilities/Doxygen/doc_makeall.sh.in @@ -4,7 +4,7 @@ # ------------------------------------------------------------------------- # Path to several tools (_PROG to avoid the typical GZIP env var pb) -# Example: +# Example: # DOXYGEN_PROG=@DOXYGEN@ (INCLUDE(${CMAKE_ROOT}/Modules/FindDoxygen.cmake)) # GZIP_PROG=@GZIP@ (INCLUDE(${CMAKE_ROOT}/Modules/FindCygwin.cmake)) # HHC_PROG=@HHC@ (INCLUDE(${CMAKE_ROOT}/Modules/FindHhc.cmake)) @@ -26,26 +26,26 @@ export WGET_PROG="@WGET@" # wget (remote file retrieval) # PROJECT_NAME: # Documentation/project name. Used in some of the resulting file names and -# xrefs to uniquify two or more projects linked together through their +# xrefs to uniquify two or more projects linked together through their # Doxygen's tag files. Mandatory for each documentation set. # Note: might be the same as the doxyfile's PROJECT_NAME -# Example: +# Example: # PROJECT_NAME=VTK # export PROJECT_NAME=CMake # PATH_TO_VTK_DOX_SCRIPTS: # Path to the directory holding the Perl scripts used to produce the VTK doc -# in Doxygen format. You need the VTK source files or a local copy of +# in Doxygen format. You need the VTK source files or a local copy of # these scripts. -# Example: +# Example: # PATH_TO_VTK_DOX_SCRIPTS=@VTK_SOURCE_DIR@/Utilities/Doxygen # export PATH_TO_VTK_DOX_SCRIPTS="@VTK_SOURCE_DIR@/Utilities/Doxygen" # SOURCE_DIR: # Source directory. The top directory of the source files. -# Example: +# Example: # SOURCE_DIR=@VTK_SOURCE_DIR@ # export SOURCE_DIR="@CMake_SOURCE_DIR@" @@ -54,7 +54,7 @@ export SOURCE_DIR="@CMake_SOURCE_DIR@" # Relative path from the top directory of the source files to the directory # (or top directory) holding the files to document. Useful if several parts # of the same source directory should be documented separately. -# Example: +# Example: # REL_PATH_TO_TOP=. # REL_PATH_TO_TOP=framework/src # @@ -67,7 +67,7 @@ export REL_PATH_TO_TOP=. # This directory is erased at the end of this script, unless you comment # the corresponding line. # DOXTEMP might be used to simplify the syntax. -# Example: +# Example: # DOXTEMP=DOXTEMP=@VTK_BINARY_DIR@/Utilities/Doxygen # INTERMEDIATE_DOX_DIR=$DOXTEMP/dox # @@ -76,7 +76,7 @@ export INTERMEDIATE_DOX_DIR="$DOXTEMP/dox" # DOXYFILE: # Path to the Doxygen configuration file (i.e. doxyfile). -# Example: +# Example: # DOXYFILE=$DOXTEMP/doxyfile # export DOXYFILE="$DOXTEMP/doxyfile" @@ -86,7 +86,7 @@ export DOXYFILE="$DOXTEMP/doxyfile" # Note: should be the same as your doxyfile's OUTPUT_DIRECTORY # If ON, allows the output directory to be erased when some advanced output # file have been produced (HTML Help, or TAR archive for example). -# Example: +# Example: # OUTPUT_DIRECTORY=$DOXTEMP/doc # ALLOW_ERASE_OUTPUT_DIRECTORY=ON # @@ -94,16 +94,16 @@ export OUTPUT_DIRECTORY="$DOXTEMP/doc" export ALLOW_ERASE_OUTPUT_DIRECTORY=ON # COMPILE_HTML_HELP RESULTING_HTML_HELP_FILE: -# Compile the CHM (Compressed HTML) HTML Help file, name of the resulting -# file. If set to ON and name is non-empty these options will actually +# Compile the CHM (Compressed HTML) HTML Help file, name of the resulting +# file. If set to ON and name is non-empty these options will actually # trigger the HTML-Help compiler to create the CHM. The resulting # file (usually index.chm) will be renamed to this name. # Note: if ON, the whole $OUTPUT_DIRECTORY will be erased at the end of -# this script, since this file is considered to be one of the +# this script, since this file is considered to be one of the # advanced final output, unless ALLOW_ERASE_OUTPUT_DIRECTORY is OFF -# Note: your doxyfile should be configured to enable HTML Help creation +# Note: your doxyfile should be configured to enable HTML Help creation # (using GENERATE_HTML = YES, GENERATE_HTMLHELP = YES) -# Example: +# Example: # COMPILE_HTML_HELP=ON # COMPILE_HTML_HELP=@DOCUMENTATION_HTML_HELP@ # RESULTING_HTML_HELP_FILE=$DOXTEMP/vtk4.chm @@ -113,10 +113,10 @@ export RESULTING_HTML_HELP_FILE="$DOXTEMP/$PROJECT_NAME.chm" # CREATE_HTML_TARZ_ARCHIVE RESULTING_HTML_TARZ_ARCHIVE_FILE: # Create a compressed (gzip) tar archive of the html directory (located -# under the OUTPUT_DIRECTORY), and name of the resulting archive file. -# Note: your doxyfile should be configured to enable HTML creation +# under the OUTPUT_DIRECTORY), and name of the resulting archive file. +# Note: your doxyfile should be configured to enable HTML creation # (using GENERATE_HTML = YES) -# Example: +# Example: # CREATE_HTML_TARZ_ARCHIVE=ON # CREATE_HTML_TARZ_ARCHIVE=@DOCUMENTATION_HTML_TARZ@ # RESULTING_HTML_TARZ_ARCHIVE_FILE=$DOXTEMP/vtk4-html.tar.gz diff --git a/Utilities/KWStyle/CMakeLists.txt b/Utilities/KWStyle/CMakeLists.txt index 5b0c84e8b00..fbaa67b37af 100644 --- a/Utilities/KWStyle/CMakeLists.txt +++ b/Utilities/KWStyle/CMakeLists.txt @@ -22,7 +22,7 @@ IF(NOT home) ENDIF() FIND_PROGRAM(KWSTYLE_EXECUTABLE - NAMES KWStyle + NAMES KWStyle PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Kitware Inc.\\KWStyle 1.0.0]/bin" "${home}/Dashboards/Support/KWStyle/bin" diff --git a/Utilities/KWStyle/CMakeMoreChecks.kws.xml.in b/Utilities/KWStyle/CMakeMoreChecks.kws.xml.in index b7078e0cf54..c48e92f77d1 100644 --- a/Utilities/KWStyle/CMakeMoreChecks.kws.xml.in +++ b/Utilities/KWStyle/CMakeMoreChecks.kws.xml.in @@ -1,6 +1,6 @@ - 10 + 10 79
"@CMake_SOURCE_DIR@/Utilities/KWStyle/Headers",false,true
diff --git a/Utilities/Release/Cygwin/CMakeLists.txt b/Utilities/Release/Cygwin/CMakeLists.txt index 2420c97d9b0..565c9a4d67d 100644 --- a/Utilities/Release/Cygwin/CMakeLists.txt +++ b/Utilities/Release/Cygwin/CMakeLists.txt @@ -4,7 +4,7 @@ FOREACH(f ${INSTALLED_CURSES}) IF(NOT "${f}" MATCHES "\\+") STRING(REGEX REPLACE ".*-([0-9]*).dll" "\\1" NUMBER "${f}") IF(NUMBER GREATER MAX) - SET(MAX ${NUMBER}) + SET(MAX ${NUMBER}) ENDIF(NUMBER GREATER MAX) ENDIF(NOT "${f}" MATCHES "\\+") ENDFOREACH(f) diff --git a/Utilities/Release/Cygwin/cygwin-package.sh.in b/Utilities/Release/Cygwin/cygwin-package.sh.in index 9730b333247..dff27f14dbb 100755 --- a/Utilities/Release/Cygwin/cygwin-package.sh.in +++ b/Utilities/Release/Cygwin/cygwin-package.sh.in @@ -4,11 +4,11 @@ TOP_DIR=`cd \`echo "$0" | sed -n '/\//{s/\/[^\/]*$//;p;}'\`;pwd` mkdirs() { ( - mkdir -p "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" + mkdir -p "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" ) } -# cd into +# cd into # untar source tree and apply patch prep() { @@ -23,7 +23,7 @@ prep() conf() { ( - cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" && + cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" && ../bootstrap --parallel=2 ) } @@ -49,8 +49,8 @@ pkg() { ( cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" && - ./bin/cpack && - mv @CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@.tar.bz2 "$TOP_DIR" + ./bin/cpack && + mv @CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@.tar.bz2 "$TOP_DIR" ) } @@ -59,7 +59,7 @@ spkg() ( cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" && ./bin/cpack --config CPackSourceConfig.cmake && - mv @CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@-src.tar.bz2 "$TOP_DIR" + mv @CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@-src.tar.bz2 "$TOP_DIR" ) } diff --git a/Utilities/Release/release_cmake.cmake b/Utilities/Release/release_cmake.cmake index 0c9b3f9c58e..b5b86aff00d 100644 --- a/Utilities/Release/release_cmake.cmake +++ b/Utilities/Release/release_cmake.cmake @@ -48,7 +48,7 @@ endif(NOT HOST) if(NOT DEFINED MAKE) message(FATAL_ERROR "MAKE must be specified with -DMAKE=\"make -j2\"") endif(NOT DEFINED MAKE) - + message("Creating CMake release ${CMAKE_CREATE_VERSION} on ${HOST} with parallel = ${PROCESSORS}") # define a macro to run a remote command @@ -58,8 +58,8 @@ macro(remote_command comment command) message("ssh ${HOST} ${EXTRA_HOP} ${command}") execute_process(COMMAND ssh ${HOST} ${EXTRA_HOP} ${command} RESULT_VARIABLE result INPUT_FILE ${ARGV2}) else(${ARGC} GREATER 2) - message("ssh ${HOST} ${EXTRA_HOP} ${command}") - execute_process(COMMAND ssh ${HOST} ${EXTRA_HOP} ${command} RESULT_VARIABLE result) + message("ssh ${HOST} ${EXTRA_HOP} ${command}") + execute_process(COMMAND ssh ${HOST} ${EXTRA_HOP} ${command} RESULT_VARIABLE result) endif(${ARGC} GREATER 2) if(${result} GREATER 0) message(FATAL_ERROR "Error running command: ${command}, return value = ${result}") @@ -80,7 +80,7 @@ ELSE(RUN_LOCAL) "${RUN_SHELL}" ${SCRIPT_FILE}) ENDIF(RUN_LOCAL) -# now figure out which types of packages were created +# now figure out which types of packages were created set(generators ${CPACK_BINARY_GENERATORS} ${CPACK_SOURCE_GENERATORS}) separate_arguments(generators) foreach(gen ${generators}) @@ -114,9 +114,9 @@ endforeach(gen) set(PROJECT_PREFIX cmake-) foreach(suffix ${SUFFIXES}) message("scp ${HOST}:${FINAL_PATH}/${PROJECT_PREFIX}${suffix} .") - execute_process(COMMAND + execute_process(COMMAND scp ${HOST}:${FINAL_PATH}/${PROJECT_PREFIX}${suffix} . - RESULT_VARIABLE result) + RESULT_VARIABLE result) if(${result} GREATER 0) message("error getting file back scp ${HOST}:${FINAL_PATH}/${PROJECT_PREFIX}${suffix} .") endif(${result} GREATER 0) @@ -126,7 +126,7 @@ endforeach(suffix) if(extra_files) foreach(f ${extra_files}) message("scp ${HOST}:${FINAL_PATH}/${f} .") - execute_process(COMMAND + execute_process(COMMAND scp ${HOST}:${FINAL_PATH}/${f} . RESULT_VARIABLE result) if(${result} GREATER 0) diff --git a/Utilities/Release/release_cmake.sh.in b/Utilities/Release/release_cmake.sh.in index b5ff6dd8933..82c039b434b 100755 --- a/Utilities/Release/release_cmake.sh.in +++ b/Utilities/Release/release_cmake.sh.in @@ -3,7 +3,7 @@ echo "Start release" date echo "" echo "remove and create working directory @CMAKE_RELEASE_DIRECTORY@" -rm -rf @CMAKE_RELEASE_DIRECTORY@ +rm -rf @CMAKE_RELEASE_DIRECTORY@ mkdir @CMAKE_RELEASE_DIRECTORY@ check_exit_value() @@ -12,7 +12,7 @@ check_exit_value() if [ "$VALUE" != "0" ]; then echo "error in $2" exit 1 - fi + fi } if [ ! -z "@CC@" ]; then @@ -77,7 +77,7 @@ if [ ! -z "@USER_OVERRIDE@" ]; then fi echo "Checkout the source for @CMAKE_CREATE_VERSION@" -cd @CMAKE_RELEASE_DIRECTORY@ +cd @CMAKE_RELEASE_DIRECTORY@ if [ ! -z "@GIT_COMMAND@" ]; then # clone the repo without creating any source files in the directory # matching the branch being built (i.e. master CMake-2-8, etc) @@ -97,9 +97,9 @@ else exit 1 fi -cd @CMAKE_RELEASE_DIRECTORY@/@CMAKE_CREATE_VERSION@-build +cd @CMAKE_RELEASE_DIRECTORY@/@CMAKE_CREATE_VERSION@-build -if [ ! -z "@CONFIGURE_WITH_CMAKE@" ]; then +if [ ! -z "@CONFIGURE_WITH_CMAKE@" ]; then echo "Run cmake to configure cmake" @CMAKE_CONFIGURE_PATH@ ../@CMAKE_CREATE_VERSION@ check_exit_value $? "Configure cmake" || exit 1 @@ -125,7 +125,7 @@ if [ -z "@SKIP_TESTS@" ]; then check_exit_value $? "Test cmake" || exit 1 fi -# loop over binary generators +# loop over binary generators generators="@CPACK_BINARY_GENERATORS@" for GEN in $generators; do echo "Create $GEN package" @@ -133,7 +133,7 @@ for GEN in $generators; do check_exit_value $? "Create $GEN package" || exit 1 done -# loop over source generators +# loop over source generators generators="@CPACK_SOURCE_GENERATORS@" for GEN in $generators; do echo "Create $GEN package" diff --git a/Utilities/Release/upload_release.cmake b/Utilities/Release/upload_release.cmake index bd79296a1a8..827e683fd87 100644 --- a/Utilities/Release/upload_release.cmake +++ b/Utilities/Release/upload_release.cmake @@ -19,7 +19,7 @@ set(count 0) foreach(file ${FILES}) if(NOT IS_DIRECTORY ${file}) message("upload ${file} ${UPLOAD_LOC}") - execute_process(COMMAND + execute_process(COMMAND scp ${file} ${UPLOAD_LOC} RESULT_VARIABLE result) if("${result}" GREATER 0) diff --git a/doxygen.config b/doxygen.config index c22f2650d77..82add731e65 100644 --- a/doxygen.config +++ b/doxygen.config @@ -11,219 +11,219 @@ # General configuration options #--------------------------------------------------------------------------- -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. PROJECT_NAME = CMAKE -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = 0.0.1 -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = ./Doxygen -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Dutch, French, Italian, Czech, Swedish, German, Finnish, Japanese, +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Dutch, French, Italian, Czech, Swedish, German, Finnish, Japanese, # Spanish and Russian OUTPUT_LANGUAGE = English -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. DISABLE_INDEX = NO -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = YES -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. EXTRACT_PRIVATE = NO -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. EXTRACT_STATIC = YES -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO -# If the HIDE_UNDOC_CLASSESS tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these class will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. +# If the HIDE_UNDOC_CLASSESS tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these class will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. BRIEF_MEMBER_DESC = YES -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. REPEAT_BRIEF = YES -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. ALWAYS_DETAILED_SEC = NO -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = NO -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. -STRIP_FROM_PATH = +STRIP_FROM_PATH = -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. INTERNAL_DOCS = NO -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a class diagram (in Html and LaTeX) for classes with base or -# super classes. Setting the tag to NO turns the diagrams off. +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a class diagram (in Html and LaTeX) for classes with base or +# super classes. Setting the tag to NO turns the diagrams off. CLASS_DIAGRAMS = YES -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. SOURCE_BROWSER = YES -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. INLINE_SOURCES = NO -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES -# If the CASE_SENSE_NAMES tag is set to NO (the default) then Doxygen -# will only generate file names in lower case letters. If set to -# YES upper case letters are also allowed. This is useful if you have -# classes or files whose names only differ in case and if your file system -# supports case sensitive file names. +# If the CASE_SENSE_NAMES tag is set to NO (the default) then Doxygen +# will only generate file names in lower case letters. If set to +# YES upper case letters are also allowed. This is useful if you have +# classes or files whose names only differ in case and if your file system +# supports case sensitive file names. CASE_SENSE_NAMES = YES -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put list of the files that are included by a file in the documentation -# of that file. +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put list of the files that are included by a file in the documentation +# of that file. SHOW_INCLUDE_FILES = YES -# If the JAVADOC_AUTOBRIEF tag is set to YES (the default) then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the Javadoc-style will -# behave just like the Qt-style comments. +# If the JAVADOC_AUTOBRIEF tag is set to YES (the default) then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the Javadoc-style will +# behave just like the Qt-style comments. JAVADOC_AUTOBRIEF = NO -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# reimplements. +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# reimplements. INHERIT_DOCS = YES -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. INLINE_INFO = YES -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. SORT_MEMBER_DOCS = YES -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 8 -# The ENABLE_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. +# The ENABLE_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. -ENABLED_SECTIONS = +ENABLED_SECTIONS = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = NO -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. WARNINGS = YES -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. WARN_IF_UNDOCUMENTED = YES -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. WARN_FORMAT = "$file:$line: $text" @@ -231,133 +231,133 @@ WARN_FORMAT = "$file:$line: $text" # configuration options related to the input files #--------------------------------------------------------------------------- -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. INPUT = "Source" -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. FILE_PATTERNS = *.h *.txx *.cxx -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. RECURSIVE = YES -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. -EXCLUDE = - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. +EXCLUDE = -EXCLUDE_PATTERNS = +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). +EXCLUDE_PATTERNS = -EXAMPLE_PATH = +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. +EXAMPLE_PATH = -EXAMPLE_PATTERNS = +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). +EXAMPLE_PATTERNS = -IMAGE_PATH = +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. +IMAGE_PATH = -INPUT_FILTER = +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. + +INPUT_FILTER = #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = YES -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 3 -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. -IGNORE_PREFIX = +IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. GENERATE_HTML = YES -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a # standard header. -HTML_HEADER = +HTML_HEADER = -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a # standard footer. -HTML_FOOTER = +HTML_FOOTER = -# The HTML_STYLESHEET tag can be used to specify a user defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet +# The HTML_STYLESHEET tag can be used to specify a user defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet -HTML_STYLESHEET = +HTML_STYLESHEET = -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) -# of the generated HTML documentation. +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) +# of the generated HTML documentation. GENERATE_HTMLHELP = NO @@ -365,52 +365,52 @@ GENERATE_HTMLHELP = NO # configuration options related to the LaTeX output #--------------------------------------------------------------------------- -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. GENERATE_LATEX = YES -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. COMPACT_LATEX = NO -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and +# executive. If left blank a4wide will be used. PAPER_TYPE = a4wide -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. -EXTRA_PACKAGES = +EXTRA_PACKAGES = -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! -LATEX_HEADER = +LATEX_HEADER = -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = NO -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO @@ -418,31 +418,31 @@ LATEX_BATCHMODE = NO # configuration options related to the RTF output #--------------------------------------------------------------------------- -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# For now this is experimental and is disabled by default. The RTF output -# is optimised for Word 97 and may not look too pretty with other readers +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# For now this is experimental and is disabled by default. The RTF output +# is optimised for Word 97 and may not look too pretty with other readers # or editors. GENERATE_RTF = YES -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. COMPACT_RTF = NO -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using a WORD or other. -# programs which support those fields. -# Note: wordpad (write) and others do not support links. +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using a WORD or other. +# programs which support those fields. +# Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO @@ -450,54 +450,54 @@ RTF_HYPERLINKS = NO # configuration options related to the man page output #--------------------------------------------------------------------------- -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages GENERATE_MAN = YES -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 #--------------------------------------------------------------------------- -# Configuration options related to the preprocessor +# Configuration options related to the preprocessor #--------------------------------------------------------------------------- -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. ENABLE_PREPROCESSING = YES -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. MACRO_EXPANSION = YES -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = NO -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. -INCLUDE_PATH = +INCLUDE_PATH = -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. PREDEFINED = "itkNotUsed(x)="\ "itkSetMacro(name,type)= \ @@ -558,140 +558,140 @@ PREDEFINED = "itkNotUsed(x)="\ "ITK_NUMERIC_LIMITS= \ std::numeric_limits" -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED tag. +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED tag. EXPAND_ONLY_PREDEF = YES #--------------------------------------------------------------------------- -# Configuration::addtions related to external references +# Configuration::addtions related to external references #--------------------------------------------------------------------------- -# The TAGFILES tag can be used to specify one or more tagfiles. +# The TAGFILES tag can be used to specify one or more tagfiles. -TAGFILES = +TAGFILES = -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. -GENERATE_TAGFILE = +GENERATE_TAGFILE = -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. ALLEXTERNALS = NO -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- -# Configuration options related to the dot tool +# Configuration options related to the dot tool #--------------------------------------------------------------------------- -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) HAVE_DOT = YES -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES -# If the ENABLE_PREPROCESSING, INCLUDE_GRAPH, and HAVE_DOT tags are set to -# YES then doxygen will generate a graph for each documented file showing -# the direct and indirect include dependencies of the file with other -# documented files. +# If the ENABLE_PREPROCESSING, INCLUDE_GRAPH, and HAVE_DOT tags are set to +# YES then doxygen will generate a graph for each documented file showing +# the direct and indirect include dependencies of the file with other +# documented files. INCLUDE_GRAPH = YES -# If the ENABLE_PREPROCESSING, INCLUDED_BY_GRAPH, and HAVE_DOT tags are set to -# YES then doxygen will generate a graph for each documented header file showing -# the documented files that directly or indirectly include this file +# If the ENABLE_PREPROCESSING, INCLUDED_BY_GRAPH, and HAVE_DOT tags are set to +# YES then doxygen will generate a graph for each documented header file showing +# the documented files that directly or indirectly include this file INCLUDED_BY_GRAPH = YES -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found on the path. +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found on the path. DOT_PATH = -# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. +# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very +# large images. MAX_DOT_GRAPH_WIDTH = 1024 -# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. +# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very +# large images. MAX_DOT_GRAPH_HEIGHT = 1024 #--------------------------------------------------------------------------- -# Configuration::addtions related to the search engine +# Configuration::addtions related to the search engine #--------------------------------------------------------------------------- -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. +# The SEARCHENGINE tag specifies whether or not a search engine should be +# used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = NO -# The CGI_NAME tag should be the name of the CGI script that -# starts the search engine (doxysearch) with the correct parameters. -# A script with this name will be generated by doxygen. +# The CGI_NAME tag should be the name of the CGI script that +# starts the search engine (doxysearch) with the correct parameters. +# A script with this name will be generated by doxygen. CGI_NAME = search.cgi -# The CGI_URL tag should be the absolute URL to the directory where the -# cgi binaries are located. See the documentation of your http daemon for -# details. +# The CGI_URL tag should be the absolute URL to the directory where the +# cgi binaries are located. See the documentation of your http daemon for +# details. -CGI_URL = +CGI_URL = -# The DOC_URL tag should be the absolute URL to the directory where the -# documentation is located. If left blank the absolute path to the -# documentation, with file:// prepended to it, will be used. +# The DOC_URL tag should be the absolute URL to the directory where the +# documentation is located. If left blank the absolute path to the +# documentation, with file:// prepended to it, will be used. -DOC_URL = +DOC_URL = -# The DOC_ABSPATH tag should be the absolute path to the directory where the -# documentation is located. If left blank the directory on the local machine -# will be used. +# The DOC_ABSPATH tag should be the absolute path to the directory where the +# documentation is located. If left blank the directory on the local machine +# will be used. -DOC_ABSPATH = +DOC_ABSPATH = -# The BIN_ABSPATH tag must point to the directory where the doxysearch binary -# is installed. +# The BIN_ABSPATH tag must point to the directory where the doxysearch binary +# is installed. BIN_ABSPATH = /usr/local/bin/ -# The EXT_DOC_PATHS tag can be used to specify one or more paths to -# documentation generated for other projects. This allows doxysearch to search -# the documentation for these projects as well. +# The EXT_DOC_PATHS tag can be used to specify one or more paths to +# documentation generated for other projects. This allows doxysearch to search +# the documentation for these projects as well. -EXT_DOC_PATHS = +EXT_DOC_PATHS =