~ubuntu-branches/ubuntu/trusty/cmake3/trusty-updates

« back to all changes in this revision

Viewing changes to Tests/CMakeTests/CMakeHostSystemInformationTest.cmake.in

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2017-02-23 17:55:24 UTC
  • Revision ID: package-import@ubuntu.com-20170223175524-5nh7s4pu97fsa0t7
Tags: upstream-3.5.1
ImportĀ upstreamĀ versionĀ 3.5.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
set(BadArg1-RESULT 1)
 
2
set(BadArg1-STDERR "missing RESULT specification")
 
3
set(BadArg2-RESULT 1)
 
4
set(BadArg2-STDERR "missing QUERY specification")
 
5
set(BadArg3-RESULT 1)
 
6
set(BadArg3-STDERR "does not recognize <key> FOOBAR")
 
7
set(QueryList-RESULT 0)
 
8
set(QueryList-STDERR "\\[[0-9]+;[0-9]+\\]")
 
9
 
 
10
function(try_and_print key)
 
11
        cmake_host_system_information(RESULT RESULT QUERY ${key})
 
12
        message(STATUS "[${key}] [${RESULT}]")
 
13
endfunction()
 
14
 
 
15
message("CTEST_FULL_OUTPUT (Avoid ctest truncation of output)")
 
16
 
 
17
try_and_print(NUMBER_OF_LOGICAL_CORES)
 
18
try_and_print(NUMBER_OF_PHYSICAL_CORES)
 
19
try_and_print(HOSTNAME)
 
20
try_and_print(FQDN)
 
21
try_and_print(TOTAL_VIRTUAL_MEMORY)
 
22
try_and_print(AVAILABLE_VIRTUAL_MEMORY)
 
23
try_and_print(TOTAL_PHYSICAL_MEMORY)
 
24
try_and_print(AVAILABLE_PHYSICAL_MEMORY)
 
25
 
 
26
include("@CMAKE_CURRENT_SOURCE_DIR@/CheckCMakeTest.cmake")
 
27
 
 
28
check_cmake_test(CMakeHostSystemInformation
 
29
        BadArg1
 
30
        BadArg2
 
31
        BadArg3
 
32
        QueryList
 
33
)