Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
CMake
CMake
Commits
036b6ef7
Commit
036b6ef7
authored
Dec 17, 2015
by
Brad King
Browse files
Port CMake from cmIML to KWIML
KWIML no longer uses a configured prefix.
parent
12293371
Changes
14
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
036b6ef7
...
...
@@ -538,9 +538,9 @@ 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
)
if
(
BUILD_TESTING
)
set
(
KWIML
_TEST_ENABLE 1
)
endif
(
)
add_subdirectory
(
Utilities/KWIML
)
if
(
NOT CMake_TEST_EXTERNAL_CMAKE
)
...
...
CTestCustom.cmake.in
View file @
036b6ef7
...
...
@@ -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.*"
...
...
Source/cmAlgorithms.h
View file @
036b6ef7
...
...
@@ -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
(
cm
IML_INT_intptr_t
amount
)
cmRange
&
advance
(
KW
IML_INT_intptr_t
amount
)
{
std
::
advance
(
Begin
,
amount
);
return
*
this
;
}
cmRange
&
retreat
(
cm
IML_INT_intptr_t
amount
)
cmRange
&
retreat
(
KW
IML_INT_intptr_t
amount
)
{
std
::
advance
(
End
,
-
amount
);
return
*
this
;
...
...
Source/cmELF.cxx
View file @
036b6ef7
...
...
@@ -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
cm
IML_ABI_ENDIAN_ID ==
cm
IML_ABI_ENDIAN_ID_LITTLE
#if
KW
IML_ABI_ENDIAN_ID ==
KW
IML_ABI_ENDIAN_ID_LITTLE
this
->
NeedSwap
=
(
this
->
ByteOrder
==
ByteOrderMSB
);
#elif
cm
IML_ABI_ENDIAN_ID ==
cm
IML_ABI_ENDIAN_ID_BIG
#elif
KW
IML_ABI_ENDIAN_ID ==
KW
IML_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
cm
IML_INT_uint32_t
tagtype
;
typedef
KW
IML_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
cm
IML_INT_uint64_t
tagtype
;
typedef
KW
IML_INT_uint64_t
tagtype
;
static
const
char
*
GetName
()
{
return
"64-bit"
;
}
};
...
...
Source/cmFileCommand.cxx
View file @
036b6ef7
...
...
@@ -2811,8 +2811,8 @@ namespace {
case
CURLINFO_SSL_DATA_OUT
:
{
char
buf
[
128
];
int
n
=
sprintf
(
buf
,
"[%"
cm
IML_INT_PRIu64
" bytes data]
\n
"
,
static_cast
<
cm
IML_INT_uint64_t
>
(
size
));
int
n
=
sprintf
(
buf
,
"[%"
KW
IML_INT_PRIu64
" bytes data]
\n
"
,
static_cast
<
KW
IML_INT_uint64_t
>
(
size
));
if
(
n
>
0
)
{
vec
->
insert
(
vec
->
end
(),
buf
,
buf
+
n
);
...
...
Source/cmFindPackageCommand.h
View file @
036b6ef7
...
...
@@ -130,7 +130,7 @@ private:
unsigned
int
VersionFoundPatch
;
unsigned
int
VersionFoundTweak
;
unsigned
int
VersionFoundCount
;
cm
IML_INT_uint64_t
RequiredCMakeVersion
;
KW
IML_INT_uint64_t
RequiredCMakeVersion
;
bool
Quiet
;
bool
Required
;
bool
UseConfigFiles
;
...
...
Source/cmLocalGenerator.cxx
View file @
036b6ef7
...
...
@@ -2980,7 +2980,7 @@ cmLocalGenerator::GetTargetDirectory(const cmGeneratorTarget*) const
}
//----------------------------------------------------------------------------
cm
IML_INT_uint64_t
cmLocalGenerator
::
GetBackwardsCompatibility
()
KW
IML_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.
cm
IML_INT_uint64_t
actual_compat
=
this
->
GetBackwardsCompatibility
();
KW
IML_INT_uint64_t
actual_compat
=
this
->
GetBackwardsCompatibility
();
return
(
actual_compat
&&
actual_compat
<=
CMake_VERSION_ENCODE
(
2
,
4
,
255
));
}
...
...
Source/cmLocalGenerator.h
View file @
036b6ef7
...
...
@@ -267,7 +267,7 @@ public:
*
* and is monotonically increasing with the CMake version.
*/
cm
IML_INT_uint64_t
GetBackwardsCompatibility
();
KW
IML_INT_uint64_t
GetBackwardsCompatibility
();
/**
* Test whether compatibility is set to a given version or lower.
...
...
@@ -390,7 +390,7 @@ protected:
// committed.
std
::
string
TargetImplib
;
cm
IML_INT_uint64_t
BackwardsCompatibility
;
KW
IML_INT_uint64_t
BackwardsCompatibility
;
bool
BackwardsCompatibilityFinal
;
private:
void
AddSharedFlags
(
std
::
string
&
flags
,
const
std
::
string
&
lang
,
...
...
Source/cmStandardIncludes.h
View file @
036b6ef7
...
...
@@ -31,7 +31,7 @@
#endif
// Provide fixed-size integer types.
#include
<cm
IML/INT
.h>
#include
<cm
_kwiml
.h>
#include
<fstream>
#include
<iostream>
...
...
Source/cmVersion.h
View file @
036b6ef7
...
...
@@ -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
cm
IML_INT_UINT64_C(100000000)
#define CMake_VERSION_ENCODE__BASE
KW
IML_INT_UINT64_C(100000000)
#define CMake_VERSION_ENCODE(major, minor, patch) \
((((major) * 1000u) * CMake_VERSION_ENCODE__BASE) + \
(((minor) % 1000u) * CMake_VERSION_ENCODE__BASE) + \
...
...
Source/cm_sha2.c
View file @
036b6ef7
...
...
@@ -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
cm
IML_ABI_ENDIAN_ID
# define BIG_ENDIAN
cm
IML_ABI_ENDIAN_ID_BIG
# define LITTLE_ENDIAN
cm
IML_ABI_ENDIAN_ID_LITTLE
# define BYTE_ORDER
KW
IML_ABI_ENDIAN_ID
# define BIG_ENDIAN
KW
IML_ABI_ENDIAN_ID_BIG
# define LITTLE_ENDIAN
KW
IML_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)
cm
IML_INT_UINT32_C(x)
#define SHA_UINT64_C(x)
cm
IML_INT_UINT64_C(x)
#define SHA_UINT32_C(x)
KW
IML_INT_UINT32_C(x)
#define SHA_UINT64_C(x)
KW
IML_INT_UINT64_C(x)
#if defined(__clang__)
# pragma clang diagnostic ignored "-Wcast-align"
#endif
...
...
Source/cm_sha2.h
View file @
036b6ef7
...
...
@@ -38,11 +38,11 @@
#include
"cm_sha2_mangle.h"
/* CMake modification: use integer types from
cm
IML. */
#include
"
cm
IML/INT
.h
"
typedef
cm
IML_INT_uint8_t
cm_sha2_uint8_t
;
typedef
cm
IML_INT_uint32_t
cm_sha2_uint32_t
;
typedef
cm
IML_INT_uint64_t
cm_sha2_uint64_t
;
/* CMake modification: use integer types from
KW
IML. */
#include
<
cm
_kwiml
.h
>
typedef
KW
IML_INT_uint8_t
cm_sha2_uint8_t
;
typedef
KW
IML_INT_uint32_t
cm_sha2_uint32_t
;
typedef
KW
IML_INT_uint64_t
cm_sha2_uint64_t
;
#ifdef __cplusplus
extern
"C"
{
...
...
Utilities/cm_kwiml.h
0 → 100644
View file @
036b6ef7
/*============================================================================
CMake - Cross Platform Makefile Generator
Copyright 2000-2015 Kitware, Inc., Insight Software Consortium
Distributed under the OSI-approved BSD License (the "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.
============================================================================*/
#ifndef cm_kwiml_h
#define cm_kwiml_h
#include
"KWIML/include/kwiml/abi.h"
#include
"KWIML/include/kwiml/int.h"
#endif
bootstrap
View file @
036b6ef7
...
...
@@ -373,11 +373,6 @@ KWSYS_FILES="\
SystemTools.hxx
\
Terminal.h"
KWIML_FILES
=
'
ABI.h
INT.h
'
# Display CMake bootstrap usage
cmake_usage
()
{
...
...
@@ -702,11 +697,6 @@ if [ ! -d "cmsys" ]; then
cmake_error 4
"Cannot create directory
${
cmake_bootstrap_dir
}
/cmsys"
fi
[
-d
"cmIML"
]
||
mkdir
"cmIML"
if
[
!
-d
"cmIML"
]
;
then
cmake_error 12
"Cannot create directory
${
cmake_bootstrap_dir
}
/cmIML"
fi
# Delete all the bootstrap files
rm
-f
"
${
cmake_bootstrap_dir
}
/cmake_bootstrap.log"
rm
-f
"
${
cmake_bootstrap_dir
}
/cmConfigure.h
${
_tmp
}
"
...
...
@@ -1280,11 +1270,6 @@ for a in ${KWSYS_FILES}; do
"
${
cmake_bootstrap_dir
}
/cmsys/
${
a
}
"
KWSYS_NAMESPACE cmsys
done
for
a
in
${
KWIML_FILES
}
;
do
cmake_replace_string
"
${
cmake_source_dir
}
/Utilities/KWIML/
${
a
}
.in"
\
"
${
cmake_bootstrap_dir
}
/cmIML/
${
a
}
"
KWIML cmIML
done
# Generate Makefile
dep
=
"cmConfigure.h cmsys/*.hxx cmsys/*.h
`
cmake_escape
\"
${
cmake_source_dir
}
\"
`
/Source/*.h"
objs
=
""
...
...
@@ -1326,9 +1311,9 @@ cmake_cxx_flags_SystemTools="
-DKWSYS_CXX_HAS_UTIMES=
${
KWSYS_CXX_HAS_UTIMES
}
"
cmake_c_flags
=
"
${
cmake_c_flags
}
-I
`
cmake_escape
\"
${
cmake_bootstrap_dir
}
\"
`
-I
`
cmake_escape
\"
${
cmake_source_dir
}
/Source
\"
`
\
-I
`
cmake_escape
\"
${
cmake_
bootstrap_dir
}
\"
`
"
-I
`
cmake_escape
\"
${
cmake_
source_dir
}
/Utilities
\"
`
"
cmake_cxx_flags
=
"
${
cmake_cxx_flags
}
-I
`
cmake_escape
\"
${
cmake_bootstrap_dir
}
\"
`
-I
`
cmake_escape
\"
${
cmake_source_dir
}
/Source
\"
`
\
-I
`
cmake_escape
\"
${
cmake_
bootstrap_dir
}
\"
`
"
-I
`
cmake_escape
\"
${
cmake_
source_dir
}
/Utilities
\"
`
"
echo
"cmake:
${
objs
}
"
>
"
${
cmake_bootstrap_dir
}
/Makefile"
echo
"
${
cmake_cxx_compiler
}
${
cmake_ld_flags
}
${
cmake_cxx_flags
}
${
objs
}
-o cmake"
>>
"
${
cmake_bootstrap_dir
}
/Makefile"
for
a
in
${
CMAKE_CXX_SOURCES
}
;
do
...
...
Brad King
@brad.king
mentioned in commit
a53e0168
·
Dec 21, 2015
mentioned in commit
a53e0168
mentioned in commit a53e0168c344111de301ad67498ad89862b58cdf
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment