Remove changes introduced accidentally because I was using an older

version of this file (sync with 0b5f66393a).
main
David Lobron 8 years ago
parent 44d05e58a6
commit c036265ece

@ -5,7 +5,7 @@
# List of single-file tests.
set(TESTS
#alignTest.m
alignTest.m
AllocatePair.m
AssociatedObject.m
AssociatedObject2.m
@ -19,45 +19,50 @@ set(TESTS
NestedExceptions.m
PropertyAttributeTest.m
PropertyIntrospectionTest.m
PropertyIntrospectionTest2.m
PropertyIntrospectionTest2_arc.m
ProtocolCreation.m
ResurrectInDealloc_arc.m
RuntimeTest.m
WeakBlock_arc.m
WeakReferences_arc.m
ivar_arc.m
IVarOverlap.m
objc_msgSend.m
msgInterpose.m
NilException.m
MethodArguments.m
zeroSizedIVar.m
exchange.m
)
# Function for adding a test. This takes the name of the test and the list of
# source files as arguments.
function(addtest_flags TEST FLAGS TEST_SOURCE)
if (TEST MATCHES ".*_arc")
function(addtest_flags TEST_NAME FLAGS TEST_SOURCE)
if (${TEST_NAME} MATCHES ".*_arc")
# Only compile the main file with ARC
set_source_files_properties(${TEST_SOURCE}
COMPILE_FLAGS "-fobjc-arc")
# Add the ARC-incompatible definitions of the test class.
list(APPEND TEST_SOURCE "Test.m")
endif()
add_executable(${TEST} ${TEST_SOURCE})
add_test(${TEST} ${TEST})
add_executable(${TEST_NAME} ${TEST_SOURCE})
add_test(${TEST_NAME} ${TEST_NAME})
set(ARC "")
set_target_properties(${TEST} PROPERTIES
set_target_properties(${TEST_NAME} PROPERTIES
INCLUDE_DIRECTORIES "${CMAKE_SOURCE_DIR}"
COMPILE_FLAGS "-fobjc-runtime=gnustep-1.7 -fblocks ${FLAGS}"
LINKER_LANGUAGE C
)
set_property(TEST ${TEST} PROPERTY
set_property(TEST ${TEST_NAME} PROPERTY
ENVIRONMENT "LD_LIBRARY_PATH="
)
target_link_libraries(${TEST} objc)
target_link_libraries(${TEST_NAME} objc)
endfunction(addtest_flags)
foreach(TEST_SOURCE ${TESTS})
get_filename_component(TEST ${TEST_SOURCE} NAME_WE)
addtest_flags(${TEST} "-O0" ${TEST_SOURCE})
addtest_flags("${TEST}_optimised" "-O3" ${TEST_SOURCE})
addtest_flags(${TEST} "-O0 -UNDEBUG" ${TEST_SOURCE})
addtest_flags("${TEST}_optimised" "-O3 -UNDEBUG" ${TEST_SOURCE})
endforeach()
# Tests that are more than a single file.

Loading…
Cancel
Save