summaryrefslogtreecommitdiffstats
path: root/config/cmake/javaTargets.cmake.in
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2021-09-07 13:18:53 (GMT)
committerGitHub <noreply@github.com>2021-09-07 13:18:53 (GMT)
commit216f5ba65e21cef46ce23060fb57cc9f1706f22a (patch)
tree1793da2f67966abe93bb820cdde6ef85ac7aeb53 /config/cmake/javaTargets.cmake.in
parentf679c6ea28599669a3961068b04b415377c64b8b (diff)
downloadhdf5-216f5ba65e21cef46ce23060fb57cc9f1706f22a.zip
hdf5-216f5ba65e21cef46ce23060fb57cc9f1706f22a.tar.gz
hdf5-216f5ba65e21cef46ce23060fb57cc9f1706f22a.tar.bz2
Sync CMake java macros with cmake repo (#982)
Diffstat (limited to 'config/cmake/javaTargets.cmake.in')
-rw-r--r--config/cmake/javaTargets.cmake.in39
1 files changed, 39 insertions, 0 deletions
diff --git a/config/cmake/javaTargets.cmake.in b/config/cmake/javaTargets.cmake.in
new file mode 100644
index 0000000..6e14256
--- /dev/null
+++ b/config/cmake/javaTargets.cmake.in
@@ -0,0 +1,39 @@
+cmake_minimum_required(VERSION 2.8.12)
+cmake_policy(PUSH)
+cmake_policy(VERSION 2.8)
+
+#----------------------------------------------------------------
+# Generated CMake Java target import file.
+#----------------------------------------------------------------
+
+# Protect against multiple inclusion, which would fail when already imported targets are added once more.
+set(_targetsDefined)
+set(_targetsNotDefined)
+set(_expectedTargets)
+foreach(_expectedTarget @__targets__@)
+ list(APPEND _expectedTargets ${_expectedTarget})
+ if(TARGET ${_expectedTarget})
+ list(APPEND _targetsDefined ${_expectedTarget})
+ else()
+ list(APPEND _targetsNotDefined ${_expectedTarget})
+ endif()
+endforeach()
+if("%${_targetsDefined}" STREQUAL "%${_expectedTargets}")
+ unset(_targetsDefined)
+ unset(_targetsNotDefined)
+ unset(_expectedTargets)
+ cmake_policy(POP)
+ return()
+endif()
+if(NOT "${_targetsDefined}" STREQUAL "")
+ message(FATAL_ERROR
+ "Some (but not all) targets in this export set were already defined.\n"
+ "Targets Defined: ${_targetsDefined}\n"
+ "Targets not yet defined: ${_targetsNotDefined}\n")
+endif()
+unset(_targetsDefined)
+unset(_targetsNotDefined)
+unset(_expectedTargets)
+
+@__targetdefs__@
+cmake_policy(POP)