Changes needed to make Xcode generation working

This commit is contained in:
Pere Mato 2015-03-05 22:47:17 +01:00 committed by sftnight
parent 18d0c4e740
commit 61112a0f7b
3 changed files with 6 additions and 4 deletions

View File

@ -171,5 +171,5 @@ $(call stripsrc,$(MODDIR)/lib/Interpreter/CIFactory.o): $(CLINGCOMPDH)
$(call stripsrc,$(MODDIR)/lib/Interpreter/CIFactory.o): CLINGCXXFLAGS += -I$(dir $(CLINGCOMPDH))
$(call stripsrc,$(MODDIR)/lib/Interpreter/Interpreter.o): $(CLINGCOMPDH)
$(call stripsrc,$(MODDIR)/lib/Interpreter/Interpreter.o): CLINGCXXFLAGS += -I$(dir $(CLINGCOMPDH))
$(call stripsrc,$(MODDIR)/lib/Interpreter/Interpreter.o): CLINGCXXFLAGS += -DCLING_VERSION='"$(CLING_VERSION)"'
$(call stripsrc,$(MODDIR)/lib/Interpreter/Interpreter.o): CLINGCXXFLAGS += -DCLING_VERSION=$(CLING_VERSION)

View File

@ -58,7 +58,7 @@ if(NOT WIN32)
set_source_files_properties(RuntimeException.cpp COMPILE_FLAGS -fexceptions)
endif()
set_source_files_properties(Interpreter.cpp COMPILE_FLAGS -DCLING_VERSION=\\\"${CLING_VERSION}\\\")
set_source_files_properties(Interpreter.cpp COMPILE_FLAGS -DCLING_VERSION=${CLING_VERSION})
#set_source_files_properties(RuntimeException.cpp COMPILE_FLAGS " /EHsc ")
# the line above doesn't work, and it gives the following warnings:

View File

@ -47,6 +47,8 @@
#include <string>
#include <vector>
#define stringify(s) #s
using namespace clang;
namespace {
@ -219,7 +221,7 @@ namespace cling {
I != E; ++I)
m_IncrParser->commitTransaction(*I);
// Disable suggestions for ROOT
bool showSuggestions = !llvm::StringRef(CLING_VERSION).startswith("ROOT");
bool showSuggestions = !llvm::StringRef(stringify(CLING_VERSION)).startswith("ROOT");
std::unique_ptr<InterpreterCallbacks>
AutoLoadCB(new AutoloadCallback(this, showSuggestions));
setCallbacks(std::move(AutoLoadCB));
@ -239,7 +241,7 @@ namespace cling {
}
const char* Interpreter::getVersion() const {
return CLING_VERSION;
return stringify(CLING_VERSION);
}
void Interpreter::handleFrontendOptions() {