"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "CMakeLists.txt" between
ginac-1.7.11.tar.bz2 and ginac-1.8.0.tar.bz2

About: GiNaC (GiNaC is Not a CAS (Computer Algebra System)) is a C++ library for symbolic calculations.

CMakeLists.txt  (ginac-1.7.11.tar.bz2):CMakeLists.txt  (ginac-1.8.0.tar.bz2)
cmake_minimum_required(VERSION 3.1) cmake_minimum_required(VERSION 3.1)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules") set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
project(GiNaC) project(GiNaC)
file(STRINGS ${CMAKE_SOURCE_DIR}/ginac/version.h _ginac_vinfo REGEX "^#define[\t ]+GINACLIB_.*_VERSION.*") file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/ginac/version.h _ginac_vinfo REGEX "^#d efine[\t ]+GINACLIB_.*_VERSION.*")
string(REGEX REPLACE "^.*GINACLIB_MAJOR_VERSION[ \t]+([0-9]+).*" "\\1" GINAC_MAJ OR_VERSION "${_ginac_vinfo}") string(REGEX REPLACE "^.*GINACLIB_MAJOR_VERSION[ \t]+([0-9]+).*" "\\1" GINAC_MAJ OR_VERSION "${_ginac_vinfo}")
string(REGEX REPLACE "^.*GINACLIB_MINOR_VERSION[ \t]+([0-9]+).*" "\\1" GINAC_MIN OR_VERSION "${_ginac_vinfo}") string(REGEX REPLACE "^.*GINACLIB_MINOR_VERSION[ \t]+([0-9]+).*" "\\1" GINAC_MIN OR_VERSION "${_ginac_vinfo}")
string(REGEX REPLACE "^.*GINACLIB_MICRO_VERSION[ \t]+([0-9]+).*" "\\1" GINAC_MIC RO_VERSION "${_ginac_vinfo}") string(REGEX REPLACE "^.*GINACLIB_MICRO_VERSION[ \t]+([0-9]+).*" "\\1" GINAC_MIC RO_VERSION "${_ginac_vinfo}")
set(GINAC_VERSION "${GINAC_MAJOR_VERSION}.${GINAC_MINOR_VERSION}.${GINAC_MICRO_V ERSION}") set(GINAC_VERSION "${GINAC_MAJOR_VERSION}.${GINAC_MINOR_VERSION}.${GINAC_MICRO_V ERSION}")
# Library versioning info # Library versioning info
file(STRINGS ${CMAKE_SOURCE_DIR}/ginac/version.h _ginac_vinfo REGEX "^#define[\t ]+GINAC_LT_.*") file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/ginac/version.h _ginac_vinfo REGEX "^#d efine[\t ]+GINAC_LT_.*")
string(REGEX REPLACE "^.*GINAC_LT_CURRENT[ \t]+([0-9]+).*" "\\1" ginac_lt_curren t "${_ginac_vinfo}") string(REGEX REPLACE "^.*GINAC_LT_CURRENT[ \t]+([0-9]+).*" "\\1" ginac_lt_curren t "${_ginac_vinfo}")
string(REGEX REPLACE "^.*GINAC_LT_AGE[ \t]+([0-9]+).*" "\\1" ginac_lt_age "${_gi nac_vinfo}") string(REGEX REPLACE "^.*GINAC_LT_AGE[ \t]+([0-9]+).*" "\\1" ginac_lt_age "${_gi nac_vinfo}")
string(REGEX REPLACE "^.*GINAC_LT_REVISION[ \t]+([0-9]+).*" "\\1" ginac_lt_revis ion "${_ginac_vinfo}") string(REGEX REPLACE "^.*GINAC_LT_REVISION[ \t]+([0-9]+).*" "\\1" ginac_lt_revis ion "${_ginac_vinfo}")
# XXX: it looks like we need to set this for every platform? # XXX: it looks like we need to set this for every platform?
math(EXPR ginaclib_soversion "${ginac_lt_current} - ${ginac_lt_age}") math(EXPR ginaclib_soversion "${ginac_lt_current} - ${ginac_lt_age}")
set(ginaclib_version ${ginaclib_soversion}.${ginac_lt_age}.${ginac_lt_revision}) set(ginaclib_version ${ginaclib_soversion}.${ginac_lt_age}.${ginac_lt_revision})
include(GNUInstallDirs)
# make check # make check
enable_testing() enable_testing()
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND}) if (NOT TARGET check)
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND})
endif()
if (NOT TARGET test_suite)
add_custom_target(test_suite)
endif()
if (WIN32)
if (NOT DEFINED CMAKE_RUNTIME_OUTPUT_DIRECTORY)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bi
n)
endif()
endif()
# make info # make info
add_custom_target(info ALL) if (NOT TARGET info)
add_custom_target(html) add_custom_target(info ALL)
add_custom_target(pdf) endif()
if (NOT TARGET html)
add_custom_target(html)
endif()
if (NOT TARGET pdf)
add_custom_target(pdf)
endif()
set (CMAKE_CXX_STANDARD 11) set (CMAKE_CXX_STANDARD 11)
find_package(CLN 1.2.2 REQUIRED) if (NOT DEFINED CLN_SOURCE_DIR)
include_directories(${CLN_INCLUDE_DIR}) set(CLN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/cln)
endif()
if (EXISTS ${CLN_SOURCE_DIR}/CMakeLists.txt)
add_subdirectory(${CLN_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/cln)
else()
find_package(CLN 1.2.2 REQUIRED)
endif()
include(CheckIncludeFile) include(CheckIncludeFile)
check_include_file("unistd.h" HAVE_UNISTD_H) check_include_file("unistd.h" HAVE_UNISTD_H)
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/gina
c)
# This macro implements some very special logic how to deal with the cache.
# By default the various install locations inherit their value from their
#"parent" variable, so if you set CMAKE_INSTALL_PREFIX, then
# EXEC_INSTALL_PREFIX, BIN_INSTALL_DIR, LIB_INSTALL_DIR, etc will calculate
# their value by appending subdirs to CMAKE_INSTALL_PREFIX.
# This would work just fine without using the cache.
# But if somebody wants e.g. a different EXEC_INSTALL_PREFIX this value
# has to go into the cache, otherwise it will be forgotten on the next cmake
# run. Once a variable is in the cache, it doesn't depend on its "parent"
# variables anymore and you can only change it by editing it directly.
# This macro helps in this regard, because as long as you don't set one
# of the variables explicitly to some location, the value will be computed
# from parents of the variable in question. So modifying CMAKE_INSTALL_PREFIX
# later on will have the desired effect.
# But once you decide to set e.g. EXEC_INSTALL_PREFIX to some special
# location this will go into the cache and it will no longer depend on
# CMAKE_INSTALL_PREFIX.
macro(_set_fancy _var _value _comment)
set(predefinedvalue "${_value}")
if ("${CMAKE_INSTALL_PREFIX}" STREQUAL "${GINAC_INSTALL_DIR}" AND DEFINED
GINAC_${_var})
set(predefinedvalue "${GINAC_${_var}}")
endif()
if (NOT DEFINED ${_var})
set(${_var} ${predefinedvalue})
else()
set(${_var} "${${_var}}" CACHE PATH "${_comment}")
endif()
endmacro(_set_fancy)
_set_fancy(EXEC_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}"
"Base directory for libraries and executables")
_set_fancy(LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/lib"
"Libraries installation directory")
_set_fancy(BIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/bin"
"Binaries installation directory")
_set_fancy(SHARE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/share"
"Base directory for architecture independent files")
_set_fancy(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include"
"Headers installation directory")
if (NOT DEFINED BUILD_SHARED_LIBS) if (NOT DEFINED BUILD_SHARED_LIBS)
if (NOT MSVC) if (NOT MSVC)
set(BUILD_SHARED_LIBS true) set(BUILD_SHARED_LIBS true)
else() else()
set(BUILD_SHARED_LIBS false) set(BUILD_SHARED_LIBS false)
endif() endif()
endif() endif()
# Set proper rpath so tools will Just Work(TM) after make install. # Set proper rpath so tools will Just Work(TM) after make install.
# Also take care to add -Wl,-rpath, stanza into the *.pc file so that # Also take care to add -Wl,-rpath, stanza into the *.pc file so that
skipping to change at line 102 skipping to change at line 83
# will Just Work (TM), too. # will Just Work (TM), too.
# Distro packagers should use -DCMAKE_INSTALL_RPATH="" to avoid # Distro packagers should use -DCMAKE_INSTALL_RPATH="" to avoid
# setting rpath on installed binaries. # setting rpath on installed binaries.
# rpath for making binaries/libraries relocatable # rpath for making binaries/libraries relocatable
set(_ginac_rpath_reloc "$ORIGIN/../lib") set(_ginac_rpath_reloc "$ORIGIN/../lib")
set(_wl_rpath "${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG}") set(_wl_rpath "${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG}")
# rpath for the pkg-config meta-data. # rpath for the pkg-config meta-data.
set(_ginaclib_rpath "${_wl_rpath}${_ginac_rpath_reloc}") set(_ginaclib_rpath "${_wl_rpath}${_ginac_rpath_reloc}")
list(FIND CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "${LIB_INSTALL_DIR}" isSystemDir) list(FIND CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_FULL_LIBDIR}" isS ystemDir)
if ("${isSystemDir}" STREQUAL "-1") if ("${isSystemDir}" STREQUAL "-1")
list(APPEND _ginaclib_rpath "${_wl_rpath}\${libdir}") list(APPEND _ginaclib_rpath "${_wl_rpath}\${libdir}")
endif() endif()
set(GINACLIB_RPATH) set(GINACLIB_RPATH)
if (NOT CMAKE_SKIP_RPATH) if (NOT CMAKE_SKIP_RPATH)
if (_wl_rpath) if (_wl_rpath)
set(GINACLIB_RPATH "${_ginaclib_rpath}") set(GINACLIB_RPATH "${_ginaclib_rpath}")
endif() endif()
endif() endif()
configure_file(${CMAKE_SOURCE_DIR}/ginac.pc.cmake ${CMAKE_BINARY_DIR}/ginac.pc @ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/ginac.pc.cmake ${CMAKE_CURRENT_BINARY
ONLY) _DIR}/ginac.pc @ONLY)
install(FILES ${CMAKE_BINARY_DIR}/ginac.pc DESTINATION "${LIB_INSTALL_DIR}/pkgco install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ginac.pc DESTINATION "${CMAKE_INSTALL_
nfig") LIBDIR}/pkgconfig")
# rpath for libginac.so itself, ginsh, and friends # rpath for libginac.so itself, ginsh, and friends
set(_ginac_rpath ${_ginac_rpath_reloc}) set(_ginac_rpath ${_ginac_rpath_reloc})
foreach(_d ${CLN_LIBRARY_DIRS} ${LIB_INSTALL_DIR}) foreach(_d ${CLN_LIBRARY_DIRS} ${CMAKE_INSTALL_FULL_LIBDIR})
list(FIND CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "${_d}" isSystemDir) list(FIND CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "${_d}" isSystemDir)
if ("${isSystemDir}" STREQUAL "-1") if ("${isSystemDir}" STREQUAL "-1")
list(APPEND _ginac_rpath "${_d}") list(APPEND _ginac_rpath "${_d}")
endif() endif()
endforeach() endforeach()
list(REMOVE_DUPLICATES _ginac_rpath) list(REMOVE_DUPLICATES _ginac_rpath)
string(REPLACE ";" ":" ginac_rpath "${_ginac_rpath}") string(REPLACE ";" ":" ginac_rpath "${_ginac_rpath}")
if (NOT DEFINED CMAKE_INSTALL_RPATH_USE_LINK_RPATH) if (NOT DEFINED CMAKE_INSTALL_RPATH_USE_LINK_RPATH)
set(CMAKE_INSTALL_RPATH_USE_LINK_RPATH TRUE) set(CMAKE_INSTALL_RPATH_USE_LINK_RPATH TRUE)
endif() endif()
if (NOT DEFINED CMAKE_INSTALL_RPATH) if (NOT DEFINED CMAKE_INSTALL_RPATH)
set(CMAKE_INSTALL_RPATH ${ginac_rpath}) set(CMAKE_INSTALL_RPATH ${ginac_rpath})
endif() endif()
if (APPLE AND NOT DEFINED CMAKE_INSTALL_NAME_DIR) if (APPLE AND NOT DEFINED CMAKE_INSTALL_NAME_DIR)
set(CMAKE_INSTALL_NAME_DIR ${LIB_INSTALL_DIR}) set(CMAKE_INSTALL_NAME_DIR ${CMAKE_INSTALL_FULL_LIBDIR})
endif() endif()
list(FIND CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "${LIB_INSTALL_DIR}" isSystemDir) list(FIND CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_FULL_LIBDIR}" isS ystemDir)
if ("${isSystemDir}" STREQUAL "-1") if ("${isSystemDir}" STREQUAL "-1")
string(REPLACE ":" ";" _install_rpath "${CMAKE_INSTALL_RPATH}") string(REPLACE ":" ";" _install_rpath "${CMAKE_INSTALL_RPATH}")
list(FIND _install_rpath "${LIB_INSTALL_DIR}" _is_rpath_consistent) list(FIND _install_rpath "${CMAKE_INSTALL_FULL_LIBDIR}" _is_rpath_consist ent)
if ("${_is_rpath_consistent}" STREQUAL "-1") if ("${_is_rpath_consistent}" STREQUAL "-1")
message(WARNING "the libginac.so library will be installed into " message(WARNING "the libginac.so library will be installed into "
"a non-standard directory (${LIB_INSTALL_DIR}), " "a non-standard directory (${CMAKE_INSTALL_FULL_LIBDIR}), "
"however, the rpath (${_install_rpath}) " "however, the rpath (${_install_rpath}) "
"does not contain that directory. Most likely " "does not contain that directory. Most likely "
"things won't work without extra configuration " "things won't work without extra configuration "
"(tweaking LD_LIBRARY_PATH, /etc/ld.so.conf, etc) .") "(tweaking LD_LIBRARY_PATH, /etc/ld.so.conf, etc) .")
endif() endif()
endif() endif()
include(CMakePackageConfigHelpers)
write_basic_package_version_file(
${CMAKE_CURRENT_BINARY_DIR}/ginac-config-version.cmake
VERSION ${GINAC_VERSION}
COMPATIBILITY AnyNewerVersion
)
configure_package_config_file(${CMAKE_CURRENT_LIST_DIR}/cmake/ginac-config.cmake
.in
${CMAKE_CURRENT_BINARY_DIR}/ginac-config.cmake
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ginac
)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/ginac-config.cmake
${CMAKE_CURRENT_BINARY_DIR}/ginac-config-version.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ginac
)
include(FindFLEX) include(FindFLEX)
include(FindBISON) include(FindBISON)
find_package(BISON) find_package(BISON)
find_package(FLEX) find_package(FLEX)
find_package(Readline) find_package(Readline)
if (READLINE_FOUND) if (READLINE_FOUND)
set(HAVE_LIBREADLINE 1) set(HAVE_LIBREADLINE 1)
set(HAVE_READLINE_READLINE_H 1) set(HAVE_READLINE_READLINE_H 1)
set(HAVE_READLINE_HISTORY_H 1) set(HAVE_READLINE_HISTORY_H 1)
endif() endif()
find_package(LibDL) find_package(LibDL)
if (LIBDL_FOUND) if (LIBDL_FOUND)
set(HAVE_LIBDL 1) set(HAVE_LIBDL 1)
endif() endif()
find_program(MAKEINFO makeinfo) find_program(MAKEINFO makeinfo)
find_program(FIG2DEV fig2dev) find_program(FIG2DEV fig2dev)
find_program(PYTHON python)
if (NOT PYTHON)
find_program(PYTHON python3)
endif()
if (NOT PYTHON)
message(FATAL_ERROR "Python version 3 or 2 is required")
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.cmake.in ${CMAKE_CURRENT_BINAR Y_DIR}/config.h) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.cmake.in ${CMAKE_CURRENT_BINAR Y_DIR}/config.h)
add_definitions(-DHAVE_CONFIG_H)
if (NOT LIBEXECDIR) if (NOT LIBEXECDIR)
set (LIBEXECDIR "${CMAKE_INSTALL_PREFIX}/libexec") set (LIBEXECDIR "${CMAKE_INSTALL_PREFIX}/libexec")
endif() endif()
add_subdirectory(ginac) add_subdirectory(ginac)
add_subdirectory(tools) add_subdirectory(tools)
add_subdirectory(check) add_subdirectory(check)
if (BISON_FOUND AND FLEX_FOUND) if (BISON_FOUND AND FLEX_FOUND)
add_subdirectory(ginsh) add_subdirectory(ginsh)
 End of changes. 18 change blocks. 
65 lines changed or deleted 70 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)