aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/Toolchain_clang.cmake
diff options
context:
space:
mode:
authorJuergen Kahrs <Juergen.Kahrs@googlemail.com>2013-02-21 08:50:50 +0100
committerJuergen Kahrs <Juergen.Kahrs@googlemail.com>2013-02-21 08:50:50 +0100
commita0283cb5e4c3191db16fc9b48d0ff05f660ef3ae (patch)
treed7bbc8229f3e4c2e1a56516aca6e6c2d06c80bfa /cmake/Toolchain_clang.cmake
parent6c173e43fc3902e5dc4be1ed90aac7a66228628e (diff)
downloadegawk-a0283cb5e4c3191db16fc9b48d0ff05f660ef3ae.tar.gz
egawk-a0283cb5e4c3191db16fc9b48d0ff05f660ef3ae.tar.bz2
egawk-a0283cb5e4c3191db16fc9b48d0ff05f660ef3ae.zip
CMake can now use the clang compiler (supplied by the llvm project) to build gawk.
Diffstat (limited to 'cmake/Toolchain_clang.cmake')
-rw-r--r--cmake/Toolchain_clang.cmake19
1 files changed, 19 insertions, 0 deletions
diff --git a/cmake/Toolchain_clang.cmake b/cmake/Toolchain_clang.cmake
new file mode 100644
index 00000000..9784db41
--- /dev/null
+++ b/cmake/Toolchain_clang.cmake
@@ -0,0 +1,19 @@
+# http://www.cmake.org/Wiki/CmakeMingw
+# http://www.cmake.org/Wiki/CMake_Cross_Compiling#The_toolchain_file
+
+# the name of the target operating system
+SET(CMAKE_SYSTEM_NAME Clang)
+
+# which compilers to use for C and C++
+SET(CMAKE_C_COMPILER /usr/bin/clang)
+
+# here is the target environment located
+SET(CMAKE_FIND_ROOT_PATH /usr/)
+
+# adjust the default behaviour of the FIND_XXX() commands:
+# search headers and libraries in the target environment, search
+# programs in the 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)
+