summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeOnly/find_library/CMakeLists.txt15
-rw-r--r--Tests/CMakeOnly/find_library/lib/A/libXYZ/libtest2.a0
-rw-r--r--Tests/CMakeOnly/find_library/lib/XYZ/libtest1.a0
-rw-r--r--Tests/CMakeOnly/find_library/libXYZ/A/lib/libtest4.a0
-rw-r--r--Tests/CMakeOnly/find_library/libXYZ/A/libXYZ/libtest5.a0
-rw-r--r--Tests/CMakeOnly/find_library/libXYZ/A/libtest6.a0
-rw-r--r--Tests/CMakeOnly/find_library/libXYZ/libtest7.a0
-rw-r--r--Tests/RunCMake/VS10Project/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/VS10Project/VsCSharpCustomTags-check.cmake23
-rw-r--r--Tests/RunCMake/VS10Project/VsCSharpCustomTags.cmake11
-rw-r--r--Tests/RunCMake/VS10Project/foo.cs3
11 files changed, 52 insertions, 1 deletions
diff --git a/Tests/CMakeOnly/find_library/CMakeLists.txt b/Tests/CMakeOnly/find_library/CMakeLists.txt
index 9958650..9c1aad8 100644
--- a/Tests/CMakeOnly/find_library/CMakeLists.txt
+++ b/Tests/CMakeOnly/find_library/CMakeLists.txt
@@ -24,7 +24,7 @@ endmacro()
macro(test_find_library_subst expected)
get_filename_component(dir ${expected} PATH)
get_filename_component(name ${expected} NAME)
- string(REGEX REPLACE "lib/?64" "lib" dir "${dir}")
+ string(REGEX REPLACE "lib/?[36X][24Y][Z]*" "lib" dir "${dir}")
test_find_library(", searched as ${dir}" "${expected}"
NAMES ${name}
PATHS ${CMAKE_CURRENT_SOURCE_DIR}/${dir}
@@ -79,3 +79,16 @@ test_find_library("" A/libtestA.a
NAMES testB testA NAMES_PER_DIR
PATHS ${CMAKE_CURRENT_SOURCE_DIR}/A ${CMAKE_CURRENT_SOURCE_DIR}/B
)
+
+set(CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX "XYZ")
+foreach(libXYZ
+ lib/XYZ/libtest1.a
+ lib/A/libXYZ/libtest2.a
+ lib/libtest3.a
+ libXYZ/A/lib/libtest4.a
+ libXYZ/A/libXYZ/libtest5.a
+ libXYZ/A/libtest6.a
+ libXYZ/libtest7.a
+ )
+ test_find_library_subst(${libXYZ})
+endforeach()
diff --git a/Tests/CMakeOnly/find_library/lib/A/libXYZ/libtest2.a b/Tests/CMakeOnly/find_library/lib/A/libXYZ/libtest2.a
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/CMakeOnly/find_library/lib/A/libXYZ/libtest2.a
diff --git a/Tests/CMakeOnly/find_library/lib/XYZ/libtest1.a b/Tests/CMakeOnly/find_library/lib/XYZ/libtest1.a
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/CMakeOnly/find_library/lib/XYZ/libtest1.a
diff --git a/Tests/CMakeOnly/find_library/libXYZ/A/lib/libtest4.a b/Tests/CMakeOnly/find_library/libXYZ/A/lib/libtest4.a
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/CMakeOnly/find_library/libXYZ/A/lib/libtest4.a
diff --git a/Tests/CMakeOnly/find_library/libXYZ/A/libXYZ/libtest5.a b/Tests/CMakeOnly/find_library/libXYZ/A/libXYZ/libtest5.a
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/CMakeOnly/find_library/libXYZ/A/libXYZ/libtest5.a
diff --git a/Tests/CMakeOnly/find_library/libXYZ/A/libtest6.a b/Tests/CMakeOnly/find_library/libXYZ/A/libtest6.a
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/CMakeOnly/find_library/libXYZ/A/libtest6.a
diff --git a/Tests/CMakeOnly/find_library/libXYZ/libtest7.a b/Tests/CMakeOnly/find_library/libXYZ/libtest7.a
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/CMakeOnly/find_library/libXYZ/libtest7.a
diff --git a/Tests/RunCMake/VS10Project/RunCMakeTest.cmake b/Tests/RunCMake/VS10Project/RunCMakeTest.cmake
index bc1ec97..3af877f 100644
--- a/Tests/RunCMake/VS10Project/RunCMakeTest.cmake
+++ b/Tests/RunCMake/VS10Project/RunCMakeTest.cmake
@@ -3,3 +3,4 @@ run_cmake(VsConfigurationType)
run_cmake(VsTargetsFileReferences)
run_cmake(VsCustomProps)
run_cmake(VsDebuggerWorkingDir)
+run_cmake(VsCSharpCustomTags)
diff --git a/Tests/RunCMake/VS10Project/VsCSharpCustomTags-check.cmake b/Tests/RunCMake/VS10Project/VsCSharpCustomTags-check.cmake
new file mode 100644
index 0000000..70ea193
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/VsCSharpCustomTags-check.cmake
@@ -0,0 +1,23 @@
+set(csProjectFile "${RunCMake_TEST_BINARY_DIR}/foo.csproj")
+if(NOT EXISTS "${csProjectFile}")
+ set(RunCMake_TEST_FAILED "Project file ${csProjectFile} does not exist.")
+ return()
+endif()
+
+set(tagFound FALSE)
+
+set(tagName "MyCustomTag")
+set(tagValue "MyCustomValue")
+
+file(STRINGS "${csProjectFile}" lines)
+foreach(line IN LISTS lines)
+ if(line MATCHES "^ *<${tagName}>${tagValue}</${tagName}>")
+ message(STATUS "foo.csproj has tag ${tagName} with value ${tagValue} defined")
+ set(tagFound TRUE)
+ endif()
+endforeach()
+
+if(NOT tagFound)
+ set(RunCMake_TEST_FAILED "Source file tag ${tagName} with value ${tagValue} not found.")
+ return()
+endif()
diff --git a/Tests/RunCMake/VS10Project/VsCSharpCustomTags.cmake b/Tests/RunCMake/VS10Project/VsCSharpCustomTags.cmake
new file mode 100644
index 0000000..c51e9c3
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/VsCSharpCustomTags.cmake
@@ -0,0 +1,11 @@
+enable_language(CSharp)
+add_library(foo foo.cs)
+
+set(props_file "${CMAKE_CURRENT_SOURCE_DIR}/my.props")
+
+set(tagName "MyCustomTag")
+set(tagValue "MyCustomValue")
+
+set_source_files_properties(foo.cs
+ PROPERTIES
+ VS_CSHARP_${tagName} "${tagValue}")
diff --git a/Tests/RunCMake/VS10Project/foo.cs b/Tests/RunCMake/VS10Project/foo.cs
new file mode 100644
index 0000000..3695dc9
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/foo.cs
@@ -0,0 +1,3 @@
+void foo()
+{
+}