summaryrefslogtreecommitdiffstats
path: root/Tests/Complex/Executable
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/Complex/Executable')
-rw-r--r--Tests/Complex/Executable/CMakeLists.txt1
-rw-r--r--Tests/Complex/Executable/complex.cxx5
2 files changed, 5 insertions, 1 deletions
diff --git a/Tests/Complex/Executable/CMakeLists.txt b/Tests/Complex/Executable/CMakeLists.txt
index 7468926..93d1abb 100644
--- a/Tests/Complex/Executable/CMakeLists.txt
+++ b/Tests/Complex/Executable/CMakeLists.txt
@@ -1,6 +1,7 @@
#
# Create exe.
#
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTEST_CXX_FLAGS")
SET_SOURCE_FILES_PROPERTIES(complex
COMPILE_FLAGS "-DFILE_HAS_EXTRA_COMPILE_FLAGS")
ADD_EXECUTABLE(complex complex)
diff --git a/Tests/Complex/Executable/complex.cxx b/Tests/Complex/Executable/complex.cxx
index 6607d7d..adde525 100644
--- a/Tests/Complex/Executable/complex.cxx
+++ b/Tests/Complex/Executable/complex.cxx
@@ -132,7 +132,10 @@ int main()
{
cmPassed("Call to file2 function returned 1.");
}
-
+#ifndef TEST_CXX_FLAGS
+ cmFailed("CMake CMAKE_CXX_FLAGS is not being passed to the compiler!");
+#else
+ cmPassed("CMake CMAKE_CXX_FLAGS is being passed to the compiler.");
// ----------------------------------------------------------------------
// Test ADD_DEFINITIONS