diff options
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt | 3 | ||||
-rw-r--r-- | Tests/CMakeLib/testRST.expect | 6 | ||||
-rw-r--r-- | Tests/CMakeLib/testRSTmod.cmake | 7 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0022/CMP0022-NOWARN-static.cmake | 6 | ||||
-rw-r--r-- | Tests/RunCMake/DisallowedCommands/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/RunCMake/Syntax/RunCMakeTest.cmake | 3 | ||||
-rw-r--r-- | Tests/RunCMake/Syntax/StringBackslash-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/Syntax/StringBackslash-stderr.txt | 6 | ||||
-rw-r--r-- | Tests/RunCMake/Syntax/StringBackslash.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/Syntax/StringContinuation1-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/Syntax/StringContinuation1-stderr.txt | 4 | ||||
-rw-r--r-- | Tests/RunCMake/Syntax/StringContinuation1.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/Syntax/StringContinuation2-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/Syntax/StringContinuation2-stderr.txt | 4 | ||||
-rw-r--r-- | Tests/RunCMake/Syntax/StringContinuation2.cmake | 2 |
15 files changed, 48 insertions, 2 deletions
diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt b/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt index 07d7c43..33757b6 100644 --- a/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt +++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt @@ -22,6 +22,9 @@ generate_export_header(staticlib1) add_library(staticlib2 STATIC staticlib2.cpp) generate_export_header(staticlib2) target_link_libraries(staticlib1 LINK_PUBLIC staticlib2) +if (CMAKE_CXX_COMPILER_ID MATCHES GNU OR CMAKE_CXX_COMPILER_ID MATCHES Clang) + target_link_libraries(staticlib1 LINK_PRIVATE "-Wl,-v") +endif() add_executable(staticlib_exe staticlib_exe.cpp) target_link_libraries(staticlib_exe staticlib1) diff --git a/Tests/CMakeLib/testRST.expect b/Tests/CMakeLib/testRST.expect index 9bd0ca4..744cb88 100644 --- a/Tests/CMakeLib/testRST.expect +++ b/Tests/CMakeLib/testRST.expect @@ -27,6 +27,12 @@ CMake Module Content More CMake Module Content +Bracket Comment Content + +[ +Bracket Comment Content +] + .. cmake:command:: some_cmd Command some_cmd description. diff --git a/Tests/CMakeLib/testRSTmod.cmake b/Tests/CMakeLib/testRSTmod.cmake index dfa793d..8b807a6 100644 --- a/Tests/CMakeLib/testRSTmod.cmake +++ b/Tests/CMakeLib/testRSTmod.cmake @@ -2,3 +2,10 @@ # CMake Module Content #.rst: # More CMake Module Content +#[[.rst: +Bracket Comment Content +# not part of content]] # not part of content +#[=[.rst: +[ +Bracket Comment Content +]]=] # not part of content diff --git a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static.cmake b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static.cmake index 3e4144f..ad3b8df 100644 --- a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static.cmake +++ b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static.cmake @@ -5,4 +5,8 @@ add_library(foo STATIC empty_vs6_1.cpp) add_library(bar STATIC empty_vs6_2.cpp) add_library(bat STATIC empty_vs6_3.cpp) target_link_libraries(foo bar) -target_link_libraries(bar bat) +# The last element here needs to contain a space so that it is a single +# element which is not a valid target name. As bar is a STATIC library, +# this tests that the LINK_ONLY generator expression is not used for +# that element, creating an error. +target_link_libraries(bar bat "-lz -lm") diff --git a/Tests/RunCMake/DisallowedCommands/CMakeLists.txt b/Tests/RunCMake/DisallowedCommands/CMakeLists.txt index e8db6b0..12cd3c7 100644 --- a/Tests/RunCMake/DisallowedCommands/CMakeLists.txt +++ b/Tests/RunCMake/DisallowedCommands/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 2.8.4) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/Syntax/RunCMakeTest.cmake b/Tests/RunCMake/Syntax/RunCMakeTest.cmake index f5e0d11..2d49f76 100644 --- a/Tests/RunCMake/Syntax/RunCMakeTest.cmake +++ b/Tests/RunCMake/Syntax/RunCMakeTest.cmake @@ -14,7 +14,10 @@ run_cmake(CommandError1) run_cmake(CommandError2) run_cmake(String0) run_cmake(String1) +run_cmake(StringBackslash) run_cmake(StringCRLF) +run_cmake(StringContinuation1) +run_cmake(StringContinuation2) run_cmake(StringNoSpace) run_cmake(OneLetter) run_cmake(Unquoted0) diff --git a/Tests/RunCMake/Syntax/StringBackslash-result.txt b/Tests/RunCMake/Syntax/StringBackslash-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Syntax/StringBackslash-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Syntax/StringBackslash-stderr.txt b/Tests/RunCMake/Syntax/StringBackslash-stderr.txt new file mode 100644 index 0000000..214f914 --- /dev/null +++ b/Tests/RunCMake/Syntax/StringBackslash-stderr.txt @@ -0,0 +1,6 @@ +CMake Error at StringBackslash.cmake:1 \(message\): + a\\ + + b +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/Syntax/StringBackslash.cmake b/Tests/RunCMake/Syntax/StringBackslash.cmake new file mode 100644 index 0000000..066be96 --- /dev/null +++ b/Tests/RunCMake/Syntax/StringBackslash.cmake @@ -0,0 +1,2 @@ +message(FATAL_ERROR "a\\ +b") diff --git a/Tests/RunCMake/Syntax/StringContinuation1-result.txt b/Tests/RunCMake/Syntax/StringContinuation1-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Syntax/StringContinuation1-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Syntax/StringContinuation1-stderr.txt b/Tests/RunCMake/Syntax/StringContinuation1-stderr.txt new file mode 100644 index 0000000..05771da --- /dev/null +++ b/Tests/RunCMake/Syntax/StringContinuation1-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at StringContinuation1.cmake:1 \(message\): + ab +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/Syntax/StringContinuation1.cmake b/Tests/RunCMake/Syntax/StringContinuation1.cmake new file mode 100644 index 0000000..ae86bb2 --- /dev/null +++ b/Tests/RunCMake/Syntax/StringContinuation1.cmake @@ -0,0 +1,2 @@ +message(FATAL_ERROR "a\ +b") diff --git a/Tests/RunCMake/Syntax/StringContinuation2-result.txt b/Tests/RunCMake/Syntax/StringContinuation2-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Syntax/StringContinuation2-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Syntax/StringContinuation2-stderr.txt b/Tests/RunCMake/Syntax/StringContinuation2-stderr.txt new file mode 100644 index 0000000..2f4964c --- /dev/null +++ b/Tests/RunCMake/Syntax/StringContinuation2-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at StringContinuation2.cmake:1 \(message\): + a\\b +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/Syntax/StringContinuation2.cmake b/Tests/RunCMake/Syntax/StringContinuation2.cmake new file mode 100644 index 0000000..490a408 --- /dev/null +++ b/Tests/RunCMake/Syntax/StringContinuation2.cmake @@ -0,0 +1,2 @@ +message(FATAL_ERROR "a\\\ +b") |