diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2013-12-13 19:39:47 +0000 |
---|---|---|
committer | Tarmac <Unknown> | 2013-12-13 19:39:47 +0000 |
commit | 79972de2f13e9886330f87c3f7ce3a24f641c46d (patch) | |
tree | 23dae184a48b6ee3659cf2c7163d31fcf8d56f6c /tests/CMakeLists.txt | |
parent | 171d8c455f8dcd00e3e0eb37d02b0ffa82f06cb7 (diff) | |
parent | b91dc2ac50d421d29e22bac9c9564029ba64350d (diff) | |
download | ayatana-indicator-datetime-79972de2f13e9886330f87c3f7ce3a24f641c46d.tar.gz ayatana-indicator-datetime-79972de2f13e9886330f87c3f7ce3a24f641c46d.tar.bz2 ayatana-indicator-datetime-79972de2f13e9886330f87c3f7ce3a24f641c46d.zip |
Make the phone profile's header format sensitive to whether the phone is running in a 12h or 24h locale, and use a 12h or 24h notation accordingly. Fixes: https://bugs.launchpad.net/bugs/1256061.
Approved by PS Jenkins bot, Ted Gould.
Diffstat (limited to 'tests/CMakeLists.txt')
-rw-r--r-- | tests/CMakeLists.txt | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 682896b..6564a25 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,3 +1,12 @@ +# build libgtest +add_library (gtest STATIC + ${GTEST_SOURCE_DIR}/gtest-all.cc + ${GTEST_SOURCE_DIR}/gtest_main.cc) +set_target_properties (gtest PROPERTIES INCLUDE_DIRECTORIES ${INCLUDE_DIRECTORIES} ${GTEST_INCLUDE_DIR}) +set_target_properties (gtest PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS} -w) + +SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -g ${CC_WARNING_ARGS}") + # build the necessary schemas set_directory_properties (PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES gschemas.compiled) @@ -12,12 +21,19 @@ execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} gio-2.0 --variable glib_compil OUTPUT_VARIABLE COMPILE_SCHEMA_EXECUTABLE OUTPUT_STRIP_TRAILING_WHITESPACE) add_custom_command (OUTPUT gschemas.compiled - DEPENDS ${CMAKE_SOURCE_DIR}/data/com.canonical.indicator.session.gschema.xml + DEPENDS ${CMAKE_SOURCE_DIR}/data/com.canonical.indicator.datetime.gschema.xml COMMAND cp -f ${CMAKE_SOURCE_DIR}/data/*gschema.xml ${SCHEMA_DIR} COMMAND ${COMPILE_SCHEMA_EXECUTABLE} ${SCHEMA_DIR}) -# look for hearder in our src dir, and also in the directories where we autogenerate files... +# look for headers in our src dir, and also in the directories where we autogenerate files... include_directories (${CMAKE_SOURCE_DIR}/src) -include_directories (${CMAKE_CURRENT_BINARY_DIR} ${SERVICE_INCLUDE_DIRS}) +include_directories (${CMAKE_CURRENT_BINARY_DIR}) +include_directories (${SERVICE_DEPS_INCLUDE_DIRS}) +# test-formatter +set (TEST_NAME test-formatter) +add_executable (${TEST_NAME} test-formatter.cc) +add_test (${TEST_NAME} ${TEST_NAME}) +add_dependencies (${TEST_NAME} libindicatordatetimeservice) +target_link_libraries (${TEST_NAME} indicatordatetimeservice gtest ${SERVICE_DEPS_LIBRARIES} ${GTEST_LIBS}) |