From 4b43800596822ad53b9c4e0ae5d4fe0130d73ad3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Fri, 25 Jan 2019 14:47:48 +0100 Subject: KDat: Add CMake test if the mtget contains mt_gstat. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- kdat/CMakeLists.txt | 5 +++++ kdat/ConfigureChecks.cmake | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 kdat/ConfigureChecks.cmake diff --git a/kdat/CMakeLists.txt b/kdat/CMakeLists.txt index 4adf4fb..69491a4 100644 --- a/kdat/CMakeLists.txt +++ b/kdat/CMakeLists.txt @@ -1,5 +1,10 @@ # This file is genereted by trinity-automake-cmake-convert script by Fat-Zer +##### configure checks + +include( ConfigureChecks.cmake ) + + add_subdirectory( pics ) include_directories( diff --git a/kdat/ConfigureChecks.cmake b/kdat/ConfigureChecks.cmake new file mode 100644 index 0000000..89facde --- /dev/null +++ b/kdat/ConfigureChecks.cmake @@ -0,0 +1,19 @@ +################################################# +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 3 +# +################################################# + +check_cxx_source_compiles(" + #include + int main() { + struct mtget tapeStatus; + return GMT_EOF ( tapeStatus.mt_gstat ); + }" + HAVE_MTGET_GSTAT +) +if( NOT HAVE_MTGET_GSTAT ) + tde_message_fatal( "It is required to build kdat, but mtget does not contain mt_gstat." ) +endif( ) -- cgit v1.2.3