Remove unused test code

We have not run tests with the "como" compiler or enabled the
experimental ConvLibrary test for years.
This commit is contained in:
Brad King 2012-02-03 15:54:20 -05:00
parent bb29f2765c
commit daa4101619
6 changed files with 29 additions and 118 deletions

View File

@ -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

View File

@ -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)

View File

@ -1,4 +0,0 @@
int bar()
{
return 20;
}

View File

@ -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;
}

View File

@ -1,4 +0,0 @@
int foo()
{
return 10;
}

View File

@ -1,4 +0,0 @@
int car()
{
return 30;
}