summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeLists.txt216
-rw-r--r--Tests/FindIconv/Test/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/export/Empty.cmake1
-rw-r--r--Tests/RunCMake/export/RunCMakeTest.cmake1
4 files changed, 53 insertions, 167 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index b766838..a81ea5b 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -1398,184 +1398,66 @@ ${CMake_SOURCE_DIR}/Utilities/Release/push.bash --dir dev -- '${CMake_BUILD_NIGH
endif()
endif()
- if(CMake_TEST_FindALSA)
- add_subdirectory(FindALSA)
- endif()
+ # test for Find modules, simple cases
+ foreach(_mod IN ITEMS
+ ALSA
+ Boost
+ BZip2
+ CURL
+ Cups
+ Doxygen
+ EnvModules
+ EXPAT
+ Fontconfig
+ Freetype
+ GDAL
+ GIF
+ Git
+ GLEW
+ GSL
+ GTK2
+ Iconv
+ ICU
+ JPEG
+ JsonCpp
+ LibLZMA
+ LibRHash
+ Libinput
+ LibUV
+ LibXml2
+ LTTngUST
+ ODBC
+ OpenCL
+ OpenGL
+ OpenMP
+ OpenSSL
+ MPI
+ PNG
+ Patch
+ PostgreSQL
+ Protobuf
+ SQLite3
+ TIFF
+ Vulkan
+ X11
+ XalanC
+ XercesC
+ )
+ if(CMake_TEST_Find${_mod})
+ add_subdirectory(Find${_mod})
+ endif()
+ endforeach()
if(CMake_TEST_CUDA)
add_subdirectory(Cuda)
add_subdirectory(CudaOnly)
endif()
- if(CMake_TEST_FindBoost)
- add_subdirectory(FindBoost)
- endif()
-
- if(CMake_TEST_FindBZip2)
- add_subdirectory(FindBZip2)
- endif()
-
- if(CMake_TEST_FindCURL)
- add_subdirectory(FindCURL)
- endif()
-
- if(CMake_TEST_FindCups)
- add_subdirectory(FindCups)
- endif()
-
- if(CMake_TEST_FindDoxygen)
- add_subdirectory(FindDoxygen)
- endif()
-
- if(CMake_TEST_FindEnvModules)
- add_subdirectory(FindEnvModules)
- endif()
-
- if(CMake_TEST_FindEXPAT)
- add_subdirectory(FindEXPAT)
- endif()
-
- if(CMake_TEST_FindFontconfig)
- add_subdirectory(FindFontconfig)
- endif()
-
- if(CMake_TEST_FindFreetype)
- add_subdirectory(FindFreetype)
- endif()
-
- if(CMake_TEST_FindGDAL)
- add_subdirectory(FindGDAL)
- endif()
-
- if(CMake_TEST_FindGIF)
- add_subdirectory(FindGIF)
- endif()
-
- if(CMake_TEST_FindGit)
- add_subdirectory(FindGit)
- endif()
-
- if(CMake_TEST_FindGLEW)
- add_subdirectory(FindGLEW)
- endif()
-
- if(CMake_TEST_FindGSL)
- add_subdirectory(FindGSL)
- endif()
-
if(CMake_TEST_FindGTest)
add_subdirectory(FindGTest)
add_subdirectory(GoogleTest)
endif()
- if(CMake_TEST_FindGTK2)
- add_subdirectory(FindGTK2)
- endif()
-
- if(CMake_TEST_FindIconv)
- add_subdirectory(FindIconv)
- endif()
-
- if(CMake_TEST_FindICU)
- add_subdirectory(FindICU)
- endif()
-
- if(CMake_TEST_FindJPEG)
- add_subdirectory(FindJPEG)
- endif()
-
- if(CMake_TEST_FindJsonCpp)
- add_subdirectory(FindJsonCpp)
- endif()
-
- if(CMake_TEST_FindLibLZMA)
- add_subdirectory(FindLibLZMA)
- endif()
-
- if(CMake_TEST_FindLibRHash)
- add_subdirectory(FindLibRHash)
- endif()
-
- if(CMake_TEST_FindLibinput)
- add_subdirectory(FindLibinput)
- endif()
-
- if(CMake_TEST_FindLibUV)
- add_subdirectory(FindLibUV)
- endif()
-
- if(CMake_TEST_FindLibXml2)
- add_subdirectory(FindLibXml2)
- endif()
-
- if(CMake_TEST_FindLTTngUST)
- add_subdirectory(FindLTTngUST)
- endif()
-
- if(CMake_TEST_FindODBC)
- add_subdirectory(FindODBC)
- endif()
-
- if(CMake_TEST_FindOpenCL)
- add_subdirectory(FindOpenCL)
- endif()
-
- if(CMake_TEST_FindOpenGL)
- add_subdirectory(FindOpenGL)
- endif()
-
- if(CMake_TEST_FindOpenMP)
- add_subdirectory(FindOpenMP)
- endif()
-
- if(CMake_TEST_FindOpenSSL)
- add_subdirectory(FindOpenSSL)
- endif()
-
- if(CMake_TEST_FindMPI)
- add_subdirectory(FindMPI)
- endif()
-
- if(CMake_TEST_FindPNG)
- add_subdirectory(FindPNG)
- endif()
-
- if(CMake_TEST_FindPatch)
- add_subdirectory(FindPatch)
- endif()
-
- if(CMake_TEST_FindPostgreSQL)
- add_subdirectory(FindPostgreSQL)
- endif()
-
- if(CMake_TEST_FindProtobuf)
- add_subdirectory(FindProtobuf)
- endif()
-
- if(CMake_TEST_FindSQLite3)
- add_subdirectory(FindSQLite3)
- endif()
-
- if(CMake_TEST_FindTIFF)
- add_subdirectory(FindTIFF)
- endif()
-
- if(CMake_TEST_FindVulkan)
- add_subdirectory(FindVulkan)
- endif()
-
- if(CMake_TEST_FindX11)
- add_subdirectory(FindX11)
- endif()
-
- if(CMake_TEST_FindXalanC)
- add_subdirectory(FindXalanC)
- endif()
-
- if(CMake_TEST_FindXercesC)
- add_subdirectory(FindXercesC)
- endif()
-
if(CMake_TEST_FindPython OR CMake_TEST_FindPython_NumPy)
add_subdirectory(FindPython)
endif()
diff --git a/Tests/FindIconv/Test/CMakeLists.txt b/Tests/FindIconv/Test/CMakeLists.txt
index c59adb3..a6243f5 100644
--- a/Tests/FindIconv/Test/CMakeLists.txt
+++ b/Tests/FindIconv/Test/CMakeLists.txt
@@ -6,9 +6,11 @@ find_package(Iconv REQUIRED)
add_executable(test_iconv_tgt main.cxx)
target_link_libraries(test_iconv_tgt Iconv::Iconv)
+target_compile_features(test_iconv_tgt PRIVATE cxx_std_11)
add_test(NAME test_iconv_tgt COMMAND test_iconv_tgt)
add_executable(test_iconv_var main.cxx)
target_include_directories(test_iconv_var PRIVATE ${Iconv_INCLUDE_DIRS})
target_link_libraries(test_iconv_var PRIVATE ${Iconv_LIBRARIES})
+target_compile_features(test_iconv_var PRIVATE cxx_std_11)
add_test(NAME test_iconv_var COMMAND test_iconv_var)
diff --git a/Tests/RunCMake/export/Empty.cmake b/Tests/RunCMake/export/Empty.cmake
new file mode 100644
index 0000000..2198ddf
--- /dev/null
+++ b/Tests/RunCMake/export/Empty.cmake
@@ -0,0 +1 @@
+export(TARGETS FILE targets.cmake)
diff --git a/Tests/RunCMake/export/RunCMakeTest.cmake b/Tests/RunCMake/export/RunCMakeTest.cmake
index 46bb1fc..97a0ca6 100644
--- a/Tests/RunCMake/export/RunCMakeTest.cmake
+++ b/Tests/RunCMake/export/RunCMakeTest.cmake
@@ -1,6 +1,7 @@
include(RunCMake)
run_cmake(CustomTarget)
+run_cmake(Empty)
run_cmake(TargetNotFound)
run_cmake(AppendExport)
run_cmake(OldIface)