Commit a53e0168 authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'import-kwiml'

a5dd0c9d Add option to use a system-installed KWIML
036b6ef7 Port CMake from cmIML to KWIML
12293371 Merge branch 'upstream-KWIML' into import-kwiml
3fdbb0a8 KWIML 2015-12-09 (43f9f8d0)
55b21d07 Add script to update KWIML from upstream
c7d9a249 Utilities/KWIML: Drop sources to make room for fresh import
parents 3768a79c a5dd0c9d
......@@ -138,8 +138,13 @@ macro(CMAKE_HANDLE_SYSTEM_LIBRARIES)
option(CMAKE_USE_SYSTEM_FORM "Use system-installed libform" "${CMAKE_USE_SYSTEM_LIBRARY_FORM}")
option(CMAKE_USE_SYSTEM_JSONCPP "Use system-installed jsoncpp" "${CMAKE_USE_SYSTEM_LIBRARY_JSONCPP}")
# For now use system KWIML only if explicitly requested rather
# than activating via the general system libs options.
option(CMAKE_USE_SYSTEM_KWIML "Use system-installed KWIML" OFF)
mark_as_advanced(CMAKE_USE_SYSTEM_KWIML)
# Mention to the user what system libraries are being used.
foreach(util ${UTILITIES})
foreach(util ${UTILITIES} KWIML)
if(CMAKE_USE_SYSTEM_${util})
message(STATUS "Using system-installed ${util}")
endif()
......@@ -270,6 +275,20 @@ macro (CMAKE_BUILD_UTILITIES)
# (a macro defined in this file)
CMAKE_HANDLE_SYSTEM_LIBRARIES()
if(CMAKE_USE_SYSTEM_KWIML)
find_package(KWIML 1.0)
if(NOT KWIML_FOUND)
message(FATAL_ERROR "CMAKE_USE_SYSTEM_KWIML is ON but KWIML is not found!")
endif()
set(CMake_KWIML_LIBRARIES kwiml::kwiml)
else()
set(CMake_KWIML_LIBRARIES "")
if(BUILD_TESTING)
set(KWIML_TEST_ENABLE 1)
endif()
add_subdirectory(Utilities/KWIML)
endif()
#---------------------------------------------------------------------
# Build zlib library for Curl, CMake, and CTest.
set(CMAKE_ZLIB_HEADER "cm_zlib.h")
......@@ -538,10 +557,10 @@ if("x${CMAKE_TESTS_CDASH_SERVER}" STREQUAL "x")
set(CMAKE_TESTS_CDASH_SERVER "http://open.cdash.org")
endif()
# Create the KWIML library for CMake.
set(KWIML cmIML)
set(KWIML_HEADER_ROOT ${CMake_BINARY_DIR}/Utilities)
add_subdirectory(Utilities/KWIML)
if(CMake_TEST_EXTERNAL_CMAKE)
set(KWIML_TEST_ENABLE 1)
add_subdirectory(Utilities/KWIML)
endif()
if(NOT CMake_TEST_EXTERNAL_CMAKE)
# build the utilities (a macro defined in this file)
......
......@@ -36,7 +36,7 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
"LINK : warning LNK4089: all references to.*SHELL32.dll.*discarded by /OPT:REF"
"LINK : warning LNK4089: all references to.*USER32.dll.*discarded by /OPT:REF"
"LINK : warning LNK4089: all references to.*ole32.dll.*discarded by /OPT:REF"
"Warning.*: .*/Utilities/KWIML/test/test_INT_format.h.* # Redundant preprocessing concatenation"
"Warning.*: .*/Utilities/KWIML/test/test_int_format.h.* # Redundant preprocessing concatenation"
"Warning: library was too large for page size.*"
"Warning: public.*_archive_.*in module.*archive_*clashes with prior module.*archive_.*"
"Warning: public.*BZ2_bz.*in module.*bzlib.*clashes with prior module.*bzlib.*"
......
......@@ -566,6 +566,7 @@ target_link_libraries(CMakeLib cmsys
${CMAKE_TAR_LIBRARIES} ${CMAKE_COMPRESS_LIBRARIES}
${CMAKE_CURL_LIBRARIES}
${CMAKE_JSONCPP_LIBRARIES}
${CMake_KWIML_LIBRARIES}
)
# On Apple we need CoreFoundation
......
......@@ -162,13 +162,13 @@ struct cmRange
const_iterator end() const { return End; }
bool empty() const { return std::distance(Begin, End) == 0; }
difference_type size() const { return std::distance(Begin, End); }
cmRange& advance(cmIML_INT_intptr_t amount)
cmRange& advance(KWIML_INT_intptr_t amount)
{
std::advance(Begin, amount);
return *this;
}
cmRange& retreat(cmIML_INT_intptr_t amount)
cmRange& retreat(KWIML_INT_intptr_t amount)
{
std::advance(End, -amount);
return *this;
......
......@@ -15,9 +15,6 @@
#include <cmsys/auto_ptr.hxx>
#include <cmsys/FStream.hxx>
// Need the native byte order of the running CPU.
#include <cmIML/ABI.h>
// Include the ELF format information system header.
#if defined(__OpenBSD__)
# include <stdint.h>
......@@ -101,9 +98,9 @@ public:
// In most cases the processor-specific byte order will match that
// of the target execution environment. If we choose wrong here
// it is fixed when the header is read.
#if cmIML_ABI_ENDIAN_ID == cmIML_ABI_ENDIAN_ID_LITTLE
#if KWIML_ABI_ENDIAN_ID == KWIML_ABI_ENDIAN_ID_LITTLE
this->NeedSwap = (this->ByteOrder == ByteOrderMSB);
#elif cmIML_ABI_ENDIAN_ID == cmIML_ABI_ENDIAN_ID_BIG
#elif KWIML_ABI_ENDIAN_ID == KWIML_ABI_ENDIAN_ID_BIG
this->NeedSwap = (this->ByteOrder == ByteOrderLSB);
#else
this->NeedSwap = false; // Final decision is at runtime anyway.
......@@ -197,7 +194,7 @@ struct cmELFTypes32
typedef Elf32_Shdr ELF_Shdr;
typedef Elf32_Dyn ELF_Dyn;
typedef Elf32_Half ELF_Half;
typedef cmIML_INT_uint32_t tagtype;
typedef KWIML_INT_uint32_t tagtype;
static const char* GetName() { return "32-bit"; }
};
......@@ -208,7 +205,7 @@ struct cmELFTypes64
typedef Elf64_Shdr ELF_Shdr;
typedef Elf64_Dyn ELF_Dyn;
typedef Elf64_Half ELF_Half;
typedef cmIML_INT_uint64_t tagtype;
typedef KWIML_INT_uint64_t tagtype;
static const char* GetName() { return "64-bit"; }
};
......
......@@ -2811,8 +2811,8 @@ namespace {
case CURLINFO_SSL_DATA_OUT:
{
char buf[128];
int n = sprintf(buf, "[%" cmIML_INT_PRIu64 " bytes data]\n",
static_cast<cmIML_INT_uint64_t>(size));
int n = sprintf(buf, "[%" KWIML_INT_PRIu64 " bytes data]\n",
static_cast<KWIML_INT_uint64_t>(size));
if (n > 0)
{
vec->insert(vec->end(), buf, buf + n);
......
......@@ -130,7 +130,7 @@ private:
unsigned int VersionFoundPatch;
unsigned int VersionFoundTweak;
unsigned int VersionFoundCount;
cmIML_INT_uint64_t RequiredCMakeVersion;
KWIML_INT_uint64_t RequiredCMakeVersion;
bool Quiet;
bool Required;
bool UseConfigFiles;
......
......@@ -2980,7 +2980,7 @@ cmLocalGenerator::GetTargetDirectory(const cmGeneratorTarget*) const
}
//----------------------------------------------------------------------------
cmIML_INT_uint64_t cmLocalGenerator::GetBackwardsCompatibility()
KWIML_INT_uint64_t cmLocalGenerator::GetBackwardsCompatibility()
{
// The computed version may change until the project is fully
// configured.
......@@ -3033,7 +3033,7 @@ bool cmLocalGenerator::NeedBackwardsCompatibility_2_4()
// Compatibility is needed if CMAKE_BACKWARDS_COMPATIBILITY is set
// equal to or lower than the given version.
cmIML_INT_uint64_t actual_compat = this->GetBackwardsCompatibility();
KWIML_INT_uint64_t actual_compat = this->GetBackwardsCompatibility();
return (actual_compat &&
actual_compat <= CMake_VERSION_ENCODE(2, 4, 255));
}
......
......@@ -267,7 +267,7 @@ public:
*
* and is monotonically increasing with the CMake version.
*/
cmIML_INT_uint64_t GetBackwardsCompatibility();
KWIML_INT_uint64_t GetBackwardsCompatibility();
/**
* Test whether compatibility is set to a given version or lower.
......@@ -390,7 +390,7 @@ protected:
// committed.
std::string TargetImplib;
cmIML_INT_uint64_t BackwardsCompatibility;
KWIML_INT_uint64_t BackwardsCompatibility;
bool BackwardsCompatibilityFinal;
private:
void AddSharedFlags(std::string& flags, const std::string& lang,
......
......@@ -31,7 +31,7 @@
#endif
// Provide fixed-size integer types.
#include <cmIML/INT.h>
#include <cm_kwiml.h>
#include <fstream>
#include <iostream>
......
......@@ -34,7 +34,7 @@ public:
/* Encode with room for up to 1000 minor releases between major releases
and to encode dates until the year 10000 in the patch level. */
#define CMake_VERSION_ENCODE__BASE cmIML_INT_UINT64_C(100000000)
#define CMake_VERSION_ENCODE__BASE KWIML_INT_UINT64_C(100000000)
#define CMake_VERSION_ENCODE(major, minor, patch) \
((((major) * 1000u) * CMake_VERSION_ENCODE__BASE) + \
(((minor) % 1000u) * CMake_VERSION_ENCODE__BASE) + \
......
......@@ -87,22 +87,21 @@
* made).
*/
#if !defined(BYTE_ORDER) || (BYTE_ORDER != LITTLE_ENDIAN && BYTE_ORDER != BIG_ENDIAN)
/* CMake modification: use byte order from cmIML. */
# include "cmIML/ABI.h"
/* CMake modification: use byte order from KWIML. */
# undef BYTE_ORDER
# undef BIG_ENDIAN
# undef LITTLE_ENDIAN
# define BYTE_ORDER cmIML_ABI_ENDIAN_ID
# define BIG_ENDIAN cmIML_ABI_ENDIAN_ID_BIG
# define LITTLE_ENDIAN cmIML_ABI_ENDIAN_ID_LITTLE
# define BYTE_ORDER KWIML_ABI_ENDIAN_ID
# define BIG_ENDIAN KWIML_ABI_ENDIAN_ID_BIG
# define LITTLE_ENDIAN KWIML_ABI_ENDIAN_ID_LITTLE
#endif
/* CMake modification: use types computed in header. */
typedef cm_sha2_uint8_t sha_byte; /* Exactly 1 byte */
typedef cm_sha2_uint32_t sha_word32; /* Exactly 4 bytes */
typedef cm_sha2_uint64_t sha_word64; /* Exactly 8 bytes */
#define SHA_UINT32_C(x) cmIML_INT_UINT32_C(x)
#define SHA_UINT64_C(x) cmIML_INT_UINT64_C(x)
#define SHA_UINT32_C(x) KWIML_INT_UINT32_C(x)
#define SHA_UINT64_C(x) KWIML_INT_UINT64_C(x)
#if defined(__clang__)
# pragma clang diagnostic ignored "-Wcast-align"
#endif
......
......@@ -38,11 +38,11 @@
#include "cm_sha2_mangle.h"
/* CMake modification: use integer types from cmIML. */
#include "cmIML/INT.h"
typedef cmIML_INT_uint8_t cm_sha2_uint8_t;
typedef cmIML_INT_uint32_t cm_sha2_uint32_t;
typedef cmIML_INT_uint64_t cm_sha2_uint64_t;
/* CMake modification: use integer types from KWIML. */
#include <cm_kwiml.h>
typedef KWIML_INT_uint8_t cm_sha2_uint8_t;
typedef KWIML_INT_uint32_t cm_sha2_uint32_t;
typedef KWIML_INT_uint64_t cm_sha2_uint64_t;
#ifdef __cplusplus
extern "C" {
......
*.md conflict-marker-size=78
#=============================================================================
# Kitware Information Macro Library
# Copyright 2010-2011 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
# Copyright Kitware, Inc.
# Distributed under the OSI-approved BSD 3-Clause License.
# See accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# Import the KWIML directory tree into a subdirectory under a parent
# project and configure the library as follows:
#
# set(KWIML myIML)
# subdirs(KWIML)
#
# Optional settings are as follows:
#
# KWIML_HEADER_ROOT = build tree directory to hold KWIML headers.
# Headers will go in a directory called "${KWIML}" under this root.
# For example:
#
# set(KWIML_HEADER_ROOT ${PROJECT_BINARY_DIR})
# include_directories(${PROJECT_BINARY_DIR})
#
# KWIML_INSTALL_INCLUDE_DIR = install KWIML with "make install"
# Specify a value relative to the install prefix and do NOT start with '/'.
# KWIML_INSTALL_INCLUDE_OPTIONS = extra header installation options
# Specify options for the install(FILES) command.
#
# KWIML_LABELS_TEST = list of labels for KWIML tests
cmake_minimum_required(VERSION 2.6.3 FATAL_ERROR)
#-----------------------------------------------------------------------------
if(NOT DEFINED KWIML)
if(NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
message(FATAL_ERROR "Set KWIML namespace in parent directory!")
endif()
set(KWIML KWIML)
set(KWIML_STANDALONE 1)
if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
set(kwiml_standalone 1)
project(KWIML)
include(CTest)
mark_as_advanced(BUILD_TESTING)
if(BUILD_TESTING)
set(KWIML_TEST_ENABLE 1)
endif()
if(NOT DEFINED KWIML_INSTALL_INCLUDE_DIR)
set(KWIML_INSTALL_INCLUDE_DIR include)
endif()
set(KWIML_INCLUDE_PREFIX kwiml)
else()
cmake_minimum_required(VERSION 2.8.2 FATAL_ERROR)
set(kwiml_standalone 0)
if(KWIML_INSTALL_INCLUDE_DIR AND NOT DEFINED KWIML_INCLUDE_PREFIX)
message(FATAL_ERROR "Host project must set KWIML_INCLUDE_PREFIX")
endif()
endif()
#-----------------------------------------------------------------------------
get_property(KWIML_LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)
foreach(lang ${KWIML_LANGUAGES})
set(KWIML_LANGUAGE_${lang} 1)
......@@ -55,25 +32,73 @@ if(NOT KWIML_LANGUAGE_C AND NOT KWIML_LANGUAGE_CXX)
set(BUILD_TESTING OFF)
endif()
#-----------------------------------------------------------------------------
if(NOT KWIML_HEADER_ROOT)
set(KWIML_HEADER_ROOT "${PROJECT_BINARY_DIR}")
if(KWIML_INSTALL_INCLUDE_DIR)
install(FILES
include/kwiml/abi.h
include/kwiml/int.h
DESTINATION ${KWIML_INSTALL_INCLUDE_DIR}/${KWIML_INCLUDE_PREFIX}
${KWIML_INSTALL_INCLUDE_OPTIONS}
)
endif()
set(KWIML_HEADER_DIR "${KWIML_HEADER_ROOT}/${KWIML}")
include_directories(${KWIML_HEADER_ROOT})
#-----------------------------------------------------------------------------
foreach(h ABI INT)
set(header ${KWIML_HEADER_DIR}/${h}.h)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${h}.h.in ${header} @ONLY)
if(KWIML_INSTALL_INCLUDE_DIR)
install(FILES ${header}
DESTINATION ${KWIML_INSTALL_INCLUDE_DIR}/${KWIML}
${KWIML_INSTALL_INCLUDE_OPTIONS})
endif()
endforeach()
#-----------------------------------------------------------------------------
if(BUILD_TESTING)
if(KWIML_TEST_ENABLE)
add_subdirectory(test)
endif()
if(NOT kwiml_standalone)
return()
endif()
#----------------------------------------------------------------------------
set(KWIML_VERSION 1.0.0)
if(KWIML_VERSION MATCHES "^([0-9]+)\\.([0-9]+)\\.([0-9]+)")
set(KWIML_VERSION_MAJOR "${CMAKE_MATCH_1}")
set(KWIML_VERSION_MINOR "${CMAKE_MATCH_2}")
set(KWIML_VERSION_PATCH "${CMAKE_MATCH_3}")
math(EXPR KWIML_VERSION_DECIMAL
"${KWIML_VERSION_MAJOR}*1000000 + ${KWIML_VERSION_MINOR}*1000 + ${KWIML_VERSION_PATCH}")
else()
message(FATAL_ERROR "Failed to parse KWIML_VERSION='${KWIML_VERSION}'")
endif()
configure_file(src/version.h.in include/kwiml/version.h @ONLY)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/include/kwiml/version.h
DESTINATION ${KWIML_INSTALL_INCLUDE_DIR}/kwiml
)
if(NOT KWIML_INSTALL_PACKAGE_DIR)
set(KWIML_INSTALL_PACKAGE_DIR share/cmake/kwiml-${KWIML_VERSION_MAJOR}.${KWIML_VERSION_MINOR})
endif()
add_library(kwiml INTERFACE)
target_include_directories(kwiml INTERFACE
$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${KWIML_INSTALL_INCLUDE_DIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
)
export(TARGETS kwiml
NAMESPACE kwiml::
FILE kwiml-targets.cmake
)
install(TARGETS kwiml
DESTINATION lib
EXPORT kwiml-targets
)
install(EXPORT kwiml-targets
NAMESPACE kwiml::
DESTINATION ${KWIML_INSTALL_PACKAGE_DIR}
)
configure_file(src/kwiml-config.cmake.in kwiml-config.cmake @ONLY)
include(CMakePackageConfigHelpers)
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/kwiml-config-version.cmake"
VERSION ${KWIML_VERSION}
COMPATIBILITY AnyNewerVersion
)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/kwiml-config.cmake
${CMAKE_CURRENT_BINARY_DIR}/kwiml-config-version.cmake
DESTINATION ${KWIML_INSTALL_PACKAGE_DIR}
)
Kitware Information Macro Library
Copyright 2010-2011 Kitware, Inc.
Copyright 2010-2015 Kitware, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
......
This diff is collapsed.
Kitware Information Macro Library (KWIML)
=========================================
KWIML provides header files that use preprocessor tests to detect and
provide information about the compiler and its target architecture.
The headers contain no configuration-time test results and thus may
be installed into an architecture-independent include directory.
This makes them suitable for use in the public interface of any package.
The following headers are provided. See header comments for details:
* [kwiml/abi.h][]: Fundamental type size and representation.
* [kwiml/int.h][]: Fixed-size integer types and format specifiers.
* [kwiml/version.h][]: Information about this version of KWIML.
The [test][] subdirectory builds tests that verify correctness of the
information provided by each header.
License
=======
KWIML is distributed under the OSI-approved 3-clause BSD License.
Files used only for build and test purposes contain a copyright notice and
reference [Copyright.txt][] for details. Headers meant for installation and
distribution outside the source tree come with full inlined copies of the
copyright notice and license text. This makes them suitable for distribution
with any package under compatible license terms.
[Copyright.txt]: Copyright.txt
[kwiml/abi.h]: include/kwiml/abi.h
[kwiml/int.h]: include/kwiml/int.h
[kwiml/version.h]: src/version.h.in
[test]: test/
KWIML - The Kitware Information Macro Library
KWIML provides header files that use preprocessor tests to detect and
provide information about the compiler and its target architecture. The
headers contain no configuration-time test results and thus may be
installed into an architecture-independent include directory. This
makes them suitable for use in the public interface of any package.
This source tree is intended for distribution inside the source trees of
other packages. In order to avoid name collisions among multiple
packages the KWIML headers are configured with a per-package prefix on
both the header locations and the macros they define. See comments in
CMakeLists.txt for instructions to include KWIML inside another project.
The entire KWIML source tree is distributed under the OSI-approved
3-clause BSD License. Files used only for build and test purposes
contain a copyright notice and reference Copyright.txt for details.
Headers meant for installation and distribution outside the source tree
come with full inlined copies of the copyright notice and license text.
This makes them suitable for distribution with any package under
compatible license terms.
The following components are provided. See header comments for details:
ABI.h = Fundamental type size and representation
INT.h = Fixed-size integer types and format specifiers
The "test" subdirectory builds tests that verify correctness of the
information provided by each header.
This diff is collapsed.
include(${CMAKE_CURRENT_LIST_DIR}/kwiml-targets.cmake)
/*============================================================================
Kitware Information Macro Library
Copyright 2010-2015 Kitware, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of Kitware, Inc. nor the names of its contributors
may be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
============================================================================*/
#ifndef KWIML_VERSION_H
#define KWIML_VERSION_H
/*
This header defines macros with information about this version of KWIML.
An includer may test the following macros after inclusion:
KWIML_VERSION = KWIML version number encoded in an integer as
`printf("%d%03d%03d", MAJOR, MINOR, PATCH)`.
MAJOR is incremented on incompatible changes.
MINOR is incremented on interface additions.
PATCH is incremented on implementation updates.
KWIML_VERSION_STRING = KWIML version number in string formatted as
`printf("%d.%d.%d", MAJOR, MINOR PATCH)`.
KWIML_VERSION_HAS_ABI_H = header 'kwiml/abi.h' is available
KWIML_VERSION_HAS_INT_H = header 'kwiml/int.h' is available
*/
#define KWIML_VERSION @KWIML_VERSION_DECIMAL@
#define KWIML_VERSION_STRING "@KWIML_VERSION@"
#define KWIML_VERSION_HAS_ABI_H 1
#define KWIML_VERSION_HAS_INT_H 1
#endif
#=============================================================================
# Kitware Information Macro Library
# Copyright 2010-2011 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
# Copyright Kitware, Inc.
# Distributed under the OSI-approved BSD 3-Clause License.
# See accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
set(test_defs KWIML_NAMESPACE=${KWIML})
# Tell CMake how to follow dependencies of sources in this directory.
set_property(DIRECTORY
PROPERTY IMPLICIT_DEPENDS_INCLUDE_TRANSFORM
"KWIML_HEADER(%)=<${KWIML}/%>"
)
if(NOT KWIML_TEST_PREFIX)
set(KWIML_TEST_PREFIX kwiml)
endif()
# Suppress printf/scanf format warnings; we test if the sizes match.
foreach(lang C CXX)
......@@ -33,38 +22,33 @@ endif()
if(KWIML_LANGUAGE_C)
list(APPEND test_defs KWIML_LANGUAGE_C)
list(APPEND test_srcs
test_ABI_C.c
test_INT_C.c
test_abi_C.c
test_int_C.c
test_include_C.c
)
endif()
if(KWIML_LANGUAGE_CXX)
list(APPEND test_defs KWIML_LANGUAGE_CXX)
list(APPEND test_srcs
test_ABI_CXX.cxx
test_INT_CXX.cxx
test_abi_CXX.cxx
test_int_CXX.cxx
test_include_CXX.cxx
)
endif()
foreach(th test_ABI_endian test_INT_format)
configure_file