summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-02-03 20:54:20 (GMT)
committerBrad King <brad.king@kitware.com>2012-02-03 20:55:27 (GMT)
commitdaa4101619514d2b7eebbce7a73cd2149b7679b8 (patch)
treebdca5b607446cfddaa7835414a04b86aa6845fcd
parentbb29f2765c0cd752c97862c6eb81975afdcdaed1 (diff)
downloadCMake-daa4101619514d2b7eebbce7a73cd2149b7679b8.zip
CMake-daa4101619514d2b7eebbce7a73cd2149b7679b8.tar.gz
CMake-daa4101619514d2b7eebbce7a73cd2149b7679b8.tar.bz2
Remove unused test code
We have not run tests with the "como" compiler or enabled the experimental ConvLibrary test for years.
-rw-r--r--Tests/CMakeLists.txt78
-rw-r--r--Tests/ConvLibrary/CMakeLists.txt20
-rw-r--r--Tests/ConvLibrary/bar.c4
-rw-r--r--Tests/ConvLibrary/bartest.cxx37
-rw-r--r--Tests/ConvLibrary/foo.cxx4
-rw-r--r--Tests/ConvLibrary/sub1/car.cxx4
6 files changed, 29 insertions, 118 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 2c5acd9..906b40d 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -765,56 +765,36 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/LoadCommandOneConfig")
- # Como does not seem to support shared libraries.
- GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_CXX_COMPILER} NAME_WE)
- IF(CMAKE_BASE_NAME MATCHES "^como$")
- SET(COMPILER_IS_COMO 1)
- ENDIF(CMAKE_BASE_NAME MATCHES "^como$")
- IF(NOT COMPILER_IS_COMO)
- ADD_TEST(complex ${CMAKE_CTEST_COMMAND}
- --build-and-test
- "${CMake_SOURCE_DIR}/Tests/Complex"
- "${CMake_BINARY_DIR}/Tests/Complex"
- --build-two-config
- --build-config-sample "${CMAKE_CTEST_COMMAND}"
- --build-generator ${CMAKE_TEST_GENERATOR}
- --build-project Complex
- --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
- --build-exe-dir "${CMake_BINARY_DIR}/Tests/Complex/bin"
- --build-options
- -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
- --test-command complex
- )
- LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Complex")
+ ADD_TEST(complex ${CMAKE_CTEST_COMMAND}
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/Complex"
+ "${CMake_BINARY_DIR}/Tests/Complex"
+ --build-two-config
+ --build-config-sample "${CMAKE_CTEST_COMMAND}"
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-project Complex
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
+ --build-exe-dir "${CMake_BINARY_DIR}/Tests/Complex/bin"
+ --build-options
+ -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
+ --test-command complex
+ )
+ LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Complex")
- ADD_TEST(complexOneConfig ${CMAKE_CTEST_COMMAND}
- --build-and-test
- "${CMake_SOURCE_DIR}/Tests/ComplexOneConfig"
- "${CMake_BINARY_DIR}/Tests/ComplexOneConfig"
- --build-generator ${CMAKE_TEST_GENERATOR}
- --build-project Complex
- --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
- --build-exe-dir "${CMake_BINARY_DIR}/Tests/ComplexOneConfig/bin"
- --build-options
- -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
- --test-command complex)
- LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/ComplexOneConfig")
- # because of the registry write these tests depend on each other
- SET_TESTS_PROPERTIES ( complex PROPERTIES DEPENDS complexOneConfig)
-
-# This fails on VS 70
-# works on Xcode and makefiles
-# ADD_TEST(ConvLibrary ${CMAKE_CTEST_COMMAND}
-# --build-and-test
-# "${CMake_SOURCE_DIR}/Tests/ConvLibrary"
-# "${CMake_BINARY_DIR}/Tests/ConvLibrary"
-# --build-two-config
-# --build-generator ${CMAKE_TEST_GENERATOR}
-# --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
-# --build-project ConvLibrary
-# --test-command bartest)
-
- ENDIF(NOT COMPILER_IS_COMO)
+ ADD_TEST(complexOneConfig ${CMAKE_CTEST_COMMAND}
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/ComplexOneConfig"
+ "${CMake_BINARY_DIR}/Tests/ComplexOneConfig"
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-project Complex
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
+ --build-exe-dir "${CMake_BINARY_DIR}/Tests/ComplexOneConfig/bin"
+ --build-options
+ -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
+ --test-command complex)
+ LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/ComplexOneConfig")
+ # because of the registry write these tests depend on each other
+ SET_TESTS_PROPERTIES ( complex PROPERTIES DEPENDS complexOneConfig)
ADD_TEST(Example ${CMAKE_CTEST_COMMAND}
--build-and-test
diff --git a/Tests/ConvLibrary/CMakeLists.txt b/Tests/ConvLibrary/CMakeLists.txt
deleted file mode 100644
index afc1cb6..0000000
--- a/Tests/ConvLibrary/CMakeLists.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-cmake_minimum_required (VERSION 2.6)
-project(ConvLibrary)
-
-# create a source list
-set(foo_sources foo.cxx bar.c sub1/car.cxx)
-# create a library foo from the sources
-add_library(foo ${foo_sources})
-# get the object files from the target
-get_target_property(OBJECT_FILES foo OBJECT_FILES)
-message("${OBJECT_FILES}")
-# set the object files as generated
-set_source_files_properties(${OBJECT_FILES} PROPERTIES GENERATED true)
-# create a library bar that contains the object files from foo
-add_library(bar ${OBJECT_FILES})
-# set the linker language since bar only has .obj
-set_target_properties(bar PROPERTIES LINKER_LANGUAGE CXX)
-# make sure foo is built before bar
-add_dependencies(bar foo)
-add_executable(bartest bartest.cxx)
-target_link_libraries(bartest bar)
diff --git a/Tests/ConvLibrary/bar.c b/Tests/ConvLibrary/bar.c
deleted file mode 100644
index d063082..0000000
--- a/Tests/ConvLibrary/bar.c
+++ /dev/null
@@ -1,4 +0,0 @@
-int bar()
-{
- return 20;
-}
diff --git a/Tests/ConvLibrary/bartest.cxx b/Tests/ConvLibrary/bartest.cxx
deleted file mode 100644
index ab95773..0000000
--- a/Tests/ConvLibrary/bartest.cxx
+++ /dev/null
@@ -1,37 +0,0 @@
-extern "C" int bar();
-int foo();
-int car();
-
-#include <stdio.h>
-int main()
-{
- if(foo() == 10)
- {
- printf("foo is 10!\n");
- }
- else
- {
- printf("foo is not 10 error!\n");
- return -1;
- }
- if(bar() == 20)
- {
- printf("bar is 20!\n");
- }
- else
- {
- printf("bar is not 20 error!\n");
- return -1;
- }
- if(car() == 30)
- {
- printf("car is 30!\n");
- }
- else
- {
- printf("car is not 30 error!\n");
- return -1;
- }
- printf("Test past\n");
- return 0;
-}
diff --git a/Tests/ConvLibrary/foo.cxx b/Tests/ConvLibrary/foo.cxx
deleted file mode 100644
index 1f46ef4..0000000
--- a/Tests/ConvLibrary/foo.cxx
+++ /dev/null
@@ -1,4 +0,0 @@
-int foo()
-{
- return 10;
-}
diff --git a/Tests/ConvLibrary/sub1/car.cxx b/Tests/ConvLibrary/sub1/car.cxx
deleted file mode 100644
index aa66726..0000000
--- a/Tests/ConvLibrary/sub1/car.cxx
+++ /dev/null
@@ -1,4 +0,0 @@
-int car()
-{
- return 30;
-}