build: updated to new clang and other fixes

* don't save macros from external files
* fixed macro and include saving duplicates
* added NODE_UNDEFINED_MACRO

TIL = You need to cut a 1kg cake about 85 times in half until you have a piece with only a single atom.
This commit is contained in:
Eberhard Graether
2015-09-29 14:22:52 +02:00
parent e3696df5e1
commit eeed22f478
13 changed files with 126 additions and 65 deletions
+7 -4
View File
@@ -1,11 +1,10 @@
if(UNIX AND NOT APPLE)
if (UNIX AND NOT APPLE)
execute_process(
COMMAND $ENV{CLANG_DIR}/build_debug/bin/llvm-config --cxxflags
OUTPUT_VARIABLE CLANG_DEFINITIONS
)
set(CLANG_INCLUDE_DIRS
"$ENV{CLANG_DIR}/llvm/tools/clang/include"
"$ENV{CLANG_DIR}/build_debug/tools/clang/include"
@@ -25,15 +24,19 @@ else()
OUTPUT_VARIABLE CLANG_DEFINITIONS
)
# Remove unwanted flags
string(REPLACE "-fno-exceptions" "" CLANG_DEFINITIONS ${CLANG_DEFINITIONS})
string(REPLACE "-fno-rtti" "" CLANG_DEFINITIONS ${CLANG_DEFINITIONS})
set(CLANG_INCLUDE_DIRS
"$ENV{CLANG_DIR}/llvm/tools/clang/include"
"$ENV{CLANG_DIR}/build/tools/clang/include"
)
set(CLANG_LIBRARY_DIRS "$ENV{CLANG_DIR}/build_debug/lib")
set(CLANG_LIBRARY_DIRS "$ENV{CLANG_DIR}/build/lib")
if (UNIX)
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
set(CLANG_LIBRARY_DIRS "$ENV{CLANG_DIR}/build/Release+Asserts/lib")
set(CLANG_LIBRARY_DIRS "$ENV{CLANG_DIR}/build_release/lib")
endif()
endif ()