~ubuntu-branches/ubuntu/lucid/cmake/lucid

« back to all changes in this revision

Viewing changes to Tests/Testing/driver.cmake

  • Committer: Bazaar Package Importer
  • Author(s): Artur Rona
  • Date: 2009-12-16 11:11:54 UTC
  • mfrom: (3.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20091216111154-6accvv6yq86h2hkc
Tags: 2.8.0-5ubuntu1
* Merge from debian testing (LP: #497349). Remaining changes:
  - Keep the Replaces: on cmake-data to cover the Kubuntu version from
    Jaunty in case someone decides to do an (unsupported) Jaunty->Lucid
    upgrade.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Print values for human reference.
 
2
foreach(v
 
3
    configuration
 
4
    perconfig_file_dir
 
5
    perconfig_file_name
 
6
    perconfig_file
 
7
    pcStatic_file
 
8
    pcStatic_linker_file
 
9
    pcShared_file
 
10
    pcShared_linker_file
 
11
    pcShared_soname_file
 
12
    )
 
13
  message("${v}=${${v}}")
 
14
endforeach()
 
15
 
 
16
# Verify that file names match as expected.
 
17
set(pc_file_components ${perconfig_file_dir}/${perconfig_file_name})
 
18
if(NOT "${pc_file_components}" STREQUAL "${perconfig_file}")
 
19
  message(SEND_ERROR
 
20
    "File components ${pc_file_components} do not match ${perconfig_file}")
 
21
endif()
 
22
if(NOT "${pcStatic_file}" STREQUAL "${pcStatic_linker_file}")
 
23
  message(SEND_ERROR
 
24
    "pcStatic_file does not match pcStatic_linker_file:\n"
 
25
    "  ${pcStatic_file}\n"
 
26
    "  ${pcStatic_linker_file}\n"
 
27
    )
 
28
endif()
 
29
 
 
30
# Verify that the implementation files are named correctly.
 
31
foreach(lib pcStatic pcShared)
 
32
  file(STRINGS "${${lib}_file}" info LIMIT_COUNT 1 REGEX "INFO:[^[]*\\[")
 
33
  if(NOT "${info}" MATCHES ".*INFO:symbol\\[${lib}\\].*")
 
34
    message(SEND_ERROR "No INFO:symbol[${lib}] found in:\n  ${${lib}_file}")
 
35
  endif()
 
36
endforeach()
 
37
execute_process(COMMAND ${perconfig_file} RESULT_VARIABLE result)
 
38
if(result)
 
39
  message(SEND_ERROR "Error running:\n  ${perconfig_file}\n(${result})")
 
40
endif()