From 6912ed0f36514744db940ecb78fbbe25ccd889f8 Mon Sep 17 00:00:00 2001 From: Edward O'Callaghan Date: Mon, 3 Aug 2009 01:08:25 +0000 Subject: [PATCH] Initial import of CMake type build system. Just like the rest of llvm.. llvm-svn: 77933 --- compiler-rt/BlocksRuntime/CMakeLists.txt | 8 ++ compiler-rt/CMakeLists.txt | 34 +++++++ compiler-rt/lib/CMakeLists.txt | 29 ++++++ compiler-rt/lib/i386/CMakeLists.txt | 3 + compiler-rt/lib/ppc/CMakeLists.txt | 12 +++ compiler-rt/lib/x86_64/CMakeLists.txt | 5 ++ compiler-rt/test/CMakeLists.txt | 2 + compiler-rt/test/Unit/CMakeLists.txt | 109 +++++++++++++++++++++++ compiler-rt/test/Unit/ppc/CMakeLists.txt | 9 ++ compiler-rt/test/timing/CMakeLists.txt | 23 +++++ 10 files changed, 234 insertions(+) create mode 100644 compiler-rt/BlocksRuntime/CMakeLists.txt create mode 100644 compiler-rt/CMakeLists.txt create mode 100644 compiler-rt/lib/CMakeLists.txt create mode 100644 compiler-rt/lib/i386/CMakeLists.txt create mode 100644 compiler-rt/lib/ppc/CMakeLists.txt create mode 100644 compiler-rt/lib/x86_64/CMakeLists.txt create mode 100644 compiler-rt/test/CMakeLists.txt create mode 100644 compiler-rt/test/Unit/CMakeLists.txt create mode 100644 compiler-rt/test/Unit/ppc/CMakeLists.txt create mode 100644 compiler-rt/test/timing/CMakeLists.txt diff --git a/compiler-rt/BlocksRuntime/CMakeLists.txt b/compiler-rt/BlocksRuntime/CMakeLists.txt new file mode 100644 index 000000000000..33ab7e55025c --- /dev/null +++ b/compiler-rt/BlocksRuntime/CMakeLists.txt @@ -0,0 +1,8 @@ +PROJECT( BlocksRuntime ) + +SET( SRCS + runtime.c + data.c + ) + +ADD_LIBRARY( ${PROJECT_NAME} SHARED ${SRCS}) diff --git a/compiler-rt/CMakeLists.txt b/compiler-rt/CMakeLists.txt new file mode 100644 index 000000000000..4ef82bef03a8 --- /dev/null +++ b/compiler-rt/CMakeLists.txt @@ -0,0 +1,34 @@ +# See docs/CMake.html for instructions about how to build Compiler-RT with CMake. + +project(CompilerRT) +cmake_minimum_required(VERSION 2.6.1) + +set(PACKAGE_NAME compiler-rt) +set(PACKAGE_VERSION 1.0svn) +set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") +set(PACKAGE_BUGREPORT "llvmbugs@cs.uiuc.edu") + +if( CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR AND NOT MSVC_IDE ) + message(FATAL_ERROR "In-source builds are not allowed. +CMake would overwrite the makefiles distributed with Compiler-RT. +Please create a directory and run cmake from there, passing the path +to this source directory as the last argument. +This process created the file `CMakeCache.txt' and the directory `CMakeFiles'. +Please delete them.") +endif() + +install(DIRECTORY include + DESTINATION . + PATTERN ".svn" EXCLUDE + PATTERN "*.cmake" EXCLUDE + PATTERN "*.in" EXCLUDE + ) + +# BlocksRuntime - some random cruft that got thrown in at the last minute, ignoring for now. +# ADD_SUBDIRECTORY( BlocksRuntime ) +ADD_SUBDIRECTORY( lib ) +# Tests are being ignored for until the very basics are working. +# ADD_SUBDIRECTORY( test ) + +# Creates a shared lib .so +ADD_LIBRARY( ${PROJECT_NAME} SHARED ${SRCS}) diff --git a/compiler-rt/lib/CMakeLists.txt b/compiler-rt/lib/CMakeLists.txt new file mode 100644 index 000000000000..92499a6ba148 --- /dev/null +++ b/compiler-rt/lib/CMakeLists.txt @@ -0,0 +1,29 @@ +# +# Create a library called "CompilerRT" which includes the source files. + +# Generic functions needed for each architecture + +SET( SRCS + absvdi2.c cmpdi2.c fixdfdi.c floatdidf.c moddi3.c negvti2.c ucmpdi2.c + absvsi2.c cmpti2.c fixdfti.c floatdisf.c modsi3.c paritydi2.c ucmpti2.c + absvti2.c ctzdi2.c fixsfdi.c floatdixf.c modti3.c paritysi2.c udivdi3.c + addvdi3.c ctzsi2.c fixsfti.c floattidf.c muldc3.c parityti2.c udivmoddi4.c + addvsi3.c ctzti2.c fixunsdfdi.c floattisf.c muldi3.c popcountdi2.c udivmodti4.c + addvti3.c divdc3.c fixunsdfsi.c floattixf.c mulsc3.c popcountsi2.c udivsi3.c + apple_versioning.c divdi3.c fixunsdfti.c floatundidf.c multi3.c popcountti2.c udivti3.c + ashldi3.c divsc3.c fixunssfdi.c floatundisf.c mulvdi3.c powidf2.c umoddi3.c + ashlti3.c divsi3.c fixunssfsi.c floatundixf.c mulvsi3.c powisf2.c umodsi3.c + ashrdi3.c divti3.c fixunssfti.c floatuntidf.c mulvti3.c powitf2.c umodti3.c + ashrti3.c divxc3.c fixunsxfdi.c floatuntisf.c mulxc3.c powixf2.c + clear_cache.c enable_execute_stack.c fixunsxfsi.c floatuntixf.c negdi2.c subvdi3.c + clzdi2.c eprintf.c fixunsxfti.c gcc_personality_v0.c negti2.c subvsi3.c + clzsi2.c ffsdi2.c fixxfdi.c lshrdi3.c negvdi2.c subvti3.c + clzti2.c ffsti2.c fixxfti.c lshrti3.c negvsi2.c trampoline_setup.c + ) + +# Optimized functions for each architecture + +# Commenting out for the min until the basics are working first. +# ADD_SUBDIRECTORY( ppc ) +# ADD_SUBDIRECTORY( x86_64 ) +# ADD_SUBDIRECTORY( i386 ) diff --git a/compiler-rt/lib/i386/CMakeLists.txt b/compiler-rt/lib/i386/CMakeLists.txt new file mode 100644 index 000000000000..1c2861afb06e --- /dev/null +++ b/compiler-rt/lib/i386/CMakeLists.txt @@ -0,0 +1,3 @@ +SET( SRCS + + ) diff --git a/compiler-rt/lib/ppc/CMakeLists.txt b/compiler-rt/lib/ppc/CMakeLists.txt new file mode 100644 index 000000000000..fb0fcd5a771c --- /dev/null +++ b/compiler-rt/lib/ppc/CMakeLists.txt @@ -0,0 +1,12 @@ +SET( SRCS + fixtfdi.c + gcc_qdiv.c + gcc_qmul.c + divtc3.c + gcc_qsub.c + multc3.c + floatditf.c + gcc_qadd.c + fixunstfdi.c + floatunditf.c + ) diff --git a/compiler-rt/lib/x86_64/CMakeLists.txt b/compiler-rt/lib/x86_64/CMakeLists.txt new file mode 100644 index 000000000000..ee21308e20c3 --- /dev/null +++ b/compiler-rt/lib/x86_64/CMakeLists.txt @@ -0,0 +1,5 @@ +SET( SRCS + floatdixf.c + floatdisf.c + floatdidf.c + ) diff --git a/compiler-rt/test/CMakeLists.txt b/compiler-rt/test/CMakeLists.txt new file mode 100644 index 000000000000..86c4689ec4f3 --- /dev/null +++ b/compiler-rt/test/CMakeLists.txt @@ -0,0 +1,2 @@ +ADD_SUBDIRECTORY( timing ) +ADD_SUBDIRECTORY( Unit ) diff --git a/compiler-rt/test/Unit/CMakeLists.txt b/compiler-rt/test/Unit/CMakeLists.txt new file mode 100644 index 000000000000..14847c8cf8db --- /dev/null +++ b/compiler-rt/test/Unit/CMakeLists.txt @@ -0,0 +1,109 @@ +PROJECT( Unit ) + +SET( SRCS + ashldi3_test.c + gcc_personality_test.c + udivmodti4_test.c + negvsi2_test.c + fixdfdi_test.c + mulvsi3_test.c + fixdfti_test.c + muldc3_test.c + popcountdi2_test.c + negti2_test.c + divsc3_test.c + cmpti2_test.c + trampoline_setup_test.c + mulvti3_test.c + fixunsxfdi_test.c + fixunsxfti_test.c + paritydi2_test.c + negvti2_test.c + divtc3_test.c + ucmpti2_test.c + multc3_test.c + floatdixf_test.c + popcountti2_test.c + negdi2_test.c + floatdidf_test.c + fixunstfdi_test.c + ashlti3_test.c + enable_execute_stack_test.c + floatundixf_test.c + udivmoddi4_test.c + paritysi2_test.c + floatundidf_test.c + divdc3_test.c + floatuntisf_test.c + ucmpdi2_test.c + powixf2_test.c + mulsc3_test.c + popcountsi2_test.c + cmpdi2_test.c + floattisf_test.c + mulvdi3_test.c + fixunssfdi_test.c + fixunsdfsi_test.c + fixunssfti_test.c + parityti2_test.c + negvdi2_test.c + moddi3_test.c + clear_cache_test.c + fixunsxfsi_test.c + subvdi3_test.c + multi3_test.c + addvdi3_test.c + clzti2_test.c + umoddi3_test.c + absvsi2_test.c + ctzdi2_test.c + powitf2_test.c + fixsfdi_test.c + ffsti2_test.c + divdi3_test.c + fixsfti_test.c + absvti2_test.c + ashrti3_test.c + powisf2_test.c + mulxc3_test.c + lshrdi3_test.c + udivdi3_test.c + clzsi2_test.c + addvti3_test.c + udivsi3_test.c + clzdi2_test.c + floatuntidf_test.c + umodti3_test.c + divxc3_test.c + ctzti2_test.c + floatuntixf_test.c + powidf2_test.c + floattidf_test.c + modti3_test.c + fixunssfsi_test.c + fixunsdfdi_test.c + divsi3_test.c + floattixf_test.c + fixunsdfti_test.c + subvti3_test.c + muldi3_test.c + ctzsi2_test.c + absvdi2_test.c + ashrdi3_test.c + lshrti3_test.c + floatdisf_test.c + addvsi3_test.c + udivti3_test.c + umodsi3_test.c + subvsi3_test.c + fixxfdi_test.c + modsi3_test.c + fixxfti_test.c + ffsdi2_test.c + divti3_test.c + floatundisf_test.c + ) + +ADD_LIBRARY( ${PROJECT_NAME} SHARED ${SRCS}) +# ADD_EXECUTABLE( ${PROJECT_NAME} ${SRCS} ) +# TARGET_LINK_LIBRARIES( ${PROJECT_NAME} ${LIBS} ) diff --git a/compiler-rt/test/Unit/ppc/CMakeLists.txt b/compiler-rt/test/Unit/ppc/CMakeLists.txt new file mode 100644 index 000000000000..45f1a269036a --- /dev/null +++ b/compiler-rt/test/Unit/ppc/CMakeLists.txt @@ -0,0 +1,9 @@ +SET( SRCS + floatditf_test.c + fixtfdi_test.c + qsub_test.c + qadd_test.c + qmul_test.c + qdiv_test.c + floatunditf_test.c + ) diff --git a/compiler-rt/test/timing/CMakeLists.txt b/compiler-rt/test/timing/CMakeLists.txt new file mode 100644 index 000000000000..4368731be2d6 --- /dev/null +++ b/compiler-rt/test/timing/CMakeLists.txt @@ -0,0 +1,23 @@ +PROJECT( timing ) + +SET( SRCS + lshrdi3.c + floatundixf.c + floatdixf.c + umoddi3.c + udivdi3.c + negdi2.c + ashrdi3.c + muldi3.c + ashldi3.c + divdi3.c + floatundisf.c + floatdidf.c + floatdisf.c + moddi3.c + floatundidf.c + ) + +ADD_LIBRARY( ${PROJECT_NAME} SHARED ${SRCS}) +# ADD_EXECUTABLE( ${PROJECT_NAME} ${SRCS} ) +# TARGET_LINK_LIBRARIES( ${PROJECT_NAME} ${LIBS} )