Add the notion of version in both build systems. Remove redundant code.
This commit is contained in:
parent
839b1bbee5
commit
5bea5d34ec
@ -184,6 +184,9 @@ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/
|
||||
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_subdirectory(lib)
|
||||
add_subdirectory(tools)
|
||||
|
||||
|
3
Makefile
3
Makefile
@ -58,6 +58,9 @@ endif
|
||||
# We can revisit this when LLVM/Cling support it.
|
||||
CXX.Flags += -fno-strict-aliasing
|
||||
|
||||
# Determine cling's version:
|
||||
CLING_VERSION=$(shell cat "VERSION")
|
||||
|
||||
###
|
||||
# Cling Top Level specific stuff.
|
||||
|
||||
|
@ -82,18 +82,6 @@ add_file_dependencies(${CMAKE_CURRENT_SOURCE_DIR}/Interpreter.cpp
|
||||
# Remove all -I from CMAKE_CXX_FLAGS
|
||||
string(REPLACE ";" " " __flags "${CMAKE_CXX_FLAGS}")
|
||||
string(REGEX REPLACE "-I[^ ]+" "" CMAKE_CXX_FLAGS_NO_I "${__flags}")
|
||||
find_program(git_executable NAMES git git.exe git.cmd)
|
||||
if( git_executable )
|
||||
execute_process(COMMAND ${git_executable} describe --always
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
TIMEOUT 5
|
||||
RESULT_VARIABLE git_result
|
||||
OUTPUT_VARIABLE git_output
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if( git_result EQUAL 0 )
|
||||
set(CLING_VERSION "${git_output}")
|
||||
endif( )
|
||||
endif( git_executable )
|
||||
|
||||
# Remove absolute path from CMAKE_CXX_COMPILER
|
||||
get_filename_component(_path ${CMAKE_CXX_COMPILER} PATH)
|
||||
|
Loading…
Reference in New Issue
Block a user