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

Loading…
Cancel
Save