summaryrefslogtreecommitdiffstats
path: root/Tests/Complex/Executable/complex.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2005-07-29 15:56:31 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2005-07-29 15:56:31 (GMT)
commit8dc6db47776e3040c5650ff9b74a0f7793a2c815 (patch)
tree46dba4b499d63efcb88ae399b406f47a3d1bbb6a /Tests/Complex/Executable/complex.cxx
parent4f79ce8f1bea4c3a6259145d052a4c098d34a294 (diff)
downloadCMake-8dc6db47776e3040c5650ff9b74a0f7793a2c815.zip
CMake-8dc6db47776e3040c5650ff9b74a0f7793a2c815.tar.gz
CMake-8dc6db47776e3040c5650ff9b74a0f7793a2c815.tar.bz2
ENH: add new test to make sure c and cxx flags are going to the right files
Diffstat (limited to 'Tests/Complex/Executable/complex.cxx')
-rw-r--r--Tests/Complex/Executable/complex.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/Tests/Complex/Executable/complex.cxx b/Tests/Complex/Executable/complex.cxx
index 7d0cb56..a8356f1 100644
--- a/Tests/Complex/Executable/complex.cxx
+++ b/Tests/Complex/Executable/complex.cxx
@@ -258,6 +258,8 @@ void TestCMGeneratedFileSTream()
cmSystemTools::RemoveFile(file2tmp.c_str());
cmSystemTools::RemoveFile(file3tmp.c_str());
}
+// defined in testcflags.c
+extern "C" int TestCFlags(char* m);
// ======================================================================
@@ -372,6 +374,21 @@ int main()
#else
cmPassed("CMake CMAKE_CXX_FLAGS is being passed to the compiler.");
#endif
+#ifdef TEST_C_FLAGS
+ cmFailed("CMake CMAKE_C_FLAGS are being passed to c++ files the compiler!");
+#else
+ cmPassed("CMake CMAKE_C_FLAGS are not being passed to c++ files.");
+#endif
+ char msg[1024];
+ if(TestCFlags(msg))
+ {
+ cmPassed(
+ "CMake CMAKE_C_FLAGS are being passed to c files and CXX flags are not.");
+ }
+ else
+ {
+ cmFailed(msg);
+ }
// ----------------------------------------------------------------------
// Test ADD_DEFINITIONS