Pass the CLING_VERSION as compiler flag and remove it from cling_compiledata.h file

This commit is contained in:
Pere Mato 2014-05-13 16:42:13 +02:00 committed by sftnight
parent 709f085345
commit 45635cf4a2
2 changed files with 5 additions and 4 deletions

View File

@ -181,12 +181,12 @@ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/
PATTERN "*.inc"
)
add_definitions( -D_GNU_SOURCE
-DCLING_INCLUDE_PATHS="${CLING_SOURCE_DIR}/include:${CLING_BINARY_DIR}/include" )
# Determine cling's version:
file (STRINGS "VERSION" CLING_VERSION)
add_definitions( -D_GNU_SOURCE -DCLING_VERSION="${CLING_VERSION}"
-DCLING_INCLUDE_PATHS="${CLING_SOURCE_DIR}/include:${CLING_BINARY_DIR}/include" )
add_subdirectory(lib)
add_subdirectory(tools)

View File

@ -53,6 +53,8 @@ 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(RuntimeException.cpp COMPILE_FLAGS " /EHsc ")
# the line above doesn't work, and it gives the following warnings:
# cl : Command line warning D9025: overriding '/EHs' with '/EHs-'
@ -94,6 +96,5 @@ endif()
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/cling-compiledata.h
"#define LLVM_CXX \"${CMAKE_CXX_COMPILER_RELATIVE} ${CMAKE_CXX_FLAGS_NO_I} ${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}}\"
#define CLING_VERSION \"${CLING_VERSION}\"
"
)