diff options
author | gregory guy <g-gregory@gmx.fr> | 2019-04-22 19:00:51 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2019-04-28 16:04:50 +0200 |
commit | 32fc564b71ffaf9cec97f99fb9d99541c3ab279f (patch) | |
tree | 4edc2902a863d7027b216f6bb0f656fbd24c9662 /ConfigureChecks.cmake | |
parent | b72d215669ce409ed6d6b6443b2fedb6c8045289 (diff) | |
download | libart-lgpl-32fc564b71ffaf9cec97f99fb9d99541c3ab279f.tar.gz libart-lgpl-32fc564b71ffaf9cec97f99fb9d99541c3ab279f.zip |
conversion to the cmake building system
Cleanup of generated headers.
Add common cmake submodule.
Signed-off-by: gregory guy <g-gregory@gmx.fr>
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit b996d3d1de7126e111f2c48b59422ab434478377)
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r-- | ConfigureChecks.cmake | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake new file mode 100644 index 0000000..11daccd --- /dev/null +++ b/ConfigureChecks.cmake @@ -0,0 +1,52 @@ +########################################### +# # +# Improvements and feedback are welcome # +# # +# This file is released under GPL >= 3 # +# # +########################################### + +# required stuff +tde_setup_architecture_flags( ) + +include(TestBigEndian) +test_big_endian(WORDS_BIGENDIAN) + +tde_setup_largefiles( ) + + +##### check for gcc visibility support + +if( WITH_GCC_VISIBILITY ) + tde_setup_gcc_visibility( ) +endif( WITH_GCC_VISIBILITY ) + + +##### check of type size + +check_type_size( char ART_SIZEOF_CHAR ) +check_type_size( short ART_SIZEOF_SHORT ) +check_type_size( int ART_SIZEOF_INT ) +check_type_size( long ART_SIZEOF_LONG ) + +if( ${ART_SIZEOF_CHAR} EQUAL 1 ) + set( ART_U8_TYPE "unsigned char" ) +else( ) + tde_message_fatal( "sizeof(char) != 1" ) +endif( ) + +if( ${ART_SIZEOF_SHORT} EQUAL 2 ) + set( ART_U16_TYPE "unsigned short" ) +else( ) + tde_message_fatal( "sizeof(short) != 2" ) +endif( ) + +if( ${ART_SIZEOF_INT} EQUAL 4 ) + set( ART_U32_TYPE "unsigned int" ) +else( ) + if( ${ART_SIZEOF_LONG} EQUAL 4 ) + set( ART_U32_TYPE "unsigned long" ) + else( ) + tde_message_fatal( "sizeof(int) != 4 and sizeof(long) != 4" ) + endif( ) +endif( ) |