aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/customconfig.clang-default.cmake
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-06-10 19:14:45 +0200
committerSven Gothel <[email protected]>2014-06-10 19:14:45 +0200
commita71e2ed35cc57dfc9ca6d33c3a2b8a53b3659710 (patch)
tree0e56f33d3ee7b76bd402cbab0f1d0903793ee685 /cmake/customconfig.clang-default.cmake
parentf95bf4457fbc31112fa82dacbc1b7e094b9fd1cf (diff)
CMake: Don't use CMAKE_TOOLCHAIN_FILE for non-crosscompilation, use OPENAL_CUSTOM_CONFIG to inject cmake commands
Diffstat (limited to 'cmake/customconfig.clang-default.cmake')
-rw-r--r--cmake/customconfig.clang-default.cmake16
1 files changed, 16 insertions, 0 deletions
diff --git a/cmake/customconfig.clang-default.cmake b/cmake/customconfig.clang-default.cmake
new file mode 100644
index 00000000..9f0f1b7c
--- /dev/null
+++ b/cmake/customconfig.clang-default.cmake
@@ -0,0 +1,16 @@
+# For normal clang compilation
+
+set(CMAKE_C_FLAGS "-include ${PROJECT_SOURCE_DIR}/cmake/glibc-compat-symbols.h")
+set(CMAKE_CXX_FLAGS "-include ${PROJECT_SOURCE_DIR}/cmake/glibc-compat-symbols.h")
+
+set(CMAKE_CXX_CMPILER "gcc")
+set(CMAKE_C_CMPILER "gcc")
+set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}" CACHE STRING "c++ flags")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}" CACHE STRING "c flags")
+
+# set(LINKER_FLAGS "-static-libgcc")
+
+set(CMAKE_SHARED_LINKER_FLAGS "${LINKER_FLAGS}" CACHE STRING "linker flags" FORCE)
+set(CMAKE_MODULE_LINKER_FLAGS "${LINKER_FLAGS}" CACHE STRING "linker flags" FORCE)
+set(CMAKE_EXE_LINKER_FLAGS "${LINKER_FLAGS}" CACHE STRING "linker flags" FORCE)
+