diff options
Diffstat (limited to 'cmake')
| -rw-r--r-- | cmake/Toolchain-Arch-mingw32.cmake.sample | 30 | ||||
| -rw-r--r-- | cmake/Toolchain-OSX-GenericShElf.cmake.sample | 37 | ||||
| -rw-r--r-- | cmake/Toolchain-OSX-mingw32.cmake.sample | 32 | ||||
| -rw-r--r-- | cmake/Toolchain-OpenWRT-ANY.cmake | 13 | ||||
| -rw-r--r-- | cmake/Toolchain-Ubuntu-gnueabi.cmake.sample | 29 | ||||
| -rw-r--r-- | cmake/Toolchain-Ubuntu-gnueabihf.cmake.sample | 29 | ||||
| -rw-r--r-- | cmake/Toolchain-Ubuntu-mingw32.cmake.sample | 30 | ||||
| -rw-r--r-- | cmake/modules/IntrospectSystem.cmake | 54 |
8 files changed, 0 insertions, 254 deletions
diff --git a/cmake/Toolchain-Arch-mingw32.cmake.sample b/cmake/Toolchain-Arch-mingw32.cmake.sample deleted file mode 100644 index 727fa04ce..000000000 --- a/cmake/Toolchain-Arch-mingw32.cmake.sample +++ /dev/null @@ -1,30 +0,0 @@ -# Sample toolchain file for building for Windows from an Arch Linux system. -# -# Typical usage: -# 1) install cross compiler: `sudo pacman -S mingw32-gcc` -# 2) cp cmake/Toolchain-Arch-mingw32.cmake.sample ~/Toolchain-Arch-mingw32.cmake -# 3) tweak toolchain values as needed -# 4) cd build -# 5) cmake -DCMAKE_TOOLCHAIN_FILE=~/Toolchain-Arch-mingw32.cmake .. - -# name of the target OS on which the built artifacts will run -# and the toolchain prefix -set(CMAKE_SYSTEM_NAME Windows) -set(TOOLCHAIN_PREFIX i486-mingw32) - -# cross compilers to use for C and C++ -set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc) -set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++) -set(CMAKE_RC_COMPILER ${TOOLCHAIN_PREFIX}-windres) - -# target environment on the build host system -# set 1st to dir with the cross compiler's C/C++ headers/libs -# set 2nd to dir containing personal cross development headers/libs -set(CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX} ~/crossdev/w32) - -# modify default behavior of FIND_XXX() commands to -# search for headers/libs in the target environment and -# search for programs in the build host environment -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) diff --git a/cmake/Toolchain-OSX-GenericShElf.cmake.sample b/cmake/Toolchain-OSX-GenericShElf.cmake.sample deleted file mode 100644 index 1f847830a..000000000 --- a/cmake/Toolchain-OSX-GenericShElf.cmake.sample +++ /dev/null @@ -1,37 +0,0 @@ -# -# Typical usage: -# 0) install cmake version 2.8-9 or higher. -# 1) install a PizzaFactory cross compiler -# a) darwin toolchain targeting sh-elf: http://sourceforge.jp/projects/pf3gnuchains/downloads/50061/sh-pizzafactory-elf.pkg/ -# b) install pkg. -# c) export PATH=$PATH:/pizza/bin -# 2) cp cmake/Toolchain-OSX-GenericShElf.cmake.sample ~/Toolchain-OSX-GenericShElf.cmake -# 3) tweak toolchain values as needed -# 4) cd build -# 5) cmake -DCMAKE_TOOLCHAIN_FILE=~/Toolchain-OSX-GenericShElf.cmake .. -# 6) Run mirb on gdb -# a) sh-pizzafactory-elf-gdb tools/mirb/mirb -# b) target sim -# c) load -# d) run - -# name of the target OS on which the built artifacts will run -# and the toolchain prefix -set(CMAKE_SYSTEM_NAME Generic) -set(TOOLCHAIN_PREFIX sh-pizzafactory-elf) - -# cross compilers to use for C and C++ -set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc) -set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++) - -# target environment(s) on the build host system -# set 1st to dir with the cross compiler's C/C++ headers/libs -# set 2nd to dir containing personal cross development headers/libs -set(CMAKE_FIND_ROOT_PATH /pizza/${TOOLCHAIN_PREFIX}) - -# modify default behavior of FIND_XXX() commands to -# search for headers/libs in the target environment and -# search for programs in the build host environment -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) diff --git a/cmake/Toolchain-OSX-mingw32.cmake.sample b/cmake/Toolchain-OSX-mingw32.cmake.sample deleted file mode 100644 index 4926645e7..000000000 --- a/cmake/Toolchain-OSX-mingw32.cmake.sample +++ /dev/null @@ -1,32 +0,0 @@ -# Sample toolchain file for building for Windows from an OS X system. -# -# Typical usage: -# 1) install a mingw-w64 cross compiler -# a) darwin toolchain targeting win32: http://sourceforge.net/projects/mingw-w64/files/Toolchains targetting Win32/ -# b) extract toolchain into ~/mingw/w32 -# 2) cp cmake/Toolchain-OSX-mingw32.cmake.sample ~/Toolchain-OSX-mingw32.cmake -# 3) tweak toolchain values as needed -# 4) cd build -# 5) cmake -DCMAKE_TOOLCHAIN_FILE=~/Toolchain-OSX-mingw32.cmake .. - -# name of the target OS on which the built artifacts will run -# and the toolchain prefix -set(CMAKE_SYSTEM_NAME Windows) -set(TOOLCHAIN_PREFIX i686-w64-mingw32) - -# cross compilers to use for C and C++ -set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc) -set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++) -set(CMAKE_RC_COMPILER ${TOOLCHAIN_PREFIX}-windres) - -# target environment(s) on the build host system -# set 1st to dir with the cross compiler's C/C++ headers/libs -# set 2nd to dir containing personal cross development headers/libs -set(CMAKE_FIND_ROOT_PATH ~/mingw/w32/${TOOLCHAIN_PREFIX} ~/crossdev/w32) - -# modify default behavior of FIND_XXX() commands to -# search for headers/libs in the target environment and -# search for programs in the build host environment -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) diff --git a/cmake/Toolchain-OpenWRT-ANY.cmake b/cmake/Toolchain-OpenWRT-ANY.cmake deleted file mode 100644 index 888c51ebe..000000000 --- a/cmake/Toolchain-OpenWRT-ANY.cmake +++ /dev/null @@ -1,13 +0,0 @@ -# Toolchain file for building with OpenWRT Toolchain for ANY OpenWRT Target. -# Following prequisition are necessary: -# - latest cmake version -# - mruby OpenWRT Package file (not yet in distribution) - -# Switch to Cross Compile by setting the system name -SET(CMAKE_SYSTEM_NAME Linux) - -# We show CMAKE the compiler, the rest will be guessed by the Toolchain -SET(CMAKE_C_COMPILER "$ENV{OPENWRT_TOOLCHAIN}/bin/$ENV{OPENWRT_TARGETCC}") - -# We define an own release flag so that we can adapt the optimal C_FLAGS -SET(CMAKE_C_FLAGS_OPENWRT "$ENV{OPENWRT_TARGETFLAGS}") diff --git a/cmake/Toolchain-Ubuntu-gnueabi.cmake.sample b/cmake/Toolchain-Ubuntu-gnueabi.cmake.sample deleted file mode 100644 index bf29a5cad..000000000 --- a/cmake/Toolchain-Ubuntu-gnueabi.cmake.sample +++ /dev/null @@ -1,29 +0,0 @@ -# Sample toolchain file for building for ARM from an Ubuntu Linux system. -# -# Typical usage: -# 1) install cross compiler: `sudo apt-get install gcc-arm-linux-gnueabi` -# 2) cp cmake/Toolchain-Ubuntu-gnueabi.cmake.sample ~/Toolchain-Ubuntu-gnueabi.cmake -# 3) tweak toolchain values as needed -# 4) cd build -# 5) cmake -DCMAKE_TOOLCHAIN_FILE=~/Toolchain-Ubuntu-gnueabi.cmake .. - -# name of the target OS on which the built artifacts will run and the -# toolchain prefix. if target is an embedded system without an OS, set -# CMAKE_SYSTEM_NAME to `Generic` -set(CMAKE_SYSTEM_NAME Linux) -set(TOOLCHAIN_PREFIX arm-linux-gnueabi) - -# cross compilers to use for C -set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc) - -# target environment on the build host system -# set 1st to dir with the cross compiler's C/C++ headers/libs -# set 2nd to dir containing personal cross development headers/libs -set(CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX} ~/crossdev/eabi) - -# modify default behavior of FIND_XXX() commands to -# search for headers/libs in the target environment and -# search for programs in the build host environment -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) diff --git a/cmake/Toolchain-Ubuntu-gnueabihf.cmake.sample b/cmake/Toolchain-Ubuntu-gnueabihf.cmake.sample deleted file mode 100644 index 2d7f2769c..000000000 --- a/cmake/Toolchain-Ubuntu-gnueabihf.cmake.sample +++ /dev/null @@ -1,29 +0,0 @@ -# Sample toolchain file for building for ARM (w/hw float support) from an Ubuntu Linux system. -# -# Typical usage: -# 1) install cross compiler: `sudo apt-get install gcc-arm-linux-gnueabihf` -# 2) cp cmake/Toolchain-Ubuntu-gnueabihf.cmake.sample ~/Toolchain-Ubuntu-gnueabihf.cmake -# 3) tweak toolchain values as needed -# 4) cd build -# 5) cmake -DCMAKE_TOOLCHAIN_FILE=~/Toolchain-Ubuntu-gnueabihf.cmake .. - -# name of the target OS on which the built artifacts will run and the -# toolchain prefix. if target is an embedded system without an OS, set -# CMAKE_SYSTEM_NAME to `Generic` -set(CMAKE_SYSTEM_NAME Linux) -set(TOOLCHAIN_PREFIX arm-linux-gnueabihf) - -# cross compilers to use for C -set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc) - -# target environment on the build host system -# set 1st to dir with the cross compiler's C/C++ headers/libs -# set 2nd to dir containing personal cross development headers/libs -set(CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX} ~/crossdev/eabihf) - -# modify default behavior of FIND_XXX() commands to -# search for headers/libs in the target environment and -# search for programs in the build host environment -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) diff --git a/cmake/Toolchain-Ubuntu-mingw32.cmake.sample b/cmake/Toolchain-Ubuntu-mingw32.cmake.sample deleted file mode 100644 index adc24e501..000000000 --- a/cmake/Toolchain-Ubuntu-mingw32.cmake.sample +++ /dev/null @@ -1,30 +0,0 @@ -# Sample toolchain file for building for Windows from an Ubuntu Linux system. -# -# Typical usage: -# 1) install cross compiler: `sudo apt-get install mingw-w64 g++-mingw-w64` -# 2) cp cmake/Toolchain-Ubuntu-mingw32.cmake.sample ~/Toolchain-Ubuntu-mingw32.cmake -# 3) tweak toolchain values as needed -# 4) cd build -# 5) cmake -DCMAKE_TOOLCHAIN_FILE=~/Toolchain-Ubuntu-mingw32.cmake .. - -# name of the target OS on which the built artifacts will run -# and the toolchain prefix -set(CMAKE_SYSTEM_NAME Windows) -set(TOOLCHAIN_PREFIX i686-w64-mingw32) - -# cross compilers to use for C and C++ -set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc) -set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++) -set(CMAKE_RC_COMPILER ${TOOLCHAIN_PREFIX}-windres) - -# target environment on the build host system -# set 1st to dir with the cross compiler's C/C++ headers/libs -# set 2nd to dir containing personal cross development headers/libs -set(CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX} ~/crossdev/w32) - -# modify default behavior of FIND_XXX() commands to -# search for headers/libs in the target environment and -# search for programs in the build host environment -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) diff --git a/cmake/modules/IntrospectSystem.cmake b/cmake/modules/IntrospectSystem.cmake deleted file mode 100644 index 559b884b8..000000000 --- a/cmake/modules/IntrospectSystem.cmake +++ /dev/null @@ -1,54 +0,0 @@ -# system capabilities checking - -# initial system defaults -if(CMAKE_COMPILER_IS_GNUCC) - set(MRUBY_DEFAULT_CFLAGS "-std=gnu99 -Wall -Werror-implicit-function-declaration -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-pointer-sign -Wno-missing-field-initializers -Wformat=2 -Wstrict-aliasing=2 -Wdisabled-optimization -Wpointer-arith -Wdeclaration-after-statement -Wbad-function-cast -Wcast-align -Wredundant-decls") - set(CMAKE_C_FLAGS "${MRUBY_DEFAULT_CFLAGS}") - set(CMAKE_C_FLAGS_DEBUG "-O3 -ggdb") - set(CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG") - set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -g") - set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG") - - set(MRUBY_LIBS m) -else() - if(MSVC) - # TODO default MSVC flags - add_definitions( - -D_CRT_SECURE_NO_WARNINGS - -wd4018 # suppress 'signed/unsigned mismatch' - ) - endif() -endif() - -add_definitions(-DDISABLE_GEMS) - -if(MSVC) - add_definitions( - -DRUBY_EXPORT # required by oniguruma.h - ) -endif() - - -# include helpers -include(CheckIncludeFile) -include(CheckSymbolExists) - -# header checks -CHECK_INCLUDE_FILE(string.h HAVE_STRING_H) -if(HAVE_STRING_H) - add_definitions(-DHAVE_STRING_H) -endif() - -CHECK_INCLUDE_FILE(float.h HAVE_FLOAT_H) -if(HAVE_FLOAT_H) - add_definitions(-DHAVE_FLOAT_H) -endif() - - -# symbol checks -CHECK_SYMBOL_EXISTS(gettimeofday sys/time.h HAVE_GETTIMEOFDAY) -if(NOT HAVE_GETTIMEOFDAY) - add_definitions(-DNO_GETTIMEOFDAY) -endif() - -# vim: ts=2 sts=2 sw=2 et |
