diff options
author | Kitware Robot <kwrobot@kitware.com> | 2012-08-13 13:42:58 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-08-13 14:18:39 -0400 |
commit | 7bbaa4283de26864b2e55e819db0884771585467 (patch) | |
tree | ecb748dbe41a13d8bdea77acd0049cde999d933e /Tests/ComplexOneConfig | |
parent | be9db98946b7918f279812fd0616abb650eebed0 (diff) | |
download | cmake-7bbaa4283de26864b2e55e819db0884771585467.tar.gz |
Remove trailing whitespace from most CMake and C/C++ code
Our Git commit hooks disallow modification or addition of lines with
trailing whitespace. Wipe out all remnants of trailing whitespace
everywhere except third-party code.
Run the following shell code:
git ls-files -z -- \
bootstrap doxygen.config '*.readme' \
'*.c' '*.cmake' '*.cpp' '*.cxx' \
'*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \
'*.mm' '*.pike' '*.py' '*.txt' '*.vim' |
egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' |
egrep -z -v '^(Modules/CPack\..*\.in)' |
xargs -0 sed -i 's/ \+$//'
Diffstat (limited to 'Tests/ComplexOneConfig')
-rw-r--r-- | Tests/ComplexOneConfig/CMakeLists.txt | 34 | ||||
-rw-r--r-- | Tests/ComplexOneConfig/Executable/CMakeLists.txt | 4 | ||||
-rw-r--r-- | Tests/ComplexOneConfig/Executable/Temp/CMakeLists.txt | 4 | ||||
-rw-r--r-- | Tests/ComplexOneConfig/Executable/complex.cxx | 132 | ||||
-rw-r--r-- | Tests/ComplexOneConfig/Executable/testcflags.c | 2 | ||||
-rw-r--r-- | Tests/ComplexOneConfig/Library/CMakeLists.txt | 16 | ||||
-rw-r--r-- | Tests/ComplexOneConfig/Library/create_file.cxx | 4 | ||||
-rw-r--r-- | Tests/ComplexOneConfig/Library/testConly.c | 4 | ||||
-rw-r--r-- | Tests/ComplexOneConfig/Library/testConly.h | 2 |
9 files changed, 101 insertions, 101 deletions
diff --git a/Tests/ComplexOneConfig/CMakeLists.txt b/Tests/ComplexOneConfig/CMakeLists.txt index b50501905c..500431cf27 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 345836257f..6ccdaf0261 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 f009550292..989765e3ab 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 1901d9914a..27d70adc81 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 f4d5848442..6c2dd5db32 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 c8efc30226..becf672078 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 d41551980a..050ed0bac3 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 2d83f778e0..a7d20b0b58 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 f1470a8d7e..ba8458923d 100644 --- a/Tests/ComplexOneConfig/Library/testConly.h +++ b/Tests/ComplexOneConfig/Library/testConly.h @@ -10,4 +10,4 @@ #endif CMakeTest_EXPORT int CsharedFunction(); - + |