X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit-third-party%2FCMakeLists.txt;h=dfbe07fd306f8262a0f549d2e017a6966900c4b7;hp=ea5ce5cb312cee9ec7bc6c78056e129a9b3a2400;hb=71f37f16f983957d32defb8456fade32c99fcfef;hpb=941eb8eab76fca967bb8e21456179fc9b4eafea6 diff --git a/automated-tests/src/dali-toolkit-third-party/CMakeLists.txt b/automated-tests/src/dali-toolkit-third-party/CMakeLists.txt index ea5ce5c..dfbe07f 100644 --- a/automated-tests/src/dali-toolkit-third-party/CMakeLists.txt +++ b/automated-tests/src/dali-toolkit-third-party/CMakeLists.txt @@ -12,35 +12,20 @@ SET(TC_SOURCES # Append list of test harness files (Won't get parsed for test cases) LIST(APPEND TC_SOURCES - ../dali-toolkit/dali-toolkit-test-utils/toolkit-accessibility-adaptor.cpp - ../dali-toolkit/dali-toolkit-test-utils/toolkit-application.cpp - ../dali-toolkit/dali-toolkit-test-utils/toolkit-clipboard.cpp - ../dali-toolkit/dali-toolkit-test-utils/toolkit-clipboard-event-notifier.cpp - ../dali-toolkit/dali-toolkit-test-utils/toolkit-event-thread-callback.cpp - ../dali-toolkit/dali-toolkit-test-utils/toolkit-environment-variable.cpp - ../dali-toolkit/dali-toolkit-test-utils/toolkit-imf-manager.cpp - ../dali-toolkit/dali-toolkit-test-utils/toolkit-orientation.cpp - ../dali-toolkit/dali-toolkit-test-utils/toolkit-physical-keyboard.cpp - ../dali-toolkit/dali-toolkit-test-utils/toolkit-style-monitor.cpp - ../dali-toolkit/dali-toolkit-test-utils/toolkit-singleton-service.cpp - ../dali-toolkit/dali-toolkit-test-utils/toolkit-timer.cpp - ../dali-toolkit/dali-toolkit-test-utils/toolkit-tts-player.cpp ../dali-toolkit/dali-toolkit-test-utils/dali-test-suite-utils.cpp - ../dali-toolkit/dali-toolkit-test-utils/dummy-control.cpp ../dali-toolkit/dali-toolkit-test-utils/mesh-builder.cpp ../dali-toolkit/dali-toolkit-test-utils/test-actor-utils.cpp ../dali-toolkit/dali-toolkit-test-utils/test-animation-data.cpp ../dali-toolkit/dali-toolkit-test-utils/test-application.cpp ../dali-toolkit/dali-toolkit-test-utils/test-button.cpp ../dali-toolkit/dali-toolkit-test-utils/test-harness.cpp - ../dali-toolkit/dali-toolkit-test-utils/test-gesture-manager.cpp ../dali-toolkit/dali-toolkit-test-utils/test-gl-abstraction.cpp ../dali-toolkit/dali-toolkit-test-utils/test-gl-sync-abstraction.cpp ../dali-toolkit/dali-toolkit-test-utils/test-platform-abstraction.cpp ../dali-toolkit/dali-toolkit-test-utils/test-render-controller.cpp + ../dali-toolkit/dali-toolkit-test-utils/test-render-surface.cpp ../dali-toolkit/dali-toolkit-test-utils/test-trace-call-stack.cpp ../dali-toolkit/dali-toolkit-test-utils/test-native-image.cpp - facebook-flexbox/layout-test-utils.c ) @@ -50,7 +35,18 @@ PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED dali-toolkit ) -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -ggdb --coverage -Wall -Werror") +# Locate GTest +CMAKE_MINIMUM_REQUIRED(VERSION 2.6) +FIND_PACKAGE(GTest REQUIRED) + +#ADD_COMPILE_OPTIONS( -O0 -ggdb --coverage -Wall -Werror ) +# ADD_COMPILE_OPTIONS( ${${CAPI_LIB}_CFLAGS_OTHER} ) +# This works for a homogenous C++ project, but not for mixed C++/C project +# On CMake >= 3.3, could use +# ADD_COMPILE_OPTIONS( "$<$:${${CAPI_LIB}_CFLAGS_OTHER}>" ) +# However, we need to support CMake 2.8, so instead, fall back to setting the CXX_FLAGS directly: +SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -ggdb --coverage -Wall -Werror" ) +SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${${CAPI_LIB}_CFLAGS_OTHER}" ) FOREACH(directory ${${CAPI_LIB}_LIBRARY_DIRS}) SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -L${directory}") @@ -58,14 +54,17 @@ ENDFOREACH(directory ${CAPI_LIB_LIBRARY_DIRS}) INCLUDE_DIRECTORIES( ../../../ + ../../../dali-toolkit/third-party ${${CAPI_LIB}_INCLUDE_DIRS} ../dali-toolkit/dali-toolkit-test-utils + ${GTEST_INCLUDE_DIRS} ) ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.cpp ${TC_SOURCES}) TARGET_LINK_LIBRARIES(${EXEC_NAME} ${${CAPI_LIB}_LIBRARIES} - -lpthread + -lpthread --coverage + ${GTEST_LIBRARIES} ) INSTALL(PROGRAMS ${EXEC_NAME}