From a6e6642eb21ad8c3c2eae021abd997d11fb62539 Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Tue, 2 May 2017 07:41:55 +0100 Subject: [PATCH] fixes --- cmake/Prelims.cmake | 14 ++++++ cmake/os/YapIOConfig.h | 112 ----------------------------------------- cmake/python.cmake | 12 +++-- 3 files changed, 22 insertions(+), 116 deletions(-) delete mode 100644 cmake/os/YapIOConfig.h diff --git a/cmake/Prelims.cmake b/cmake/Prelims.cmake index a7c4e5290..5e3bba6fb 100644 --- a/cmake/Prelims.cmake +++ b/cmake/Prelims.cmake @@ -164,3 +164,17 @@ set(YAP_ROOTDIR "${prefix}") include (cudd NO-POLICY-SCOPE) include (python NO-POLICY-SCOPE) include (java NO-POLICY-SCOPE) + +set (pl_library "" CACHE INTERNAL "prolog library files" ) +set (pl_os_library "" CACHE INTERNAL "prolog os files" ) +set (pl_boot_library "" CACHE INTERNAL "prolog boot files" ) + +function(add_to_group output list) + set (result "") + foreach (path IN LISTS ${list}) + get_source_file_property(result ${path} LOCATION) + list( APPEND tmp ${result}) + endforeach () + list( APPEND ${output} ${tmp}) + set (${output} ${${output}} CACHE INTERNAL "prolog library files") +endfunction(add_to_group output list ) diff --git a/cmake/os/YapIOConfig.h b/cmake/os/YapIOConfig.h deleted file mode 100644 index 6345636f0..000000000 --- a/cmake/os/YapIOConfig.h +++ /dev/null @@ -1,112 +0,0 @@ -/* Define if you have libreadline */ -#ifndef HAVE_LIBREADLINE -/* #undef HAVE_LIBREADLINE */ -#endif - -/* Define to 1 if you have the header file. */ -#ifndef HAVE_READLINE_HISTORY_H -/* #undef HAVE_READLINE_HISTORY_H */ -#endif - -/* Define to 1 if you have the header file. */ -#ifndef HAVE_READLINE_READLINE_H -/* #undef HAVE_READLINE_READLINE_H */ -#endif - -#if defined(HAVE_LIBREADLINE) && defined(HAVE_READLINE_READLINE_H) -#define USE_READLINE 1 -#endif - -/* Define to 1 if you have the declaration of `rl_catch_signals ', and to 0 if -you don't. */ -#ifndef HAVE_DECL_RL_CATCH_SIGNALS_ -/* #undef HAVE_DECL_RL_CATCH_SIGNALS */ -#endif - -/* Define to 1 if you have the declaration of `rl_done ', and to 0 if you -don't. */ -#ifndef HAVE_DECL_RL_DONE_ -/* #undef HAVE_DECL_RL_DONE_ */ -#endif - -/* Define to 1 if you have the declaration of `rl_event_hook', and to 0 if you -don't. */ -#ifndef HAVE_DECL_RL_EVENT_HOOK -/* #undef HAVE_DECL_RL_EVENT_HOOK */ -#endif - -/* Define to 1 if you have the declaration of `rl_readline_state', and to 0 if -you don't. */ -#ifndef HAVE_DECL_RL_READLINE_STATE -/* #undef HAVE_DECL_RL_READLINE_STATE */ -#endif - -/* Define to 1 if you have the `rl_begin_undo_group' function. */ -#ifndef HAVE_RL_BEGIN_UNDO_GROUP -/* #undef HAVE_RL_BEGIN_UNDO_GROUP */ -#endif - -/* Define to 1 if you have the `rl_clear_pending_input' function. */ -#ifndef HAVE_RL_CLEAR_PENDING_INPUT -/* #undef HAVE_RL_CLEAR_PENDING_INPUT */ -#endif - -/* Define to 1 if the system has the type `rl_completion_func_t'). */ -#ifndef HAVE_RL_COMPLETION_FUNC_T -/* #undef HAVE_RL_COMPLETION_FUNC_T */ -#endif - -/* Define to 1 if the system has the type `rl_completion_func_t'. */ -#ifndef HAVE_RL_COMPLETION_FUNC_T -/* #undef HAVE_RL_COMPLETION_FUNC_T */ -#endif - -/* Define to 1 if you have the `rl_completion_matches' function. */ -#ifndef HAVE_RL_COMPLETION_MATCHES -/* #undef HAVE_RL_COMPLETION_MATCHES */ -#endif - -/* Define to 1 if you have the `rl_discard_argument' function. */ -#ifndef HAVE_RL_DISCARD_ARGUMENT -/* #undef HAVE_RL_DISCARD_ARGUMENT */ -#endif - -/* Define to 1 if you have the `rl_done' variable. */ -#ifndef HAVE_RL_DONE -#define HAVE_RL_DONE -#endif - -/* Define to 1 if you have the `rl_filename_completion_function' function. */ -#ifndef HAVE_RL_FILENAME_COMPLETION_FUNCTION -#define HAVE_RL_FILENAME_COMPLETION_FUNCTION -#endif - -/* Define to 1 if you have the `rl_free_line_state' function. */ -#ifndef HAVE_RL_FREE_LINE_STATE -/* #undef HAVE_RL_FREE_LINE_STATE */ -#endif - -/* Define to 1 if the system has the type `rl_hook_func_t'. */ -#ifndef HAVE_RL_HOOK_FUNC_T -/* #undef HAVE_RL_HOOK_FUNC_T */ -#endif - -/* Define to 1 if you have the `rl_insert_close' function. */ -#ifndef HAVE_RL_INSERT_CLOSE -/* #undef HAVE_RL_INSERT_CLOSE */ -#endif - -/* Define to 1 if you have the `rl_reset_after_signal' function. */ -#ifndef HAVE_RL_RESET_AFTER_SIGNAL -/* #undef HAVE_RL_RESET_AFTER_SIGNAL */ -#endif - -/* Define to 1 if you have the `rl_set_keyboard_input_timeout' function. */ -#ifndef HAVE_RL_SET_KEYBOARD_INPUT_TIMEOUT -/* #undef HAVE_RL_SET_KEYBOARD_INPUT_TIMEOUT */ -#endif - -/* Define to 1 if you have the `rl_set_prompt' function. */ -#ifndef HAVE_RL_SET_PROMPT -/* #undef HAVE_RL_SET_PROMPT */ -#endif diff --git a/cmake/python.cmake b/cmake/python.cmake index 9f6776f68..fa88ccce7 100644 --- a/cmake/python.cmake +++ b/cmake/python.cmake @@ -12,7 +12,7 @@ option (WITH_PYTHON # # IF (WITH_PYTHON) - set (Python_ADDITIONAL_VERSIONS 3.5 3.6 3.4 3.3) + set (Python_ADDITIONAL_VERSIONS 3.7 3.6 3.5 3.6 3.4 3.3) find_package(PythonInterp) # find_package(PythonLibs) @@ -37,9 +37,13 @@ get_filename_component ( ABS_PYTHON_INCLUDE_PATH ${_ABS_PYTHON_INCLUDE_PATH} ABS OUTPUT_VARIABLE _ABS_PYTHON_SYSLIB_PATH OUTPUT_STRIP_TRAILING_WHITESPACE ) - find_library(ABS_PYTHON_SYSLIB_PATH +get_filename_component ( _ABS_PYTHON_SYSLIB_PATH ${_ABS_PYTHON_SYSLIB_PATH} ABSOLUTE ) +get_filename_component ( _ABS_PYTHON_SYSLIB_PATH ${_ABS_PYTHON_SYSLIB_PATH} DIRECTORY ) + + + find_library( ABS_PYTHON_SYSLIB_PATH NAMES python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}m - PATHS _ABS_PYTHON_SYSLIB_PATH + PATHS ${_ABS_PYTHON_SYSLIB_PATH} ${libdir} ) set ( PYTHON_LIBRARY @@ -70,4 +74,4 @@ endif() check_include_file(Python.h HAVE_PYTHON_H) -endif(WITH_PYTHON) \ No newline at end of file +endif(WITH_PYTHON)