summaryrefslogtreecommitdiffstats
path: root/Tests/ComplexOneConfig/Executable
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/ComplexOneConfig/Executable')
-rw-r--r--Tests/ComplexOneConfig/Executable/CMakeLists.txt4
-rw-r--r--Tests/ComplexOneConfig/Executable/Temp/CMakeLists.txt4
-rw-r--r--Tests/ComplexOneConfig/Executable/complex.cxx132
-rw-r--r--Tests/ComplexOneConfig/Executable/testcflags.c2
4 files changed, 71 insertions, 71 deletions
diff --git a/Tests/ComplexOneConfig/Executable/CMakeLists.txt b/Tests/ComplexOneConfig/Executable/CMakeLists.txt
index 3458362..6ccdaf0 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 f009550..989765e 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 1901d99..27d70ad 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 f4d5848..6c2dd5d 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