diff options
Diffstat (limited to 'test cases/linuxlike')
| -rw-r--r-- | test cases/linuxlike/13 cmake dependency/cmake/FindSomethingLikeZLIB.cmake | 4 | ||||
| -rw-r--r-- | test cases/linuxlike/13 cmake dependency/meson.build | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/test cases/linuxlike/13 cmake dependency/cmake/FindSomethingLikeZLIB.cmake b/test cases/linuxlike/13 cmake dependency/cmake/FindSomethingLikeZLIB.cmake index 4f12706ed..d19f7e8c0 100644 --- a/test cases/linuxlike/13 cmake dependency/cmake/FindSomethingLikeZLIB.cmake +++ b/test cases/linuxlike/13 cmake dependency/cmake/FindSomethingLikeZLIB.cmake @@ -38,6 +38,10 @@ if(NOT C_CODE_RAN) message(FATAL_ERROR "Running C source code failed") endif() +if(NOT SomethingLikeZLIB_FIND_COMPONENTS STREQUAL "required_comp") + message(FATAL_ERROR "Component 'required_comp' was not specified") +endif() + find_dependency(Threads) if(ZLIB_FOUND OR ZLIB_Found) diff --git a/test cases/linuxlike/13 cmake dependency/meson.build b/test cases/linuxlike/13 cmake dependency/meson.build index a76b32789..79acc83c4 100644 --- a/test cases/linuxlike/13 cmake dependency/meson.build +++ b/test cases/linuxlike/13 cmake dependency/meson.build @@ -44,9 +44,9 @@ depPrefEnv = dependency('cmMesonTestDep', required : true, method : 'cmake') # Try to find a dependency with a custom CMake module -depm1 = dependency('SomethingLikeZLIB', required : true, method : 'cmake', cmake_module_path : 'cmake') -depm2 = dependency('SomethingLikeZLIB', required : true, method : 'cmake', cmake_module_path : ['cmake']) -depm3 = dependency('SomethingLikeZLIB', required : true, cmake_module_path : 'cmake') +depm1 = dependency('SomethingLikeZLIB', required : true, components : 'required_comp', method : 'cmake', cmake_module_path : 'cmake') +depm2 = dependency('SomethingLikeZLIB', required : true, components : 'required_comp', method : 'cmake', cmake_module_path : ['cmake']) +depm3 = dependency('SomethingLikeZLIB', required : true, components : ['required_comp'], cmake_module_path : 'cmake') # Test some edge cases with spaces, etc. |
