summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-01-07 14:39:22 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-01-07 14:39:22 (GMT)
commit855e8759fdf20a209f19f02e8dc5d203f4713a6a (patch)
treedb9481bddcca00eaa5f5da2b632c23f7453125ac /Tests
parentf74b607aa3aaf4910b824bca09b0a369dbc57ee9 (diff)
parent3917d86b261f0b88eb5cf0e8d2700c70cebdbe4b (diff)
downloadCMake-855e8759fdf20a209f19f02e8dc5d203f4713a6a.zip
CMake-855e8759fdf20a209f19f02e8dc5d203f4713a6a.tar.gz
CMake-855e8759fdf20a209f19f02e8dc5d203f4713a6a.tar.bz2
Merge topic 'minor-cleanups'
3917d86 Genex: Add a nullary form for CONFIG 5169130 Help: Document the target properties exported to IMPORTED targets. ee21f1c CompatibleInterface: Test debugging of not-set property. 80e9fe9 Help: Note that language-specific 'built-ins' are set by the project command. 0b5bf8a Help: Mention CMAKE_DISABLE_FIND_PACKAGE_<PackageName> in package docs. 28c865b Tests: simplify Qt4 target usage 6cfe6b8 Help: Fix typo: 'target' -> 'target property' b7deca4 Test: Remove obsolete commented code. 9c9f69f Genex: Make EQUAL support upper case binary literals 6eb3218 Genex: Fix case of methods in the dag checker. 646c6ec Genex: Use a preprocessor loop to implement transitive DAG check. 711fb38 Genex: List transitive properties and methods as a table, not two lists. 802a28f Add cmHasLiteralSuffix API.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/GeneratorExpression/CMakeLists.txt17
-rw-r--r--Tests/GeneratorExpression/check-part1.cmake1
-rw-r--r--Tests/GeneratorExpression/check-part3.cmake6
-rw-r--r--Tests/LinkDirectory/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CompatibleInterface/AutoUic.cmake5
-rw-r--r--Tests/RunCMake/CompatibleInterface/DebugProperties-stderr.txt6
-rw-r--r--Tests/RunCMake/CompatibleInterface/DebugProperties.cmake3
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadCONFIG-stderr.txt11
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadCONFIG.cmake1
9 files changed, 25 insertions, 27 deletions
diff --git a/Tests/GeneratorExpression/CMakeLists.txt b/Tests/GeneratorExpression/CMakeLists.txt
index 4fb7ecd..3b85dc3 100644
--- a/Tests/GeneratorExpression/CMakeLists.txt
+++ b/Tests/GeneratorExpression/CMakeLists.txt
@@ -13,6 +13,7 @@ add_custom_target(check-part1 ALL
-Dtest_1=$<1:content>
-Dtest_1_with_comma=$<1:-Wl,--no-undefined>
-Dconfig=$<CONFIGURATION>
+ -Dshort_config=$<CONFIG>
-Dtest_and_0=$<AND:0>
-Dtest_and_0_0=$<AND:0,0>
-Dtest_and_0_1=$<AND:0,1>
@@ -199,7 +200,7 @@ add_custom_target(check-part3 ALL
-Dequal1=$<EQUAL:1,2>
-Dequal2=$<EQUAL:1,1>
-Dequal3=$<EQUAL:0x1,1>
- -Dequal4=$<EQUAL:0x1,2>
+ -Dequal4=$<EQUAL:0X1,2>
-Dequal5=$<EQUAL:0xA,0xa>
-Dequal6=$<EQUAL:0xA,10>
-Dequal7=$<EQUAL:0xA,012>
@@ -208,15 +209,17 @@ add_custom_target(check-part3 ALL
-Dequal10=$<EQUAL:10,0b1010>
-Dequal11=$<EQUAL:-10,-0xa>
-Dequal12=$<EQUAL:10,+0xa>
- -Dequal13=$<EQUAL:+10,+0xa>
+ -Dequal13=$<EQUAL:+10,+0Xa>
-Dequal14=$<EQUAL:+10,0xa>
- -Dequal15=$<EQUAL:-10,-0xa>
+ -Dequal15=$<EQUAL:-10,-0Xa>
-Dequal16=$<EQUAL:-10,-0b1010>
-Dequal17=$<EQUAL:-10,+0b1010>
- -Dequal18=$<EQUAL:10,+0b1010>
- -Dequal19=$<EQUAL:10,+012>
- -Dequal20=$<EQUAL:10,-012>
- -Dequal21=$<EQUAL:-10,-012>
+ -Dequal18=$<EQUAL:10,+0B1010>
+ -Dequal19=$<EQUAL:10,-0B1010>
+ -Dequal20=$<EQUAL:10,0B1010>
+ -Dequal21=$<EQUAL:10,+012>
+ -Dequal22=$<EQUAL:10,-012>
+ -Dequal23=$<EQUAL:-10,-012>
-P ${CMAKE_CURRENT_SOURCE_DIR}/check-part3.cmake
COMMAND ${CMAKE_COMMAND} -E echo "check done (part 3 of 3)"
VERBATIM
diff --git a/Tests/GeneratorExpression/check-part1.cmake b/Tests/GeneratorExpression/check-part1.cmake
index 9bef159..3207582 100644
--- a/Tests/GeneratorExpression/check-part1.cmake
+++ b/Tests/GeneratorExpression/check-part1.cmake
@@ -2,6 +2,7 @@
include(${CMAKE_CURRENT_LIST_DIR}/check-common.cmake)
message(STATUS "config=[${config}]")
+check(config "${short_config}")
check(test_0 "")
check(test_0_with_comma "")
check(test_1 "content")
diff --git a/Tests/GeneratorExpression/check-part3.cmake b/Tests/GeneratorExpression/check-part3.cmake
index 2c6bf49..70ccfe1 100644
--- a/Tests/GeneratorExpression/check-part3.cmake
+++ b/Tests/GeneratorExpression/check-part3.cmake
@@ -55,6 +55,8 @@ check(equal15 "1")
check(equal16 "1")
check(equal17 "0")
check(equal18 "1")
-check(equal19 "1")
-check(equal20 "0")
+check(equal19 "0")
+check(equal20 "1")
check(equal21 "1")
+check(equal22 "0")
+check(equal23 "1")
diff --git a/Tests/LinkDirectory/CMakeLists.txt b/Tests/LinkDirectory/CMakeLists.txt
index b8d5a04..c60de84 100644
--- a/Tests/LinkDirectory/CMakeLists.txt
+++ b/Tests/LinkDirectory/CMakeLists.txt
@@ -11,13 +11,11 @@ endif()
add_library(mylibA STATIC mylibA.c)
set_property(TARGET mylibA PROPERTY
ARCHIVE_OUTPUT_DIRECTORY "${LinkDirectory_BINARY_DIR}/External/lib")
-# get_property(mylibA TARGET mylibA PROPERTY LOCATION)
# Build a library into our build tree relative to the subproject build tree.
add_library(mylibB STATIC mylibB.c)
set_property(TARGET mylibB PROPERTY
ARCHIVE_OUTPUT_DIRECTORY "${LinkDirectory_BINARY_DIR}/lib")
-# get_property(mylibB TARGET mylibB PROPERTY LOCATION)
# Create a custom target to drive the subproject build.
include(ExternalProject)
diff --git a/Tests/RunCMake/CompatibleInterface/AutoUic.cmake b/Tests/RunCMake/CompatibleInterface/AutoUic.cmake
index 86bd5a0..03635e2 100644
--- a/Tests/RunCMake/CompatibleInterface/AutoUic.cmake
+++ b/Tests/RunCMake/CompatibleInterface/AutoUic.cmake
@@ -1,9 +1,6 @@
find_package(Qt4 REQUIRED)
-set(QT_CORE_TARGET Qt4::QtCore)
-set(QT_GUI_TARGET Qt4::QtGui)
-
set(CMAKE_AUTOUIC ON)
set(CMAKE_DEBUG_TARGET_PROPERTIES AUTOUIC_OPTIONS)
@@ -19,4 +16,4 @@ set_property(TARGET OtherI18n APPEND PROPERTY
)
add_library(LibWidget empty.cpp)
-target_link_libraries(LibWidget KI18n OtherI18n ${QT_GUI_TARGET})
+target_link_libraries(LibWidget KI18n OtherI18n Qt4::QtGui)
diff --git a/Tests/RunCMake/CompatibleInterface/DebugProperties-stderr.txt b/Tests/RunCMake/CompatibleInterface/DebugProperties-stderr.txt
index e3efe28..17b8a5c 100644
--- a/Tests/RunCMake/CompatibleInterface/DebugProperties-stderr.txt
+++ b/Tests/RunCMake/CompatibleInterface/DebugProperties-stderr.txt
@@ -67,6 +67,12 @@ CMake Debug Log:
\* Target "CompatibleInterface" has property content "prop3"
+
CMake Debug Log:
+ String compatibility of property "STRING_PROP4" for target
+ "CompatibleInterface" \(result: "\(unset\)"\):
+
+ \* Target "CompatibleInterface" property not set.
++
+CMake Debug Log:
Numeric minimum compatibility of property "NUMBER_MIN_PROP1" for target
"CompatibleInterface" \(result: "50"\):
diff --git a/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake b/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake
index 42a3af2..0196611 100644
--- a/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake
+++ b/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake
@@ -22,6 +22,7 @@ set_property(TARGET iface1 APPEND PROPERTY
STRING_PROP1
STRING_PROP2
STRING_PROP3
+ STRING_PROP4 # Not set.
)
set_property(TARGET iface1 APPEND PROPERTY
COMPATIBLE_INTERFACE_NUMBER_MIN
@@ -36,7 +37,7 @@ set_property(TARGET iface1 APPEND PROPERTY
set(CMAKE_DEBUG_TARGET_PROPERTIES
BOOL_PROP1 BOOL_PROP2 BOOL_PROP3 BOOL_PROP4 BOOL_PROP5 BOOL_PROP6 BOOL_PROP7
- STRING_PROP1 STRING_PROP2 STRING_PROP3
+ STRING_PROP1 STRING_PROP2 STRING_PROP3 STRING_PROP4
NUMBER_MIN_PROP1 NUMBER_MIN_PROP2
NUMBER_MAX_PROP1 NUMBER_MAX_PROP2
)
diff --git a/Tests/RunCMake/GeneratorExpression/BadCONFIG-stderr.txt b/Tests/RunCMake/GeneratorExpression/BadCONFIG-stderr.txt
index 1cfbf40..964ea4d 100644
--- a/Tests/RunCMake/GeneratorExpression/BadCONFIG-stderr.txt
+++ b/Tests/RunCMake/GeneratorExpression/BadCONFIG-stderr.txt
@@ -1,15 +1,6 @@
CMake Error at BadCONFIG.cmake:1 \(add_custom_target\):
Error evaluating generator expression:
- \$<CONFIG>
-
- \$<CONFIG> expression requires exactly one parameter.
-Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
-+
-CMake Error at BadCONFIG.cmake:1 \(add_custom_target\):
- Error evaluating generator expression:
-
\$<CONFIG:.>
Expression syntax not recognized.
@@ -21,7 +12,7 @@ CMake Error at BadCONFIG.cmake:1 \(add_custom_target\):
\$<CONFIG:Foo,Bar>
- \$<CONFIG> expression requires exactly one parameter.
+ \$<CONFIG> expression requires one or zero parameters.
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
+
diff --git a/Tests/RunCMake/GeneratorExpression/BadCONFIG.cmake b/Tests/RunCMake/GeneratorExpression/BadCONFIG.cmake
index c27ea5f..5c22aaa 100644
--- a/Tests/RunCMake/GeneratorExpression/BadCONFIG.cmake
+++ b/Tests/RunCMake/GeneratorExpression/BadCONFIG.cmake
@@ -1,5 +1,4 @@
add_custom_target(check ALL COMMAND check
- $<CONFIG>
$<CONFIG:.>
$<CONFIG:Foo,Bar>
$<CONFIG:Foo-Bar>