summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeLists.txt1
-rw-r--r--Tests/CompileFeatures/CMakeLists.txt1
-rw-r--r--Tests/CompileFeatures/genex_test.cpp3
-rw-r--r--Tests/Complex/CMakeLists.txt8
-rw-r--r--Tests/Complex/Executable/complex.cxx2
-rw-r--r--Tests/ComplexOneConfig/CMakeLists.txt8
-rw-r--r--Tests/ComplexOneConfig/Executable/complex.cxx2
-rw-r--r--Tests/FindOpenSP/CMakeLists.txt10
-rw-r--r--Tests/FindOpenSP/Test/CMakeLists.txt16
-rw-r--r--Tests/FindOpenSP/Test/main.cxx55
-rw-r--r--Tests/FindOpenSP/Test/test.sgml7
-rw-r--r--Tests/Preprocess/CMakeLists.txt7
-rw-r--r--Tests/Preprocess/preprocess.c2
-rw-r--r--Tests/Preprocess/preprocess.cxx2
-rw-r--r--Tests/RunCMake/CommandLine/E_capabilities-stdout.txt2
-rw-r--r--Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake3
-rw-r--r--Tests/RunCMake/SymlinkTrees/RunCMakeTest.cmake3
-rw-r--r--Tests/RunCMake/XcodeProject/BundleLinkBundle.cmake14
-rw-r--r--Tests/RunCMake/XcodeProject/RunCMakeTest.cmake10
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeSchemaProperty-check.cmake2
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeSchemaProperty.cmake2
-rw-r--r--Tests/RunCMake/XcodeProject/lib_bundle/CMakeLIsts.txt5
-rw-r--r--Tests/RunCMake/XcodeProject/lib_bundle/lib_bundle.cpp6
-rw-r--r--Tests/RunCMake/XcodeProject/main_bundle.cpp9
-rw-r--r--Tests/RunCMake/find_library/IgnoreStagingAndInstallPrefix-stderr.txt43
-rw-r--r--Tests/RunCMake/find_library/IgnoreStagingAndInstallPrefix-stdout.txt3
-rw-r--r--Tests/RunCMake/find_library/IgnoreStagingAndInstallPrefix.cmake1
-rw-r--r--Tests/RunCMake/find_library/IgnoreStagingPrefix-stderr.txt43
-rw-r--r--Tests/RunCMake/find_library/IgnoreStagingPrefix-stdout.txt3
-rw-r--r--Tests/RunCMake/find_library/IgnoreStagingPrefix.cmake1
-rw-r--r--Tests/RunCMake/find_library/RunCMakeTest.cmake2
31 files changed, 269 insertions, 7 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index b7de021..b6fec4d 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -1476,6 +1476,7 @@ if(BUILD_TESTING)
OpenCL
OpenGL
OpenMP
+ OpenSP
OpenSSL
MPI
PNG
diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt
index c6d1e8a..f3d3a73 100644
--- a/Tests/CompileFeatures/CMakeLists.txt
+++ b/Tests/CompileFeatures/CMakeLists.txt
@@ -356,6 +356,7 @@ else()
HAVE_CXX_STD_17=$<COMPILE_FEATURES:cxx_std_17>
HAVE_CXX_STD_20=$<COMPILE_FEATURES:cxx_std_20>
HAVE_CXX_STD_23=$<COMPILE_FEATURES:cxx_std_23>
+ HAVE_CXX_STD_26=$<COMPILE_FEATURES:cxx_std_26>
)
endif()
diff --git a/Tests/CompileFeatures/genex_test.cpp b/Tests/CompileFeatures/genex_test.cpp
index 9c3910e..048f3de 100644
--- a/Tests/CompileFeatures/genex_test.cpp
+++ b/Tests/CompileFeatures/genex_test.cpp
@@ -27,6 +27,9 @@
# if HAVE_CXX_STD_23 && !defined(ALLOW_LATER_STANDARDS)
# error HAVE_CXX_STD_23 is true with CXX_STANDARD == 11
# endif
+# if HAVE_CXX_STD_26 && !defined(ALLOW_LATER_STANDARDS)
+# error HAVE_CXX_STD_26 is true with CXX_STANDARD == 11
+# endif
#endif
#if !HAVE_OVERRIDE_CONTROL
diff --git a/Tests/Complex/CMakeLists.txt b/Tests/Complex/CMakeLists.txt
index 5df22d2..9493a2f 100644
--- a/Tests/Complex/CMakeLists.txt
+++ b/Tests/Complex/CMakeLists.txt
@@ -5,6 +5,14 @@ cmake_minimum_required(VERSION 2.4)
cmake_policy(SET CMP0054 NEW)
project (Complex)
+# Inform the test if the debug configuration is getting built.
+string(APPEND CMAKE_C_FLAGS_RELEASE " -DCOMPLEX_NDEBUG")
+string(APPEND CMAKE_CXX_FLAGS_RELEASE " -DCOMPLEX_NDEBUG")
+string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO " -DCOMPLEX_NDEBUG")
+string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " -DCOMPLEX_NDEBUG")
+string(APPEND CMAKE_C_FLAGS_MINSIZEREL " -DCOMPLEX_NDEBUG")
+string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL " -DCOMPLEX_NDEBUG")
+
# Test that renaming a built-in works when configured multiple times.
message("message")
function(message)
diff --git a/Tests/Complex/Executable/complex.cxx b/Tests/Complex/Executable/complex.cxx
index 49e97d5..67a1645 100644
--- a/Tests/Complex/Executable/complex.cxx
+++ b/Tests/Complex/Executable/complex.cxx
@@ -62,7 +62,7 @@ void cmPassed(const char* Message, const char* m2 = "")
# error This is a problem. Looks like ADD_DEFINITIONS and REMOVE_DEFINITIONS does not work
#endif
-#if defined(NDEBUG) && !defined(CMAKE_IS_FUN_IN_RELEASE_MODE)
+#if defined(COMPLEX_NDEBUG) && !defined(CMAKE_IS_FUN_IN_RELEASE_MODE)
# error Per-configuration directory-level definition not inherited.
#endif
diff --git a/Tests/ComplexOneConfig/CMakeLists.txt b/Tests/ComplexOneConfig/CMakeLists.txt
index 5a4134d..e4fdc68 100644
--- a/Tests/ComplexOneConfig/CMakeLists.txt
+++ b/Tests/ComplexOneConfig/CMakeLists.txt
@@ -5,6 +5,14 @@ cmake_minimum_required(VERSION 2.4)
cmake_policy(SET CMP0054 NEW)
project (Complex)
+# Inform the test if the debug configuration is getting built.
+string(APPEND CMAKE_C_FLAGS_RELEASE " -DCOMPLEX_NDEBUG")
+string(APPEND CMAKE_CXX_FLAGS_RELEASE " -DCOMPLEX_NDEBUG")
+string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO " -DCOMPLEX_NDEBUG")
+string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " -DCOMPLEX_NDEBUG")
+string(APPEND CMAKE_C_FLAGS_MINSIZEREL " -DCOMPLEX_NDEBUG")
+string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL " -DCOMPLEX_NDEBUG")
+
# Try setting a new policy. The IF test is for coverage.
if(POLICY CMP0003)
cmake_policy(SET CMP0003 NEW)
diff --git a/Tests/ComplexOneConfig/Executable/complex.cxx b/Tests/ComplexOneConfig/Executable/complex.cxx
index 54c18f4..097668b 100644
--- a/Tests/ComplexOneConfig/Executable/complex.cxx
+++ b/Tests/ComplexOneConfig/Executable/complex.cxx
@@ -62,7 +62,7 @@ void cmPassed(const char* Message, const char* m2 = "")
# error This is a problem. Looks like ADD_DEFINITIONS and REMOVE_DEFINITIONS does not work
#endif
-#if defined(NDEBUG) && !defined(CMAKE_IS_FUN_IN_RELEASE_MODE)
+#if defined(COMPLEX_NDEBUG) && !defined(CMAKE_IS_FUN_IN_RELEASE_MODE)
# error Per-configuration directory-level definition not inherited.
#endif
diff --git a/Tests/FindOpenSP/CMakeLists.txt b/Tests/FindOpenSP/CMakeLists.txt
new file mode 100644
index 0000000..26826d3
--- /dev/null
+++ b/Tests/FindOpenSP/CMakeLists.txt
@@ -0,0 +1,10 @@
+add_test(NAME FindOpenSP.Test COMMAND
+ ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/FindOpenSP/Test"
+ "${CMake_BINARY_DIR}/Tests/FindOpenSP/Test"
+ ${build_generator_args}
+ --build-project TestFindOpenSP
+ --build-options ${build_options}
+ --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
+ )
diff --git a/Tests/FindOpenSP/Test/CMakeLists.txt b/Tests/FindOpenSP/Test/CMakeLists.txt
new file mode 100644
index 0000000..d8992d9
--- /dev/null
+++ b/Tests/FindOpenSP/Test/CMakeLists.txt
@@ -0,0 +1,16 @@
+cmake_minimum_required(VERSION 3.4)
+project(TestFindOpenSP CXX)
+include(CTest)
+
+find_package(OpenSP REQUIRED)
+
+add_definitions(-DSP_MULTI_BYTE="${OpenSP_MULTI_BYTE}")
+
+add_executable(test_tgt main.cxx)
+target_link_libraries(test_tgt OpenSP::OpenSP)
+add_test(NAME test_tgt COMMAND test_tgt)
+
+add_executable(test_var main.cxx)
+target_include_directories(test_var PRIVATE ${OpenSP_INCLUDE_DIRS})
+target_link_libraries(test_var PRIVATE ${OpenSP_LIBRARIES})
+add_test(NAME test_var COMMAND test_var)
diff --git a/Tests/FindOpenSP/Test/main.cxx b/Tests/FindOpenSP/Test/main.cxx
new file mode 100644
index 0000000..ef8aa2c
--- /dev/null
+++ b/Tests/FindOpenSP/Test/main.cxx
@@ -0,0 +1,55 @@
+#include <cassert>
+#include <string>
+
+#include "ParserEventGeneratorKit.h"
+
+std::string CharStringtostring(const SGMLApplication::CharString source)
+{
+ // The CharString type might have multi-byte characters if SP_MULTI_BYTE was
+ // defined
+ std::string result;
+ result.resize(source.len);
+ for (size_t i = 0; i < source.len; i++) {
+ result[i] = static_cast<char>(source.ptr[i]);
+ }
+ return result;
+}
+
+class OutlineApplication : public SGMLApplication
+{
+public:
+ OutlineApplication()
+ : depth_(0)
+ {
+ }
+ void startElement(const StartElementEvent& event)
+ {
+ for (unsigned i = 0; i < depth_; i++)
+ parsedOutput += "\t";
+ parsedOutput += CharStringtostring(event.gi);
+ depth_++;
+ }
+ void endElement(const EndElementEvent&) { depth_--; }
+ std::string parsedOutput;
+
+private:
+ unsigned depth_;
+};
+
+int main()
+{
+ std::string expectedOutput = "TESTDOC\tTESTELEMENT";
+ char file_name[] = "test.sgml";
+ char* files[] = { file_name, 0 };
+
+ ParserEventGeneratorKit parserKit;
+ EventGenerator* egp = parserKit.makeEventGenerator(1, files);
+ OutlineApplication app;
+ unsigned nErrors = egp->run(app);
+
+ assert(nErrors == 0);
+ assert(app.parsedOutput.compare(expectedOutput) == 0);
+
+ delete egp;
+ return 0;
+}
diff --git a/Tests/FindOpenSP/Test/test.sgml b/Tests/FindOpenSP/Test/test.sgml
new file mode 100644
index 0000000..bbf0da6
--- /dev/null
+++ b/Tests/FindOpenSP/Test/test.sgml
@@ -0,0 +1,7 @@
+ <!DOCTYPE TESTDOC [
+<!ELEMENT TESTDOC - - (TESTELEMENT)+>
+<!ELEMENT TESTELEMENT - - (#PCDATA)>
+]>
+<TESTDOC>
+<TESTELEMENT>Hello</TESTELEMENT>
+</TESTDOC>
diff --git a/Tests/Preprocess/CMakeLists.txt b/Tests/Preprocess/CMakeLists.txt
index 4347459..84ca5e8 100644
--- a/Tests/Preprocess/CMakeLists.txt
+++ b/Tests/Preprocess/CMakeLists.txt
@@ -197,9 +197,14 @@ endif()
#-----------------------------------------------------------------------------
# Inform the test if the debug configuration is getting built.
-# The NDEBUG definition takes care of this for release.
string(APPEND CMAKE_C_FLAGS_DEBUG " -DPREPROCESS_DEBUG")
string(APPEND CMAKE_CXX_FLAGS_DEBUG " -DPREPROCESS_DEBUG")
+string(APPEND CMAKE_C_FLAGS_RELEASE " -DPREPROCESS_NDEBUG")
+string(APPEND CMAKE_CXX_FLAGS_RELEASE " -DPREPROCESS_NDEBUG")
+string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO " -DPREPROCESS_NDEBUG")
+string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " -DPREPROCESS_NDEBUG")
+string(APPEND CMAKE_C_FLAGS_MINSIZEREL " -DPREPROCESS_NDEBUG")
+string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL " -DPREPROCESS_NDEBUG")
# Inform the test if it built from Xcode.
if(PP_XCODE)
diff --git a/Tests/Preprocess/preprocess.c b/Tests/Preprocess/preprocess.c
index b3117da..88f9e97 100644
--- a/Tests/Preprocess/preprocess.c
+++ b/Tests/Preprocess/preprocess.c
@@ -33,7 +33,7 @@ int check_defines_C(void)
result = 0;
}
}
-#ifdef NDEBUG
+#ifdef PREPROCESS_NDEBUG
# ifdef FILE_DEF_DEBUG
{
fprintf(stderr, "FILE_DEF_DEBUG should not be defined in C\n");
diff --git a/Tests/Preprocess/preprocess.cxx b/Tests/Preprocess/preprocess.cxx
index f2fffef..50150d1 100644
--- a/Tests/Preprocess/preprocess.cxx
+++ b/Tests/Preprocess/preprocess.cxx
@@ -35,7 +35,7 @@ int check_defines_CXX()
result = 0;
}
}
-#ifdef NDEBUG
+#ifdef PREPROCESS_NDEBUG
# ifdef FILE_DEF_DEBUG
{
fprintf(stderr, "FILE_DEF_DEBUG should not be defined in CXX\n");
diff --git a/Tests/RunCMake/CommandLine/E_capabilities-stdout.txt b/Tests/RunCMake/CommandLine/E_capabilities-stdout.txt
index 6a932f1..1452c9b 100644
--- a/Tests/RunCMake/CommandLine/E_capabilities-stdout.txt
+++ b/Tests/RunCMake/CommandLine/E_capabilities-stdout.txt
@@ -1 +1 @@
-^{"fileApi":{"requests":\[{"kind":"codemodel","version":\[{"major":2,"minor":4}]},{"kind":"cache","version":\[{"major":2,"minor":0}]},{"kind":"cmakeFiles","version":\[{"major":1,"minor":0}]},{"kind":"toolchains","version":\[{"major":1,"minor":0}]}]},"generators":\[.*\],"serverMode":false,"version":{.*}}$
+^{"fileApi":{"requests":\[{"kind":"codemodel","version":\[{"major":2,"minor":4}]},{"kind":"cache","version":\[{"major":2,"minor":0}]},{"kind":"cmakeFiles","version":\[{"major":1,"minor":0}]},{"kind":"toolchains","version":\[{"major":1,"minor":0}]}]},"generators":\[.*\],"serverMode":false,"tls":(true|false),"version":{.*}}$
diff --git a/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake b/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake
index 84d0479..e6a2605 100644
--- a/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake
@@ -17,7 +17,8 @@ endfunction()
function(run_compiler_launcher_env lang)
string(REGEX REPLACE "-.*" "" core_lang "${lang}")
- set(ENV{CMAKE_${core_lang}_COMPILER_LAUNCHER} "${CMAKE_COMMAND};-E;env;USED_LAUNCHER=1")
+ # Use the noop genexp $<PATH:...> genexp to validate genexp support.
+ set(ENV{CMAKE_${core_lang}_COMPILER_LAUNCHER} "$<PATH:CMAKE_PATH,${CMAKE_COMMAND}>;-E;env;USED_LAUNCHER=1")
run_compiler_launcher(${lang})
unset(ENV{CMAKE_${core_lang}_COMPILER_LAUNCHER})
endfunction()
diff --git a/Tests/RunCMake/SymlinkTrees/RunCMakeTest.cmake b/Tests/RunCMake/SymlinkTrees/RunCMakeTest.cmake
index e5bfac4..58a111a 100644
--- a/Tests/RunCMake/SymlinkTrees/RunCMakeTest.cmake
+++ b/Tests/RunCMake/SymlinkTrees/RunCMakeTest.cmake
@@ -1,5 +1,8 @@
include(RunCMake)
+# Do not let ccache modify paths checked by the test cases.
+unset(ENV{CCACHE_BASEDIR})
+
function(run_symlink_test_case)
file(REMOVE_RECURSE
"${RunCMake_TEST_BINARY_DIR}/CMakeCache.txt"
diff --git a/Tests/RunCMake/XcodeProject/BundleLinkBundle.cmake b/Tests/RunCMake/XcodeProject/BundleLinkBundle.cmake
new file mode 100644
index 0000000..1f3c19d
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/BundleLinkBundle.cmake
@@ -0,0 +1,14 @@
+cmake_minimum_required(VERSION 3.23)
+
+project(BundleLinkBundle CXX)
+
+add_subdirectory(lib_bundle)
+
+add_executable(MainBundle MACOSX_BUNDLE main_bundle.cpp)
+
+target_link_libraries(MainBundle PRIVATE LibBundle)
+
+set_target_properties(MainBundle PROPERTIES
+ MACOSX_BUNDLE "YES"
+ XCODE_LINK_BUILD_PHASE_MODE BUILT_ONLY
+)
diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
index 80c6b73..d20f5a6 100644
--- a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
+++ b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
@@ -151,6 +151,16 @@ endfunction()
XcodeXCConfig()
+function(BundleLinkBundle)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/BundleLinkBundle-build)
+ run_cmake(BundleLinkBundle)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ run_cmake_command(BundleLinkBundle-build ${CMAKE_COMMAND} --build .)
+endfunction()
+
+BundleLinkBundle()
+
+
# Isolate device tests from host architecture selection.
unset(ENV{CMAKE_OSX_ARCHITECTURES})
diff --git a/Tests/RunCMake/XcodeProject/XcodeSchemaProperty-check.cmake b/Tests/RunCMake/XcodeProject/XcodeSchemaProperty-check.cmake
index efd70cf..6bad527 100644
--- a/Tests/RunCMake/XcodeProject/XcodeSchemaProperty-check.cmake
+++ b/Tests/RunCMake/XcodeProject/XcodeSchemaProperty-check.cmake
@@ -29,6 +29,8 @@ check_property("UNDEFINED_BEHAVIOUR_SANITIZER" "enableUBSanitizer")
check_property("UNDEFINED_BEHAVIOUR_SANITIZER_STOP" "stopOnEveryUBSanitizerIssue")
check_property("DISABLE_MAIN_THREAD_CHECKER" "disableMainThreadChecker")
check_property("MAIN_THREAD_CHECKER_STOP" "stopOnEveryMainThreadCheckerIssue")
+check_property("DISABLE_XCODE_SCHEME_ENABLE_GPU_API_VALIDATION" "enableGPUValidationMode")
+check_property("ENABLE_XCODE_SCHEME_ENABLE_GPU_SHADER_VALIDATION" "enableGPUShaderValidationMode")
check_property("MALLOC_SCRIBBLE" "MallocScribble")
check_property("MALLOC_GUARD_EDGES" "MallocGuardEdges")
diff --git a/Tests/RunCMake/XcodeProject/XcodeSchemaProperty.cmake b/Tests/RunCMake/XcodeProject/XcodeSchemaProperty.cmake
index 5edbc89..267e379 100644
--- a/Tests/RunCMake/XcodeProject/XcodeSchemaProperty.cmake
+++ b/Tests/RunCMake/XcodeProject/XcodeSchemaProperty.cmake
@@ -32,6 +32,8 @@ function(create_scheme_for_property scheme property value)
set_target_properties(${scheme} PROPERTIES XCODE_SCHEME_${property} "${value}")
endfunction()
+create_scheme_for_property(DISABLE_XCODE_SCHEME_ENABLE_GPU_API_VALIDATION ENABLE_GPU_API_VALIDATION OFF)
+create_scheme_for_property(ENABLE_XCODE_SCHEME_ENABLE_GPU_SHADER_VALIDATION ENABLE_GPU_SHADER_VALIDATION ON)
create_scheme_for_property(ENABLE_GPU_FRAME_CAPTURE_MODE_1 ENABLE_GPU_FRAME_CAPTURE_MODE 1)
create_scheme_for_property(ENABLE_GPU_FRAME_CAPTURE_MODE_3 ENABLE_GPU_FRAME_CAPTURE_MODE 3)
create_scheme_for_property(ENABLE_GPU_FRAME_CAPTURE_MODE_DISABLED ENABLE_GPU_FRAME_CAPTURE_MODE Disabled)
diff --git a/Tests/RunCMake/XcodeProject/lib_bundle/CMakeLIsts.txt b/Tests/RunCMake/XcodeProject/lib_bundle/CMakeLIsts.txt
new file mode 100644
index 0000000..7a50ce8
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/lib_bundle/CMakeLIsts.txt
@@ -0,0 +1,5 @@
+
+add_library(LibBundle lib_bundle.cpp)
+
+set_target_properties(LibBundle PROPERTIES
+ MACOSX_BUNDLE YES)
diff --git a/Tests/RunCMake/XcodeProject/lib_bundle/lib_bundle.cpp b/Tests/RunCMake/XcodeProject/lib_bundle/lib_bundle.cpp
new file mode 100644
index 0000000..9f74584
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/lib_bundle/lib_bundle.cpp
@@ -0,0 +1,6 @@
+#include <iostream>
+
+void foo()
+{
+ std::cout << "foobar" << std::endl;
+}
diff --git a/Tests/RunCMake/XcodeProject/main_bundle.cpp b/Tests/RunCMake/XcodeProject/main_bundle.cpp
new file mode 100644
index 0000000..11834ac
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/main_bundle.cpp
@@ -0,0 +1,9 @@
+
+extern void foo();
+
+int main()
+{
+
+ foo();
+ return 0;
+}
diff --git a/Tests/RunCMake/find_library/IgnoreStagingAndInstallPrefix-stderr.txt b/Tests/RunCMake/find_library/IgnoreStagingAndInstallPrefix-stderr.txt
new file mode 100644
index 0000000..48d2fad
--- /dev/null
+++ b/Tests/RunCMake/find_library/IgnoreStagingAndInstallPrefix-stderr.txt
@@ -0,0 +1,43 @@
+ find_library called with the following settings:.*
+ VAR: CREATED_LIBRARY
+ NAMES: \"created\"
+ Documentation.*
+ Framework.*
+ AppBundle.*
+ CMAKE_FIND_USE_CMAKE_PATH: 1
+ CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH: 1
+ CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH: 1
+ CMAKE_FIND_USE_CMAKE_SYSTEM_PATH: 1
+ CMAKE_FIND_USE_INSTALL_PREFIX: 0
+
+ find_library considered the following locations:.*
+ The item was not found.*
+ find_library called with the following settings:.*
+ VAR: CREATED_LIBRARY
+ NAMES: \"created\"
+ Documentation.*
+ Framework.*
+ AppBundle.*
+ CMAKE_FIND_USE_CMAKE_PATH: 1
+ CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH: 1
+ CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH: 1
+ CMAKE_FIND_USE_CMAKE_SYSTEM_PATH: 1
+ CMAKE_FIND_USE_INSTALL_PREFIX: 1
+
+ find_library considered the following locations:.*
+ The item was found at.*
+ .*IgnoreStagingAndInstallPrefix-build/lib.*
+ find_library called with the following settings:.*
+ VAR: CREATED_LIBRARY
+ NAMES: \"created\"
+ Documentation.*
+ Framework.*
+ AppBundle.*
+ CMAKE_FIND_USE_CMAKE_PATH: 1
+ CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH: 1
+ CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH: 1
+ CMAKE_FIND_USE_CMAKE_SYSTEM_PATH: 1
+ CMAKE_FIND_USE_INSTALL_PREFIX: 0
+
+ find_library considered the following locations:.*
+ The item was not found.*
diff --git a/Tests/RunCMake/find_library/IgnoreStagingAndInstallPrefix-stdout.txt b/Tests/RunCMake/find_library/IgnoreStagingAndInstallPrefix-stdout.txt
new file mode 100644
index 0000000..ea6614e
--- /dev/null
+++ b/Tests/RunCMake/find_library/IgnoreStagingAndInstallPrefix-stdout.txt
@@ -0,0 +1,3 @@
+-- CREATED_LIBRARY='CREATED_LIBRARY-NOTFOUND'
+-- CREATED_LIBRARY='[^']*/Tests/RunCMake/find_library/IgnoreStagingAndInstallPrefix-build/lib/libcreated.a'
+-- CREATED_LIBRARY='CREATED_LIBRARY-NOTFOUND'
diff --git a/Tests/RunCMake/find_library/IgnoreStagingAndInstallPrefix.cmake b/Tests/RunCMake/find_library/IgnoreStagingAndInstallPrefix.cmake
new file mode 100644
index 0000000..9b5700a
--- /dev/null
+++ b/Tests/RunCMake/find_library/IgnoreStagingAndInstallPrefix.cmake
@@ -0,0 +1 @@
+include(IgnoreInstallPrefix.cmake)
diff --git a/Tests/RunCMake/find_library/IgnoreStagingPrefix-stderr.txt b/Tests/RunCMake/find_library/IgnoreStagingPrefix-stderr.txt
new file mode 100644
index 0000000..784c5fd
--- /dev/null
+++ b/Tests/RunCMake/find_library/IgnoreStagingPrefix-stderr.txt
@@ -0,0 +1,43 @@
+ find_library called with the following settings:.*
+ VAR: CREATED_LIBRARY
+ NAMES: \"created\"
+ Documentation.*
+ Framework.*
+ AppBundle.*
+ CMAKE_FIND_USE_CMAKE_PATH: 1
+ CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH: 1
+ CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH: 1
+ CMAKE_FIND_USE_CMAKE_SYSTEM_PATH: 1
+ CMAKE_FIND_USE_INSTALL_PREFIX: 0
+
+ find_library considered the following locations:.*
+ The item was not found.*
+ find_library called with the following settings:.*
+ VAR: CREATED_LIBRARY
+ NAMES: \"created\"
+ Documentation.*
+ Framework.*
+ AppBundle.*
+ CMAKE_FIND_USE_CMAKE_PATH: 1
+ CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH: 1
+ CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH: 1
+ CMAKE_FIND_USE_CMAKE_SYSTEM_PATH: 1
+ CMAKE_FIND_USE_INSTALL_PREFIX: 1
+
+ find_library considered the following locations:.*
+ The item was found at.*
+ .*IgnoreStagingPrefix-build/lib.*
+ find_library called with the following settings:.*
+ VAR: CREATED_LIBRARY
+ NAMES: \"created\"
+ Documentation.*
+ Framework.*
+ AppBundle.*
+ CMAKE_FIND_USE_CMAKE_PATH: 1
+ CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH: 1
+ CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH: 1
+ CMAKE_FIND_USE_CMAKE_SYSTEM_PATH: 1
+ CMAKE_FIND_USE_INSTALL_PREFIX: 0
+
+ find_library considered the following locations:.*
+ The item was not found.*
diff --git a/Tests/RunCMake/find_library/IgnoreStagingPrefix-stdout.txt b/Tests/RunCMake/find_library/IgnoreStagingPrefix-stdout.txt
new file mode 100644
index 0000000..fd414fb
--- /dev/null
+++ b/Tests/RunCMake/find_library/IgnoreStagingPrefix-stdout.txt
@@ -0,0 +1,3 @@
+-- CREATED_LIBRARY='CREATED_LIBRARY-NOTFOUND'
+-- CREATED_LIBRARY='[^']*/Tests/RunCMake/find_library/IgnoreStagingPrefix-build/lib/libcreated.a'
+-- CREATED_LIBRARY='CREATED_LIBRARY-NOTFOUND'
diff --git a/Tests/RunCMake/find_library/IgnoreStagingPrefix.cmake b/Tests/RunCMake/find_library/IgnoreStagingPrefix.cmake
new file mode 100644
index 0000000..9b5700a
--- /dev/null
+++ b/Tests/RunCMake/find_library/IgnoreStagingPrefix.cmake
@@ -0,0 +1 @@
+include(IgnoreInstallPrefix.cmake)
diff --git a/Tests/RunCMake/find_library/RunCMakeTest.cmake b/Tests/RunCMake/find_library/RunCMakeTest.cmake
index cc005d0..8b223b4 100644
--- a/Tests/RunCMake/find_library/RunCMakeTest.cmake
+++ b/Tests/RunCMake/find_library/RunCMakeTest.cmake
@@ -4,6 +4,8 @@ run_cmake(Created)
run_cmake(FromPrefixPath)
run_cmake(FromPATHEnv)
run_cmake_with_options(IgnoreInstallPrefix "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/IgnoreInstallPrefix-build/")
+run_cmake_with_options(IgnoreStagingPrefix "-DCMAKE_STAGING_PREFIX=${RunCMake_BINARY_DIR}/IgnoreStagingPrefix-build/")
+run_cmake_with_options(IgnoreStagingAndInstallPrefix "-DCMAKE_STAGING_PREFIX=${RunCMake_BINARY_DIR}/IgnoreStagingAndInstallPrefix-build/" "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/IgnoreStagingAndInstallPrefix-build/")
if(UNIX AND NOT CYGWIN)
run_cmake(LibArchLink)
run_cmake(LibSymLink)