From 571990d5c41dc3a0e4ffb3ec18af689576ad5594 Mon Sep 17 00:00:00 2001
From: Allen Byrne <50328838+byrnHDF@users.noreply.github.com>
Date: Wed, 3 May 2023 11:45:16 -0500
Subject: Changes to isolate API Test option files and use fetchcontent (#2880)
---
config/cmake/cacheinit.cmake | 11 +
doxygen/dox/Overview.dox | 2 +-
test/API/CMake/CheckAsan.cmake | 37 -
test/API/CMake/CheckUbsan.cmake | 37 -
test/API/CMakeLists.txt | 38 +-
test/API/driver/CMakeLists.txt | 37 +-
test/API/driver/kwsys/.clang-format | 22 -
test/API/driver/kwsys/.hooks-config | 2 -
test/API/driver/kwsys/Base64.c | 225 -
test/API/driver/kwsys/Base64.h.in | 110 -
test/API/driver/kwsys/CMakeLists.txt | 1260 -----
test/API/driver/kwsys/CONTRIBUTING.rst | 49 -
test/API/driver/kwsys/CTestConfig.cmake | 9 -
test/API/driver/kwsys/CTestCustom.cmake.in | 14 -
test/API/driver/kwsys/CommandLineArguments.cxx | 768 ---
test/API/driver/kwsys/CommandLineArguments.hxx.in | 270 -
test/API/driver/kwsys/Configure.h.in | 89 -
test/API/driver/kwsys/Configure.hxx.in | 65 -
test/API/driver/kwsys/ConsoleBuf.hxx.in | 398 --
test/API/driver/kwsys/Copyright.txt | 38 -
test/API/driver/kwsys/Directory.cxx | 236 -
test/API/driver/kwsys/Directory.hxx.in | 72 -
test/API/driver/kwsys/DynamicLoader.cxx | 495 --
test/API/driver/kwsys/DynamicLoader.hxx.in | 106 -
test/API/driver/kwsys/Encoding.h.in | 69 -
test/API/driver/kwsys/Encoding.hxx.in | 80 -
test/API/driver/kwsys/EncodingC.c | 72 -
test/API/driver/kwsys/EncodingCXX.cxx | 288 --
test/API/driver/kwsys/ExtraTest.cmake.in | 1 -
test/API/driver/kwsys/FStream.cxx | 55 -
test/API/driver/kwsys/FStream.hxx.in | 278 -
test/API/driver/kwsys/GitSetup/.gitattributes | 6 -
test/API/driver/kwsys/GitSetup/LICENSE | 202 -
test/API/driver/kwsys/GitSetup/NOTICE | 5 -
test/API/driver/kwsys/GitSetup/README | 87 -
test/API/driver/kwsys/GitSetup/config | 4 -
test/API/driver/kwsys/GitSetup/config.sample | 32 -
test/API/driver/kwsys/GitSetup/git-gerrit-push | 74 -
test/API/driver/kwsys/GitSetup/git-gitlab-push | 177 -
test/API/driver/kwsys/GitSetup/pre-commit | 26 -
test/API/driver/kwsys/GitSetup/setup-aliases | 6 -
test/API/driver/kwsys/GitSetup/setup-gerrit | 147 -
test/API/driver/kwsys/GitSetup/setup-gitlab | 140 -
test/API/driver/kwsys/GitSetup/setup-hooks | 64 -
test/API/driver/kwsys/GitSetup/setup-ssh | 111 -
test/API/driver/kwsys/GitSetup/setup-stage | 82 -
test/API/driver/kwsys/GitSetup/setup-upstream | 104 -
test/API/driver/kwsys/GitSetup/setup-user | 39 -
test/API/driver/kwsys/GitSetup/tips | 55 -
test/API/driver/kwsys/Glob.cxx | 448 --
test/API/driver/kwsys/Glob.hxx.in | 134 -
test/API/driver/kwsys/IOStream.cxx | 255 -
test/API/driver/kwsys/IOStream.hxx.in | 126 -
test/API/driver/kwsys/MD5.c | 494 --
test/API/driver/kwsys/MD5.h.in | 97 -
test/API/driver/kwsys/Process.h.in | 544 --
test/API/driver/kwsys/ProcessUNIX.c | 2920 -----------
test/API/driver/kwsys/ProcessWin32.c | 2786 ----------
test/API/driver/kwsys/README.rst | 37 -
test/API/driver/kwsys/RegularExpression.cxx | 1218 -----
test/API/driver/kwsys/RegularExpression.hxx.in | 562 --
test/API/driver/kwsys/SetupForDevelopment.sh | 20 -
test/API/driver/kwsys/SharedForward.h.in | 879 ----
test/API/driver/kwsys/String.c | 100 -
test/API/driver/kwsys/String.h.in | 57 -
test/API/driver/kwsys/String.hxx.in | 65 -
test/API/driver/kwsys/System.c | 236 -
test/API/driver/kwsys/System.h.in | 60 -
test/API/driver/kwsys/SystemInformation.cxx | 5466 --------------------
test/API/driver/kwsys/SystemInformation.hxx.in | 170 -
test/API/driver/kwsys/SystemTools.cxx | 4703 -----------------
test/API/driver/kwsys/SystemTools.hxx.in | 981 ----
test/API/driver/kwsys/Terminal.c | 414 --
test/API/driver/kwsys/Terminal.h.in | 170 -
test/API/driver/kwsys/clang-format.bash | 128 -
test/API/driver/kwsys/hash_fun.hxx.in | 166 -
test/API/driver/kwsys/hash_map.hxx.in | 423 --
test/API/driver/kwsys/hash_set.hxx.in | 392 --
test/API/driver/kwsys/hashtable.hxx.in | 995 ----
test/API/driver/kwsys/kwsysHeaderDump.pl | 41 -
test/API/driver/kwsys/kwsysPlatformTests.cmake | 216 -
test/API/driver/kwsys/kwsysPlatformTestsC.c | 108 -
test/API/driver/kwsys/kwsysPlatformTestsCXX.cxx | 335 --
test/API/driver/kwsys/kwsysPrivate.h | 34 -
test/API/driver/kwsys/testCommandLineArguments.cxx | 209 -
.../API/driver/kwsys/testCommandLineArguments1.cxx | 93 -
test/API/driver/kwsys/testConfigure.cxx | 30 -
test/API/driver/kwsys/testConsoleBuf.cxx | 782 ---
test/API/driver/kwsys/testConsoleBuf.hxx | 17 -
test/API/driver/kwsys/testConsoleBufChild.cxx | 55 -
test/API/driver/kwsys/testDirectory.cxx | 110 -
test/API/driver/kwsys/testDynamicLoader.cxx | 133 -
test/API/driver/kwsys/testDynload.c | 13 -
test/API/driver/kwsys/testDynloadImpl.c | 10 -
test/API/driver/kwsys/testDynloadImpl.h | 15 -
test/API/driver/kwsys/testDynloadUse.c | 15 -
test/API/driver/kwsys/testEncode.c | 67 -
test/API/driver/kwsys/testEncoding.cxx | 286 -
test/API/driver/kwsys/testFStream.cxx | 113 -
test/API/driver/kwsys/testFail.c | 24 -
test/API/driver/kwsys/testHashSTL.cxx | 64 -
test/API/driver/kwsys/testProcess.c | 728 ---
test/API/driver/kwsys/testSharedForward.c.in | 27 -
test/API/driver/kwsys/testSystemInformation.cxx | 106 -
test/API/driver/kwsys/testSystemTools.bin | Bin 766 -> 0 bytes
test/API/driver/kwsys/testSystemTools.cxx | 1128 ----
test/API/driver/kwsys/testSystemTools.h.in | 12 -
test/API/driver/kwsys/testTerminal.c | 22 -
test/API/driver/kwsys/update-gitsetup.bash | 20 -
test/API/driver/kwsys/update-third-party.bash | 169 -
test/CMakeLists.txt | 24 +-
testpar/API/CMakeLists.txt | 27 +-
testpar/CMakeLists.txt | 24 +-
113 files changed, 89 insertions(+), 36608 deletions(-)
delete mode 100644 test/API/CMake/CheckAsan.cmake
delete mode 100644 test/API/CMake/CheckUbsan.cmake
delete mode 100644 test/API/driver/kwsys/.clang-format
delete mode 100644 test/API/driver/kwsys/.hooks-config
delete mode 100644 test/API/driver/kwsys/Base64.c
delete mode 100644 test/API/driver/kwsys/Base64.h.in
delete mode 100644 test/API/driver/kwsys/CMakeLists.txt
delete mode 100644 test/API/driver/kwsys/CONTRIBUTING.rst
delete mode 100644 test/API/driver/kwsys/CTestConfig.cmake
delete mode 100644 test/API/driver/kwsys/CTestCustom.cmake.in
delete mode 100644 test/API/driver/kwsys/CommandLineArguments.cxx
delete mode 100644 test/API/driver/kwsys/CommandLineArguments.hxx.in
delete mode 100644 test/API/driver/kwsys/Configure.h.in
delete mode 100644 test/API/driver/kwsys/Configure.hxx.in
delete mode 100644 test/API/driver/kwsys/ConsoleBuf.hxx.in
delete mode 100644 test/API/driver/kwsys/Copyright.txt
delete mode 100644 test/API/driver/kwsys/Directory.cxx
delete mode 100644 test/API/driver/kwsys/Directory.hxx.in
delete mode 100644 test/API/driver/kwsys/DynamicLoader.cxx
delete mode 100644 test/API/driver/kwsys/DynamicLoader.hxx.in
delete mode 100644 test/API/driver/kwsys/Encoding.h.in
delete mode 100644 test/API/driver/kwsys/Encoding.hxx.in
delete mode 100644 test/API/driver/kwsys/EncodingC.c
delete mode 100644 test/API/driver/kwsys/EncodingCXX.cxx
delete mode 100644 test/API/driver/kwsys/ExtraTest.cmake.in
delete mode 100644 test/API/driver/kwsys/FStream.cxx
delete mode 100644 test/API/driver/kwsys/FStream.hxx.in
delete mode 100644 test/API/driver/kwsys/GitSetup/.gitattributes
delete mode 100644 test/API/driver/kwsys/GitSetup/LICENSE
delete mode 100644 test/API/driver/kwsys/GitSetup/NOTICE
delete mode 100644 test/API/driver/kwsys/GitSetup/README
delete mode 100644 test/API/driver/kwsys/GitSetup/config
delete mode 100644 test/API/driver/kwsys/GitSetup/config.sample
delete mode 100644 test/API/driver/kwsys/GitSetup/git-gerrit-push
delete mode 100644 test/API/driver/kwsys/GitSetup/git-gitlab-push
delete mode 100644 test/API/driver/kwsys/GitSetup/pre-commit
delete mode 100644 test/API/driver/kwsys/GitSetup/setup-aliases
delete mode 100644 test/API/driver/kwsys/GitSetup/setup-gerrit
delete mode 100644 test/API/driver/kwsys/GitSetup/setup-gitlab
delete mode 100644 test/API/driver/kwsys/GitSetup/setup-hooks
delete mode 100644 test/API/driver/kwsys/GitSetup/setup-ssh
delete mode 100644 test/API/driver/kwsys/GitSetup/setup-stage
delete mode 100644 test/API/driver/kwsys/GitSetup/setup-upstream
delete mode 100644 test/API/driver/kwsys/GitSetup/setup-user
delete mode 100644 test/API/driver/kwsys/GitSetup/tips
delete mode 100644 test/API/driver/kwsys/Glob.cxx
delete mode 100644 test/API/driver/kwsys/Glob.hxx.in
delete mode 100644 test/API/driver/kwsys/IOStream.cxx
delete mode 100644 test/API/driver/kwsys/IOStream.hxx.in
delete mode 100644 test/API/driver/kwsys/MD5.c
delete mode 100644 test/API/driver/kwsys/MD5.h.in
delete mode 100644 test/API/driver/kwsys/Process.h.in
delete mode 100644 test/API/driver/kwsys/ProcessUNIX.c
delete mode 100644 test/API/driver/kwsys/ProcessWin32.c
delete mode 100644 test/API/driver/kwsys/README.rst
delete mode 100644 test/API/driver/kwsys/RegularExpression.cxx
delete mode 100644 test/API/driver/kwsys/RegularExpression.hxx.in
delete mode 100644 test/API/driver/kwsys/SetupForDevelopment.sh
delete mode 100644 test/API/driver/kwsys/SharedForward.h.in
delete mode 100644 test/API/driver/kwsys/String.c
delete mode 100644 test/API/driver/kwsys/String.h.in
delete mode 100644 test/API/driver/kwsys/String.hxx.in
delete mode 100644 test/API/driver/kwsys/System.c
delete mode 100644 test/API/driver/kwsys/System.h.in
delete mode 100644 test/API/driver/kwsys/SystemInformation.cxx
delete mode 100644 test/API/driver/kwsys/SystemInformation.hxx.in
delete mode 100644 test/API/driver/kwsys/SystemTools.cxx
delete mode 100644 test/API/driver/kwsys/SystemTools.hxx.in
delete mode 100644 test/API/driver/kwsys/Terminal.c
delete mode 100644 test/API/driver/kwsys/Terminal.h.in
delete mode 100644 test/API/driver/kwsys/clang-format.bash
delete mode 100644 test/API/driver/kwsys/hash_fun.hxx.in
delete mode 100644 test/API/driver/kwsys/hash_map.hxx.in
delete mode 100644 test/API/driver/kwsys/hash_set.hxx.in
delete mode 100644 test/API/driver/kwsys/hashtable.hxx.in
delete mode 100644 test/API/driver/kwsys/kwsysHeaderDump.pl
delete mode 100644 test/API/driver/kwsys/kwsysPlatformTests.cmake
delete mode 100644 test/API/driver/kwsys/kwsysPlatformTestsC.c
delete mode 100644 test/API/driver/kwsys/kwsysPlatformTestsCXX.cxx
delete mode 100644 test/API/driver/kwsys/kwsysPrivate.h
delete mode 100644 test/API/driver/kwsys/testCommandLineArguments.cxx
delete mode 100644 test/API/driver/kwsys/testCommandLineArguments1.cxx
delete mode 100644 test/API/driver/kwsys/testConfigure.cxx
delete mode 100644 test/API/driver/kwsys/testConsoleBuf.cxx
delete mode 100644 test/API/driver/kwsys/testConsoleBuf.hxx
delete mode 100644 test/API/driver/kwsys/testConsoleBufChild.cxx
delete mode 100644 test/API/driver/kwsys/testDirectory.cxx
delete mode 100644 test/API/driver/kwsys/testDynamicLoader.cxx
delete mode 100644 test/API/driver/kwsys/testDynload.c
delete mode 100644 test/API/driver/kwsys/testDynloadImpl.c
delete mode 100644 test/API/driver/kwsys/testDynloadImpl.h
delete mode 100644 test/API/driver/kwsys/testDynloadUse.c
delete mode 100644 test/API/driver/kwsys/testEncode.c
delete mode 100644 test/API/driver/kwsys/testEncoding.cxx
delete mode 100644 test/API/driver/kwsys/testFStream.cxx
delete mode 100644 test/API/driver/kwsys/testFail.c
delete mode 100644 test/API/driver/kwsys/testHashSTL.cxx
delete mode 100644 test/API/driver/kwsys/testProcess.c
delete mode 100644 test/API/driver/kwsys/testSharedForward.c.in
delete mode 100644 test/API/driver/kwsys/testSystemInformation.cxx
delete mode 100644 test/API/driver/kwsys/testSystemTools.bin
delete mode 100644 test/API/driver/kwsys/testSystemTools.cxx
delete mode 100644 test/API/driver/kwsys/testSystemTools.h.in
delete mode 100644 test/API/driver/kwsys/testTerminal.c
delete mode 100644 test/API/driver/kwsys/update-gitsetup.bash
delete mode 100644 test/API/driver/kwsys/update-third-party.bash
diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake
index 4460891..376b28f 100644
--- a/config/cmake/cacheinit.cmake
+++ b/config/cmake/cacheinit.cmake
@@ -49,6 +49,10 @@ set (HDF5_MINGW_STATIC_GCC_LIBS ON CACHE BOOL "Statically link libgcc/libstdc++"
set (HDF5_ALLOW_EXTERNAL_SUPPORT "TGZ" CACHE STRING "Allow External Library Building (NO GIT TGZ)" FORCE)
set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO GIT TGZ)
+########################
+# compression options
+########################
+
set (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE)
set (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use HDF5_ZLib from compressed file" FORCE)
set (ZLIB_TGZ_ORIGPATH "https://github.com/madler/zlib/releases/download/v1.2.13" CACHE STRING "Use ZLIB from original location" FORCE)
@@ -62,6 +66,13 @@ set (LIBAEC_TGZ_ORIGNAME "libaec-v1.0.6.tar.gz" CACHE STRING "Use LIBAEC from or
set (LIBAEC_USE_LOCALCONTENT OFF CACHE BOOL "Use local file for LIBAEC FetchContent" FORCE)
########################
+# API test options
+########################
+set (KWSYS_TGZ_ORIGPATH "https://gitlab.kitware.com/utils/kwsys/-/archive/master/kwsys-master.tar.gz" CACHE STRING "Use KWSYS from original location" FORCE)
+set (KWSYS_TGZ_ORIGNAME "kwsys-master.tar.gz" CACHE STRING "Use KWSYS from original compressed file" FORCE)
+set (KWSYS_USE_LOCALCONTENT OFF CACHE BOOL "Use local file for KWSYS FetchContent" FORCE)
+
+########################
# filter plugin options
########################
diff --git a/doxygen/dox/Overview.dox b/doxygen/dox/Overview.dox
index fb6231c..32d0dea 100644
--- a/doxygen/dox/Overview.dox
+++ b/doxygen/dox/Overview.dox
@@ -23,7 +23,7 @@ documents cover a mix of tasks, concepts, and reference, to help a specific
\par Versions
Version-specific documentation (see the version in the title area) can be found
here:
- - HDF5 develop
branch (this site)
+ - HDF5 develop
branch (this site)
- HDF5 1.14.x
- HDF5 1.12.x
- HDF5 1.10.x
diff --git a/test/API/CMake/CheckAsan.cmake b/test/API/CMake/CheckAsan.cmake
deleted file mode 100644
index 32f4b45..0000000
--- a/test/API/CMake/CheckAsan.cmake
+++ /dev/null
@@ -1,37 +0,0 @@
-set(ASAN_FLAG "-fsanitize=address")
-set(ASAN_C_FLAGS "-O1 -g ${ASAN_FLAG} -fsanitize-address-use-after-scope -fno-omit-frame-pointer -fno-optimize-sibling-calls")
-set(ASAN_CXX_FLAGS ${ASAN_C_FLAGS})
-
-get_property(ASAN_LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)
-foreach(lang ${ASAN_LANGUAGES})
- set(ASAN_${lang}_LANG_ENABLED 1)
-endforeach()
-
-if(ASAN_C_LANG_ENABLED)
- include(CheckCCompilerFlag)
- set(CMAKE_REQUIRED_LINK_OPTIONS ${ASAN_FLAG})
- check_c_compiler_flag(${ASAN_FLAG} ASAN_C_FLAG_SUPPORTED)
- if(NOT ASAN_C_FLAG_SUPPORTED)
- message(STATUS "Asan flags are not supported by the C compiler.")
- else()
- if(NOT CMAKE_C_FLAGS_ASAN)
- set(CMAKE_C_FLAGS_ASAN ${ASAN_C_FLAGS} CACHE STRING "Flags used by the C compiler during ASAN builds." FORCE)
- endif()
- endif()
- unset(CMAKE_REQUIRED_LINK_OPTIONS)
-endif()
-
-if(ASAN_CXX_LANG_ENABLED)
- include(CheckCXXCompilerFlag)
- set(CMAKE_REQUIRED_LINK_OPTIONS ${ASAN_FLAG})
- check_cxx_compiler_flag(${ASAN_FLAG} ASAN_CXX_FLAG_SUPPORTED)
- if(NOT ASAN_CXX_FLAG_SUPPORTED)
- message(STATUS "Asan flags are not supported by the CXX compiler.")
- else()
- if(NOT CMAKE_CXX_FLAGS_ASAN)
- set(CMAKE_CXX_FLAGS_ASAN ${ASAN_CXX_FLAGS} CACHE STRING "Flags used by the CXX compiler during ASAN builds." FORCE)
- endif()
- endif()
- unset(CMAKE_REQUIRED_LINK_OPTIONS)
-endif()
-
diff --git a/test/API/CMake/CheckUbsan.cmake b/test/API/CMake/CheckUbsan.cmake
deleted file mode 100644
index f2b9c2c..0000000
--- a/test/API/CMake/CheckUbsan.cmake
+++ /dev/null
@@ -1,37 +0,0 @@
-set(UBSAN_FLAG "-fsanitize=undefined")
-set(UBSAN_C_FLAGS "-O1 -g ${UBSAN_FLAG} -fno-omit-frame-pointer")
-set(UBSAN_CXX_FLAGS ${UBSAN_C_FLAGS})
-
-get_property(UBSAN_LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)
-foreach(lang ${UBSAN_LANGUAGES})
- set(UBSAN_${lang}_LANG_ENABLED 1)
-endforeach()
-
-if(UBSAN_C_LANG_ENABLED)
- include(CheckCCompilerFlag)
- set(CMAKE_REQUIRED_LINK_OPTIONS ${UBSAN_FLAG})
- check_c_compiler_flag(${UBSAN_FLAG} UBSAN_C_FLAG_SUPPORTED)
- if(NOT UBSAN_C_FLAG_SUPPORTED)
- message(STATUS "Ubsan flags are not supported by the C compiler.")
- else()
- if(NOT CMAKE_C_FLAGS_UBSAN)
- set(CMAKE_C_FLAGS_UBSAN ${UBSAN_C_FLAGS} CACHE STRING "Flags used by the C compiler during UBSAN builds." FORCE)
- endif()
- endif()
- unset(CMAKE_REQUIRED_LINK_OPTIONS)
-endif()
-
-if(UBSAN_CXX_LANG_ENABLED)
- include(CheckCXXCompilerFlag)
- set(CMAKE_REQUIRED_LINK_OPTIONS ${UBSAN_FLAG})
- check_cxx_compiler_flag(${UBSAN_FLAG} UBSAN_CXX_FLAG_SUPPORTED)
- if(NOT UBSAN_CXX_FLAG_SUPPORTED)
- message(STATUS "Ubsan flags are not supported by the CXX compiler.")
- else()
- if(NOT CMAKE_CXX_FLAGS_UBSAN)
- set(CMAKE_CXX_FLAGS_UBSAN ${UBSAN_CXX_FLAGS} CACHE STRING "Flags used by the CXX compiler during UBSAN builds." FORCE)
- endif()
- endif()
- unset(CMAKE_REQUIRED_LINK_OPTIONS)
-endif()
-
diff --git a/test/API/CMakeLists.txt b/test/API/CMakeLists.txt
index d189d67..c2f95bd 100644
--- a/test/API/CMakeLists.txt
+++ b/test/API/CMakeLists.txt
@@ -9,26 +9,12 @@
# help@hdfgroup.org.
#
-#------------------------------------------------------------------------------
-# Set module path
-#------------------------------------------------------------------------------
-set(HDF5_TEST_API_CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake")
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${HDF5_TEST_API_CMAKE_MODULE_PATH})
-
-# TODO: probably not necessary
-#------------------------------------------------------------------------------
-# Setup CMake Environment
-#------------------------------------------------------------------------------
-if (WIN32)
- message("The HDF5 API test suite is currently not supported on this platform." FATAL_ERROR)
-endif ()
+cmake_minimum_required (VERSION 3.18)
+project (HDF5_TEST_API C)
#------------------------------------------------------------------------------
# Setup testing configuration file
#------------------------------------------------------------------------------
-if (HDF5_TEST_PARALLEL)
- set (HDF5_TEST_API_HAVE_PARALLEL 1)
-endif ()
if (HDF5_TEST_API_ENABLE_ASYNC)
set (H5_API_TEST_HAVE_ASYNC 1)
endif ()
@@ -46,9 +32,27 @@ if (HDF5_TEST_API_ENABLE_DRIVER)
endif ()
#------------------------------------------------------------------------------
-# Setup for API tests
+# Define for API tests
#------------------------------------------------------------------------------
+set (HDF5_API_TESTS
+ attribute
+ dataset
+ datatype
+ file
+ group
+ link
+ misc
+ object
+)
+
+if (HDF5_TEST_API_ENABLE_ASYNC)
+ set (HDF5_API_TESTS
+ ${HDF5_API_TESTS}
+ async
+ )
+endif ()
+
# Ported HDF5 tests
set (HDF5_API_TESTS_EXTRA
testhdf5
diff --git a/test/API/driver/CMakeLists.txt b/test/API/driver/CMakeLists.txt
index 2210068..23ba053 100644
--- a/test/API/driver/CMakeLists.txt
+++ b/test/API/driver/CMakeLists.txt
@@ -1,17 +1,34 @@
-cmake_minimum_required(VERSION 2.8.12.2 FATAL_ERROR)
+cmake_minimum_required (VERSION 3.18)
project(H5_API_TEST_DRIVER CXX)
-include(CheckAsan)
-include(CheckUbsan)
+if (NOT KWSYS_USE_LOCALCONTENT)
+ set (KWSYS_URL ${KWSYS_TGZ_ORIGPATH}/${KWSYS_TGZ_ORIGNAME})
+else ()
+ set (KWSYS_URL ${TGZPATH}/${KWSYS_TGZ_ORIGNAME})
+endif ()
+# Only tgz files
+FetchContent_Declare (KWSYS
+ URL ${KWSYS_URL}
+ URL_HASH ""
+)
+FetchContent_GetProperties(KWSYS)
+if(NOT kwsys_POPULATED)
+ FetchContent_Populate(KWSYS)
-set(CMAKE_CXX_STANDARD 11)
+ # Copy an additional/replacement files into the populated source
+ #file(COPY ${HDF_RESOURCES_DIR}/KWSYS/CMakeLists.txt DESTINATION ${hdf5_kwsys_SOURCE_DIR})
-set(KWSYS_NAMESPACE h5_api_test_sys)
-set(KWSYS_USE_SystemTools 1)
-set(KWSYS_USE_Process 1)
-set(KWSYS_USE_RegularExpression 1)
-add_subdirectory(kwsys)
-include_directories(${CMAKE_CURRENT_BINARY_DIR}/kwsys)
+ set(CMAKE_CXX_STANDARD 11)
+
+ set(KWSYS_NAMESPACE h5_api_test_sys)
+ set(KWSYS_USE_SystemTools 1)
+ set(KWSYS_USE_Process 1)
+ set(KWSYS_USE_RegularExpression 1)
+
+ add_subdirectory(${hdf5_kwsysb_SOURCE_DIR} ${hdf5_kwsys_BINARY_DIR})
+endif()
+
+include_directories(${hdf5_kwsys_BINARY_DIR})
add_executable(h5_api_test_driver h5_api_test_driver.cxx)
target_link_libraries(h5_api_test_driver h5_api_test_sys)
diff --git a/test/API/driver/kwsys/.clang-format b/test/API/driver/kwsys/.clang-format
deleted file mode 100644
index 588b790..0000000
--- a/test/API/driver/kwsys/.clang-format
+++ /dev/null
@@ -1,22 +0,0 @@
----
-# This configuration requires clang-format version 6.0 exactly.
-BasedOnStyle: Mozilla
-AlignOperands: false
-AllowShortFunctionsOnASingleLine: InlineOnly
-AlwaysBreakAfterDefinitionReturnType: None
-AlwaysBreakAfterReturnType: None
-BinPackArguments: true
-BinPackParameters: true
-BraceWrapping:
- AfterClass: true
- AfterEnum: true
- AfterFunction: true
- AfterStruct: true
- AfterUnion: true
-BreakBeforeBraces: Custom
-ColumnLimit: 79
-IndentPPDirectives: AfterHash
-SortUsingDeclarations: false
-SpaceAfterTemplateKeyword: true
-Standard: Cpp03
-...
diff --git a/test/API/driver/kwsys/.hooks-config b/test/API/driver/kwsys/.hooks-config
deleted file mode 100644
index 739cdd2..0000000
--- a/test/API/driver/kwsys/.hooks-config
+++ /dev/null
@@ -1,2 +0,0 @@
-[hooks "chain"]
- pre-commit = GitSetup/pre-commit
diff --git a/test/API/driver/kwsys/Base64.c b/test/API/driver/kwsys/Base64.c
deleted file mode 100644
index bf876f2..0000000
--- a/test/API/driver/kwsys/Base64.c
+++ /dev/null
@@ -1,225 +0,0 @@
-/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
- file Copyright.txt or https://cmake.org/licensing#kwsys for details. */
-#include "kwsysPrivate.h"
-#include KWSYS_HEADER(Base64.h)
-
-/* Work-around CMake dependency scanning limitation. This must
- duplicate the above list of headers. */
-#if 0
-# include "Base64.h.in"
-#endif
-
-static const unsigned char kwsysBase64EncodeTable[65] =
- "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
- "abcdefghijklmnopqrstuvwxyz"
- "0123456789+/";
-
-static const unsigned char kwsysBase64DecodeTable[256] = {
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0x3E, 0xFF, 0xFF, 0xFF, 0x3F, 0x34, 0x35, 0x36, 0x37,
- 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0xFF,
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C,
- 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20,
- 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D,
- 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- /*------------------------------------*/
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
-};
-
-static unsigned char kwsysBase64EncodeChar(int c)
-{
- return kwsysBase64EncodeTable[(unsigned char)c];
-}
-
-static unsigned char kwsysBase64DecodeChar(unsigned char c)
-{
- return kwsysBase64DecodeTable[c];
-}
-
-/* Encode 3 bytes into a 4 byte string. */
-void kwsysBase64_Encode3(const unsigned char* src, unsigned char* dest)
-{
- dest[0] = kwsysBase64EncodeChar((src[0] >> 2) & 0x3F);
- dest[1] =
- kwsysBase64EncodeChar(((src[0] << 4) & 0x30) | ((src[1] >> 4) & 0x0F));
- dest[2] =
- kwsysBase64EncodeChar(((src[1] << 2) & 0x3C) | ((src[2] >> 6) & 0x03));
- dest[3] = kwsysBase64EncodeChar(src[2] & 0x3F);
-}
-
-/* Encode 2 bytes into a 4 byte string. */
-void kwsysBase64_Encode2(const unsigned char* src, unsigned char* dest)
-{
- dest[0] = kwsysBase64EncodeChar((src[0] >> 2) & 0x3F);
- dest[1] =
- kwsysBase64EncodeChar(((src[0] << 4) & 0x30) | ((src[1] >> 4) & 0x0F));
- dest[2] = kwsysBase64EncodeChar(((src[1] << 2) & 0x3C));
- dest[3] = '=';
-}
-
-/* Encode 1 bytes into a 4 byte string. */
-void kwsysBase64_Encode1(const unsigned char* src, unsigned char* dest)
-{
- dest[0] = kwsysBase64EncodeChar((src[0] >> 2) & 0x3F);
- dest[1] = kwsysBase64EncodeChar(((src[0] << 4) & 0x30));
- dest[2] = '=';
- dest[3] = '=';
-}
-
-/* Encode 'length' bytes from the input buffer and store the
- encoded stream into the output buffer. Return the length of the encoded
- buffer (output). Note that the output buffer must be allocated by the caller
- (length * 1.5 should be a safe estimate). If 'mark_end' is true than an
- extra set of 4 bytes is added to the end of the stream if the input is a
- multiple of 3 bytes. These bytes are invalid chars and therefore they will
- stop the decoder thus enabling the caller to decode a stream without
- actually knowing how much data to expect (if the input is not a multiple of
- 3 bytes then the extra padding needed to complete the encode 4 bytes will
- stop the decoding anyway). */
-size_t kwsysBase64_Encode(const unsigned char* input, size_t length,
- unsigned char* output, int mark_end)
-{
- const unsigned char* ptr = input;
- const unsigned char* end = input + length;
- unsigned char* optr = output;
-
- /* Encode complete triplet */
-
- while ((end - ptr) >= 3) {
- kwsysBase64_Encode3(ptr, optr);
- ptr += 3;
- optr += 4;
- }
-
- /* Encodes a 2-byte ending into 3 bytes and 1 pad byte and writes. */
-
- if (end - ptr == 2) {
- kwsysBase64_Encode2(ptr, optr);
- optr += 4;
- }
-
- /* Encodes a 1-byte ending into 2 bytes and 2 pad bytes */
-
- else if (end - ptr == 1) {
- kwsysBase64_Encode1(ptr, optr);
- optr += 4;
- }
-
- /* Do we need to mark the end */
-
- else if (mark_end) {
- optr[0] = optr[1] = optr[2] = optr[3] = '=';
- optr += 4;
- }
-
- return (size_t)(optr - output);
-}
-
-/* Decode 4 bytes into a 3 byte string. */
-int kwsysBase64_Decode3(const unsigned char* src, unsigned char* dest)
-{
- unsigned char d0, d1, d2, d3;
-
- d0 = kwsysBase64DecodeChar(src[0]);
- d1 = kwsysBase64DecodeChar(src[1]);
- d2 = kwsysBase64DecodeChar(src[2]);
- d3 = kwsysBase64DecodeChar(src[3]);
-
- /* Make sure all characters were valid */
-
- if (d0 == 0xFF || d1 == 0xFF || d2 == 0xFF || d3 == 0xFF) {
- return 0;
- }
-
- /* Decode the 3 bytes */
-
- dest[0] = (unsigned char)(((d0 << 2) & 0xFC) | ((d1 >> 4) & 0x03));
- dest[1] = (unsigned char)(((d1 << 4) & 0xF0) | ((d2 >> 2) & 0x0F));
- dest[2] = (unsigned char)(((d2 << 6) & 0xC0) | ((d3 >> 0) & 0x3F));
-
- /* Return the number of bytes actually decoded */
-
- if (src[2] == '=') {
- return 1;
- }
- if (src[3] == '=') {
- return 2;
- }
- return 3;
-}
-
-/* Decode bytes from the input buffer and store the decoded stream
- into the output buffer until 'length' bytes have been decoded. Return the
- real length of the decoded stream (which should be equal to 'length'). Note
- that the output buffer must be allocated by the caller. If
- 'max_input_length' is not null, then it specifies the number of encoded
- bytes that should be at most read from the input buffer. In that case the
- 'length' parameter is ignored. This enables the caller to decode a stream
- without actually knowing how much decoded data to expect (of course, the
- buffer must be large enough). */
-size_t kwsysBase64_Decode(const unsigned char* input, size_t length,
- unsigned char* output, size_t max_input_length)
-{
- const unsigned char* ptr = input;
- unsigned char* optr = output;
-
- /* Decode complete triplet */
-
- if (max_input_length) {
- const unsigned char* end = input + max_input_length;
- while (ptr < end) {
- int len = kwsysBase64_Decode3(ptr, optr);
- optr += len;
- if (len < 3) {
- return (size_t)(optr - output);
- }
- ptr += 4;
- }
- } else {
- unsigned char* oend = output + length;
- while ((oend - optr) >= 3) {
- int len = kwsysBase64_Decode3(ptr, optr);
- optr += len;
- if (len < 3) {
- return (size_t)(optr - output);
- }
- ptr += 4;
- }
-
- /* Decode the last triplet */
-
- if (oend - optr == 2) {
- unsigned char temp[3];
- int len = kwsysBase64_Decode3(ptr, temp);
- if (len >= 2) {
- optr[0] = temp[0];
- optr[1] = temp[1];
- optr += 2;
- } else if (len > 0) {
- optr[0] = temp[0];
- optr += 1;
- }
- } else if (oend - optr == 1) {
- unsigned char temp[3];
- int len = kwsysBase64_Decode3(ptr, temp);
- if (len > 0) {
- optr[0] = temp[0];
- optr += 1;
- }
- }
- }
-
- return (size_t)(optr - output);
-}
diff --git a/test/API/driver/kwsys/Base64.h.in b/test/API/driver/kwsys/Base64.h.in
deleted file mode 100644
index 729f972..0000000
--- a/test/API/driver/kwsys/Base64.h.in
+++ /dev/null
@@ -1,110 +0,0 @@
-/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
- file Copyright.txt or https://cmake.org/licensing#kwsys for details. */
-#ifndef @KWSYS_NAMESPACE@_Base64_h
-#define @KWSYS_NAMESPACE@_Base64_h
-
-#include <@KWSYS_NAMESPACE@/Configure.h>
-
-#include /* size_t */
-
-/* Redefine all public interface symbol names to be in the proper
- namespace. These macros are used internally to kwsys only, and are
- not visible to user code. Use kwsysHeaderDump.pl to reproduce
- these macros after making changes to the interface. */
-#if !defined(KWSYS_NAMESPACE)
-# define kwsys_ns(x) @KWSYS_NAMESPACE@##x
-# define kwsysEXPORT @KWSYS_NAMESPACE@_EXPORT
-#endif
-#if !@KWSYS_NAMESPACE@_NAME_IS_KWSYS
-# define kwsysBase64 kwsys_ns(Base64)
-# define kwsysBase64_Decode kwsys_ns(Base64_Decode)
-# define kwsysBase64_Decode3 kwsys_ns(Base64_Decode3)
-# define kwsysBase64_Encode kwsys_ns(Base64_Encode)
-# define kwsysBase64_Encode1 kwsys_ns(Base64_Encode1)
-# define kwsysBase64_Encode2 kwsys_ns(Base64_Encode2)
-# define kwsysBase64_Encode3 kwsys_ns(Base64_Encode3)
-#endif
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-/**
- * Encode 3 bytes into a 4 byte string.
- */
-kwsysEXPORT void kwsysBase64_Encode3(const unsigned char* src,
- unsigned char* dest);
-
-/**
- * Encode 2 bytes into a 4 byte string.
- */
-kwsysEXPORT void kwsysBase64_Encode2(const unsigned char* src,
- unsigned char* dest);
-
-/**
- * Encode 1 bytes into a 4 byte string.
- */
-kwsysEXPORT void kwsysBase64_Encode1(const unsigned char* src,
- unsigned char* dest);
-
-/**
- * Encode 'length' bytes from the input buffer and store the encoded
- * stream into the output buffer. Return the length of the encoded
- * buffer (output). Note that the output buffer must be allocated by
- * the caller (length * 1.5 should be a safe estimate). If 'mark_end'
- * is true than an extra set of 4 bytes is added to the end of the
- * stream if the input is a multiple of 3 bytes. These bytes are
- * invalid chars and therefore they will stop the decoder thus
- * enabling the caller to decode a stream without actually knowing how
- * much data to expect (if the input is not a multiple of 3 bytes then
- * the extra padding needed to complete the encode 4 bytes will stop
- * the decoding anyway).
- */
-kwsysEXPORT size_t kwsysBase64_Encode(const unsigned char* input,
- size_t length, unsigned char* output,
- int mark_end);
-
-/**
- * Decode 4 bytes into a 3 byte string. Returns the number of bytes
- * actually decoded.
- */
-kwsysEXPORT int kwsysBase64_Decode3(const unsigned char* src,
- unsigned char* dest);
-
-/**
- * Decode bytes from the input buffer and store the decoded stream
- * into the output buffer until 'length' bytes have been decoded.
- * Return the real length of the decoded stream (which should be equal
- * to 'length'). Note that the output buffer must be allocated by the
- * caller. If 'max_input_length' is not null, then it specifies the
- * number of encoded bytes that should be at most read from the input
- * buffer. In that case the 'length' parameter is ignored. This
- * enables the caller to decode a stream without actually knowing how
- * much decoded data to expect (of course, the buffer must be large
- * enough).
- */
-kwsysEXPORT size_t kwsysBase64_Decode(const unsigned char* input,
- size_t length, unsigned char* output,
- size_t max_input_length);
-
-#if defined(__cplusplus)
-} /* extern "C" */
-#endif
-
-/* If we are building a kwsys .c or .cxx file, let it use these macros.
- Otherwise, undefine them to keep the namespace clean. */
-#if !defined(KWSYS_NAMESPACE)
-# undef kwsys_ns
-# undef kwsysEXPORT
-# if !@KWSYS_NAMESPACE@_NAME_IS_KWSYS
-# undef kwsysBase64
-# undef kwsysBase64_Decode
-# undef kwsysBase64_Decode3
-# undef kwsysBase64_Encode
-# undef kwsysBase64_Encode1
-# undef kwsysBase64_Encode2
-# undef kwsysBase64_Encode3
-# endif
-#endif
-
-#endif
diff --git a/test/API/driver/kwsys/CMakeLists.txt b/test/API/driver/kwsys/CMakeLists.txt
deleted file mode 100644
index 09bcdb9..0000000
--- a/test/API/driver/kwsys/CMakeLists.txt
+++ /dev/null
@@ -1,1260 +0,0 @@
-# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
-# file Copyright.txt or https://cmake.org/licensing#kwsys for details.
-
-# The Kitware System Library is intended to be included in other
-# projects. It is completely configurable in that the library's
-# namespace can be configured and the components that are included can
-# be selected invididually.
-
-# Typical usage is to import the kwsys directory tree into a
-# subdirectory under a parent project and enable the classes that will
-# be used. All classes are disabled by default. The CMake listfile
-# above this one configures the library as follows:
-#
-# SET(KWSYS_NAMESPACE foosys)
-# SET(KWSYS_USE_Directory 1) # Enable Directory class.
-# SUBDIRS(kwsys)
-#
-# Optional settings are as follows:
-#
-# KWSYS_HEADER_ROOT = The directory into which to generate the kwsys headers.
-# A directory called "${KWSYS_NAMESPACE}" will be
-# created under this root directory to hold the files.
-# KWSYS_SPLIT_OBJECTS_FROM_INTERFACE
-# = Instead of creating a single ${KWSYS_NAMESPACE} library
-# target, create three separate targets:
-# ${KWSYS_NAMESPACE}
-# - An INTERFACE library only containing usage
-# requirements.
-# ${KWSYS_NAMESPACE}_objects
-# - An OBJECT library for the built kwsys objects.
-# Note: This is omitted from the install rules
-# ${KWSYS_NAMESPACE}_private
-# - An INTERFACE library combining both that is
-# appropriate for use with PRIVATE linking in
-# target_link_libraries. Because of how interface
-# properties propagate, this target is not suitable
-# for use with PUBLIC or INTERFACE linking.
-# KWSYS_ALIAS_TARGET = The name of an alias target to create to the actual target.
-#
-# Example:
-#
-# SET(KWSYS_HEADER_ROOT ${PROJECT_BINARY_DIR})
-# INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR})
-#
-# KWSYS_CXX_STANDARD = A value for CMAKE_CXX_STANDARD within KWSys.
-# Set to empty string to use no default value.
-# KWSYS_CXX_COMPILE_FEATURES = target_compile_features arguments for KWSys.
-#
-# Optional settings to setup install rules are as follows:
-#
-# KWSYS_INSTALL_BIN_DIR = The installation target directories into
-# KWSYS_INSTALL_LIB_DIR which the libraries and headers from
-# KWSYS_INSTALL_INCLUDE_DIR kwsys should be installed by a "make install".
-# The values should be specified relative to
-# the installation prefix and NOT start with '/'.
-# KWSYS_INSTALL_DOC_DIR = The installation target directory for documentation
-# such as copyright information.
-#
-# KWSYS_INSTALL_COMPONENT_NAME_RUNTIME = Name of runtime and development
-# KWSYS_INSTALL_COMPONENT_NAME_DEVELOPMENT installation components.
-# If not given the install rules
-# will not be in any component.
-#
-# KWSYS_INSTALL_EXPORT_NAME = The EXPORT option value for install(TARGETS) calls.
-#
-# Example:
-#
-# SET(KWSYS_INSTALL_BIN_DIR bin)
-# SET(KWSYS_INSTALL_LIB_DIR lib)
-# SET(KWSYS_INSTALL_INCLUDE_DIR include)
-# SET(KWSYS_INSTALL_COMPONENT_NAME_RUNTIME Runtime)
-# SET(KWSYS_INSTALL_COMPONENT_NAME_DEVELOPMENT Development)
-
-# Once configured, kwsys should be used as follows from C or C++ code:
-#
-# #include
-# ...
-# foosys::Directory directory;
-#
-
-# NOTE: This library is intended for internal use by Kitware-driven
-# projects. In order to keep it simple no attempt will be made to
-# maintain backward compatibility when changes are made to KWSys.
-# When an incompatible change is made Kitware's projects that use
-# KWSys will be fixed, but no notification will necessarily be sent to
-# any outside mailing list and no documentation of the change will be
-# written.
-
-CMAKE_MINIMUM_REQUIRED(VERSION 3.1 FATAL_ERROR)
-FOREACH(p
- CMP0056 # CMake 3.2, Honor link flags in try_compile() source-file signature.
- CMP0063 # CMake 3.3, Honor visibility properties for all target types.
- CMP0067 # CMake 3.8, Honor language standard in try_compile source-file signature.
- CMP0069 # CMake 3.9, INTERPROCEDURAL_OPTIMIZATION is enforced when enabled.
- )
- IF(POLICY ${p})
- CMAKE_POLICY(SET ${p} NEW)
- ENDIF()
-ENDFOREACH()
-
-#-----------------------------------------------------------------------------
-# If a namespace is not specified, use "kwsys" and enable testing.
-# This should be the case only when kwsys is not included inside
-# another project and is being tested.
-IF(NOT KWSYS_NAMESPACE)
- SET(KWSYS_NAMESPACE "kwsys")
- SET(KWSYS_STANDALONE 1)
-ENDIF()
-
-#-----------------------------------------------------------------------------
-# The project name is that of the specified namespace.
-PROJECT(${KWSYS_NAMESPACE})
-
-# Tell CMake how to follow dependencies of sources in this directory.
-SET_PROPERTY(DIRECTORY
- PROPERTY IMPLICIT_DEPENDS_INCLUDE_TRANSFORM
- "KWSYS_HEADER(%)=<${KWSYS_NAMESPACE}/%>"
- )
-
-if(KWSYS_CXX_STANDARD)
- set(CMAKE_CXX_STANDARD "${KWSYS_CXX_STANDARD}")
-elseif(NOT DEFINED CMAKE_CXX_STANDARD AND NOT DEFINED KWSYS_CXX_STANDARD)
- if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang"
- AND CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC"
- AND CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "GNU"
- )
- set(CMAKE_CXX_STANDARD 14)
- else()
- set(CMAKE_CXX_STANDARD 11)
- endif()
-endif()
-
-# Select library components.
-IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR)
- SET(KWSYS_ENABLE_C 1)
- # Enable all components.
- SET(KWSYS_USE_Base64 1)
- SET(KWSYS_USE_Directory 1)
- SET(KWSYS_USE_DynamicLoader 1)
- SET(KWSYS_USE_Encoding 1)
- SET(KWSYS_USE_Glob 1)
- SET(KWSYS_USE_MD5 1)
- SET(KWSYS_USE_Process 1)
- SET(KWSYS_USE_RegularExpression 1)
- SET(KWSYS_USE_System 1)
- SET(KWSYS_USE_SystemTools 1)
- SET(KWSYS_USE_CommandLineArguments 1)
- SET(KWSYS_USE_Terminal 1)
- SET(KWSYS_USE_IOStream 1)
- SET(KWSYS_USE_FStream 1)
- SET(KWSYS_USE_String 1)
- SET(KWSYS_USE_SystemInformation 1)
- SET(KWSYS_USE_ConsoleBuf 1)
-ENDIF()
-
-# Enforce component dependencies.
-IF(KWSYS_USE_SystemTools)
- SET(KWSYS_USE_Directory 1)
- SET(KWSYS_USE_FStream 1)
- SET(KWSYS_USE_Encoding 1)
-ENDIF()
-IF(KWSYS_USE_Glob)
- SET(KWSYS_USE_Directory 1)
- SET(KWSYS_USE_SystemTools 1)
- SET(KWSYS_USE_RegularExpression 1)
- SET(KWSYS_USE_FStream 1)
- SET(KWSYS_USE_Encoding 1)
-ENDIF()
-IF(KWSYS_USE_Process)
- SET(KWSYS_USE_System 1)
- SET(KWSYS_USE_Encoding 1)
-ENDIF()
-IF(KWSYS_USE_SystemInformation)
- SET(KWSYS_USE_Process 1)
-ENDIF()
-IF(KWSYS_USE_System)
- SET(KWSYS_USE_Encoding 1)
-ENDIF()
-IF(KWSYS_USE_Directory)
- SET(KWSYS_USE_Encoding 1)
-ENDIF()
-IF(KWSYS_USE_DynamicLoader)
- SET(KWSYS_USE_Encoding 1)
-ENDIF()
-IF(KWSYS_USE_FStream)
- SET(KWSYS_USE_Encoding 1)
-ENDIF()
-IF(KWSYS_USE_ConsoleBuf)
- SET(KWSYS_USE_Encoding 1)
-ENDIF()
-
-# Specify default 8 bit encoding for Windows
-IF(NOT KWSYS_ENCODING_DEFAULT_CODEPAGE)
- SET(KWSYS_ENCODING_DEFAULT_CODEPAGE CP_ACP)
-ENDIF()
-
-# Enable testing if building standalone.
-IF(KWSYS_STANDALONE)
- INCLUDE(Dart)
- MARK_AS_ADVANCED(BUILD_TESTING DART_ROOT TCL_TCLSH)
- IF(BUILD_TESTING)
- ENABLE_TESTING()
- ENDIF()
-ENDIF()
-
-# Choose default shared/static build if not specified.
-IF(NOT DEFINED KWSYS_BUILD_SHARED)
- SET(KWSYS_BUILD_SHARED ${BUILD_SHARED_LIBS})
-ENDIF()
-
-# Include helper macros.
-INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/kwsysPlatformTests.cmake)
-INCLUDE(CheckTypeSize)
-
-# Do full dependency headers.
-INCLUDE_REGULAR_EXPRESSION("^.*$")
-
-# Use new KWSYS_INSTALL_*_DIR variable names to control installation.
-# Take defaults from the old names. Note that there was no old name
-# for the bin dir, so we take the old lib dir name so DLLs will be
-# installed in a compatible way for old code.
-IF(NOT KWSYS_INSTALL_INCLUDE_DIR)
- STRING(REGEX REPLACE "^/" "" KWSYS_INSTALL_INCLUDE_DIR
- "${KWSYS_HEADER_INSTALL_DIR}")
-ENDIF()
-IF(NOT KWSYS_INSTALL_LIB_DIR)
- STRING(REGEX REPLACE "^/" "" KWSYS_INSTALL_LIB_DIR
- "${KWSYS_LIBRARY_INSTALL_DIR}")
-ENDIF()
-IF(NOT KWSYS_INSTALL_BIN_DIR)
- STRING(REGEX REPLACE "^/" "" KWSYS_INSTALL_BIN_DIR
- "${KWSYS_LIBRARY_INSTALL_DIR}")
-ENDIF()
-
-# Setup header install rules.
-SET(KWSYS_INSTALL_INCLUDE_OPTIONS)
-IF(KWSYS_INSTALL_COMPONENT_NAME_DEVELOPMENT)
- SET(KWSYS_INSTALL_INCLUDE_OPTIONS ${KWSYS_INSTALL_INCLUDE_OPTIONS}
- COMPONENT ${KWSYS_INSTALL_COMPONENT_NAME_DEVELOPMENT}
- )
-ENDIF()
-
-# Setup library install rules.
-SET(KWSYS_INSTALL_LIBRARY_RULE)
-SET(KWSYS_INSTALL_NAMELINK_RULE)
-IF(KWSYS_INSTALL_LIB_DIR)
- IF(KWSYS_INSTALL_EXPORT_NAME)
- LIST(APPEND KWSYS_INSTALL_LIBRARY_RULE EXPORT ${KWSYS_INSTALL_EXPORT_NAME})
- ENDIF()
- # Install the shared library to the lib directory.
- SET(KWSYS_INSTALL_LIBRARY_RULE ${KWSYS_INSTALL_LIBRARY_RULE}
- LIBRARY DESTINATION ${KWSYS_INSTALL_LIB_DIR} NAMELINK_SKIP
- )
- # Assign the shared library to the runtime component.
- IF(KWSYS_INSTALL_COMPONENT_NAME_RUNTIME)
- SET(KWSYS_INSTALL_LIBRARY_RULE ${KWSYS_INSTALL_LIBRARY_RULE}
- COMPONENT ${KWSYS_INSTALL_COMPONENT_NAME_RUNTIME}
- )
- ENDIF()
- IF(KWSYS_BUILD_SHARED)
- SET(KWSYS_INSTALL_NAMELINK_RULE ${KWSYS_INSTALL_NAMELINK_RULE}
- LIBRARY DESTINATION ${KWSYS_INSTALL_LIB_DIR} NAMELINK_ONLY
- )
- # Assign the namelink to the development component.
- IF(KWSYS_INSTALL_COMPONENT_NAME_DEVELOPMENT)
- SET(KWSYS_INSTALL_NAMELINK_RULE ${KWSYS_INSTALL_NAMELINK_RULE}
- COMPONENT ${KWSYS_INSTALL_COMPONENT_NAME_DEVELOPMENT}
- )
- ENDIF()
- ENDIF()
-
- # Install the archive to the lib directory.
- SET(KWSYS_INSTALL_LIBRARY_RULE ${KWSYS_INSTALL_LIBRARY_RULE}
- ARCHIVE DESTINATION ${KWSYS_INSTALL_LIB_DIR}
- )
- # Assign the archive to the development component.
- IF(KWSYS_INSTALL_COMPONENT_NAME_DEVELOPMENT)
- SET(KWSYS_INSTALL_LIBRARY_RULE ${KWSYS_INSTALL_LIBRARY_RULE}
- COMPONENT ${KWSYS_INSTALL_COMPONENT_NAME_DEVELOPMENT}
- )
- ENDIF()
-ENDIF()
-IF(KWSYS_INSTALL_BIN_DIR)
- # Install the runtime library to the bin directory.
- SET(KWSYS_INSTALL_LIBRARY_RULE ${KWSYS_INSTALL_LIBRARY_RULE}
- RUNTIME DESTINATION ${KWSYS_INSTALL_BIN_DIR}
- )
- # Assign the runtime library to the runtime component.
- IF(KWSYS_INSTALL_COMPONENT_NAME_RUNTIME)
- SET(KWSYS_INSTALL_LIBRARY_RULE ${KWSYS_INSTALL_LIBRARY_RULE}
- COMPONENT ${KWSYS_INSTALL_COMPONENT_NAME_RUNTIME}
- )
- ENDIF()
-ENDIF()
-
-# Do not support old KWSYS_*a_INSTALL_DIR variable names.
-SET(KWSYS_HEADER_INSTALL_DIR)
-SET(KWSYS_LIBRARY_INSTALL_DIR)
-
-# Generated source files will need this header.
-STRING(COMPARE EQUAL "${PROJECT_SOURCE_DIR}" "${PROJECT_BINARY_DIR}"
- KWSYS_IN_SOURCE_BUILD)
-IF(NOT KWSYS_IN_SOURCE_BUILD)
- CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/kwsysPrivate.h
- ${PROJECT_BINARY_DIR}/kwsysPrivate.h COPYONLY IMMEDIATE)
-ENDIF()
-
-# Select plugin module file name convention.
-IF(NOT KWSYS_DynamicLoader_PREFIX)
- SET(KWSYS_DynamicLoader_PREFIX ${CMAKE_SHARED_MODULE_PREFIX})
-ENDIF()
-IF(NOT KWSYS_DynamicLoader_SUFFIX)
- SET(KWSYS_DynamicLoader_SUFFIX ${CMAKE_SHARED_MODULE_SUFFIX})
-ENDIF()
-
-#-----------------------------------------------------------------------------
-# We require ANSI support from the C compiler. Add any needed flags.
-IF(CMAKE_ANSI_CFLAGS)
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}")
-ENDIF()
-
-#-----------------------------------------------------------------------------
-# Adjust compiler flags for some platforms.
-IF(NOT CMAKE_COMPILER_IS_GNUCXX)
- IF(CMAKE_SYSTEM MATCHES "OSF1-V.*")
- STRING(REGEX MATCH "-timplicit_local"
- KWSYS_CXX_FLAGS_HAVE_IMPLICIT_LOCAL "${CMAKE_CXX_FLAGS}")
- STRING(REGEX MATCH "-no_implicit_include"
- KWSYS_CXX_FLAGS_HAVE_NO_IMPLICIT_INCLUDE "${CMAKE_CXX_FLAGS}")
- IF(NOT KWSYS_CXX_FLAGS_HAVE_IMPLICIT_LOCAL)
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -timplicit_local")
- ENDIF()
- IF(NOT KWSYS_CXX_FLAGS_HAVE_NO_IMPLICIT_INCLUDE)
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -no_implicit_include")
- ENDIF()
- ENDIF()
- IF(CMAKE_SYSTEM MATCHES "HP-UX")
- SET(KWSYS_PLATFORM_CXX_TEST_EXTRA_FLAGS "+p")
- IF(CMAKE_CXX_COMPILER_ID MATCHES "HP")
- # it is known that version 3.85 fails and 6.25 works without these flags
- IF(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4)
- # use new C++ library and improved template support
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -AA +hpxstd98")
- ENDIF()
- ENDIF()
- ENDIF()
-ENDIF()
-IF(KWSYS_STANDALONE)
- IF(CMAKE_CXX_COMPILER_ID STREQUAL SunPro)
- IF(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.13)
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++03")
- ELSE()
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -library=stlport4")
- ENDIF()
- ENDIF()
-ENDIF()
-
-#-----------------------------------------------------------------------------
-# Configure the standard library header wrappers based on compiler's
-# capabilities and parent project's request. Enforce 0/1 as only
-# possible values for configuration into Configure.hxx.
-
-# Check existence and uniqueness of long long and __int64.
-KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_LONG_LONG
- "Checking whether C++ compiler has 'long long'" DIRECT)
-KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS___INT64
- "Checking whether C++ compiler has '__int64'" DIRECT)
-IF(KWSYS_CXX_HAS___INT64)
- KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_SAME_LONG_AND___INT64
- "Checking whether long and __int64 are the same type" DIRECT)
- IF(KWSYS_CXX_HAS_LONG_LONG)
- KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_SAME_LONG_LONG_AND___INT64
- "Checking whether long long and __int64 are the same type" DIRECT)
- ENDIF()
-ENDIF()
-
-# Enable the "long long" type if it is available. It is standard in
-# C99 and C++03 but not in earlier standards.
-IF(KWSYS_CXX_HAS_LONG_LONG)
- SET(KWSYS_USE_LONG_LONG 1)
-ELSE()
- SET(KWSYS_USE_LONG_LONG 0)
-ENDIF()
-
-# Enable the "__int64" type if it is available and unique. It is not
-# standard.
-SET(KWSYS_USE___INT64 0)
-IF(KWSYS_CXX_HAS___INT64)
- IF(NOT KWSYS_CXX_SAME_LONG_AND___INT64)
- IF(NOT KWSYS_CXX_SAME_LONG_LONG_AND___INT64)
- SET(KWSYS_USE___INT64 1)
- ENDIF()
- ENDIF()
-ENDIF()
-
-IF(KWSYS_USE_Encoding)
- # Look for type size helper macros.
- KWSYS_PLATFORM_CXX_TEST(KWSYS_STL_HAS_WSTRING
- "Checking whether wstring is available" DIRECT)
-ENDIF()
-
-IF(KWSYS_USE_IOStream)
- # Determine whether iostreams support long long.
- IF(KWSYS_CXX_HAS_LONG_LONG)
- KWSYS_PLATFORM_CXX_TEST(KWSYS_IOS_HAS_ISTREAM_LONG_LONG
- "Checking if istream supports long long" DIRECT)
- KWSYS_PLATFORM_CXX_TEST(KWSYS_IOS_HAS_OSTREAM_LONG_LONG
- "Checking if ostream supports long long" DIRECT)
- ELSE()
- SET(KWSYS_IOS_HAS_ISTREAM_LONG_LONG 0)
- SET(KWSYS_IOS_HAS_OSTREAM_LONG_LONG 0)
- ENDIF()
- IF(KWSYS_CXX_HAS___INT64)
- KWSYS_PLATFORM_CXX_TEST(KWSYS_IOS_HAS_ISTREAM___INT64
- "Checking if istream supports __int64" DIRECT)
- KWSYS_PLATFORM_CXX_TEST(KWSYS_IOS_HAS_OSTREAM___INT64
- "Checking if ostream supports __int64" DIRECT)
- ELSE()
- SET(KWSYS_IOS_HAS_ISTREAM___INT64 0)
- SET(KWSYS_IOS_HAS_OSTREAM___INT64 0)
- ENDIF()
-ENDIF()
-
-IF(KWSYS_NAMESPACE MATCHES "^kwsys$")
- SET(KWSYS_NAME_IS_KWSYS 1)
-ELSE()
- SET(KWSYS_NAME_IS_KWSYS 0)
-ENDIF()
-
-IF(KWSYS_BUILD_SHARED)
- SET(KWSYS_BUILD_SHARED 1)
- SET(KWSYS_LIBRARY_TYPE SHARED)
-ELSE()
- SET(KWSYS_BUILD_SHARED 0)
- SET(KWSYS_LIBRARY_TYPE STATIC)
-ENDIF()
-
-if(NOT DEFINED KWSYS_BUILD_PIC)
- set(KWSYS_BUILD_PIC 0)
-endif()
-
-#-----------------------------------------------------------------------------
-# Configure some implementation details.
-
-KWSYS_PLATFORM_C_TEST(KWSYS_C_HAS_PTRDIFF_T
- "Checking whether C compiler has ptrdiff_t in stddef.h" DIRECT)
-KWSYS_PLATFORM_C_TEST(KWSYS_C_HAS_SSIZE_T
- "Checking whether C compiler has ssize_t in unistd.h" DIRECT)
-IF(KWSYS_USE_Process)
- KWSYS_PLATFORM_C_TEST(KWSYS_C_HAS_CLOCK_GETTIME_MONOTONIC
- "Checking whether C compiler has clock_gettime" DIRECT)
-ENDIF()
-
-SET_SOURCE_FILES_PROPERTIES(ProcessUNIX.c System.c PROPERTIES
- COMPILE_FLAGS "-DKWSYS_C_HAS_PTRDIFF_T=${KWSYS_C_HAS_PTRDIFF_T} -DKWSYS_C_HAS_SSIZE_T=${KWSYS_C_HAS_SSIZE_T} -DKWSYS_C_HAS_CLOCK_GETTIME_MONOTONIC=${KWSYS_C_HAS_CLOCK_GETTIME_MONOTONIC}"
- )
-
-IF(DEFINED KWSYS_PROCESS_USE_SELECT)
- GET_PROPERTY(ProcessUNIX_FLAGS SOURCE ProcessUNIX.c PROPERTY COMPILE_FLAGS)
- SET_PROPERTY(SOURCE ProcessUNIX.c PROPERTY COMPILE_FLAGS "${ProcessUNIX_FLAGS} -DKWSYSPE_USE_SELECT=${KWSYSPE_USE_SELECT}")
-ENDIF()
-
-IF(KWSYS_USE_DynamicLoader)
- GET_PROPERTY(KWSYS_SUPPORTS_SHARED_LIBS GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS)
- IF(KWSYS_SUPPORTS_SHARED_LIBS)
- SET(KWSYS_SUPPORTS_SHARED_LIBS 1)
- ELSE()
- SET(KWSYS_SUPPORTS_SHARED_LIBS 0)
- ENDIF()
- SET_PROPERTY(SOURCE DynamicLoader.cxx APPEND PROPERTY COMPILE_DEFINITIONS
- KWSYS_SUPPORTS_SHARED_LIBS=${KWSYS_SUPPORTS_SHARED_LIBS})
-ENDIF()
-
-IF(KWSYS_USE_SystemTools)
- if (NOT DEFINED KWSYS_SYSTEMTOOLS_USE_TRANSLATION_MAP)
- set(KWSYS_SYSTEMTOOLS_USE_TRANSLATION_MAP 1)
- endif ()
- if (KWSYS_SYSTEMTOOLS_USE_TRANSLATION_MAP)
- set(KWSYS_SYSTEMTOOLS_USE_TRANSLATION_MAP 1)
- else ()
- set(KWSYS_SYSTEMTOOLS_USE_TRANSLATION_MAP 0)
- endif ()
- KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_SETENV
- "Checking whether CXX compiler has setenv" DIRECT)
- KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_UNSETENV
- "Checking whether CXX compiler has unsetenv" DIRECT)
- KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H
- "Checking whether CXX compiler has environ in stdlib.h" DIRECT)
- KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_UTIMES
- "Checking whether CXX compiler has utimes" DIRECT)
- KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_UTIMENSAT
- "Checking whether CXX compiler has utimensat" DIRECT)
- KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_STAT_HAS_ST_MTIM
- "Checking whether CXX compiler struct stat has st_mtim member" DIRECT)
- KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_STAT_HAS_ST_MTIMESPEC
- "Checking whether CXX compiler struct stat has st_mtimespec member" DIRECT)
- SET_PROPERTY(SOURCE SystemTools.cxx APPEND PROPERTY COMPILE_DEFINITIONS
- KWSYS_CXX_HAS_SETENV=${KWSYS_CXX_HAS_SETENV}
- KWSYS_CXX_HAS_UNSETENV=${KWSYS_CXX_HAS_UNSETENV}
- KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H=${KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H}
- KWSYS_CXX_HAS_UTIMES=${KWSYS_CXX_HAS_UTIMES}
- KWSYS_CXX_HAS_UTIMENSAT=${KWSYS_CXX_HAS_UTIMENSAT}
- KWSYS_CXX_STAT_HAS_ST_MTIM=${KWSYS_CXX_STAT_HAS_ST_MTIM}
- KWSYS_CXX_STAT_HAS_ST_MTIMESPEC=${KWSYS_CXX_STAT_HAS_ST_MTIMESPEC}
- )
- IF(NOT WIN32)
- IF(KWSYS_STANDALONE)
- OPTION(KWSYS_SYSTEMTOOLS_SUPPORT_WINDOWS_SLASHES "If true, Windows paths will be supported on Unix as well" ON)
- ENDIF()
- IF(KWSYS_SYSTEMTOOLS_SUPPORT_WINDOWS_SLASHES)
- SET_PROPERTY(SOURCE SystemTools.cxx testSystemTools.cxx APPEND PROPERTY COMPILE_DEFINITIONS
- KWSYS_SYSTEMTOOLS_SUPPORT_WINDOWS_SLASHES
- )
- ENDIF()
- ENDIF()
-
- # Disable getpwnam for static linux builds since it depends on shared glibc
- GET_PROPERTY(SHARED_LIBS_SUPPORTED GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS)
- IF(CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT SHARED_LIBS_SUPPORTED)
- SET_PROPERTY(SOURCE SystemTools.cxx APPEND PROPERTY COMPILE_DEFINITIONS
- HAVE_GETPWNAM=0
- )
- ENDIF()
-ENDIF()
-
-IF(KWSYS_USE_SystemInformation)
- SET_PROPERTY(SOURCE SystemInformation.cxx APPEND PROPERTY
- COMPILE_DEFINITIONS SIZEOF_VOID_P=${CMAKE_SIZEOF_VOID_P})
- IF(NOT CYGWIN)
- INCLUDE(CheckIncludeFiles)
- CHECK_INCLUDE_FILES("sys/types.h;ifaddrs.h" KWSYS_SYS_HAS_IFADDRS_H)
- IF(KWSYS_SYS_HAS_IFADDRS_H)
- SET_PROPERTY(SOURCE SystemInformation.cxx APPEND PROPERTY
- COMPILE_DEFINITIONS KWSYS_SYS_HAS_IFADDRS_H=1)
- ENDIF()
- ENDIF()
- IF(WIN32)
- INCLUDE(CheckSymbolExists)
- SET(CMAKE_REQUIRED_LIBRARIES Psapi)
- CHECK_SYMBOL_EXISTS(GetProcessMemoryInfo "windows.h;psapi.h" KWSYS_SYS_HAS_PSAPI)
- UNSET(CMAKE_REQUIRED_LIBRARIES)
- IF(KWSYS_SYS_HAS_PSAPI)
- SET_PROPERTY(SOURCE SystemInformation.cxx APPEND PROPERTY
- COMPILE_DEFINITIONS KWSYS_SYS_HAS_PSAPI=1)
- IF(MSVC70 OR MSVC71)
- # Suppress LNK4089: all references to 'PSAPI.DLL' discarded by /OPT:REF
- SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /IGNORE:4089")
- ENDIF()
- ENDIF()
- ENDIF()
- IF(CMAKE_SYSTEM MATCHES "HP-UX")
- CHECK_INCLUDE_FILES("sys/mpctl.h" KWSYS_SYS_HAS_MPCTL_H)
- IF(KWSYS_SYS_HAS_MPCTL_H)
- SET_PROPERTY(SOURCE SystemInformation.cxx APPEND PROPERTY
- COMPILE_DEFINITIONS KWSYS_SYS_HAS_MPCTL_H=1)
- ENDIF()
- ENDIF()
- IF(CMAKE_SYSTEM MATCHES "BSD")
- CHECK_INCLUDE_FILES("machine/cpu.h" KWSYS_SYS_HAS_MACHINE_CPU_H)
- IF(KWSYS_SYS_HAS_MACHINE_CPU_H)
- SET_PROPERTY(SOURCE SystemInformation.cxx APPEND PROPERTY
- COMPILE_DEFINITIONS KWSYS_SYS_HAS_MACHINE_CPU_H=1)
- ENDIF()
- ENDIF()
- KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_RLIMIT64
- "Checking whether CXX compiler has rlimit64" DIRECT)
- SET(KWSYS_PLATFORM_CXX_TEST_DEFINES)
- IF(KWSYS_CXX_HAS_RLIMIT64)
- SET_PROPERTY(SOURCE SystemInformation.cxx APPEND PROPERTY
- COMPILE_DEFINITIONS KWSYS_CXX_HAS_RLIMIT64=1)
- ENDIF()
- KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_ATOL
- "Checking whether CXX compiler has atol" DIRECT)
- IF(KWSYS_CXX_HAS_ATOL)
- SET_PROPERTY(SOURCE SystemInformation.cxx APPEND PROPERTY
- COMPILE_DEFINITIONS KWSYS_CXX_HAS_ATOL=1)
- ENDIF()
- KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_ATOLL
- "Checking whether CXX compiler has atoll" DIRECT)
- IF(KWSYS_CXX_HAS_ATOLL)
- SET_PROPERTY(SOURCE SystemInformation.cxx APPEND PROPERTY
- COMPILE_DEFINITIONS KWSYS_CXX_HAS_ATOLL=1)
- ENDIF()
- KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS__ATOI64
- "Checking whether CXX compiler has _atoi64" DIRECT)
- IF(KWSYS_CXX_HAS__ATOI64)
- SET_PROPERTY(SOURCE SystemInformation.cxx APPEND PROPERTY
- COMPILE_DEFINITIONS KWSYS_CXX_HAS__ATOI64=1)
- ENDIF()
- IF(UNIX)
- INCLUDE(CheckIncludeFileCXX)
- # check for simple stack trace
- # usually it's in libc but on FreeBSD
- # it's in libexecinfo
- FIND_LIBRARY(EXECINFO_LIB "execinfo")
- MARK_AS_ADVANCED(EXECINFO_LIB)
- IF (NOT EXECINFO_LIB)
- SET(EXECINFO_LIB "")
- ENDIF()
- CHECK_INCLUDE_FILE_CXX("execinfo.h" KWSYS_CXX_HAS_EXECINFOH)
- IF (KWSYS_CXX_HAS_EXECINFOH)
- # we have the backtrace header check if it
- # can be used with this compiler
- SET(KWSYS_PLATFORM_CXX_TEST_LINK_LIBRARIES ${EXECINFO_LIB})
- KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_BACKTRACE
- "Checking whether backtrace works with this C++ compiler" DIRECT)
- SET(KWSYS_PLATFORM_CXX_TEST_LINK_LIBRARIES)
- IF (KWSYS_CXX_HAS_BACKTRACE)
- # backtrace is supported by this system and compiler.
- # now check for the more advanced capabilities.
- SET_PROPERTY(SOURCE SystemInformation.cxx APPEND PROPERTY
- COMPILE_DEFINITIONS KWSYS_SYSTEMINFORMATION_HAS_BACKTRACE=1)
- # check for symbol lookup using dladdr
- CHECK_INCLUDE_FILE_CXX("dlfcn.h" KWSYS_CXX_HAS_DLFCNH)
- IF (KWSYS_CXX_HAS_DLFCNH)
- # we have symbol lookup libraries and headers
- # check if they can be used with this compiler
- SET(KWSYS_PLATFORM_CXX_TEST_LINK_LIBRARIES ${CMAKE_DL_LIBS})
- KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_DLADDR
- "Checking whether dladdr works with this C++ compiler" DIRECT)
- SET(KWSYS_PLATFORM_CXX_TEST_LINK_LIBRARIES)
- IF (KWSYS_CXX_HAS_DLADDR)
- # symbol lookup is supported by this system
- # and compiler.
- SET_PROPERTY(SOURCE SystemInformation.cxx APPEND PROPERTY
- COMPILE_DEFINITIONS KWSYS_SYSTEMINFORMATION_HAS_SYMBOL_LOOKUP=1)
- ENDIF()
- ENDIF()
- # c++ demangling support
- # check for cxxabi headers
- CHECK_INCLUDE_FILE_CXX("cxxabi.h" KWSYS_CXX_HAS_CXXABIH)
- IF (KWSYS_CXX_HAS_CXXABIH)
- # check if cxxabi can be used with this
- # system and compiler.
- KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_CXXABI
- "Checking whether cxxabi works with this C++ compiler" DIRECT)
- IF (KWSYS_CXX_HAS_CXXABI)
- # c++ demangle using cxxabi is supported with
- # this system and compiler
- SET_PROPERTY(SOURCE SystemInformation.cxx APPEND PROPERTY
- COMPILE_DEFINITIONS KWSYS_SYSTEMINFORMATION_HAS_CPP_DEMANGLE=1)
- ENDIF()
- ENDIF()
- # basic backtrace works better with release build
- # don't bother with advanced features for release
- SET_PROPERTY(SOURCE SystemInformation.cxx APPEND PROPERTY
- COMPILE_DEFINITIONS_DEBUG KWSYS_SYSTEMINFORMATION_HAS_DEBUG_BUILD=1)
- SET_PROPERTY(SOURCE SystemInformation.cxx APPEND PROPERTY
- COMPILE_DEFINITIONS_RELWITHDEBINFO KWSYS_SYSTEMINFORMATION_HAS_DEBUG_BUILD=1)
- ENDIF()
- ENDIF()
- ENDIF()
- IF(BORLAND)
- KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_BORLAND_ASM
- "Checking whether Borland CXX compiler supports assembler instructions" DIRECT)
- IF(KWSYS_CXX_HAS_BORLAND_ASM)
- SET_PROPERTY(SOURCE SystemInformation.cxx APPEND PROPERTY
- COMPILE_DEFINITIONS KWSYS_CXX_HAS_BORLAND_ASM=1)
- KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_BORLAND_ASM_CPUID
- "Checking whether Borland CXX compiler supports CPUID assembler instruction" DIRECT)
- IF(KWSYS_CXX_HAS_BORLAND_ASM_CPUID)
- SET_PROPERTY(SOURCE SystemInformation.cxx APPEND PROPERTY
- COMPILE_DEFINITIONS KWSYS_CXX_HAS_BORLAND_ASM_CPUID=1)
- ENDIF()
- ENDIF()
- ENDIF()
- IF(KWSYS_USE___INT64)
- SET_PROPERTY(SOURCE SystemInformation.cxx testSystemInformation.cxx APPEND PROPERTY
- COMPILE_DEFINITIONS KWSYS_USE___INT64=1)
- ENDIF()
- IF(KWSYS_USE_LONG_LONG)
- SET_PROPERTY(SOURCE SystemInformation.cxx testSystemInformation.cxx APPEND PROPERTY
- COMPILE_DEFINITIONS KWSYS_USE_LONG_LONG=1)
- ENDIF()
- IF(KWSYS_IOS_HAS_OSTREAM_LONG_LONG)
- SET_PROPERTY(SOURCE SystemInformation.cxx testSystemInformation.cxx APPEND PROPERTY
- COMPILE_DEFINITIONS KWSYS_IOS_HAS_OSTREAM_LONG_LONG=1)
- ENDIF()
- IF(KWSYS_IOS_HAS_OSTREAM___INT64)
- SET_PROPERTY(SOURCE SystemInformation.cxx testSystemInformation.cxx APPEND PROPERTY
- COMPILE_DEFINITIONS KWSYS_IOS_HAS_OSTREAM___INT64=1)
- ENDIF()
- IF(KWSYS_BUILD_SHARED)
- SET_PROPERTY(SOURCE SystemInformation.cxx APPEND PROPERTY
- COMPILE_DEFINITIONS KWSYS_BUILD_SHARED=1)
- ENDIF()
-
- IF(UNIX AND NOT CYGWIN)
- KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_GETLOADAVG
- "Checking whether CXX compiler has getloadavg" DIRECT)
- IF(KWSYS_CXX_HAS_GETLOADAVG)
- SET_PROPERTY(SOURCE SystemInformation.cxx APPEND PROPERTY
- COMPILE_DEFINITIONS KWSYS_CXX_HAS_GETLOADAVG=1)
- ENDIF()
- ENDIF()
-ENDIF()
-
-IF(KWSYS_USE_FStream)
- KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_EXT_STDIO_FILEBUF_H
- "Checking whether is available" DIRECT)
-ENDIF()
-
-#-----------------------------------------------------------------------------
-# Choose a directory for the generated headers.
-IF(NOT KWSYS_HEADER_ROOT)
- SET(KWSYS_HEADER_ROOT "${PROJECT_BINARY_DIR}")
-ENDIF()
-SET(KWSYS_HEADER_DIR "${KWSYS_HEADER_ROOT}/${KWSYS_NAMESPACE}")
-INCLUDE_DIRECTORIES(${KWSYS_HEADER_ROOT})
-
-#-----------------------------------------------------------------------------
-IF(KWSYS_INSTALL_DOC_DIR)
- # Assign the license to the runtime component since it must be
- # distributed with binary forms of this software.
- IF(KWSYS_INSTALL_COMPONENT_NAME_RUNTIME)
- SET(KWSYS_INSTALL_LICENSE_OPTIONS ${KWSYS_INSTALL_LICENSE_OPTIONS}
- COMPONENT ${KWSYS_INSTALL_COMPONENT_NAME_RUNTIME}
- )
- ENDIF()
-
- # Install the license under the documentation directory.
- INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt
- DESTINATION ${KWSYS_INSTALL_DOC_DIR}/${KWSYS_NAMESPACE}
- ${KWSYS_INSTALL_LICENSE_OPTIONS})
-ENDIF()
-
-#-----------------------------------------------------------------------------
-# Build a list of classes and headers we need to implement the
-# selected components. Initialize with required components.
-SET(KWSYS_CLASSES)
-SET(KWSYS_H_FILES Configure SharedForward)
-SET(KWSYS_HXX_FILES Configure String)
-
-IF(NOT CMake_SOURCE_DIR)
- SET(KWSYS_HXX_FILES ${KWSYS_HXX_FILES}
- hashtable hash_fun hash_map hash_set
- )
-ENDIF()
-
-# Add selected C++ classes.
-SET(cppclasses
- Directory DynamicLoader Encoding Glob RegularExpression SystemTools
- CommandLineArguments IOStream FStream SystemInformation ConsoleBuf
- )
-FOREACH(cpp ${cppclasses})
- IF(KWSYS_USE_${cpp})
- # Use the corresponding class.
- SET(KWSYS_CLASSES ${KWSYS_CLASSES} ${cpp})
-
- # Load component-specific CMake code.
- IF(EXISTS ${PROJECT_SOURCE_DIR}/kwsys${cpp}.cmake)
- INCLUDE(${PROJECT_SOURCE_DIR}/kwsys${cpp}.cmake)
- ENDIF()
- ENDIF()
-ENDFOREACH()
-
-# Add selected C components.
-FOREACH(c
- Process Base64 Encoding MD5 Terminal System String
- )
- IF(KWSYS_USE_${c})
- # Use the corresponding header file.
- SET(KWSYS_H_FILES ${KWSYS_H_FILES} ${c})
-
- # Load component-specific CMake code.
- IF(EXISTS ${PROJECT_SOURCE_DIR}/kwsys${c}.cmake)
- INCLUDE(${PROJECT_SOURCE_DIR}/kwsys${c}.cmake)
- ENDIF()
- ENDIF()
-ENDFOREACH()
-
-#-----------------------------------------------------------------------------
-# Build a list of sources for the library based on components that are
-# included.
-SET(KWSYS_C_SRCS)
-SET(KWSYS_CXX_SRCS)
-
-# Add the proper sources for this platform's Process implementation.
-IF(KWSYS_USE_Process)
- IF(NOT UNIX)
- # Use the Windows implementation.
- SET(KWSYS_C_SRCS ${KWSYS_C_SRCS} ProcessWin32.c)
- ELSE()
- # Use the UNIX implementation.
- SET(KWSYS_C_SRCS ${KWSYS_C_SRCS} ProcessUNIX.c)
- ENDIF()
-ENDIF()
-
-# Add selected C sources.
-FOREACH(c Base64 Encoding MD5 Terminal System String)
- IF(KWSYS_USE_${c})
- IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${c}C.c)
- LIST(APPEND KWSYS_C_SRCS ${c}C.c)
- ELSE()
- LIST(APPEND KWSYS_C_SRCS ${c}.c)
- ENDIF()
- ENDIF()
-ENDFOREACH()
-
-# Configure headers of C++ classes and construct the list of sources.
-FOREACH(c ${KWSYS_CLASSES})
- # Add this source to the list of source files for the library.
- IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${c}CXX.cxx)
- LIST(APPEND KWSYS_CXX_SRCS ${c}CXX.cxx)
- ELSEIF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${c}.cxx)
- LIST(APPEND KWSYS_CXX_SRCS ${c}.cxx)
- ENDIF()
-
- # Configure the header for this class.
- CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/${c}.hxx.in ${KWSYS_HEADER_DIR}/${c}.hxx
- @ONLY IMMEDIATE)
- SET(KWSYS_CXX_SRCS ${KWSYS_CXX_SRCS} ${KWSYS_HEADER_DIR}/${c}.hxx)
-
- # Create an install target for the header.
- IF(KWSYS_INSTALL_INCLUDE_DIR)
- INSTALL(FILES ${KWSYS_HEADER_DIR}/${c}.hxx
- DESTINATION ${KWSYS_INSTALL_INCLUDE_DIR}/${KWSYS_NAMESPACE}
- ${KWSYS_INSTALL_INCLUDE_OPTIONS})
- ENDIF()
-ENDFOREACH()
-
-# Configure C headers.
-FOREACH(h ${KWSYS_H_FILES})
- # Configure the header into the given directory.
- CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/${h}.h.in ${KWSYS_HEADER_DIR}/${h}.h
- @ONLY IMMEDIATE)
- SET(KWSYS_C_SRCS ${KWSYS_C_SRCS} ${KWSYS_HEADER_DIR}/${h}.h)
-
- # Create an install target for the header.
- IF(KWSYS_INSTALL_INCLUDE_DIR)
- INSTALL(FILES ${KWSYS_HEADER_DIR}/${h}.h
- DESTINATION ${KWSYS_INSTALL_INCLUDE_DIR}/${KWSYS_NAMESPACE}
- ${KWSYS_INSTALL_INCLUDE_OPTIONS})
- ENDIF()
-ENDFOREACH()
-
-# Configure other C++ headers.
-FOREACH(h ${KWSYS_HXX_FILES})
- # Configure the header into the given directory.
- CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/${h}.hxx.in ${KWSYS_HEADER_DIR}/${h}.hxx
- @ONLY IMMEDIATE)
- SET(KWSYS_CXX_SRCS ${KWSYS_CXX_SRCS} ${KWSYS_HEADER_DIR}/${h}.hxx)
-
- # Create an install target for the header.
- IF(KWSYS_INSTALL_INCLUDE_DIR)
- INSTALL(FILES ${KWSYS_HEADER_DIR}/${h}.hxx
- DESTINATION ${KWSYS_INSTALL_INCLUDE_DIR}/${KWSYS_NAMESPACE}
- ${KWSYS_INSTALL_INCLUDE_OPTIONS})
- ENDIF()
-ENDFOREACH()
-
-#-----------------------------------------------------------------------------
-# Add the library with the configured name and list of sources.
-IF(KWSYS_C_SRCS OR KWSYS_CXX_SRCS)
- IF(KWSYS_SPLIT_OBJECTS_FROM_INTERFACE)
- SET(KWSYS_TARGET_INTERFACE ${KWSYS_NAMESPACE})
- SET(KWSYS_TARGET_OBJECT ${KWSYS_NAMESPACE}_objects)
- SET(KWSYS_TARGET_LINK ${KWSYS_NAMESPACE}_private)
- SET(KWSYS_TARGET_INSTALL ${KWSYS_TARGET_INTERFACE} ${KWSYS_TARGET_LINK})
- SET(KWSYS_LINK_DEPENDENCY INTERFACE)
- ADD_LIBRARY(${KWSYS_TARGET_OBJECT} OBJECT
- ${KWSYS_C_SRCS} ${KWSYS_CXX_SRCS})
- IF(KWSYS_BUILD_SHARED OR KWSYS_BUILD_PIC)
- SET_PROPERTY(TARGET ${KWSYS_TARGET_OBJECT} PROPERTY
- POSITION_INDEPENDENT_CODE TRUE)
- ENDIF()
- ADD_LIBRARY(${KWSYS_TARGET_INTERFACE} INTERFACE)
- ADD_LIBRARY(${KWSYS_TARGET_LINK} INTERFACE)
- TARGET_LINK_LIBRARIES(${KWSYS_TARGET_LINK} INTERFACE
- ${KWSYS_TARGET_INTERFACE})
- TARGET_SOURCES(${KWSYS_TARGET_LINK} INTERFACE
- $)
- target_compile_features(${KWSYS_TARGET_OBJECT} PRIVATE ${KWSYS_CXX_COMPILE_FEATURES})
- target_compile_features(${KWSYS_TARGET_INTERFACE} INTERFACE ${KWSYS_CXX_COMPILE_FEATURES})
- ELSE()
- SET(KWSYS_TARGET_INTERFACE ${KWSYS_NAMESPACE})
- SET(KWSYS_TARGET_OBJECT ${KWSYS_NAMESPACE})
- SET(KWSYS_TARGET_LINK ${KWSYS_NAMESPACE})
- set(KWSYS_TARGET_INSTALL ${KWSYS_TARGET_LINK})
- SET(KWSYS_LINK_DEPENDENCY PUBLIC)
- ADD_LIBRARY(${KWSYS_TARGET_INTERFACE} ${KWSYS_LIBRARY_TYPE}
- ${KWSYS_C_SRCS} ${KWSYS_CXX_SRCS})
- target_compile_features(${KWSYS_TARGET_INTERFACE} PUBLIC ${KWSYS_CXX_COMPILE_FEATURES})
- ENDIF()
- if (KWSYS_ALIAS_TARGET)
- add_library(${KWSYS_ALIAS_TARGET} ALIAS ${KWSYS_TARGET_INTERFACE})
- endif ()
- SET_TARGET_PROPERTIES(${KWSYS_TARGET_OBJECT} PROPERTIES
- C_CLANG_TIDY ""
- CXX_CLANG_TIDY ""
- C_INCLUDE_WHAT_YOU_USE ""
- CXX_INCLUDE_WHAT_YOU_USE ""
- LABELS "${KWSYS_LABELS_LIB}")
- IF(KWSYS_USE_DynamicLoader)
- IF(UNIX)
- TARGET_LINK_LIBRARIES(${KWSYS_TARGET_INTERFACE} ${KWSYS_LINK_DEPENDENCY}
- ${CMAKE_DL_LIBS})
- ENDIF()
- ENDIF()
-
- IF(KWSYS_USE_SystemInformation)
- IF(WIN32)
- TARGET_LINK_LIBRARIES(${KWSYS_TARGET_INTERFACE} ${KWSYS_LINK_DEPENDENCY} ws2_32)
- # link in dbghelp.dll for symbol lookup if MSVC 1800 or later
- # Note that the dbghelp runtime is part of MS Windows OS
- IF(MSVC_VERSION AND NOT MSVC_VERSION VERSION_LESS 1800)
- TARGET_LINK_LIBRARIES(${KWSYS_TARGET_INTERFACE} ${KWSYS_LINK_DEPENDENCY} dbghelp)
- ENDIF()
- IF(KWSYS_SYS_HAS_PSAPI)
- TARGET_LINK_LIBRARIES(${KWSYS_TARGET_INTERFACE} ${KWSYS_LINK_DEPENDENCY}
- Psapi)
- ENDIF()
- ELSEIF(UNIX)
- IF (EXECINFO_LIB AND KWSYS_CXX_HAS_BACKTRACE)
- # backtrace on FreeBSD is not in libc
- TARGET_LINK_LIBRARIES(${KWSYS_TARGET_INTERFACE} ${KWSYS_LINK_DEPENDENCY}
- ${EXECINFO_LIB})
- ENDIF()
- IF (KWSYS_CXX_HAS_DLADDR)
- # for symbol lookup using dladdr
- TARGET_LINK_LIBRARIES(${KWSYS_TARGET_INTERFACE} ${KWSYS_LINK_DEPENDENCY}
- ${CMAKE_DL_LIBS})
- ENDIF()
- IF (CMAKE_SYSTEM_NAME STREQUAL "SunOS")
- TARGET_LINK_LIBRARIES(${KWSYS_TARGET_INTERFACE} ${KWSYS_LINK_DEPENDENCY}
- socket)
- ENDIF()
- ENDIF()
- ENDIF()
-
- # Apply user-defined target properties to the library.
- IF(KWSYS_PROPERTIES_CXX)
- SET_TARGET_PROPERTIES(${KWSYS_TARGET_INTERFACE} PROPERTIES
- ${KWSYS_PROPERTIES_CXX})
- ENDIF()
-
- # Set up include usage requirement
- IF(COMMAND TARGET_INCLUDE_DIRECTORIES)
- TARGET_INCLUDE_DIRECTORIES(${KWSYS_TARGET_INTERFACE} INTERFACE
- $)
- IF(KWSYS_INSTALL_INCLUDE_DIR)
- TARGET_INCLUDE_DIRECTORIES(${KWSYS_TARGET_INTERFACE} INTERFACE
- $)
- ENDIF()
- ENDIF()
-
- # Create an install target for the library.
- IF(KWSYS_INSTALL_LIBRARY_RULE)
- INSTALL(TARGETS ${KWSYS_TARGET_INSTALL} ${KWSYS_INSTALL_LIBRARY_RULE})
- ENDIF()
- IF(KWSYS_INSTALL_NAMELINK_RULE)
- INSTALL(TARGETS ${KWSYS_TARGET_INSTALL} ${KWSYS_INSTALL_NAMELINK_RULE})
- ENDIF()
-ENDIF()
-
-# Add a C-only library if requested.
-IF(KWSYS_ENABLE_C AND KWSYS_C_SRCS)
- IF(KWSYS_SPLIT_OBJECTS_FROM_INTERFACE)
- SET(KWSYS_TARGET_C_INTERFACE ${KWSYS_NAMESPACE}_c)
- SET(KWSYS_TARGET_C_OBJECT ${KWSYS_NAMESPACE}_c_objects)
- SET(KWSYS_TARGET_C_LINK ${KWSYS_NAMESPACE}_c_private)
- SET(KWSYS_TARGET_C_INSTALL
- ${KWSYS_TARGET_C_INTERFACE} ${KWSYS_TARGET_C_LINK})
- SET(KWSYS_LINK_DEPENDENCY INTERFACE)
- ADD_LIBRARY(${KWSYS_TARGET_C_OBJECT} OBJECT ${KWSYS_C_SRCS})
- IF(KWSYS_BUILD_SHARED OR KWSYS_BUILD_PIC)
- SET_PROPERTY(TARGET ${KWSYS_TARGET_C_OBJECT} PROPERTY
- POSITION_INDEPENDENT_CODE TRUE)
- ENDIF()
- ADD_LIBRARY(${KWSYS_TARGET_C_INTERFACE} INTERFACE)
- ADD_LIBRARY(${KWSYS_TARGET_C_LINK} INTERFACE)
- TARGET_LINK_LIBRARIES(${KWSYS_TARGET_C_LINK} INTERFACE
- ${KWSYS_TARGET_C_INTERFACE})
- TARGET_SOURCES(${KWSYS_TARGET_C_LINK} INTERFACE
- $)
- ELSE()
- SET(KWSYS_TARGET_C_INTERFACE ${KWSYS_NAMESPACE}_c)
- SET(KWSYS_TARGET_C_OBJECT ${KWSYS_NAMESPACE}_c)
- SET(KWSYS_TARGET_C_LINK ${KWSYS_NAMESPACE}_c)
- SET(KWSYS_TARGET_C_INSTALL ${KWSYS_TARGET_C_LINK})
- SET(KWSYS_LINK_DEPENDENCY PUBLIC)
- ADD_LIBRARY(${KWSYS_TARGET_C_INTERFACE} ${KWSYS_LIBRARY_TYPE}
- ${KWSYS_C_SRCS})
- ENDIF()
- SET_TARGET_PROPERTIES(${KWSYS_TARGET_C_OBJECT} PROPERTIES
- LABELS "${KWSYS_LABELS_LIB}")
-
- # Apply user-defined target properties to the library.
- IF(KWSYS_PROPERTIES_C)
- SET_TARGET_PROPERTIES(${KWSYS_TARGET_C_INTERFACE} PROPERTIES
- ${KWSYS_PROPERTIES_C})
- ENDIF()
-
- # Set up include usage requirement
- IF(COMMAND TARGET_INCLUDE_DIRECTORIES)
- TARGET_INCLUDE_DIRECTORIES(${KWSYS_TARGET_C_INTERFACE} INTERFACE
- $)
- IF(KWSYS_INSTALL_INCLUDE_DIR)
- TARGET_INCLUDE_DIRECTORIES(${KWSYS_TARGET_C_INTERFACE} INTERFACE
- $)
- ENDIF()
- ENDIF()
-
- # Create an install target for the library.
- IF(KWSYS_INSTALL_LIBRARY_RULE)
- INSTALL(TARGETS ${KWSYS_TARGET_C_INSTALL})
- ENDIF()
-ENDIF()
-
-# For building kwsys itself, we use a macro defined on the command
-# line to configure the namespace in the C and C++ source files.
-ADD_DEFINITIONS("-DKWSYS_NAMESPACE=${KWSYS_NAMESPACE}")
-
-# Disable deprecation warnings for standard C functions.
-IF(MSVC OR (WIN32 AND (CMAKE_C_COMPILER_ID STREQUAL "Intel" OR
- (CMAKE_C_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC"))))
- ADD_DEFINITIONS(
- -D_CRT_NONSTDC_NO_DEPRECATE
- -D_CRT_SECURE_NO_DEPRECATE
- -D_CRT_SECURE_NO_WARNINGS
- -D_SCL_SECURE_NO_DEPRECATE
- )
-ENDIF()
-
-IF(WIN32)
- # Help enforce the use of wide Windows apis.
- ADD_DEFINITIONS(-DUNICODE -D_UNICODE)
-ENDIF()
-
-IF(KWSYS_USE_String)
- # Activate code in "String.c". See the comment in the source.
- SET_SOURCE_FILES_PROPERTIES(String.c PROPERTIES
- COMPILE_FLAGS "-DKWSYS_STRING_C")
-ENDIF()
-
-IF(KWSYS_USE_Encoding)
- # Set default 8 bit encoding in "EndcodingC.c".
- SET_PROPERTY(SOURCE EncodingC.c EncodingCXX.cxx APPEND PROPERTY COMPILE_DEFINITIONS
- KWSYS_ENCODING_DEFAULT_CODEPAGE=${KWSYS_ENCODING_DEFAULT_CODEPAGE})
-ENDIF()
-
-#-----------------------------------------------------------------------------
-# Setup testing if not being built as part of another project.
-IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR)
- IF(BUILD_TESTING)
- # Compute the location of executables.
- SET(EXEC_DIR "${CMAKE_CURRENT_BINARY_DIR}")
- IF(EXECUTABLE_OUTPUT_PATH)
- SET(EXEC_DIR "${EXECUTABLE_OUTPUT_PATH}")
- ENDIF()
-
- # C tests
- SET(KWSYS_C_TESTS
- testEncode.c
- testTerminal.c
- )
- IF(KWSYS_STANDALONE)
- SET(KWSYS_C_TESTS ${KWSYS_C_TESTS} testFail.c)
- ENDIF()
- CREATE_TEST_SOURCELIST(
- KWSYS_C_TEST_SRCS ${KWSYS_NAMESPACE}TestsC.c
- ${KWSYS_C_TESTS}
- )
- ADD_EXECUTABLE(${KWSYS_NAMESPACE}TestsC ${KWSYS_C_TEST_SRCS})
- SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}TestsC PROPERTY LABELS ${KWSYS_LABELS_EXE})
- TARGET_LINK_LIBRARIES(${KWSYS_NAMESPACE}TestsC ${KWSYS_TARGET_C_LINK})
- FOREACH(testfile ${KWSYS_C_TESTS})
- get_filename_component(test "${testfile}" NAME_WE)
- ADD_TEST(kwsys.${test} ${EXEC_DIR}/${KWSYS_NAMESPACE}TestsC ${test} ${KWSYS_TEST_ARGS_${test}})
- SET_PROPERTY(TEST kwsys.${test} PROPERTY LABELS ${KWSYS_LABELS_TEST})
- ENDFOREACH()
-
- # C++ tests
- IF(NOT WATCOM AND NOT CMake_SOURCE_DIR)
- SET(KWSYS_CXX_TESTS
- testHashSTL.cxx
- )
- ENDIF()
- SET(KWSYS_CXX_TESTS ${KWSYS_CXX_TESTS}
- testConfigure.cxx
- testSystemTools.cxx
- testCommandLineArguments.cxx
- testCommandLineArguments1.cxx
- testDirectory.cxx
- )
- IF(KWSYS_STL_HAS_WSTRING)
- SET(KWSYS_CXX_TESTS ${KWSYS_CXX_TESTS}
- testEncoding.cxx
- )
- ENDIF()
- IF(KWSYS_USE_FStream)
- SET(KWSYS_CXX_TESTS ${KWSYS_CXX_TESTS}
- testFStream.cxx
- )
- ENDIF()
- IF(KWSYS_USE_ConsoleBuf)
- ADD_EXECUTABLE(testConsoleBufChild testConsoleBufChild.cxx)
- SET_PROPERTY(TARGET testConsoleBufChild PROPERTY C_CLANG_TIDY "")
- SET_PROPERTY(TARGET testConsoleBufChild PROPERTY CXX_CLANG_TIDY "")
- SET_PROPERTY(TARGET testConsoleBufChild PROPERTY C_INCLUDE_WHAT_YOU_USE "")
- SET_PROPERTY(TARGET testConsoleBufChild PROPERTY CXX_INCLUDE_WHAT_YOU_USE "")
- SET_PROPERTY(TARGET testConsoleBufChild PROPERTY LABELS ${KWSYS_LABELS_EXE})
- TARGET_LINK_LIBRARIES(testConsoleBufChild ${KWSYS_TARGET_LINK})
- SET(KWSYS_CXX_TESTS ${KWSYS_CXX_TESTS}
- testConsoleBuf.cxx
- )
- IF(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND
- CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "19.0.23506")
- set_property(SOURCE testConsoleBuf.cxx testConsoleBufChild.cxx PROPERTY COMPILE_FLAGS /utf-8)
- ENDIF()
- SET_PROPERTY(SOURCE testConsoleBuf.cxx APPEND PROPERTY COMPILE_DEFINITIONS
- KWSYS_ENCODING_DEFAULT_CODEPAGE=${KWSYS_ENCODING_DEFAULT_CODEPAGE})
- ENDIF()
- IF(KWSYS_USE_SystemInformation)
- SET(KWSYS_CXX_TESTS ${KWSYS_CXX_TESTS} testSystemInformation.cxx)
- ENDIF()
- IF(KWSYS_USE_DynamicLoader)
- SET(KWSYS_CXX_TESTS ${KWSYS_CXX_TESTS} testDynamicLoader.cxx)
- # If kwsys contains the DynamicLoader, need extra library
- ADD_LIBRARY(${KWSYS_NAMESPACE}TestDynload MODULE testDynload.c)
- SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}TestDynload PROPERTY LABELS ${KWSYS_LABELS_LIB})
- ADD_DEPENDENCIES(${KWSYS_NAMESPACE}TestDynload ${KWSYS_TARGET_INTERFACE})
-
- if (WIN32)
- # Windows tests supported flags.
- add_library(${KWSYS_NAMESPACE}TestDynloadImpl SHARED testDynloadImpl.c)
- set_property(TARGET ${KWSYS_NAMESPACE}TestDynloadImpl PROPERTY LABELS ${KWSYS_LABELS_LIB})
- set_property(TARGET ${KWSYS_NAMESPACE}TestDynloadImpl PROPERTY DEFINE_SYMBOL BUILDING_TestDynloadImpl)
- set_property(TARGET ${KWSYS_NAMESPACE}TestDynloadImpl PROPERTY RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/dynloaddir")
- add_dependencies(${KWSYS_NAMESPACE}TestDynloadImpl ${KWSYS_TARGET_INTERFACE})
- add_library(${KWSYS_NAMESPACE}TestDynloadUse MODULE testDynloadUse.c)
- set_property(TARGET ${KWSYS_NAMESPACE}TestDynloadUse PROPERTY LABELS ${KWSYS_LABELS_LIB})
- set_property(TARGET ${KWSYS_NAMESPACE}TestDynloadUse PROPERTY LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/dynloaddir")
- add_dependencies(${KWSYS_NAMESPACE}TestDynloadUse ${KWSYS_TARGET_INTERFACE})
- target_link_libraries(${KWSYS_NAMESPACE}TestDynloadUse PRIVATE ${KWSYS_NAMESPACE}TestDynloadImpl)
- endif ()
- ENDIF()
- CREATE_TEST_SOURCELIST(
- KWSYS_CXX_TEST_SRCS ${KWSYS_NAMESPACE}TestsCxx.cxx
- ${KWSYS_CXX_TESTS}
- )
- ADD_EXECUTABLE(${KWSYS_NAMESPACE}TestsCxx ${KWSYS_CXX_TEST_SRCS})
- SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}TestsCxx PROPERTY C_CLANG_TIDY "")
- SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}TestsCxx PROPERTY CXX_CLANG_TIDY "")
- SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}TestsCxx PROPERTY C_INCLUDE_WHAT_YOU_USE "")
- SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}TestsCxx PROPERTY CXX_INCLUDE_WHAT_YOU_USE "")
- SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}TestsCxx PROPERTY LABELS ${KWSYS_LABELS_EXE})
- TARGET_LINK_LIBRARIES(${KWSYS_NAMESPACE}TestsCxx ${KWSYS_TARGET_LINK})
-
- SET(TEST_SYSTEMTOOLS_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
- SET(TEST_SYSTEMTOOLS_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
- CONFIGURE_FILE(
- ${PROJECT_SOURCE_DIR}/testSystemTools.h.in
- ${PROJECT_BINARY_DIR}/testSystemTools.h)
- INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR})
-
- IF(CTEST_TEST_KWSYS)
- CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/ExtraTest.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/ExtraTest.cmake")
- SET_DIRECTORY_PROPERTIES(PROPERTIES TEST_INCLUDE_FILE "${CMAKE_CURRENT_BINARY_DIR}/ExtraTest.cmake")
- ENDIF()
-
- SET(KWSYS_TEST_ARGS_testCommandLineArguments
- --another-bool-variable
- --long3=opt
- --set-bool-arg1
- -SSS ken brad bill andy
- --some-bool-variable=true
- --some-double-variable12.5
- --some-int-variable 14
- "--some-string-variable=test string with space"
- --some-multi-argument 5 1 8 3 7 1 3 9 7 1
- -N 12.5 -SS=andy -N 1.31 -N 22
- -SS=bill -BBtrue -SS=brad
- -BBtrue
- -BBfalse
- -SS=ken
- -A
- -C=test
- --long2 hello
- )
- SET(KWSYS_TEST_ARGS_testCommandLineArguments1
- --ignored
- -n 24
- --second-ignored
- "-m=test value"
- third-ignored
- -p
- some junk at the end
- )
- FOREACH(testfile ${KWSYS_CXX_TESTS})
- get_filename_component(test "${testfile}" NAME_WE)
- ADD_TEST(kwsys.${test} ${EXEC_DIR}/${KWSYS_NAMESPACE}TestsCxx ${test} ${KWSYS_TEST_ARGS_${test}})
- SET_PROPERTY(TEST kwsys.${test} PROPERTY LABELS ${KWSYS_LABELS_TEST})
- ENDFOREACH()
-
- # Process tests.
- ADD_EXECUTABLE(${KWSYS_NAMESPACE}TestProcess testProcess.c)
- SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}TestProcess PROPERTY LABELS ${KWSYS_LABELS_EXE})
- TARGET_LINK_LIBRARIES(${KWSYS_NAMESPACE}TestProcess ${KWSYS_TARGET_C_LINK})
- IF(NOT CYGWIN)
- SET(KWSYS_TEST_PROCESS_7 7)
- ENDIF()
- FOREACH(n 1 2 3 4 5 6 ${KWSYS_TEST_PROCESS_7} 9 10)
- ADD_TEST(kwsys.testProcess-${n} ${EXEC_DIR}/${KWSYS_NAMESPACE}TestProcess ${n})
- SET_PROPERTY(TEST kwsys.testProcess-${n} PROPERTY LABELS ${KWSYS_LABELS_TEST})
- SET_TESTS_PROPERTIES(kwsys.testProcess-${n} PROPERTIES TIMEOUT 120)
- ENDFOREACH()
-
- SET(testProcess_COMPILE_FLAGS "")
- # Some Apple compilers produce bad optimizations in this source.
- IF(APPLE AND CMAKE_C_COMPILER_ID MATCHES "^(GNU|LLVM)$")
- SET(testProcess_COMPILE_FLAGS "${testProcess_COMPILE_FLAGS} -O0")
- ELSEIF(CMAKE_C_COMPILER_ID STREQUAL "XL")
- # Tell IBM XL not to warn about our test infinite loop
- IF(CMAKE_SYSTEM MATCHES "Linux.*ppc64le"
- AND CMAKE_C_COMPILER_VERSION VERSION_LESS "16.1.0"
- AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS "13.1.1")
- # v13.1.[1-6] on Linux ppc64le is clang based and does not accept
- # the -qsuppress option, so just suppress all warnings.
- SET(testProcess_COMPILE_FLAGS "${testProcess_COMPILE_FLAGS} -w")
- ELSE()
- SET(testProcess_COMPILE_FLAGS "${testProcess_COMPILE_FLAGS} -qsuppress=1500-010")
- ENDIF()
- ENDIF()
- IF(CMAKE_C_FLAGS MATCHES "-fsanitize=")
- SET(testProcess_COMPILE_FLAGS "${testProcess_COMPILE_FLAGS} -DCRASH_USING_ABORT")
- ENDIF()
- SET_PROPERTY(SOURCE testProcess.c PROPERTY COMPILE_FLAGS "${testProcess_COMPILE_FLAGS}")
-
- # Test SharedForward
- CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/testSharedForward.c.in
- ${PROJECT_BINARY_DIR}/testSharedForward.c @ONLY IMMEDIATE)
- ADD_EXECUTABLE(${KWSYS_NAMESPACE}TestSharedForward
- ${PROJECT_BINARY_DIR}/testSharedForward.c)
- SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}TestSharedForward PROPERTY LABELS ${KWSYS_LABELS_EXE})
- ADD_DEPENDENCIES(${KWSYS_NAMESPACE}TestSharedForward ${KWSYS_TARGET_C_LINK})
- ADD_TEST(kwsys.testSharedForward ${EXEC_DIR}/${KWSYS_NAMESPACE}TestSharedForward 1)
- SET_PROPERTY(TEST kwsys.testSharedForward PROPERTY LABELS ${KWSYS_LABELS_TEST})
-
- # Configure some test properties.
- IF(KWSYS_STANDALONE)
- # We expect test to fail
- SET_TESTS_PROPERTIES(kwsys.testFail PROPERTIES WILL_FAIL ON)
- GET_TEST_PROPERTY(kwsys.testFail WILL_FAIL wfv)
- SET_TESTS_PROPERTIES(kwsys.testFail PROPERTIES MEASUREMENT "Some Key=Some Value")
- MESSAGE(STATUS "GET_TEST_PROPERTY returned: ${wfv}")
- ENDIF()
-
- # Set up ctest custom configuration file.
- CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/CTestCustom.cmake.in
- ${PROJECT_BINARY_DIR}/CTestCustom.cmake @ONLY)
-
- # Suppress known consistent failures on buggy systems.
- IF(KWSYS_TEST_BOGUS_FAILURES)
- SET_TESTS_PROPERTIES(${KWSYS_TEST_BOGUS_FAILURES} PROPERTIES WILL_FAIL ON)
- ENDIF()
-
- ENDIF()
-ENDIF()
diff --git a/test/API/driver/kwsys/CONTRIBUTING.rst b/test/API/driver/kwsys/CONTRIBUTING.rst
deleted file mode 100644
index 32e7b83..0000000
--- a/test/API/driver/kwsys/CONTRIBUTING.rst
+++ /dev/null
@@ -1,49 +0,0 @@
-Contributing to KWSys
-*********************
-
-Patches
-=======
-
-KWSys is kept in its own Git repository and shared by several projects
-via copies in their source trees. Changes to KWSys should not be made
-directly in a host project, except perhaps in maintenance branches.
-
-KWSys uses `Kitware's GitLab Instance`_ to manage development and code review.
-To contribute patches:
-
-#. Fork the upstream `KWSys Repository`_ into a personal account.
-#. Base all new work on the upstream ``master`` branch.
-#. Run ``./SetupForDevelopment.sh`` in new local work trees.
-#. Create commits making incremental, distinct, logically complete changes.
-#. Push a topic branch to a personal repository fork on GitLab.
-#. Create a GitLab Merge Request targeting the upstream ``master`` branch.
-
-Once changes are reviewed, tested, and integrated to KWSys upstream then
-copies of KWSys within dependent projects can be updated to get the changes.
-
-.. _`Kitware's GitLab Instance`: https://gitlab.kitware.com
-.. _`KWSys Repository`: https://gitlab.kitware.com/utils/kwsys
-
-Code Style
-==========
-
-We use `clang-format`_ version **6.0** to define our style for C++ code in
-the KWSys source tree. See the `.clang-format`_ configuration file for
-our style settings. Use the `clang-format.bash`_ script to format source
-code. It automatically runs ``clang-format`` on the set of source files
-for which we enforce style. The script also has options to format only
-a subset of files, such as those that are locally modified.
-
-.. _`clang-format`: http://clang.llvm.org/docs/ClangFormat.html
-.. _`.clang-format`: .clang-format
-.. _`clang-format.bash`: clang-format.bash
-
-License
-=======
-
-We do not require any formal copyright assignment or contributor license
-agreement. Any contributions intentionally sent upstream are presumed
-to be offered under terms of the OSI-approved BSD 3-clause License.
-See `Copyright.txt`_ for details.
-
-.. _`Copyright.txt`: Copyright.txt
diff --git a/test/API/driver/kwsys/CTestConfig.cmake b/test/API/driver/kwsys/CTestConfig.cmake
deleted file mode 100644
index 1339ffc..0000000
--- a/test/API/driver/kwsys/CTestConfig.cmake
+++ /dev/null
@@ -1,9 +0,0 @@
-# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
-# file Copyright.txt or https://cmake.org/licensing#kwsys for details.
-
-set(CTEST_PROJECT_NAME "KWSys")
-set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT")
-set(CTEST_DROP_METHOD "http")
-set(CTEST_DROP_SITE "open.cdash.org")
-set(CTEST_DROP_LOCATION "/submit.php?project=KWSys")
-set(CTEST_DROP_SITE_CDASH TRUE)
diff --git a/test/API/driver/kwsys/CTestCustom.cmake.in b/test/API/driver/kwsys/CTestCustom.cmake.in
deleted file mode 100644
index 760221b..0000000
--- a/test/API/driver/kwsys/CTestCustom.cmake.in
+++ /dev/null
@@ -1,14 +0,0 @@
-# kwsys.testProcess-10 involves sending SIGINT to a child process, which then
-# exits abnormally via a call to _exit(). (On Windows, a call to ExitProcess).
-# Naturally, this results in plenty of memory being "leaked" by this child
-# process - the memory check results are not meaningful in this case.
-#
-# kwsys.testProcess-9 also tests sending SIGINT to a child process. However,
-# normal operation of that test involves the child process timing out, and the
-# host process kills (SIGKILL) it as a result. Since it was SIGKILL'ed, the
-# resulting memory leaks are not logged by valgrind anyway. Therefore, we
-# don't have to exclude it.
-
-list(APPEND CTEST_CUSTOM_MEMCHECK_IGNORE
- kwsys.testProcess-10
- )
diff --git a/test/API/driver/kwsys/CommandLineArguments.cxx b/test/API/driver/kwsys/CommandLineArguments.cxx
deleted file mode 100644
index 3fd1955..0000000
--- a/test/API/driver/kwsys/CommandLineArguments.cxx
+++ /dev/null
@@ -1,768 +0,0 @@
-/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
- file Copyright.txt or https://cmake.org/licensing#kwsys for details. */
-#include "kwsysPrivate.h"
-#include KWSYS_HEADER(CommandLineArguments.hxx)
-
-#include KWSYS_HEADER(Configure.hxx)
-#include KWSYS_HEADER(String.hxx)
-
-// Work-around CMake dependency scanning limitation. This must
-// duplicate the above list of headers.
-#if 0
-# include "CommandLineArguments.hxx.in"
-# include "Configure.hxx.in"
-# include "String.hxx.in"
-#endif
-
-#include
-#include