From 6f8a526cd69b1031f9efc689cec5ade390562d41 Mon Sep 17 00:00:00 2001 From: Mikael Zayenz Lagerkvist Date: Tue, 10 Feb 2026 19:28:43 +0100 Subject: [PATCH 01/21] Step 1, CMake updates --- CMakeLists.txt | 944 ++++++++++++++++++++----------- README.md | 36 +- cmake/GecodeConfig.cmake.in | 6 + cmake/GecodeSources.cmake | 80 +++ cmake/GenerateVarImp.cmake | 16 + gecode/support/thread.hpp | 2 +- gecode/support/thread/thread.hpp | 2 +- 7 files changed, 737 insertions(+), 349 deletions(-) create mode 100644 cmake/GecodeConfig.cmake.in create mode 100644 cmake/GecodeSources.cmake create mode 100644 cmake/GenerateVarImp.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f7803ec30..8085981bc5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,75 +1,146 @@ -# -# Main authors: -# Victor Zverovich -# -# Copyright: -# Victor Zverovich, 2013 -# -# This file is part of Gecode, the generic constraint -# development environment: -# http://www.gecode.org -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# - # # CMake build script for Gecode. # cmake_minimum_required(VERSION 3.8.0) -project(GECODE) +project(GECODE LANGUAGES C CXX) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/misc/cmake_modules) -find_package(MPFR) - -include(CheckCXXCompilerFlag) -if (GECODE_DISABLE_WARNINGS) - if (MSVC) - add_definitions(/wd4244 /wd4267 /wd4345 /wd4355 /wd4800 /wd4068) - else () - foreach (flag -Wextra -Wall -pedantic) - string(REPLACE ${flag} "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - endforeach () - if (CMAKE_COMPILER_IS_GNUCXX) - add_definitions(-Wno-overloaded-virtual -Wno-unknown-pragmas) - elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - add_definitions(-Wno-constant-logical-operand -Wno-switch -Wno-unknown-pragmas) - endif () - endif () -endif () - if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.11.0) cmake_policy(SET CMP0072 NEW) - set (OpenGL_GL_PREFERENCE LEGACY) + set(OpenGL_GL_PREFERENCE LEGACY) endif() if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.17.0) cmake_policy(SET CMP0100 NEW) endif() -# The following part of config.h is hard to derive from configure.ac. +# --------------------------------------------------------------------------- +# Build options (configure/autoconf parity-oriented) +# --------------------------------------------------------------------------- +option(GECODE_BUILD_SHARED "Build shared libraries" ON) +option(GECODE_BUILD_STATIC "Build static libraries" OFF) + +option(GECODE_ENABLE_THREAD "Enable thread support" ON) +option(GECODE_ENABLE_QT "Enable Qt support" ON) +option(GECODE_ENABLE_GIST "Enable Gist" ON) +option(GECODE_ENABLE_CPPROFILER "Enable CPProfiler support" ON) +option(GECODE_ENABLE_CBS "Enable counting-based search support" OFF) +option(GECODE_ENABLE_EXAMPLES "Build examples" ON) + +option(GECODE_ENABLE_SEARCH "Build search module" ON) +option(GECODE_ENABLE_INT_VARS "Build int variables module" ON) +option(GECODE_ENABLE_SET_VARS "Build set variables module" ON) +option(GECODE_ENABLE_FLOAT_VARS "Build float variables module" ON) +option(GECODE_ENABLE_MINIMODEL "Build minimodel module" ON) +option(GECODE_ENABLE_DRIVER "Build driver module" ON) +option(GECODE_ENABLE_FLATZINC "Build FlatZinc module" ON) + +option(GECODE_ENABLE_MPFR "Enable MPFR support" ON) +option(GECODE_ENABLE_ALLOCATOR "Enable default allocator" ON) +option(GECODE_ENABLE_AUDIT "Enable audit code" OFF) +option(GECODE_ENABLE_GCC_VISIBILITY "Enable GCC visibility attributes" ON) +option(GECODE_ENABLE_OSX_UNFAIR_MUTEX "Enable macOS unfair mutexes" ON) +set(GECODE_FREELIST32_SIZE_MAX "" CACHE STRING "Max freelist size on 32-bit platforms") +set(GECODE_FREELIST64_SIZE_MAX "" CACHE STRING "Max freelist size on 64-bit platforms") +set(GECODE_WITH_VIS "" CACHE STRING "Additional .vis files (comma-separated)") + +# Compatibility aliases (temporary) +if(DEFINED ENABLE_THREADS AND NOT DEFINED GECODE_ENABLE_THREAD) + set(GECODE_ENABLE_THREAD ${ENABLE_THREADS} CACHE BOOL "Enable thread support" FORCE) + message(WARNING "ENABLE_THREADS is deprecated; use GECODE_ENABLE_THREAD") +endif() +if(DEFINED ENABLE_GIST AND NOT DEFINED GECODE_ENABLE_GIST) + set(GECODE_ENABLE_GIST ${ENABLE_GIST} CACHE BOOL "Enable Gist" FORCE) + message(WARNING "ENABLE_GIST is deprecated; use GECODE_ENABLE_GIST") +endif() +if(DEFINED BUILD_EXAMPLES AND NOT DEFINED GECODE_ENABLE_EXAMPLES) + set(GECODE_ENABLE_EXAMPLES ${BUILD_EXAMPLES} CACHE BOOL "Build examples" FORCE) + message(WARNING "BUILD_EXAMPLES is deprecated; use GECODE_ENABLE_EXAMPLES") +endif() +if(DEFINED ENABLE_CPPROFILER AND NOT DEFINED GECODE_ENABLE_CPPROFILER) + set(GECODE_ENABLE_CPPROFILER ${ENABLE_CPPROFILER} CACHE BOOL "Enable CPProfiler support" FORCE) + message(WARNING "ENABLE_CPPROFILER is deprecated; use GECODE_ENABLE_CPPROFILER") +endif() + +if(NOT GECODE_BUILD_SHARED AND NOT GECODE_BUILD_STATIC) + message(FATAL_ERROR "At least one of GECODE_BUILD_SHARED or GECODE_BUILD_STATIC must be ON") +endif() +if(WIN32 AND GECODE_BUILD_SHARED AND GECODE_BUILD_STATIC) + message(FATAL_ERROR "Building both shared and static in one tree is not supported on Windows") +endif() + +# Keep dependency closure behavior similar to configure. +if(GECODE_ENABLE_SET_VARS OR GECODE_ENABLE_FLOAT_VARS) + set(GECODE_ENABLE_INT_VARS ON CACHE BOOL "Build int variables module" FORCE) +endif() +if(GECODE_ENABLE_DRIVER) + set(GECODE_ENABLE_SEARCH ON CACHE BOOL "Build search module" FORCE) + set(GECODE_ENABLE_INT_VARS ON CACHE BOOL "Build int variables module" FORCE) +endif() +if(GECODE_ENABLE_FLATZINC) + set(GECODE_ENABLE_SEARCH ON CACHE BOOL "Build search module" FORCE) + set(GECODE_ENABLE_DRIVER ON CACHE BOOL "Build driver module" FORCE) + set(GECODE_ENABLE_MINIMODEL ON CACHE BOOL "Build minimodel module" FORCE) +endif() +if(GECODE_ENABLE_EXAMPLES) + set(GECODE_ENABLE_SEARCH ON CACHE BOOL "Build search module" FORCE) + set(GECODE_ENABLE_DRIVER ON CACHE BOOL "Build driver module" FORCE) + set(GECODE_ENABLE_MINIMODEL ON CACHE BOOL "Build minimodel module" FORCE) +endif() + +include(CheckCXXCompilerFlag) +if(GECODE_ENABLE_GCC_VISIBILITY) + check_cxx_compiler_flag(-fvisibility=hidden HAVE_VISIBILITY_HIDDEN_FLAG) +endif() + +find_package(Perl REQUIRED) + +if(GECODE_ENABLE_MPFR) + find_package(MPFR) +endif() + +set(GECODE_HAS_QT_RUNTIME FALSE) +if(GECODE_ENABLE_QT) + find_package(Qt6 QUIET COMPONENTS Core Gui Widgets PrintSupport) + if(Qt6_FOUND) + set(GECODE_HAS_QT_RUNTIME TRUE) + set(GECODE_QT_CORE Qt6::Core) + set(GECODE_QT_WIDGETS Qt6::Widgets Qt6::Gui Qt6::PrintSupport) + set(CMAKE_AUTOMOC TRUE) + else() + find_package(Qt5 QUIET COMPONENTS Core Gui Widgets PrintSupport) + if(Qt5_FOUND) + set(GECODE_HAS_QT_RUNTIME TRUE) + set(GECODE_QT_CORE Qt5::Core) + set(GECODE_QT_WIDGETS Qt5::Widgets Qt5::Gui Qt5::PrintSupport) + set(CMAKE_AUTOMOC TRUE) + else() + find_package(Qt4 QUIET) + if(QT4_FOUND) + include(${QT_USE_FILE}) + set(GECODE_HAS_QT_RUNTIME TRUE) + set(GECODE_QT_CORE ${QT_LIBRARIES}) + set(GECODE_QT_WIDGETS ${QT_LIBRARIES}) + set(CMAKE_AUTOMOC TRUE) + endif() + endif() + endif() +endif() + +set(GECODE_BUILD_GIST_TARGET ${GECODE_ENABLE_GIST}) +if(GECODE_BUILD_GIST_TARGET AND NOT GECODE_HAS_QT_RUNTIME) + message(WARNING "GECODE_ENABLE_GIST is ON but Qt was not found. Disabling Gist.") + set(GECODE_BUILD_GIST_TARGET FALSE) +endif() + +# --------------------------------------------------------------------------- +# Configure-time metadata and config.hpp generation +# --------------------------------------------------------------------------- file(READ gecode/support/config.hpp.in CONFIG) string(REGEX REPLACE "^/\\*([^*]|\\*[^/])*\\*/" "" CONFIG ${CONFIG}) string(REGEX MATCHALL "[^\n]*\n" CONFIG @@ -96,368 +167,542 @@ string(REGEX MATCHALL "[^\n]*\n" CONFIG #undef PACKAGE_VERSION ") -# Get version numbers and parts of config.h from configure.ac. +# Pull package info from configure.ac to keep one version source of truth. file(READ configure.ac LINES) -# Replace semicolons with "" to avoid CMake messing with them. string(REPLACE ";" "" LINES "${LINES}") -# Split into lines keeping newlines to avoid foreach skipping empty ones. string(REGEX MATCHALL "[^\n]*\n" LINES "${LINES}") set(ah_command FALSE) -foreach (line "${EXTRA_CONFIG}" ${LINES}) +foreach(line "${EXTRA_CONFIG}" ${LINES}) string(REPLACE ";" "" line "${line}") - if (ah_command) - # Do nothing. - elseif (line MATCHES "AC_INIT\\(([^,]*), *([^,]*), *([^)]*)\\)") + if(ah_command) + # keep collecting + elseif(line MATCHES "AC_INIT\\(([^,]*), *([^,]*), *([^)]*)\\)") set(PACKAGE ${CMAKE_MATCH_1}) set(VERSION ${CMAKE_MATCH_2}) set(PACKAGE_BUGREPORT ${CMAKE_MATCH_3}) message(STATUS "Got VERSION=${VERSION} from configure.ac") - elseif (line MATCHES "ac_gecode_flatzincversion=(.*)\n") + elseif(line MATCHES "ac_gecode_soversion=(.*)\n") + set(GECODE_SOVERSION "${CMAKE_MATCH_1}") + elseif(line MATCHES "ac_gecode_flatzincversion=(.*)\n") set(GECODE_FLATZINC_VERSION "${CMAKE_MATCH_1}") - elseif (line MATCHES "AH_BOTTOM\\(\\[(.*)") + elseif(line MATCHES "AH_BOTTOM\\(\\[(.*)") set(ah_command bottom) set(line "${CMAKE_MATCH_1}") - elseif (line MATCHES "AH_VERBATIM[^,]+,(.*)") + elseif(line MATCHES "AH_VERBATIM[^,]+,(.*)") set(ah_command verbatim) set(line "${CMAKE_MATCH_1}") - endif () - if (ah_command) + endif() + + if(ah_command) set(saved_ah_command ${ah_command}) - if (line MATCHES "^\\[(.*)") + if(line MATCHES "^\\[(.*)") set(line "${CMAKE_MATCH_1}") - endif () - if (line MATCHES "\\]\\)") + endif() + if(line MATCHES "\\]\\)") set(ah_command FALSE) string(REPLACE "])" "" line "${line}") - endif () - # For some reason CMake may bundle several lines together. Split them too. + endif() string(REGEX MATCHALL "[^\n]*\n" sublines "${line}") set(config_add "") - foreach (subline ${sublines}) + foreach(subline ${sublines}) set(config_add ${config_add} "${subline}") - endforeach () - if (saved_ah_command STREQUAL "verbatim") + endforeach() + if(saved_ah_command STREQUAL "verbatim") set(CONFIG ${config_add} ${CONFIG}) - else () + else() set(CONFIG ${CONFIG} "\n" ${config_add}) - endif () - endif () -endforeach () + endif() + endif() +endforeach() + +if(NOT DEFINED GECODE_SOVERSION) + set(GECODE_SOVERSION 51) +endif() + set(PACKAGE_NAME ${PACKAGE}) string(TOLOWER ${PACKAGE} PACKAGE_TARNAME) set(PACKAGE_URL "") set(PACKAGE_VERSION ${VERSION}) set(${PACKAGE}_VERSION ${VERSION}) +set(GECODE_PROJECT_VERSION ${VERSION}) string(REPLACE "." "-" GECODE_LIBRARY_VERSION "${VERSION}") set(PACKAGE_STRING "${PACKAGE} ${VERSION}") -if (VERSION MATCHES "(.*)\\.(.*)\\.(.*)") +if(VERSION MATCHES "(.*)\\.(.*)\\.(.*)") math(EXPR GECODE_VERSION_NUMBER "${CMAKE_MATCH_1} * 100000 + ${CMAKE_MATCH_2} * 100 + ${CMAKE_MATCH_3}") -endif () +endif() set(GECODE_DLL_USERPREFIX "") set(GECODE_DLL_USERSUFFIX "") -set(GECODE_HAS_INT_VARS "/**/") -set(GECODE_HAS_SET_VARS "/**/") -set(GECODE_HAS_FLOAT_VARS "/**/") -set(GECODE_STATIC_LIBS 1) -set(GECODE_ALLOCATOR "/**/") -if (MPFR_FOUND) +if(GECODE_ENABLE_INT_VARS) + set(GECODE_HAS_INT_VARS "/**/") +endif() +if(GECODE_ENABLE_SET_VARS) + set(GECODE_HAS_SET_VARS "/**/") +endif() +if(GECODE_ENABLE_FLOAT_VARS) + set(GECODE_HAS_FLOAT_VARS "/**/") +endif() +if(GECODE_BUILD_STATIC) + set(GECODE_STATIC_LIBS 1) +endif() +if(GECODE_ENABLE_ALLOCATOR) + set(GECODE_ALLOCATOR "/**/") +endif() +if(GECODE_ENABLE_AUDIT) + set(GECODE_AUDIT "/**/") +endif() +if(GECODE_ENABLE_CPPROFILER) + set(GECODE_HAS_CPPROFILER "/**/") +endif() +if(GECODE_ENABLE_CBS) + set(GECODE_HAS_CBS "/**/") +endif() +if(GECODE_ENABLE_MPFR AND MPFR_FOUND AND GECODE_ENABLE_FLOAT_VARS) set(GECODE_HAS_MPFR "/**/") -endif () - -check_cxx_compiler_flag(-fvisibility=hidden HAVE_VISIBILITY_HIDDEN_FLAG) -if (HAVE_VISIBILITY_HIDDEN_FLAG) +endif() +if(HAVE_VISIBILITY_HIDDEN_FLAG) set(GECODE_GCC_HAS_CLASS_VISIBILITY "/**/") -endif () - -option(ENABLE_THREADS "Enable thread support" ON) -if (ENABLE_THREADS) +endif() +if(GECODE_ENABLE_THREAD) set(GECODE_HAS_THREADS 1) endif() - -option(ENABLE_GIST "Enable gist" OFF) -if (ENABLE_GIST) - set(GECODE_USE_QT TRUE) -else() - set(GECODE_USE_QT FALSE) +if(APPLE AND GECODE_ENABLE_THREAD AND GECODE_ENABLE_OSX_UNFAIR_MUTEX) + set(GECODE_USE_OSX_UNFAIR_MUTEX "/**/") +endif() +if(GECODE_HAS_QT_RUNTIME) + set(GECODE_HAS_QT "/**/") +endif() +if(GECODE_BUILD_GIST_TARGET) + set(GECODE_HAS_GIST "/**/") +endif() +if(GECODE_FREELIST32_SIZE_MAX) + set(GECODE_FREELIST_SIZE_MAX32 ${GECODE_FREELIST32_SIZE_MAX}) +endif() +if(GECODE_FREELIST64_SIZE_MAX) + set(GECODE_FREELIST_SIZE_MAX64 ${GECODE_FREELIST64_SIZE_MAX}) endif() - -# Don't use Qt if GECODE_USE_QT is set to FALSE. -if (NOT DEFINED GECODE_USE_QT OR GECODE_USE_QT) - find_package(Qt6 QUIET COMPONENTS Core Gui Widgets PrintSupport) - if (Qt6_FOUND) - set(GECODE_HAS_QT "/**/") - set(GECODE_HAS_GIST "/**/") - set(EXTRA_LIBS gist) - set(CMAKE_AUTOMOC TRUE) - else() - find_package(Qt5 QUIET COMPONENTS Core Gui Widgets PrintSupport) - if (Qt5_FOUND) - set(GECODE_HAS_QT "/**/") - set(GECODE_HAS_GIST "/**/") - set(EXTRA_LIBS gist) - set(CMAKE_AUTOMOC TRUE) - else() - find_package(Qt4) - if (QT4_FOUND) - set(GECODE_HAS_QT "/**/") - set(GECODE_HAS_GIST "/**/") - set(EXTRA_LIBS gist) - set(CMAKE_AUTOMOC TRUE) - include(${QT_USE_FILE}) - endif() - endif() - endif() -endif () include(CheckSymbolExists) check_symbol_exists(mmap sys/mman.h HAVE_MMAP) -# Check for inline. include(CheckCSourceCompiles) -check_c_source_compiles(" - inline __attribute__ ((__always_inline__)) void foo(void) {} - int main() {}" HAVE_ALWAYS_INLINE) -check_c_source_compiles(" - __forceinline void foo(void) {} - int main() {}" HAVE_FORCE_INLINE) +check_c_source_compiles("inline __attribute__ ((__always_inline__)) void foo(void) {}\nint main() {}" HAVE_ALWAYS_INLINE) +check_c_source_compiles("__forceinline void foo(void) {}\nint main() {}" HAVE_FORCE_INLINE) set(forceinline inline) -if (HAVE_ALWAYS_INLINE) +if(HAVE_ALWAYS_INLINE) set(forceinline "inline __attribute__ ((__always_inline__))") -endif () -if (HAVE_FORCE_INLINE) +endif() +if(HAVE_FORCE_INLINE) set(forceinline "__forceinline") -endif () +endif() -# Check for bit index -check_c_source_compiles(" - int main() { return __builtin_ffsl(0); }" HAVE_BUILTIN_FFSL) -if (HAVE_BUILTIN_FFSL) +check_c_source_compiles("int main() { return __builtin_ffsl(0); }" HAVE_BUILTIN_FFSL) +if(HAVE_BUILTIN_FFSL) set(GECODE_HAS_BUILTIN_FFSL "/**/") -endif () - -# Check for popcount -check_c_source_compiles(" - int main() { return __builtin_popcountll(0); }" HAVE_BUILTIN_POPCOUNTLL) -if (HAVE_BUILTIN_POPCOUNTLL) +endif() +check_c_source_compiles("int main() { return __builtin_popcountll(0); }" HAVE_BUILTIN_POPCOUNTLL) +if(HAVE_BUILTIN_POPCOUNTLL) set(GECODE_HAS_BUILTIN_POPCOUNTLL "/**/") -endif () +endif() -# Process config.hpp using autoconf rules. +# Process config.hpp using autoconf-like undef handling. list(LENGTH CONFIG length) math(EXPR length "${length} - 1") -foreach (i RANGE ${length}) +foreach(i RANGE ${length}) list(GET CONFIG ${i} line) - if (line MATCHES "^#( *)undef (.*)\n") + if(line MATCHES "^#( *)undef (.*)\n") set(space "${CMAKE_MATCH_1}") set(var ${CMAKE_MATCH_2}) - if (NOT DEFINED ${var} OR (var MATCHES "HAVE_.*" AND NOT ${var})) + if(NOT DEFINED ${var} OR (var MATCHES "HAVE_.*" AND NOT ${var})) set(line "/* #${space}undef ${var} */\n") - else () - if ("${${var}}" STREQUAL "/**/" OR "${var}" STREQUAL "GECODE_VERSION_NUMBER" OR - "${var}" STREQUAL "forceinline" OR var MATCHES "SIZEOF_.*") + else() + if("${${var}}" STREQUAL "/**/" OR "${var}" STREQUAL "GECODE_VERSION_NUMBER" OR + "${var}" STREQUAL "forceinline" OR var MATCHES "SIZEOF_.*") set(value ${${var}}) - elseif (NOT (var MATCHES ^HAVE OR ${var} EQUAL 0 OR ${var} EQUAL 1)) + elseif(NOT (var MATCHES ^HAVE OR ${var} EQUAL 0 OR ${var} EQUAL 1)) set(value \"${${var}}\") - elseif (${var}) + elseif(${var}) set(value 1) - else () + else() set(value 0) - endif () + endif() set(line "#${space}define ${var} ${value}\n") - endif () - endif () + endif() + endif() string(REPLACE "" ";" line "${line}") set(CONFIG_OUT "${CONFIG_OUT}${line}") -endforeach () +endforeach() + +set(GECODE_BUILD_DEFINES "/* Disable autolink because all dependencies are handled by CMake. */\n") +foreach(component SUPPORT KERNEL) + string(APPEND GECODE_BUILD_DEFINES "#define GECODE_BUILD_${component}\n") +endforeach() +if(GECODE_ENABLE_SEARCH) + string(APPEND GECODE_BUILD_DEFINES "#define GECODE_BUILD_SEARCH\n") +endif() +if(GECODE_ENABLE_INT_VARS) + string(APPEND GECODE_BUILD_DEFINES "#define GECODE_BUILD_INT\n") +endif() +if(GECODE_ENABLE_SET_VARS) + string(APPEND GECODE_BUILD_DEFINES "#define GECODE_BUILD_SET\n") +endif() +if(GECODE_ENABLE_FLOAT_VARS) + string(APPEND GECODE_BUILD_DEFINES "#define GECODE_BUILD_FLOAT\n") +endif() +if(GECODE_ENABLE_MINIMODEL) + string(APPEND GECODE_BUILD_DEFINES "#define GECODE_BUILD_MINIMODEL\n") +endif() +if(GECODE_ENABLE_FLATZINC) + string(APPEND GECODE_BUILD_DEFINES "#define GECODE_BUILD_FLATZINC\n") +endif() +if(GECODE_ENABLE_DRIVER) + string(APPEND GECODE_BUILD_DEFINES "#define GECODE_BUILD_DRIVER\n") +endif() +if(GECODE_BUILD_GIST_TARGET) + string(APPEND GECODE_BUILD_DEFINES "#define GECODE_BUILD_GIST\n") +endif() + file(WRITE ${GECODE_BINARY_DIR}/gecode/support/config.hpp "/* gecode/support/config.hpp. Generated from config.hpp.in by configure. */ /* gecode/support/config.hpp.in. Generated from configure.ac by autoheader. */ -/* Disable autolink because all the dependencies are handled by CMake. */ -#define GECODE_BUILD_SUPPORT -#define GECODE_BUILD_KERNEL -#define GECODE_BUILD_SEARCH -#define GECODE_BUILD_INT -#define GECODE_BUILD_SET -#define GECODE_BUILD_FLOAT -#define GECODE_BUILD_MINIMODEL -#define GECODE_BUILD_FLATZINC -#define GECODE_BUILD_DRIVER -#define GECODE_BUILD_GIST - +${GECODE_BUILD_DEFINES} ${CONFIG_OUT}") -# Expands a value substituting variables and appends the result to ${var}. -function (expand var value) - if (value MATCHES "\\$\\(([^:]+)(.*)\\)") - # Perform substitution. - set(pattern ${CMAKE_MATCH_2}) - set(items ${${CMAKE_MATCH_1}}) - if (pattern MATCHES ":%=([^%]*)%([^%]*)") - set(values ) - foreach (item ${items}) - set(values ${values} ${CMAKE_MATCH_1}${item}${CMAKE_MATCH_2}) - endforeach () - else () - set(values ${items}) - endif () - else () - set(values ${value}) - endif () - set(${var} ${${var}} ${values} PARENT_SCOPE) -endfunction () - -# Parse Makefile.in extracting variables. -file(READ Makefile.in text) -string(REPLACE "\\\n" "" text "${text}") -string(REGEX REPLACE "#[^\n]*\n" "" text "${text}") -string(REGEX MATCHALL "[^\n]+" lines "${text}") -foreach (line ${lines}) - if (line MATCHES "([^ \t]+)[ \t]*=[ \t]*(.*)") - set(var ${CMAKE_MATCH_1}) - set(${var} ) - string(REGEX MATCHALL "[^ \t]+" items "${CMAKE_MATCH_2}") - foreach (item ${items}) - expand(${var} ${item}) - endforeach () - endif () -endforeach () - -foreach (lib support kernel search int set float - minimodel driver flatzinc ${EXTRA_LIBS}) - if (lib STREQUAL "minimodel") - set(libupper MM) - else () - string(TOUPPER ${lib} libupper) - endif () - if (${libupper}SRC) - set(sources ) - foreach (src ${${libupper}SRC} ${${libupper}_GENSRC}) - if (src STREQUAL "gecode/float/rounding.cpp" AND NOT ${MPFR_FOUND}) - # ignore empty source files to prevent linker warnings - else () - set(sources ${sources} ${src}) - endif () - endforeach () - add_library(gecode${lib} ${sources} ${${libupper}HDR}) - target_include_directories(gecode${lib} - PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ) - list(APPEND GECODE_INSTALL_TARGETS gecode${lib}) - endif () -endforeach () - -option(ENABLE_CPPROFILER "Enable cpprofiler tracer mode" ON) -if(ENABLE_CPPROFILER) - add_definitions(-DGECODE_HAS_CPPROFILER) -endif() - -find_package(Threads) -target_link_libraries(gecodesupport ${CMAKE_THREAD_LIBS_INIT}) -target_link_libraries(gecodekernel gecodesupport) -target_link_libraries(gecodesearch gecodekernel) -target_link_libraries(gecodeint gecodekernel) -target_link_libraries(gecodeset gecodeint) -target_link_libraries(gecodefloat gecodeint) -target_link_libraries(gecodeminimodel gecodeint gecodeset gecodesearch) -target_link_libraries(gecodedriver gecodeint) -target_link_libraries(gecodeflatzinc gecodeminimodel gecodedriver) - -if (GECODE_HAS_QT) - if (Qt6_FOUND) - target_link_libraries(gecodegist Qt6::Widgets Qt6::Gui Qt6::PrintSupport) - target_link_libraries(gecodeflatzinc Qt6::Core) - target_link_libraries(gecodeflatzinc gecodegist) - elseif (Qt5_FOUND) - target_link_libraries(gecodegist Qt5::Widgets Qt5::Gui Qt5::PrintSupport) - target_link_libraries(gecodeflatzinc Qt5::Core) - target_link_libraries(gecodeflatzinc gecodegist) +# --------------------------------------------------------------------------- +# Native source inventory for CMake (decoupled from Makefile.in). +# --------------------------------------------------------------------------- +include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/GecodeSources.cmake) + +# --------------------------------------------------------------------------- +# Generated variable implementations (in-source, matching Makefile behavior) +# --------------------------------------------------------------------------- +set(GECODE_VIS_FILES) +if(GECODE_ENABLE_INT_VARS) + list(APPEND GECODE_VIS_FILES + gecode/int/var-imp/int.vis + gecode/int/var-imp/bool.vis) +endif() +if(GECODE_ENABLE_SET_VARS) + list(APPEND GECODE_VIS_FILES + gecode/set/var-imp/set.vis) +endif() +if(GECODE_ENABLE_FLOAT_VARS) + list(APPEND GECODE_VIS_FILES + gecode/float/var-imp/float.vis) +endif() +if(GECODE_WITH_VIS) + string(REPLACE "," ";" _extra_vis "${GECODE_WITH_VIS}") + foreach(vis ${_extra_vis}) + list(APPEND GECODE_VIS_FILES "${vis}") + endforeach() +endif() +list(REMOVE_DUPLICATES GECODE_VIS_FILES) + +set(GECODE_VIS_DEPENDS) +set(GECODE_VIS_FILES_FOR_GEN) +foreach(vis ${GECODE_VIS_FILES}) + if(IS_ABSOLUTE "${vis}") + list(APPEND GECODE_VIS_DEPENDS "${vis}") + list(APPEND GECODE_VIS_FILES_FOR_GEN "${vis}") else() - target_link_libraries(gecodegist ${QT_LIBRARIES}) - target_link_libraries(gecodeflatzinc gecodegist ${QT_LIBRARIES}) + list(APPEND GECODE_VIS_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${vis}") + if(vis MATCHES "^\\./") + list(APPEND GECODE_VIS_FILES_FOR_GEN "${vis}") + else() + list(APPEND GECODE_VIS_FILES_FOR_GEN "./${vis}") + endif() + endif() +endforeach() +string(JOIN "||" GECODE_VIS_FILES_SERIALIZED ${GECODE_VIS_FILES_FOR_GEN}) + +set(GECODE_VAR_TYPE_HPP ${CMAKE_CURRENT_SOURCE_DIR}/gecode/kernel/var-type.hpp) +set(GECODE_VAR_IMP_HPP ${CMAKE_CURRENT_SOURCE_DIR}/gecode/kernel/var-imp.hpp) + +add_custom_command( + OUTPUT ${GECODE_VAR_TYPE_HPP} + COMMAND ${CMAKE_COMMAND} + -DPERL_EXECUTABLE=${PERL_EXECUTABLE} + -DGENVARIMP=${CMAKE_CURRENT_SOURCE_DIR}/misc/genvarimp.perl + -DMODE=-typehpp + -DOUT_FILE=${GECODE_VAR_TYPE_HPP} + -DVIS_FILES_SERIALIZED=${GECODE_VIS_FILES_SERIALIZED} + -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/GenerateVarImp.cmake + DEPENDS ${GECODE_VIS_DEPENDS} ${CMAKE_CURRENT_SOURCE_DIR}/misc/genvarimp.perl ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt ${CMAKE_CURRENT_SOURCE_DIR}/configure.ac + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + VERBATIM +) +add_custom_command( + OUTPUT ${GECODE_VAR_IMP_HPP} + COMMAND ${CMAKE_COMMAND} + -DPERL_EXECUTABLE=${PERL_EXECUTABLE} + -DGENVARIMP=${CMAKE_CURRENT_SOURCE_DIR}/misc/genvarimp.perl + -DMODE=-header + -DOUT_FILE=${GECODE_VAR_IMP_HPP} + -DVIS_FILES_SERIALIZED=${GECODE_VIS_FILES_SERIALIZED} + -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/GenerateVarImp.cmake + DEPENDS ${GECODE_VIS_DEPENDS} ${CMAKE_CURRENT_SOURCE_DIR}/misc/genvarimp.perl ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt ${CMAKE_CURRENT_SOURCE_DIR}/configure.ac + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + VERBATIM +) +add_custom_target(gecode-varimp-gen DEPENDS ${GECODE_VAR_TYPE_HPP} ${GECODE_VAR_IMP_HPP}) + +# --------------------------------------------------------------------------- +# Target creation helpers +# --------------------------------------------------------------------------- +set(GECODE_LIBRARY_COMPONENTS support kernel) +if(GECODE_ENABLE_SEARCH) + list(APPEND GECODE_LIBRARY_COMPONENTS search) +endif() +if(GECODE_ENABLE_INT_VARS) + list(APPEND GECODE_LIBRARY_COMPONENTS int) +endif() +if(GECODE_ENABLE_SET_VARS) + list(APPEND GECODE_LIBRARY_COMPONENTS set) +endif() +if(GECODE_ENABLE_FLOAT_VARS) + list(APPEND GECODE_LIBRARY_COMPONENTS float) +endif() +if(GECODE_ENABLE_MINIMODEL) + list(APPEND GECODE_LIBRARY_COMPONENTS minimodel) +endif() +if(GECODE_ENABLE_DRIVER) + list(APPEND GECODE_LIBRARY_COMPONENTS driver) +endif() +if(GECODE_ENABLE_FLATZINC) + list(APPEND GECODE_LIBRARY_COMPONENTS flatzinc) +endif() +if(GECODE_BUILD_GIST_TARGET) + list(APPEND GECODE_LIBRARY_COMPONENTS gist) +endif() + +set(GECODE_DEFAULT_LINK_VARIANT) +if(GECODE_BUILD_SHARED) + set(GECODE_DEFAULT_LINK_VARIANT shared) +else() + set(GECODE_DEFAULT_LINK_VARIANT static) +endif() + +function(add_gecode_component_library lib) + string(TOUPPER ${lib} libupper) + set(sources ${GECODE_${libupper}_SOURCES}) + if(lib STREQUAL "float" AND NOT (GECODE_ENABLE_MPFR AND MPFR_FOUND)) + # Keep in sync with Make behavior: skip empty MPFR-only source when MPFR is absent. + list(REMOVE_ITEM sources "gecode/float/rounding.cpp") endif() -endif () -if (FLOATSRC) - target_link_libraries(gecodefloat gecodekernel) - target_link_libraries(gecodeminimodel gecodefloat) - if (MPFR_FOUND) - target_link_libraries(gecodefloat ${MPFR_LIBRARIES}) - target_include_directories(gecodefloat PRIVATE ${MPFR_INCLUDES}) - endif () -endif () + if(NOT sources) + return() + endif() -add_executable(gecode-test EXCLUDE_FROM_ALL ${TESTSRC} ${TESTHDR}) -target_link_libraries(gecode-test gecodeflatzinc gecodeminimodel) + if(GECODE_BUILD_SHARED) + add_library(gecode${lib}_shared SHARED ${sources}) + target_include_directories(gecode${lib}_shared + PUBLIC + $ + $ + $) + set_target_properties(gecode${lib}_shared PROPERTIES + OUTPUT_NAME gecode${lib} + VERSION ${GECODE_PROJECT_VERSION} + SOVERSION ${GECODE_SOVERSION}) + add_dependencies(gecode${lib}_shared gecode-varimp-gen) + list(APPEND GECODE_INSTALL_TARGETS gecode${lib}_shared) + list(APPEND GECODE_EXPORT_TARGETS gecode${lib}_shared) + set(GECODE_INSTALL_TARGETS ${GECODE_INSTALL_TARGETS} PARENT_SCOPE) + set(GECODE_EXPORT_TARGETS ${GECODE_EXPORT_TARGETS} PARENT_SCOPE) + endif() -add_executable(fzn-gecode ${FLATZINCEXESRC}) -target_link_libraries(fzn-gecode gecodeflatzinc gecodeminimodel gecodedriver) -list(APPEND GECODE_INSTALL_TARGETS fzn-gecode) + if(GECODE_BUILD_STATIC) + add_library(gecode${lib}_static STATIC ${sources}) + target_include_directories(gecode${lib}_static + PUBLIC + $ + $ + $) + set_target_properties(gecode${lib}_static PROPERTIES OUTPUT_NAME gecode${lib}) + add_dependencies(gecode${lib}_static gecode-varimp-gen) + list(APPEND GECODE_INSTALL_TARGETS gecode${lib}_static) + list(APPEND GECODE_EXPORT_TARGETS gecode${lib}_static) + set(GECODE_INSTALL_TARGETS ${GECODE_INSTALL_TARGETS} PARENT_SCOPE) + set(GECODE_EXPORT_TARGETS ${GECODE_EXPORT_TARGETS} PARENT_SCOPE) + endif() + add_library(gecode${lib} INTERFACE) + target_link_libraries(gecode${lib} INTERFACE gecode${lib}_${GECODE_DEFAULT_LINK_VARIANT}) + list(APPEND GECODE_EXPORT_TARGETS gecode${lib}) + set(GECODE_EXPORT_TARGETS ${GECODE_EXPORT_TARGETS} PARENT_SCOPE) +endfunction() + +function(gecode_link_component comp) + foreach(kind shared static) + if(TARGET gecode${comp}_${kind}) + foreach(dep ${ARGN}) + if(TARGET gecode${dep}_${kind}) + target_link_libraries(gecode${comp}_${kind} PUBLIC gecode${dep}_${kind}) + elseif(TARGET ${dep}) + target_link_libraries(gecode${comp}_${kind} PUBLIC ${dep}) + endif() + endforeach() + endif() + endforeach() +endfunction() + +foreach(component ${GECODE_LIBRARY_COMPONENTS}) + add_gecode_component_library(${component}) +endforeach() + +if(GECODE_ENABLE_THREAD) + find_package(Threads REQUIRED) + gecode_link_component(support Threads::Threads) +endif() + +gecode_link_component(kernel support) +if(GECODE_ENABLE_SEARCH) + gecode_link_component(search kernel) +endif() +if(GECODE_ENABLE_INT_VARS) + gecode_link_component(int kernel) +endif() +if(GECODE_ENABLE_SET_VARS) + gecode_link_component(set int) +endif() +if(GECODE_ENABLE_FLOAT_VARS) + gecode_link_component(float int kernel) + if(GECODE_ENABLE_MPFR AND MPFR_FOUND) + foreach(kind shared static) + if(TARGET gecodefloat_${kind}) + target_link_libraries(gecodefloat_${kind} PUBLIC ${MPFR_LIBRARIES}) + target_include_directories(gecodefloat_${kind} PRIVATE ${MPFR_INCLUDES}) + endif() + endforeach() + endif() +endif() +if(GECODE_ENABLE_MINIMODEL) + set(mm_deps int set search) + if(GECODE_ENABLE_FLOAT_VARS) + list(APPEND mm_deps float) + endif() + gecode_link_component(minimodel ${mm_deps}) +endif() +if(GECODE_ENABLE_DRIVER) + set(driver_deps int search) + if(GECODE_ENABLE_MINIMODEL) + list(APPEND driver_deps minimodel) + endif() + if(GECODE_BUILD_GIST_TARGET) + list(APPEND driver_deps gist) + endif() + gecode_link_component(driver ${driver_deps}) +endif() +if(GECODE_BUILD_GIST_TARGET) + foreach(kind shared static) + if(TARGET gecodegist_${kind}) + target_link_libraries(gecodegist_${kind} PUBLIC ${GECODE_QT_WIDGETS}) + endif() + endforeach() + if(GECODE_ENABLE_SEARCH) + gecode_link_component(gist search int) + endif() +endif() +if(GECODE_ENABLE_FLATZINC) + set(fzn_deps minimodel driver) + if(GECODE_BUILD_GIST_TARGET) + list(APPEND fzn_deps gist) + endif() + gecode_link_component(flatzinc ${fzn_deps}) + if(GECODE_HAS_QT_RUNTIME) + foreach(kind shared static) + if(TARGET gecodeflatzinc_${kind}) + target_link_libraries(gecodeflatzinc_${kind} PUBLIC ${GECODE_QT_CORE}) + endif() + endforeach() + endif() +endif() + +# --------------------------------------------------------------------------- +# Executables / tests +# --------------------------------------------------------------------------- +if(GECODE_ENABLE_FLATZINC) + add_executable(fzn-gecode ${GECODE_FLATZINC_EXE_SOURCE}) + target_link_libraries(fzn-gecode PRIVATE gecodeflatzinc) + list(APPEND GECODE_INSTALL_TARGETS fzn-gecode) +endif() + +set(GECODE_CAN_BUILD_TESTS TRUE) +foreach(required search int set float minimodel driver flatzinc) + if(NOT TARGET gecode${required}) + set(GECODE_CAN_BUILD_TESTS FALSE) + endif() +endforeach() +if(GECODE_CAN_BUILD_TESTS) + add_executable(gecode-test EXCLUDE_FROM_ALL ${GECODE_TEST_SOURCES}) + target_link_libraries(gecode-test PRIVATE gecodeflatzinc gecodeminimodel) + + enable_testing() + add_test(NAME test COMMAND gecode-test + -iter 2 -threads 0 + -test Branch::Int::Dense::3 + -test FlatZinc::magic_square + -test Int::Arithmetic::Abs + -test Int::Arithmetic::ArgMax + -test Int::Arithmetic::Max::Nary + -test Int::Cumulative::Man::Fix::0::4 + -test Int::Distinct::Random + -test Int::Linear::Bool::Int::Lq + -test Int::MiniModel::LinExpr::Bool::352 + -test NoGoods::Queens + -test Search::DFS::Sol::Binary::Nary::Binary::1::1::1 + -test Set::Dom::Dom::Gr + -test Set::RelOp::ConstSSI::Union + -test Set::Sequence::SeqU1 + -test Set::Wait) +else() + message(WARNING "Skipping gecode-test target because required modules are disabled") +endif() + +# --------------------------------------------------------------------------- +# FlatZinc scripts and solver configs +# --------------------------------------------------------------------------- set(prefix ${CMAKE_INSTALL_PREFIX}) set(datarootdir \${prefix}/share) set(datadir \${datarootdir}) if(WIN32) - configure_file( - ${PROJECT_SOURCE_DIR}/tools/flatzinc/mzn-gecode.bat.in - ${PROJECT_BINARY_DIR}/tools/flatzinc/mzn-gecode.bat - @ONLY - ) + configure_file(${PROJECT_SOURCE_DIR}/tools/flatzinc/mzn-gecode.bat.in + ${PROJECT_BINARY_DIR}/tools/flatzinc/mzn-gecode.bat @ONLY) set(MZN_SCRIPT ${PROJECT_BINARY_DIR}/tools/flatzinc/mzn-gecode.bat) else() - configure_file( - ${PROJECT_SOURCE_DIR}/tools/flatzinc/mzn-gecode.in - ${PROJECT_BINARY_DIR}/tools/flatzinc/mzn-gecode - @ONLY - ) + configure_file(${PROJECT_SOURCE_DIR}/tools/flatzinc/mzn-gecode.in + ${PROJECT_BINARY_DIR}/tools/flatzinc/mzn-gecode @ONLY) set(MZN_SCRIPT ${PROJECT_BINARY_DIR}/tools/flatzinc/mzn-gecode) endif() -configure_file( - ${PROJECT_SOURCE_DIR}/tools/flatzinc/gecode.msc.in - ${PROJECT_BINARY_DIR}/tools/flatzinc/gecode.msc - @ONLY -) -if (GECODE_HAS_GIST) - configure_file( - ${PROJECT_SOURCE_DIR}/tools/flatzinc/gecode-gist.msc.in - ${PROJECT_BINARY_DIR}/tools/flatzinc/gecode-gist.msc - @ONLY - ) +configure_file(${PROJECT_SOURCE_DIR}/tools/flatzinc/gecode.msc.in + ${PROJECT_BINARY_DIR}/tools/flatzinc/gecode.msc @ONLY) +if(GECODE_BUILD_GIST_TARGET) + configure_file(${PROJECT_SOURCE_DIR}/tools/flatzinc/gecode-gist.msc.in + ${PROJECT_BINARY_DIR}/tools/flatzinc/gecode-gist.msc @ONLY) endif() -set_property(GLOBAL PROPERTY USE_FOLDERS ON) - -option(BUILD_EXAMPLES "Build examples." OFF) -if (${BUILD_EXAMPLES}) +if(GECODE_ENABLE_EXAMPLES) add_subdirectory(examples) endif() -enable_testing() -add_test(test gecode-test - -iter 2 -test Branch::Int::Dense::3 - -test Int::Linear::Int::Int::Eq::Bnd::12::4 - -test Int::Distinct::Random - -test Int::Arithmetic::Mult::XYZ::Bnd::C - -test Int::Arithmetic::Mult::XYZ::Dom::A - -test Search::BAB::Sol::BalGr::Binary::Binary::Binary::1::1) - -## Installation Target +# --------------------------------------------------------------------------- +# Installation + CMake package export +# --------------------------------------------------------------------------- include(GNUInstallDirs) -# Install libraries and executables -install( - TARGETS ${GECODE_INSTALL_TARGETS} +include(CMakePackageConfigHelpers) + +install(TARGETS ${GECODE_INSTALL_TARGETS} + EXPORT GecodeTargets RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -) -install( - FILES ${MZN_SCRIPT} - DESTINATION ${CMAKE_INSTALL_BINDIR} -) -# Install include directory -install( - DIRECTORY gecode + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + +install(FILES ${MZN_SCRIPT} DESTINATION ${CMAKE_INSTALL_BINDIR}) + +install(DIRECTORY gecode DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} FILES_MATCHING PATTERN "**.hh" @@ -466,24 +711,39 @@ install( PATTERN "mznlib" EXCLUDE PATTERN "exampleplugin" EXCLUDE PATTERN "standalone-example" EXCLUDE - PATTERN "abi*" EXCLUDE -) -install( - FILES ${PROJECT_BINARY_DIR}/gecode/support/config.hpp - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gecode/support/ -) -# Install MiniZinc library -install( - DIRECTORY gecode/flatzinc/mznlib/ - DESTINATION ${CMAKE_INSTALL_DATADIR}/minizinc/gecode -) -install( - FILES ${PROJECT_BINARY_DIR}/tools/flatzinc/gecode.msc - DESTINATION ${CMAKE_INSTALL_DATADIR}/minizinc/solvers -) -if (GECODE_HAS_GIST) - install( - FILES ${PROJECT_BINARY_DIR}/tools/flatzinc/gecode-gist.msc - DESTINATION share/minizinc/solvers - ) + PATTERN "abi*" EXCLUDE) + +install(FILES ${PROJECT_BINARY_DIR}/gecode/support/config.hpp + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gecode/support/) + +install(DIRECTORY gecode/flatzinc/mznlib/ + DESTINATION ${CMAKE_INSTALL_DATADIR}/minizinc/gecode) + +install(FILES ${PROJECT_BINARY_DIR}/tools/flatzinc/gecode.msc + DESTINATION ${CMAKE_INSTALL_DATADIR}/minizinc/solvers) +if(GECODE_BUILD_GIST_TARGET) + install(FILES ${PROJECT_BINARY_DIR}/tools/flatzinc/gecode-gist.msc + DESTINATION ${CMAKE_INSTALL_DATADIR}/minizinc/solvers) endif() + +configure_package_config_file( + ${CMAKE_CURRENT_SOURCE_DIR}/cmake/GecodeConfig.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/GecodeConfig.cmake + INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Gecode) + +write_basic_package_version_file( + ${CMAKE_CURRENT_BINARY_DIR}/GecodeConfigVersion.cmake + VERSION ${GECODE_PROJECT_VERSION} + COMPATIBILITY SameMajorVersion) + +install(EXPORT GecodeTargets + FILE GecodeTargets.cmake + NAMESPACE Gecode:: + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Gecode) + +install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/GecodeConfig.cmake + ${CMAKE_CURRENT_BINARY_DIR}/GecodeConfigVersion.cmake + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Gecode) + +set_property(GLOBAL PROPERTY USE_FOLDERS ON) diff --git a/README.md b/README.md index 6bd39946c2..b2b20f05a8 100644 --- a/README.md +++ b/README.md @@ -7,22 +7,50 @@ constraint-based systems and applications. Gecode provides a constraint solver with state-of-the-art performance while being modular and extensible. -[master](https://github.com/Gecode/gecode/tree/master): +[master](https://github.com/Gecode/gecode/tree/master): [![Build Status master](https://api.travis-ci.org/Gecode/gecode.svg?branch=master)](https://travis-ci.org/Gecode/gecode) -[develop](https://github.com/Gecode/gecode/tree/develop): +[develop](https://github.com/Gecode/gecode/tree/develop): [![Build Status develop](https://api.travis-ci.org/Gecode/gecode.svg?branch=develop)](https://travis-ci.org/Gecode/gecode) ## Getting All the Info You Need... You can find lots of information on [Gecode's webpages](https://gecode.github.io), -including how to download, compile, install, and use it. +including how to download, compile, install, and use it. In particular, Gecode comes with [extensive tutorial and reference documentation](https://gecode.github.io/documentation.html). +## CMake Build Options + +CMake now exposes options aligned with the Autoconf build switches. + +| Configure switch | CMake option | Default | +|---|---|---| +| `--enable-shared` | `GECODE_BUILD_SHARED` | `ON` | +| `--enable-static` | `GECODE_BUILD_STATIC` | `OFF` | +| `--enable-thread` | `GECODE_ENABLE_THREAD` | `ON` | +| `--enable-qt` | `GECODE_ENABLE_QT` | `ON` | +| `--enable-gist` | `GECODE_ENABLE_GIST` | `ON` | +| `--enable-cpprofiler` | `GECODE_ENABLE_CPPROFILER` | `ON` | +| `--enable-cbs` | `GECODE_ENABLE_CBS` | `OFF` | +| `--enable-examples` | `GECODE_ENABLE_EXAMPLES` | `ON` | +| `--enable-search` | `GECODE_ENABLE_SEARCH` | `ON` | +| `--enable-int-vars` | `GECODE_ENABLE_INT_VARS` | `ON` | +| `--enable-set-vars` | `GECODE_ENABLE_SET_VARS` | `ON` | +| `--enable-float-vars` | `GECODE_ENABLE_FLOAT_VARS` | `ON` | +| `--enable-minimodel` | `GECODE_ENABLE_MINIMODEL` | `ON` | +| `--enable-driver` | `GECODE_ENABLE_DRIVER` | `ON` | +| `--enable-flatzinc` | `GECODE_ENABLE_FLATZINC` | `ON` | + +Additional parity-oriented options are available for advanced features, +including MPFR, allocator/audit toggles, visibility, and freelist sizes. + +Compatibility aliases are still accepted temporarily: +`ENABLE_THREADS`, `ENABLE_GIST`, `BUILD_EXAMPLES`, `ENABLE_CPPROFILER`. + ## Download Gecode Gecode packages (source, Apple MacOS, Microsoft Windows) can be downloaded from @@ -38,5 +66,3 @@ We happily accept smaller contributions and fixes, please provide them as pull r Gecode is licensed under the [MIT license](https://github.com/Gecode/gecode/blob/master/LICENSE). - - diff --git a/cmake/GecodeConfig.cmake.in b/cmake/GecodeConfig.cmake.in new file mode 100644 index 0000000000..b4e4681044 --- /dev/null +++ b/cmake/GecodeConfig.cmake.in @@ -0,0 +1,6 @@ +@PACKAGE_INIT@ + +include("${CMAKE_CURRENT_LIST_DIR}/GecodeTargets.cmake") + +set(Gecode_VERSION "@GECODE_PROJECT_VERSION@") +check_required_components(Gecode) diff --git a/cmake/GecodeSources.cmake b/cmake/GecodeSources.cmake new file mode 100644 index 0000000000..96c6632005 --- /dev/null +++ b/cmake/GecodeSources.cmake @@ -0,0 +1,80 @@ +# +# Native source inventory for the CMake build. +# This file intentionally avoids any parsing of Makefile.in. +# + +function(gecode_collect_glob out_var) + set(result) + foreach(pattern IN LISTS ARGN) + file(GLOB matches RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${pattern}") + list(APPEND result ${matches}) + endforeach() + list(REMOVE_DUPLICATES result) + list(SORT result) + set(${out_var} ${result} PARENT_SCOPE) +endfunction() + +function(gecode_collect_glob_recurse out_var) + set(result) + foreach(pattern IN LISTS ARGN) + file(GLOB_RECURSE matches RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${pattern}") + list(APPEND result ${matches}) + endforeach() + list(REMOVE_DUPLICATES result) + list(SORT result) + set(${out_var} ${result} PARENT_SCOPE) +endfunction() + +gecode_collect_glob( + GECODE_SUPPORT_SOURCES + "${CMAKE_CURRENT_SOURCE_DIR}/gecode/support/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/gecode/support/thread/*.cpp") + +gecode_collect_glob( + GECODE_KERNEL_SOURCES + "${CMAKE_CURRENT_SOURCE_DIR}/gecode/kernel/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/gecode/kernel/data/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/gecode/kernel/branch/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/gecode/kernel/memory/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/gecode/kernel/trace/*.cpp") + +gecode_collect_glob( + GECODE_SEARCH_SOURCES + "${CMAKE_CURRENT_SOURCE_DIR}/gecode/search/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/gecode/search/seq/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/gecode/search/par/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/gecode/search/cpprofiler/*.cpp") + +gecode_collect_glob_recurse( + GECODE_INT_SOURCES + "${CMAKE_CURRENT_SOURCE_DIR}/gecode/int/*.cpp") + +gecode_collect_glob_recurse( + GECODE_SET_SOURCES + "${CMAKE_CURRENT_SOURCE_DIR}/gecode/set/*.cpp") + +gecode_collect_glob_recurse( + GECODE_FLOAT_SOURCES + "${CMAKE_CURRENT_SOURCE_DIR}/gecode/float/*.cpp") + +gecode_collect_glob( + GECODE_MINIMODEL_SOURCES + "${CMAKE_CURRENT_SOURCE_DIR}/gecode/minimodel/*.cpp") + +gecode_collect_glob( + GECODE_DRIVER_SOURCES + "${CMAKE_CURRENT_SOURCE_DIR}/gecode/driver/*.cpp") + +gecode_collect_glob( + GECODE_GIST_SOURCES + "${CMAKE_CURRENT_SOURCE_DIR}/gecode/gist/*.cpp") + +gecode_collect_glob( + GECODE_FLATZINC_SOURCES + "${CMAKE_CURRENT_SOURCE_DIR}/gecode/flatzinc/*.cpp") + +gecode_collect_glob_recurse( + GECODE_TEST_SOURCES + "${CMAKE_CURRENT_SOURCE_DIR}/test/*.cpp") + +set(GECODE_FLATZINC_EXE_SOURCE tools/flatzinc/fzn-gecode.cpp) diff --git a/cmake/GenerateVarImp.cmake b/cmake/GenerateVarImp.cmake new file mode 100644 index 0000000000..451483489a --- /dev/null +++ b/cmake/GenerateVarImp.cmake @@ -0,0 +1,16 @@ +if(NOT DEFINED PERL_EXECUTABLE OR NOT DEFINED GENVARIMP OR NOT DEFINED MODE OR NOT DEFINED OUT_FILE) + message(FATAL_ERROR "GenerateVarImp.cmake requires PERL_EXECUTABLE, GENVARIMP, MODE, and OUT_FILE") +endif() + +if(DEFINED VIS_FILES_SERIALIZED) + string(REPLACE "||" ";" VIS_FILES "${VIS_FILES_SERIALIZED}") +endif() + +execute_process( + COMMAND "${PERL_EXECUTABLE}" "${GENVARIMP}" "${MODE}" ${VIS_FILES} + OUTPUT_FILE "${OUT_FILE}" + RESULT_VARIABLE genvarimp_status) + +if(NOT genvarimp_status EQUAL 0) + message(FATAL_ERROR "genvarimp failed for ${OUT_FILE}") +endif() diff --git a/gecode/support/thread.hpp b/gecode/support/thread.hpp index 9827957612..609683978f 100644 --- a/gecode/support/thread.hpp +++ b/gecode/support/thread.hpp @@ -35,12 +35,12 @@ */ #include +#include #ifdef GECODE_HAS_THREADS #include #include #include -#include #ifdef GECODE_USE_OSX_UNFAIR_MUTEX #include diff --git a/gecode/support/thread/thread.hpp b/gecode/support/thread/thread.hpp index 3d8aad56ae..c0b5a999c7 100644 --- a/gecode/support/thread/thread.hpp +++ b/gecode/support/thread/thread.hpp @@ -62,7 +62,7 @@ namespace Gecode { namespace Support { */ forceinline Mutex::Mutex(void) { -#ifdef GECODE_USE_OSX_UNFAIR_MUTEX +#if defined(GECODE_HAS_THREADS) && defined(GECODE_USE_OSX_UNFAIR_MUTEX) l = OS_UNFAIR_LOCK_INIT; #endif } From 3af240cd0d072f6dc7269af7737e64a0087d535c Mon Sep 17 00:00:00 2001 From: Mikael Zayenz Lagerkvist Date: Thu, 12 Feb 2026 07:26:48 +0100 Subject: [PATCH 02/21] Final makefile and cmake parity updates --- .github/workflows/build.yml | 57 +++++++- CMakeLists.txt | 275 +++++++++++++++++++++++++++--------- cmake/GecodeConfig.cmake.in | 11 ++ 3 files changed, 271 insertions(+), 72 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f9ded704c2..2b3e698129 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,11 +28,13 @@ jobs: shell: bash run: make check - build-cmake: + build-cmake-unix: runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: - os: [macos-latest, ubuntu-latest, windows-latest] + os: [macos-latest, ubuntu-latest] + qt_detection: [cmake, autoconf] steps: - uses: actions/checkout@v4 @@ -43,9 +45,58 @@ jobs: - name: Configure CMake shell: bash working-directory: ${{github.workspace}}/build - run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE + run: > + cmake $GITHUB_WORKSPACE + -DCMAKE_BUILD_TYPE=$BUILD_TYPE + -DGECODE_QT_DETECTION=${{ matrix.qt_detection }} - name: Build working-directory: ${{github.workspace}}/build shell: bash run: cmake --build . --config $BUILD_TYPE + + - name: Check + working-directory: ${{github.workspace}}/build + shell: bash + run: cmake --build . --config $BUILD_TYPE --target check + + build-cmake-windows: + runs-on: windows-latest + strategy: + fail-fast: false + matrix: + include: + - name: shared + build_shared: ON + build_static: OFF + - name: static + build_shared: OFF + build_static: ON + + steps: + - uses: actions/checkout@v4 + + - name: Create Build Environment + shell: bash + run: cmake -E make_directory ${{github.workspace}}/build + + - name: Configure CMake + shell: bash + working-directory: ${{github.workspace}}/build + run: > + cmake $GITHUB_WORKSPACE + -DCMAKE_BUILD_TYPE=$BUILD_TYPE + -DGECODE_ENABLE_QT=OFF + -DGECODE_ENABLE_GIST=OFF + -DGECODE_BUILD_SHARED=${{ matrix.build_shared }} + -DGECODE_BUILD_STATIC=${{ matrix.build_static }} + + - name: Build + working-directory: ${{github.workspace}}/build + shell: bash + run: cmake --build . --config $BUILD_TYPE + + - name: Build test binary + working-directory: ${{github.workspace}}/build + shell: bash + run: cmake --build . --config $BUILD_TYPE --target gecode-test diff --git a/CMakeLists.txt b/CMakeLists.txt index 8085981bc5..27eca2196c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,11 +22,33 @@ endif() # --------------------------------------------------------------------------- # Build options (configure/autoconf parity-oriented) # --------------------------------------------------------------------------- +# Legacy aliases are translated after option() initialization so they also +# override stale cache values from previous configure runs. +if(DEFINED ENABLE_THREADS) + set(GECODE_ALIAS_ENABLE_THREAD_VALUE "${ENABLE_THREADS}") + set(GECODE_USED_ENABLE_THREADS_ALIAS TRUE) +endif() +if(DEFINED ENABLE_GIST) + set(GECODE_ALIAS_ENABLE_GIST_VALUE "${ENABLE_GIST}") + set(GECODE_USED_ENABLE_GIST_ALIAS TRUE) +endif() +if(DEFINED BUILD_EXAMPLES) + set(GECODE_ALIAS_BUILD_EXAMPLES_VALUE "${BUILD_EXAMPLES}") + set(GECODE_USED_BUILD_EXAMPLES_ALIAS TRUE) +endif() +if(DEFINED ENABLE_CPPROFILER) + set(GECODE_ALIAS_ENABLE_CPPROFILER_VALUE "${ENABLE_CPPROFILER}") + set(GECODE_USED_ENABLE_CPPROFILER_ALIAS TRUE) +endif() + option(GECODE_BUILD_SHARED "Build shared libraries" ON) option(GECODE_BUILD_STATIC "Build static libraries" OFF) option(GECODE_ENABLE_THREAD "Enable thread support" ON) option(GECODE_ENABLE_QT "Enable Qt support" ON) +set(GECODE_QT_DETECTION "cmake" CACHE STRING + "Qt detection policy: cmake or autoconf") +set_property(CACHE GECODE_QT_DETECTION PROPERTY STRINGS cmake autoconf) option(GECODE_ENABLE_GIST "Enable Gist" ON) option(GECODE_ENABLE_CPPROFILER "Enable CPProfiler support" ON) option(GECODE_ENABLE_CBS "Enable counting-based search support" OFF) @@ -50,20 +72,20 @@ set(GECODE_FREELIST64_SIZE_MAX "" CACHE STRING "Max freelist size on 64-bit plat set(GECODE_WITH_VIS "" CACHE STRING "Additional .vis files (comma-separated)") # Compatibility aliases (temporary) -if(DEFINED ENABLE_THREADS AND NOT DEFINED GECODE_ENABLE_THREAD) - set(GECODE_ENABLE_THREAD ${ENABLE_THREADS} CACHE BOOL "Enable thread support" FORCE) +if(GECODE_USED_ENABLE_THREADS_ALIAS) + set(GECODE_ENABLE_THREAD ${GECODE_ALIAS_ENABLE_THREAD_VALUE} CACHE BOOL "Enable thread support" FORCE) message(WARNING "ENABLE_THREADS is deprecated; use GECODE_ENABLE_THREAD") endif() -if(DEFINED ENABLE_GIST AND NOT DEFINED GECODE_ENABLE_GIST) - set(GECODE_ENABLE_GIST ${ENABLE_GIST} CACHE BOOL "Enable Gist" FORCE) +if(GECODE_USED_ENABLE_GIST_ALIAS) + set(GECODE_ENABLE_GIST ${GECODE_ALIAS_ENABLE_GIST_VALUE} CACHE BOOL "Enable Gist" FORCE) message(WARNING "ENABLE_GIST is deprecated; use GECODE_ENABLE_GIST") endif() -if(DEFINED BUILD_EXAMPLES AND NOT DEFINED GECODE_ENABLE_EXAMPLES) - set(GECODE_ENABLE_EXAMPLES ${BUILD_EXAMPLES} CACHE BOOL "Build examples" FORCE) +if(GECODE_USED_BUILD_EXAMPLES_ALIAS) + set(GECODE_ENABLE_EXAMPLES ${GECODE_ALIAS_BUILD_EXAMPLES_VALUE} CACHE BOOL "Build examples" FORCE) message(WARNING "BUILD_EXAMPLES is deprecated; use GECODE_ENABLE_EXAMPLES") endif() -if(DEFINED ENABLE_CPPROFILER AND NOT DEFINED GECODE_ENABLE_CPPROFILER) - set(GECODE_ENABLE_CPPROFILER ${ENABLE_CPPROFILER} CACHE BOOL "Enable CPProfiler support" FORCE) +if(GECODE_USED_ENABLE_CPPROFILER_ALIAS) + set(GECODE_ENABLE_CPPROFILER ${GECODE_ALIAS_ENABLE_CPPROFILER_VALUE} CACHE BOOL "Enable CPProfiler support" FORCE) message(WARNING "ENABLE_CPPROFILER is deprecated; use GECODE_ENABLE_CPPROFILER") endif() @@ -96,6 +118,9 @@ endif() include(CheckCXXCompilerFlag) if(GECODE_ENABLE_GCC_VISIBILITY) check_cxx_compiler_flag(-fvisibility=hidden HAVE_VISIBILITY_HIDDEN_FLAG) + if(HAVE_VISIBILITY_HIDDEN_FLAG) + add_compile_options(-fvisibility=hidden) + endif() endif() find_package(Perl REQUIRED) @@ -105,28 +130,72 @@ if(GECODE_ENABLE_MPFR) endif() set(GECODE_HAS_QT_RUNTIME FALSE) +string(TOLOWER "${GECODE_QT_DETECTION}" GECODE_QT_DETECTION_MODE) +if(NOT GECODE_QT_DETECTION_MODE STREQUAL "cmake" + AND NOT GECODE_QT_DETECTION_MODE STREQUAL "autoconf") + message(FATAL_ERROR + "GECODE_QT_DETECTION must be one of: cmake, autoconf") +endif() if(GECODE_ENABLE_QT) - find_package(Qt6 QUIET COMPONENTS Core Gui Widgets PrintSupport) - if(Qt6_FOUND) - set(GECODE_HAS_QT_RUNTIME TRUE) - set(GECODE_QT_CORE Qt6::Core) - set(GECODE_QT_WIDGETS Qt6::Widgets Qt6::Gui Qt6::PrintSupport) - set(CMAKE_AUTOMOC TRUE) - else() - find_package(Qt5 QUIET COMPONENTS Core Gui Widgets PrintSupport) - if(Qt5_FOUND) + set(GECODE_QT_PROBE_ALLOWED TRUE) + if(GECODE_QT_DETECTION_MODE STREQUAL "autoconf") + find_program(GECODE_QMAKE_EXECUTABLE NAMES qmake-qt4 qmake) + find_program(GECODE_MOC_EXECUTABLE NAMES moc-qt4 moc) + if(NOT GECODE_QMAKE_EXECUTABLE OR NOT GECODE_MOC_EXECUTABLE) + set(GECODE_QT_PROBE_ALLOWED FALSE) + message(STATUS + "GECODE_QT_DETECTION=autoconf: qmake or moc not found, disabling Qt") + else() + execute_process( + COMMAND "${GECODE_QMAKE_EXECUTABLE}" -query QT_VERSION + OUTPUT_VARIABLE GECODE_QMAKE_QT_VERSION + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_QUIET + RESULT_VARIABLE GECODE_QMAKE_QT_VERSION_RESULT) + if(NOT GECODE_QMAKE_QT_VERSION_RESULT EQUAL 0) + set(GECODE_QT_PROBE_ALLOWED FALSE) + message(STATUS + "GECODE_QT_DETECTION=autoconf: unable to query Qt version from qmake, disabling Qt") + elseif(NOT GECODE_QMAKE_QT_VERSION MATCHES "^([0-9]+)\\.([0-9]+)") + set(GECODE_QT_PROBE_ALLOWED FALSE) + message(STATUS + "GECODE_QT_DETECTION=autoconf: invalid Qt version from qmake, disabling Qt") + else() + set(GECODE_QT_MAJOR "${CMAKE_MATCH_1}") + set(GECODE_QT_MINOR "${CMAKE_MATCH_2}") + if(GECODE_QT_MAJOR LESS 4 OR + (GECODE_QT_MAJOR EQUAL 4 AND GECODE_QT_MINOR LESS 3)) + set(GECODE_QT_PROBE_ALLOWED FALSE) + message(STATUS + "GECODE_QT_DETECTION=autoconf: Qt ${GECODE_QMAKE_QT_VERSION} is too old (< 4.3), disabling Qt") + endif() + endif() + endif() + endif() + + if(GECODE_QT_PROBE_ALLOWED) + find_package(Qt6 QUIET COMPONENTS Core Gui Widgets PrintSupport) + if(Qt6_FOUND) set(GECODE_HAS_QT_RUNTIME TRUE) - set(GECODE_QT_CORE Qt5::Core) - set(GECODE_QT_WIDGETS Qt5::Widgets Qt5::Gui Qt5::PrintSupport) + set(GECODE_QT_CORE Qt6::Core) + set(GECODE_QT_WIDGETS Qt6::Widgets Qt6::Gui Qt6::PrintSupport) set(CMAKE_AUTOMOC TRUE) else() - find_package(Qt4 QUIET) - if(QT4_FOUND) - include(${QT_USE_FILE}) + find_package(Qt5 QUIET COMPONENTS Core Gui Widgets PrintSupport) + if(Qt5_FOUND) set(GECODE_HAS_QT_RUNTIME TRUE) - set(GECODE_QT_CORE ${QT_LIBRARIES}) - set(GECODE_QT_WIDGETS ${QT_LIBRARIES}) + set(GECODE_QT_CORE Qt5::Core) + set(GECODE_QT_WIDGETS Qt5::Widgets Qt5::Gui Qt5::PrintSupport) set(CMAKE_AUTOMOC TRUE) + else() + find_package(Qt4 QUIET) + if(QT4_FOUND) + include(${QT_USE_FILE}) + set(GECODE_HAS_QT_RUNTIME TRUE) + set(GECODE_QT_CORE ${QT_LIBRARIES}) + set(GECODE_QT_WIDGETS ${QT_LIBRARIES}) + set(CMAKE_AUTOMOC TRUE) + endif() endif() endif() endif() @@ -297,9 +366,9 @@ if(HAVE_FORCE_INLINE) set(forceinline "__forceinline") endif() -check_c_source_compiles("int main() { return __builtin_ffsl(0); }" HAVE_BUILTIN_FFSL) -if(HAVE_BUILTIN_FFSL) - set(GECODE_HAS_BUILTIN_FFSL "/**/") +check_c_source_compiles("int main() { return __builtin_ffsll(0); }" HAVE_BUILTIN_FFSLL) +if(HAVE_BUILTIN_FFSLL) + set(GECODE_HAS_BUILTIN_FFSLL "/**/") endif() check_c_source_compiles("int main() { return __builtin_popcountll(0); }" HAVE_BUILTIN_POPCOUNTLL) if(HAVE_BUILTIN_POPCOUNTLL) @@ -631,35 +700,78 @@ if(GECODE_ENABLE_FLATZINC) endif() set(GECODE_CAN_BUILD_TESTS TRUE) -foreach(required search int set float minimodel driver flatzinc) +foreach(required search int minimodel driver) if(NOT TARGET gecode${required}) set(GECODE_CAN_BUILD_TESTS FALSE) endif() endforeach() + +if(GECODE_ENABLE_SET_VARS AND NOT TARGET gecodeset) + set(GECODE_CAN_BUILD_TESTS FALSE) +endif() +if(GECODE_ENABLE_FLOAT_VARS AND NOT TARGET gecodefloat) + set(GECODE_CAN_BUILD_TESTS FALSE) +endif() +if(GECODE_ENABLE_FLATZINC AND NOT TARGET gecodeflatzinc) + set(GECODE_CAN_BUILD_TESTS FALSE) +endif() + +set(GECODE_TEST_SOURCES_SELECTED ${GECODE_TEST_SOURCES}) +if(NOT GECODE_ENABLE_SET_VARS) + list(FILTER GECODE_TEST_SOURCES_SELECTED EXCLUDE REGEX "^test/set(/|\\.cpp)") +endif() +if(NOT GECODE_ENABLE_FLOAT_VARS) + list(FILTER GECODE_TEST_SOURCES_SELECTED EXCLUDE REGEX "^test/float(/|\\.cpp)") +endif() +if(NOT GECODE_ENABLE_FLATZINC) + list(FILTER GECODE_TEST_SOURCES_SELECTED EXCLUDE REGEX "^test/flatzinc(/|\\.cpp)") +endif() + if(GECODE_CAN_BUILD_TESTS) - add_executable(gecode-test EXCLUDE_FROM_ALL ${GECODE_TEST_SOURCES}) - target_link_libraries(gecode-test PRIVATE gecodeflatzinc gecodeminimodel) + add_executable(gecode-test EXCLUDE_FROM_ALL ${GECODE_TEST_SOURCES_SELECTED}) + set(GECODE_TEST_LINK_LIBS gecodeminimodel) + if(GECODE_ENABLE_FLATZINC) + list(APPEND GECODE_TEST_LINK_LIBS gecodeflatzinc) + endif() + target_link_libraries(gecode-test PRIVATE ${GECODE_TEST_LINK_LIBS}) enable_testing() - add_test(NAME test COMMAND gecode-test - -iter 2 -threads 0 - -test Branch::Int::Dense::3 - -test FlatZinc::magic_square - -test Int::Arithmetic::Abs - -test Int::Arithmetic::ArgMax - -test Int::Arithmetic::Max::Nary - -test Int::Cumulative::Man::Fix::0::4 - -test Int::Distinct::Random - -test Int::Linear::Bool::Int::Lq - -test Int::MiniModel::LinExpr::Bool::352 - -test NoGoods::Queens - -test Search::DFS::Sol::Binary::Nary::Binary::1::1::1 - -test Set::Dom::Dom::Gr - -test Set::RelOp::ConstSSI::Union - -test Set::Sequence::SeqU1 - -test Set::Wait) + set(GECODE_CHECK_TESTS + Branch::Int::Dense::3 + Int::Arithmetic::Abs + Int::Arithmetic::ArgMax + Int::Arithmetic::Max::Nary + Int::Cumulative::Man::Fix::0::4 + Int::Distinct::Random + Int::Linear::Bool::Int::Lq + Int::MiniModel::LinExpr::Bool::352 + NoGoods::Queens + Search::DFS::Sol::Binary::Nary::Binary::1::1::1) + if(GECODE_ENABLE_FLATZINC) + list(INSERT GECODE_CHECK_TESTS 1 FlatZinc::magic_square) + endif() + if(GECODE_ENABLE_SET_VARS) + list(APPEND GECODE_CHECK_TESTS + Set::Dom::Dom::Gr + Set::RelOp::ConstSSI::Union + Set::Sequence::SeqU1 + Set::Wait) + endif() + + set(GECODE_CHECK_ARGS -iter 2 -threads 0) + foreach(gecode_check_test ${GECODE_CHECK_TESTS}) + list(APPEND GECODE_CHECK_ARGS -test ${gecode_check_test}) + endforeach() + + add_test(NAME test COMMAND gecode-test ${GECODE_CHECK_ARGS}) + add_custom_target(check + COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -R "^test$" + DEPENDS gecode-test + USES_TERMINAL) else() - message(WARNING "Skipping gecode-test target because required modules are disabled") + message(WARNING "Skipping gecode-test/check targets because required modules are disabled") + add_custom_target(check + COMMAND ${CMAKE_COMMAND} -E echo "Skipping check target because required modules are disabled") endif() # --------------------------------------------------------------------------- @@ -668,20 +780,22 @@ endif() set(prefix ${CMAKE_INSTALL_PREFIX}) set(datarootdir \${prefix}/share) set(datadir \${datarootdir}) -if(WIN32) - configure_file(${PROJECT_SOURCE_DIR}/tools/flatzinc/mzn-gecode.bat.in - ${PROJECT_BINARY_DIR}/tools/flatzinc/mzn-gecode.bat @ONLY) - set(MZN_SCRIPT ${PROJECT_BINARY_DIR}/tools/flatzinc/mzn-gecode.bat) -else() - configure_file(${PROJECT_SOURCE_DIR}/tools/flatzinc/mzn-gecode.in - ${PROJECT_BINARY_DIR}/tools/flatzinc/mzn-gecode @ONLY) - set(MZN_SCRIPT ${PROJECT_BINARY_DIR}/tools/flatzinc/mzn-gecode) -endif() -configure_file(${PROJECT_SOURCE_DIR}/tools/flatzinc/gecode.msc.in - ${PROJECT_BINARY_DIR}/tools/flatzinc/gecode.msc @ONLY) -if(GECODE_BUILD_GIST_TARGET) - configure_file(${PROJECT_SOURCE_DIR}/tools/flatzinc/gecode-gist.msc.in - ${PROJECT_BINARY_DIR}/tools/flatzinc/gecode-gist.msc @ONLY) +if(GECODE_ENABLE_FLATZINC) + if(WIN32) + configure_file(${PROJECT_SOURCE_DIR}/tools/flatzinc/mzn-gecode.bat.in + ${PROJECT_BINARY_DIR}/tools/flatzinc/mzn-gecode.bat @ONLY) + set(MZN_SCRIPT ${PROJECT_BINARY_DIR}/tools/flatzinc/mzn-gecode.bat) + else() + configure_file(${PROJECT_SOURCE_DIR}/tools/flatzinc/mzn-gecode.in + ${PROJECT_BINARY_DIR}/tools/flatzinc/mzn-gecode @ONLY) + set(MZN_SCRIPT ${PROJECT_BINARY_DIR}/tools/flatzinc/mzn-gecode) + endif() + configure_file(${PROJECT_SOURCE_DIR}/tools/flatzinc/gecode.msc.in + ${PROJECT_BINARY_DIR}/tools/flatzinc/gecode.msc @ONLY) + if(GECODE_BUILD_GIST_TARGET) + configure_file(${PROJECT_SOURCE_DIR}/tools/flatzinc/gecode-gist.msc.in + ${PROJECT_BINARY_DIR}/tools/flatzinc/gecode-gist.msc @ONLY) + endif() endif() if(GECODE_ENABLE_EXAMPLES) @@ -700,7 +814,9 @@ install(TARGETS ${GECODE_INSTALL_TARGETS} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -install(FILES ${MZN_SCRIPT} DESTINATION ${CMAKE_INSTALL_BINDIR}) +if(GECODE_ENABLE_FLATZINC) + install(FILES ${MZN_SCRIPT} DESTINATION ${CMAKE_INSTALL_BINDIR}) +endif() install(DIRECTORY gecode DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} @@ -716,14 +832,35 @@ install(DIRECTORY gecode install(FILES ${PROJECT_BINARY_DIR}/gecode/support/config.hpp DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gecode/support/) -install(DIRECTORY gecode/flatzinc/mznlib/ - DESTINATION ${CMAKE_INSTALL_DATADIR}/minizinc/gecode) +if(GECODE_ENABLE_FLATZINC) + install(DIRECTORY gecode/flatzinc/mznlib/ + DESTINATION ${CMAKE_INSTALL_DATADIR}/minizinc/gecode) -install(FILES ${PROJECT_BINARY_DIR}/tools/flatzinc/gecode.msc - DESTINATION ${CMAKE_INSTALL_DATADIR}/minizinc/solvers) -if(GECODE_BUILD_GIST_TARGET) - install(FILES ${PROJECT_BINARY_DIR}/tools/flatzinc/gecode-gist.msc + install(FILES ${PROJECT_BINARY_DIR}/tools/flatzinc/gecode.msc DESTINATION ${CMAKE_INSTALL_DATADIR}/minizinc/solvers) + if(GECODE_BUILD_GIST_TARGET) + install(FILES ${PROJECT_BINARY_DIR}/tools/flatzinc/gecode-gist.msc + DESTINATION ${CMAKE_INSTALL_DATADIR}/minizinc/solvers) + endif() +endif() + +set(GECODE_PACKAGE_NEEDS_THREADS OFF) +if(GECODE_ENABLE_THREAD) + set(GECODE_PACKAGE_NEEDS_THREADS ON) +endif() +set(GECODE_PACKAGE_QT_MAJOR "") +set(GECODE_PACKAGE_QT_COMPONENTS "") +if(GECODE_BUILD_GIST_TARGET) + set(GECODE_PACKAGE_QT_COMPONENTS "Core;Gui;Widgets;PrintSupport") +elseif(GECODE_ENABLE_FLATZINC AND GECODE_HAS_QT_RUNTIME) + set(GECODE_PACKAGE_QT_COMPONENTS "Core") +endif() +if(NOT GECODE_PACKAGE_QT_COMPONENTS STREQUAL "") + if(Qt6_FOUND) + set(GECODE_PACKAGE_QT_MAJOR "6") + elseif(Qt5_FOUND) + set(GECODE_PACKAGE_QT_MAJOR "5") + endif() endif() configure_package_config_file( diff --git a/cmake/GecodeConfig.cmake.in b/cmake/GecodeConfig.cmake.in index b4e4681044..f79aca59bf 100644 --- a/cmake/GecodeConfig.cmake.in +++ b/cmake/GecodeConfig.cmake.in @@ -1,5 +1,16 @@ @PACKAGE_INIT@ +include(CMakeFindDependencyMacro) +if("@GECODE_PACKAGE_NEEDS_THREADS@" STREQUAL "ON") + find_dependency(Threads REQUIRED) +endif() +set(_gecode_qt_components "@GECODE_PACKAGE_QT_COMPONENTS@") +if("@GECODE_PACKAGE_QT_MAJOR@" STREQUAL "6") + find_dependency(Qt6 REQUIRED COMPONENTS ${_gecode_qt_components}) +elseif("@GECODE_PACKAGE_QT_MAJOR@" STREQUAL "5") + find_dependency(Qt5 REQUIRED COMPONENTS ${_gecode_qt_components}) +endif() + include("${CMAKE_CURRENT_LIST_DIR}/GecodeTargets.cmake") set(Gecode_VERSION "@GECODE_PROJECT_VERSION@") From 3590a5c80123a17f6f1f8aacb530b9b8b7bc7037 Mon Sep 17 00:00:00 2001 From: Mikael Zayenz Lagerkvist Date: Thu, 12 Feb 2026 17:15:50 +0100 Subject: [PATCH 03/21] Fixes for CI runners --- .github/workflows/build.yml | 42 ++++++++++++++++++++++++++----------- examples/CMakeLists.txt | 8 +++++++ 2 files changed, 38 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2b3e698129..9f7ef3e822 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,6 +16,17 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Install Ubuntu build deps + if: runner.os == 'Linux' + shell: bash + run: | + sudo apt-get update + sudo apt-get install -y flex bison libgmp-dev libmpfr-dev + + - name: Stabilize generated configure script timestamp + shell: bash + run: touch configure + - name: Configure shell: bash run: ./configure @@ -39,6 +50,13 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Install Ubuntu build deps + if: runner.os == 'Linux' + shell: bash + run: | + sudo apt-get update + sudo apt-get install -y flex bison libgmp-dev libmpfr-dev + - name: Create Build Environment run: cmake -E make_directory ${{github.workspace}}/build @@ -76,27 +94,27 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Setup Perl + uses: shogo82148/actions-setup-perl@v1 + - name: Create Build Environment - shell: bash - run: cmake -E make_directory ${{github.workspace}}/build + shell: pwsh + run: cmake -E make_directory "${{ github.workspace }}\\build" - name: Configure CMake - shell: bash - working-directory: ${{github.workspace}}/build + shell: pwsh run: > - cmake $GITHUB_WORKSPACE - -DCMAKE_BUILD_TYPE=$BUILD_TYPE + cmake -S "${{ github.workspace }}" -B "${{ github.workspace }}\\build" + -G "Visual Studio 17 2022" -A x64 -DGECODE_ENABLE_QT=OFF -DGECODE_ENABLE_GIST=OFF -DGECODE_BUILD_SHARED=${{ matrix.build_shared }} -DGECODE_BUILD_STATIC=${{ matrix.build_static }} - name: Build - working-directory: ${{github.workspace}}/build - shell: bash - run: cmake --build . --config $BUILD_TYPE + shell: pwsh + run: cmake --build "${{ github.workspace }}\\build" --config ${{ env.BUILD_TYPE }} - name: Build test binary - working-directory: ${{github.workspace}}/build - shell: bash - run: cmake --build . --config $BUILD_TYPE --target gecode-test + shell: pwsh + run: cmake --build "${{ github.workspace }}\\build" --config ${{ env.BUILD_TYPE }} --target gecode-test diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 869c08f004..33442720cb 100755 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -47,8 +47,16 @@ macro (GECODE_EXAMPLE NAME) endmacro () file(GLOB EXAMPLE_FILES *.cpp) +set(GECODE_MPFR_EXAMPLES + archimedean-spiral + golden-spiral) foreach (EXAMPLE_FILE ${EXAMPLE_FILES}) get_filename_component(EXAMPLE_NAME ${EXAMPLE_FILE} NAME_WE) + if (EXAMPLE_NAME IN_LIST GECODE_MPFR_EXAMPLES AND + (NOT GECODE_ENABLE_FLOAT_VARS OR NOT GECODE_ENABLE_MPFR OR NOT MPFR_FOUND)) + message("-- Skipping example: " ${EXAMPLE_NAME} " (requires MPFR float support)") + continue() + endif() message("-- Adding example: " ${EXAMPLE_NAME}) gecode_example(${EXAMPLE_NAME}) endforeach() From 559336e2c4f5a284ad50b721e52872ddd3ecfd84 Mon Sep 17 00:00:00 2001 From: Mikael Zayenz Lagerkvist Date: Thu, 12 Feb 2026 19:35:18 +0100 Subject: [PATCH 04/21] Updates to Windows CI build --- .github/workflows/build.yml | 41 ++++++++++++++++++++++++++++++++++++ CMakeLists.txt | 35 +++++------------------------- gecode/support/auto-link.hpp | 2 +- 3 files changed, 47 insertions(+), 31 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9f7ef3e822..f762af99a8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -118,3 +118,44 @@ jobs: - name: Build test binary shell: pwsh run: cmake --build "${{ github.workspace }}\\build" --config ${{ env.BUILD_TYPE }} --target gecode-test + + build-autoconf-windows: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup MSYS2 + uses: msys2/setup-msys2@v2 + with: + msystem: UCRT64 + update: true + install: >- + autoconf + automake + bison + flex + gcc + make + m4 + libtool + perl + mingw-w64-ucrt-x86_64-gcc + mingw-w64-ucrt-x86_64-gmp + mingw-w64-ucrt-x86_64-mpfr + + - name: Stabilize generated configure script timestamp + shell: msys2 {0} + run: touch configure + + - name: Configure + shell: msys2 {0} + run: ./configure --disable-qt --disable-gist + + - name: Build + shell: msys2 {0} + run: make test -j4 + + - name: Check + shell: msys2 {0} + run: make check diff --git a/CMakeLists.txt b/CMakeLists.txt index 27eca2196c..1eced63c07 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -403,40 +403,13 @@ foreach(i RANGE ${length}) set(CONFIG_OUT "${CONFIG_OUT}${line}") endforeach() -set(GECODE_BUILD_DEFINES "/* Disable autolink because all dependencies are handled by CMake. */\n") -foreach(component SUPPORT KERNEL) - string(APPEND GECODE_BUILD_DEFINES "#define GECODE_BUILD_${component}\n") -endforeach() -if(GECODE_ENABLE_SEARCH) - string(APPEND GECODE_BUILD_DEFINES "#define GECODE_BUILD_SEARCH\n") -endif() -if(GECODE_ENABLE_INT_VARS) - string(APPEND GECODE_BUILD_DEFINES "#define GECODE_BUILD_INT\n") -endif() -if(GECODE_ENABLE_SET_VARS) - string(APPEND GECODE_BUILD_DEFINES "#define GECODE_BUILD_SET\n") -endif() -if(GECODE_ENABLE_FLOAT_VARS) - string(APPEND GECODE_BUILD_DEFINES "#define GECODE_BUILD_FLOAT\n") -endif() -if(GECODE_ENABLE_MINIMODEL) - string(APPEND GECODE_BUILD_DEFINES "#define GECODE_BUILD_MINIMODEL\n") -endif() -if(GECODE_ENABLE_FLATZINC) - string(APPEND GECODE_BUILD_DEFINES "#define GECODE_BUILD_FLATZINC\n") -endif() -if(GECODE_ENABLE_DRIVER) - string(APPEND GECODE_BUILD_DEFINES "#define GECODE_BUILD_DRIVER\n") -endif() -if(GECODE_BUILD_GIST_TARGET) - string(APPEND GECODE_BUILD_DEFINES "#define GECODE_BUILD_GIST\n") -endif() - file(WRITE ${GECODE_BINARY_DIR}/gecode/support/config.hpp "/* gecode/support/config.hpp. Generated from config.hpp.in by configure. */ /* gecode/support/config.hpp.in. Generated from configure.ac by autoheader. */ -${GECODE_BUILD_DEFINES} +/* Disable MSVC pragma-based auto-linking: CMake wires dependencies explicitly. */ +#define GECODE_NO_AUTOLINK 1 + ${CONFIG_OUT}") # --------------------------------------------------------------------------- @@ -567,6 +540,7 @@ function(add_gecode_component_library lib) if(GECODE_BUILD_SHARED) add_library(gecode${lib}_shared SHARED ${sources}) + target_compile_definitions(gecode${lib}_shared PRIVATE GECODE_BUILD_${libupper}) target_include_directories(gecode${lib}_shared PUBLIC $ @@ -585,6 +559,7 @@ function(add_gecode_component_library lib) if(GECODE_BUILD_STATIC) add_library(gecode${lib}_static STATIC ${sources}) + target_compile_definitions(gecode${lib}_static PRIVATE GECODE_BUILD_${libupper}) target_include_directories(gecode${lib}_static PUBLIC $ diff --git a/gecode/support/auto-link.hpp b/gecode/support/auto-link.hpp index ba71d081ab..efd66289b5 100644 --- a/gecode/support/auto-link.hpp +++ b/gecode/support/auto-link.hpp @@ -36,7 +36,7 @@ * */ -#if defined(_MSC_VER) +#if defined(_MSC_VER) && !defined(GECODE_NO_AUTOLINK) #if defined(_M_IX86) #define GECODE_DLL_PLATFORM "x86" From d2aea37a6a4427892a6e9eb6562307f8de69c013 Mon Sep 17 00:00:00 2001 From: Mikael Zayenz Lagerkvist Date: Thu, 12 Feb 2026 21:51:57 +0100 Subject: [PATCH 05/21] Updates to windows ci build --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f762af99a8..8d8deeba45 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -108,6 +108,7 @@ jobs: -G "Visual Studio 17 2022" -A x64 -DGECODE_ENABLE_QT=OFF -DGECODE_ENABLE_GIST=OFF + -DGECODE_ENABLE_MPFR=OFF -DGECODE_BUILD_SHARED=${{ matrix.build_shared }} -DGECODE_BUILD_STATIC=${{ matrix.build_static }} @@ -150,7 +151,7 @@ jobs: - name: Configure shell: msys2 {0} - run: ./configure --disable-qt --disable-gist + run: CC=gcc CXX=g++ ./configure --with-host-os=Windows --disable-qt --disable-gist --disable-mpfr - name: Build shell: msys2 {0} From c70f92353f978773851f54b658f44bdf8091ed22 Mon Sep 17 00:00:00 2001 From: Mikael Zayenz Lagerkvist Date: Mon, 16 Feb 2026 21:42:07 +0100 Subject: [PATCH 06/21] Modernized CMake and removed contribs --- .github/workflows/build.yml | 2 - CMakeLists.txt | 200 +- Makefile.contribs | 84 - Makefile.in | 15 - README.md | 5 + cmake/GecodeSources.cmake | 473 ++- configure.ac | 8 - configure.ac.in | 4 - contribs/README | 26 - contribs/qecode/AbstractWorker.hh | 42 - contribs/qecode/Doxyfile | 263 -- contribs/qecode/Makefile.in.in | 162 - contribs/qecode/OptVar.cc | 82 - contribs/qecode/OptVar.hh | 124 - contribs/qecode/QCOPPlus.cc | 306 -- contribs/qecode/QCOPPlus.hh | 166 - contribs/qecode/QCSPPlusUnblockable.cc | 239 -- contribs/qecode/QCSPPlusUnblockable.hh | 140 - contribs/qecode/README | 6 - contribs/qecode/Strategy.cc | 253 -- contribs/qecode/Strategy.hh | 112 - contribs/qecode/StrategyNode.cc | 59 - contribs/qecode/StrategyNode.hh | 49 - contribs/qecode/UnblockableBranching.hh | 34 - .../qecode/UnblockableViewValBranching.cc | 61 - .../qecode/UnblockableViewValBranching.hh | 45 - contribs/qecode/Work.cc | 48 - contribs/qecode/Work.hh | 64 - contribs/qecode/WorkComparators.hh | 67 - contribs/qecode/WorkManager.cc | 376 --- contribs/qecode/WorkManager.hh | 96 - contribs/qecode/Worker.cc | 285 -- contribs/qecode/Worker.hh | 70 - contribs/qecode/clean | 5 - contribs/qecode/configure | 2843 ----------------- contribs/qecode/configure.ac | 44 - contribs/qecode/examples/COMPILING | 13 - contribs/qecode/examples/MatrixGame.cpp | 142 - contribs/qecode/examples/NimFibo.cpp | 79 - contribs/qecode/examples/network-pricing1.cpp | 168 - contribs/qecode/examples/network-pricing2.cpp | 171 - contribs/qecode/examples/optim2.cc | 150 - contribs/qecode/examples/stress_test.cpp | 268 -- contribs/qecode/myDom.cc | 59 - contribs/qecode/myspace.cc | 119 - contribs/qecode/myspace.hh | 79 - contribs/qecode/qecode.hh | 56 - contribs/qecode/qsolver_parallel.cc | 41 - contribs/qecode/qsolver_parallel.hh | 43 - contribs/qecode/qsolver_qcop.cc | 268 -- contribs/qecode/qsolver_qcop.hh | 56 - contribs/qecode/qsolver_qcsp.cc | 178 -- contribs/qecode/qsolver_qcsp.hh | 66 - contribs/qecode/qsolver_unblockable.cc | 423 --- contribs/qecode/qsolver_unblockable.hh | 84 - contribs/qecode/shortdesc.ac | 1 - contribs/qecode/vartype.hh | 31 - contribs/quacode/CMakeLists.txt | 200 -- contribs/quacode/FindGecode.cmake | 94 - contribs/quacode/LICENSE | 25 - contribs/quacode/README | 26 - contribs/quacode/doxygen/Doxyfile.conf | 2362 -------------- contribs/quacode/doxygen/getrevision.sh | 36 - contribs/quacode/doxygen/mainpage.md | 3 - contribs/quacode/examples/baker.cpp | 145 - contribs/quacode/examples/connect-four.cpp | 585 ---- contribs/quacode/examples/matrix-game.cpp | 207 -- contribs/quacode/examples/nim-fibo.cpp | 193 -- contribs/quacode/examples/qbf.cpp | 218 -- contribs/quacode/examples/qdimacs.cpp | 348 -- contribs/quacode/examples/rndQCSP.cpp | 188 -- contribs/quacode/quacode/qcsp.hh | 265 -- contribs/quacode/quacode/qint/qbool.hh | 484 --- .../quacode/quacode/qint/qbool/clause.hpp | 446 --- contribs/quacode/quacode/qint/qbool/eq.hpp | 149 - contribs/quacode/quacode/qint/qbool/eqv.hpp | 214 -- contribs/quacode/quacode/qint/qbool/or.hpp | 567 ---- contribs/quacode/quacode/qint/qbool/qbool.cpp | 208 -- contribs/quacode/quacode/qint/qbool/xor.hpp | 149 - contribs/quacode/quacode/qint/qbool/xorv.hpp | 214 -- contribs/quacode/quacode/qint/watch.hpp | 105 - contribs/quacode/quacode/qspaceinfo.cpp | 472 --- contribs/quacode/quacode/qspaceinfo.hh | 605 ---- contribs/quacode/quacode/qspaceinfo.hpp | 786 ----- contribs/quacode/quacode/search/qdfs.cpp | 63 - contribs/quacode/quacode/search/qdfs.hpp | 94 - .../quacode/quacode/search/sequential/qdfs.hh | 236 -- .../quacode/search/sequential/qpath.cpp | 61 - .../quacode/search/sequential/qpath.hh | 491 --- .../quacode/quacode/support/dynamic-list.hh | 291 -- contribs/quacode/quacode/support/log.cpp | 40 - contribs/quacode/quacode/support/log.hh | 205 -- doxygen/doxygen.conf.in | 1 - examples/CMakeLists.txt | 137 +- misc/cmake_modules/FindMPFR.cmake | 18 +- 95 files changed, 600 insertions(+), 19684 deletions(-) delete mode 100644 Makefile.contribs delete mode 100644 contribs/README delete mode 100755 contribs/qecode/AbstractWorker.hh delete mode 100644 contribs/qecode/Doxyfile delete mode 100644 contribs/qecode/Makefile.in.in delete mode 100644 contribs/qecode/OptVar.cc delete mode 100644 contribs/qecode/OptVar.hh delete mode 100755 contribs/qecode/QCOPPlus.cc delete mode 100755 contribs/qecode/QCOPPlus.hh delete mode 100755 contribs/qecode/QCSPPlusUnblockable.cc delete mode 100755 contribs/qecode/QCSPPlusUnblockable.hh delete mode 100644 contribs/qecode/README delete mode 100644 contribs/qecode/Strategy.cc delete mode 100644 contribs/qecode/Strategy.hh delete mode 100644 contribs/qecode/StrategyNode.cc delete mode 100644 contribs/qecode/StrategyNode.hh delete mode 100755 contribs/qecode/UnblockableBranching.hh delete mode 100755 contribs/qecode/UnblockableViewValBranching.cc delete mode 100755 contribs/qecode/UnblockableViewValBranching.hh delete mode 100644 contribs/qecode/Work.cc delete mode 100644 contribs/qecode/Work.hh delete mode 100644 contribs/qecode/WorkComparators.hh delete mode 100644 contribs/qecode/WorkManager.cc delete mode 100644 contribs/qecode/WorkManager.hh delete mode 100644 contribs/qecode/Worker.cc delete mode 100755 contribs/qecode/Worker.hh delete mode 100755 contribs/qecode/clean delete mode 100755 contribs/qecode/configure delete mode 100644 contribs/qecode/configure.ac delete mode 100644 contribs/qecode/examples/COMPILING delete mode 100644 contribs/qecode/examples/MatrixGame.cpp delete mode 100644 contribs/qecode/examples/NimFibo.cpp delete mode 100644 contribs/qecode/examples/network-pricing1.cpp delete mode 100644 contribs/qecode/examples/network-pricing2.cpp delete mode 100755 contribs/qecode/examples/optim2.cc delete mode 100644 contribs/qecode/examples/stress_test.cpp delete mode 100644 contribs/qecode/myDom.cc delete mode 100755 contribs/qecode/myspace.cc delete mode 100755 contribs/qecode/myspace.hh delete mode 100644 contribs/qecode/qecode.hh delete mode 100644 contribs/qecode/qsolver_parallel.cc delete mode 100644 contribs/qecode/qsolver_parallel.hh delete mode 100644 contribs/qecode/qsolver_qcop.cc delete mode 100644 contribs/qecode/qsolver_qcop.hh delete mode 100644 contribs/qecode/qsolver_qcsp.cc delete mode 100644 contribs/qecode/qsolver_qcsp.hh delete mode 100755 contribs/qecode/qsolver_unblockable.cc delete mode 100755 contribs/qecode/qsolver_unblockable.hh delete mode 100644 contribs/qecode/shortdesc.ac delete mode 100644 contribs/qecode/vartype.hh delete mode 100644 contribs/quacode/CMakeLists.txt delete mode 100644 contribs/quacode/FindGecode.cmake delete mode 100644 contribs/quacode/LICENSE delete mode 100644 contribs/quacode/README delete mode 100644 contribs/quacode/doxygen/Doxyfile.conf delete mode 100755 contribs/quacode/doxygen/getrevision.sh delete mode 100644 contribs/quacode/doxygen/mainpage.md delete mode 100644 contribs/quacode/examples/baker.cpp delete mode 100644 contribs/quacode/examples/connect-four.cpp delete mode 100644 contribs/quacode/examples/matrix-game.cpp delete mode 100644 contribs/quacode/examples/nim-fibo.cpp delete mode 100644 contribs/quacode/examples/qbf.cpp delete mode 100644 contribs/quacode/examples/qdimacs.cpp delete mode 100644 contribs/quacode/examples/rndQCSP.cpp delete mode 100644 contribs/quacode/quacode/qcsp.hh delete mode 100644 contribs/quacode/quacode/qint/qbool.hh delete mode 100644 contribs/quacode/quacode/qint/qbool/clause.hpp delete mode 100644 contribs/quacode/quacode/qint/qbool/eq.hpp delete mode 100644 contribs/quacode/quacode/qint/qbool/eqv.hpp delete mode 100644 contribs/quacode/quacode/qint/qbool/or.hpp delete mode 100644 contribs/quacode/quacode/qint/qbool/qbool.cpp delete mode 100644 contribs/quacode/quacode/qint/qbool/xor.hpp delete mode 100644 contribs/quacode/quacode/qint/qbool/xorv.hpp delete mode 100644 contribs/quacode/quacode/qint/watch.hpp delete mode 100644 contribs/quacode/quacode/qspaceinfo.cpp delete mode 100644 contribs/quacode/quacode/qspaceinfo.hh delete mode 100644 contribs/quacode/quacode/qspaceinfo.hpp delete mode 100644 contribs/quacode/quacode/search/qdfs.cpp delete mode 100644 contribs/quacode/quacode/search/qdfs.hpp delete mode 100644 contribs/quacode/quacode/search/sequential/qdfs.hh delete mode 100644 contribs/quacode/quacode/search/sequential/qpath.cpp delete mode 100644 contribs/quacode/quacode/search/sequential/qpath.hh delete mode 100644 contribs/quacode/quacode/support/dynamic-list.hh delete mode 100644 contribs/quacode/quacode/support/log.cpp delete mode 100644 contribs/quacode/quacode/support/log.hh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8d8deeba45..3d6bb8de62 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,7 +45,6 @@ jobs: fail-fast: false matrix: os: [macos-latest, ubuntu-latest] - qt_detection: [cmake, autoconf] steps: - uses: actions/checkout@v4 @@ -66,7 +65,6 @@ jobs: run: > cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE - -DGECODE_QT_DETECTION=${{ matrix.qt_detection }} - name: Build working-directory: ${{github.workspace}}/build diff --git a/CMakeLists.txt b/CMakeLists.txt index 1eced63c07..831556f644 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,22 +2,15 @@ # CMake build script for Gecode. # -cmake_minimum_required(VERSION 3.8.0) +cmake_minimum_required(VERSION 3.21) project(GECODE LANGUAGES C CXX) -set(CMAKE_CXX_STANDARD 17) -set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/misc/cmake_modules) -if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.11.0) - cmake_policy(SET CMP0072 NEW) - set(OpenGL_GL_PREFERENCE LEGACY) -endif() -if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.17.0) - cmake_policy(SET CMP0100 NEW) -endif() +# Keep this preference to preserve existing Gist/OpenGL linkage behavior. +set(OpenGL_GL_PREFERENCE LEGACY) # --------------------------------------------------------------------------- # Build options (configure/autoconf parity-oriented) @@ -46,9 +39,6 @@ option(GECODE_BUILD_STATIC "Build static libraries" OFF) option(GECODE_ENABLE_THREAD "Enable thread support" ON) option(GECODE_ENABLE_QT "Enable Qt support" ON) -set(GECODE_QT_DETECTION "cmake" CACHE STRING - "Qt detection policy: cmake or autoconf") -set_property(CACHE GECODE_QT_DETECTION PROPERTY STRINGS cmake autoconf) option(GECODE_ENABLE_GIST "Enable Gist" ON) option(GECODE_ENABLE_CPPROFILER "Enable CPProfiler support" ON) option(GECODE_ENABLE_CBS "Enable counting-based search support" OFF) @@ -67,6 +57,7 @@ option(GECODE_ENABLE_ALLOCATOR "Enable default allocator" ON) option(GECODE_ENABLE_AUDIT "Enable audit code" OFF) option(GECODE_ENABLE_GCC_VISIBILITY "Enable GCC visibility attributes" ON) option(GECODE_ENABLE_OSX_UNFAIR_MUTEX "Enable macOS unfair mutexes" ON) +option(GECODE_REGENERATE_VARIMP "Regenerate checked-in var-imp headers during build" OFF) set(GECODE_FREELIST32_SIZE_MAX "" CACHE STRING "Max freelist size on 32-bit platforms") set(GECODE_FREELIST64_SIZE_MAX "" CACHE STRING "Max freelist size on 64-bit platforms") set(GECODE_WITH_VIS "" CACHE STRING "Additional .vis files (comma-separated)") @@ -116,88 +107,39 @@ if(GECODE_ENABLE_EXAMPLES) endif() include(CheckCXXCompilerFlag) +set(GECODE_VISIBILITY_COMPILE_OPTION) if(GECODE_ENABLE_GCC_VISIBILITY) check_cxx_compiler_flag(-fvisibility=hidden HAVE_VISIBILITY_HIDDEN_FLAG) if(HAVE_VISIBILITY_HIDDEN_FLAG) - add_compile_options(-fvisibility=hidden) + set(GECODE_VISIBILITY_COMPILE_OPTION -fvisibility=hidden) endif() endif() -find_package(Perl REQUIRED) +if(GECODE_REGENERATE_VARIMP) + find_package(Perl REQUIRED) +endif() if(GECODE_ENABLE_MPFR) find_package(MPFR) endif() set(GECODE_HAS_QT_RUNTIME FALSE) -string(TOLOWER "${GECODE_QT_DETECTION}" GECODE_QT_DETECTION_MODE) -if(NOT GECODE_QT_DETECTION_MODE STREQUAL "cmake" - AND NOT GECODE_QT_DETECTION_MODE STREQUAL "autoconf") - message(FATAL_ERROR - "GECODE_QT_DETECTION must be one of: cmake, autoconf") -endif() +set(GECODE_QT_CORE) +set(GECODE_QT_WIDGETS) if(GECODE_ENABLE_QT) - set(GECODE_QT_PROBE_ALLOWED TRUE) - if(GECODE_QT_DETECTION_MODE STREQUAL "autoconf") - find_program(GECODE_QMAKE_EXECUTABLE NAMES qmake-qt4 qmake) - find_program(GECODE_MOC_EXECUTABLE NAMES moc-qt4 moc) - if(NOT GECODE_QMAKE_EXECUTABLE OR NOT GECODE_MOC_EXECUTABLE) - set(GECODE_QT_PROBE_ALLOWED FALSE) - message(STATUS - "GECODE_QT_DETECTION=autoconf: qmake or moc not found, disabling Qt") - else() - execute_process( - COMMAND "${GECODE_QMAKE_EXECUTABLE}" -query QT_VERSION - OUTPUT_VARIABLE GECODE_QMAKE_QT_VERSION - OUTPUT_STRIP_TRAILING_WHITESPACE - ERROR_QUIET - RESULT_VARIABLE GECODE_QMAKE_QT_VERSION_RESULT) - if(NOT GECODE_QMAKE_QT_VERSION_RESULT EQUAL 0) - set(GECODE_QT_PROBE_ALLOWED FALSE) - message(STATUS - "GECODE_QT_DETECTION=autoconf: unable to query Qt version from qmake, disabling Qt") - elseif(NOT GECODE_QMAKE_QT_VERSION MATCHES "^([0-9]+)\\.([0-9]+)") - set(GECODE_QT_PROBE_ALLOWED FALSE) - message(STATUS - "GECODE_QT_DETECTION=autoconf: invalid Qt version from qmake, disabling Qt") - else() - set(GECODE_QT_MAJOR "${CMAKE_MATCH_1}") - set(GECODE_QT_MINOR "${CMAKE_MATCH_2}") - if(GECODE_QT_MAJOR LESS 4 OR - (GECODE_QT_MAJOR EQUAL 4 AND GECODE_QT_MINOR LESS 3)) - set(GECODE_QT_PROBE_ALLOWED FALSE) - message(STATUS - "GECODE_QT_DETECTION=autoconf: Qt ${GECODE_QMAKE_QT_VERSION} is too old (< 4.3), disabling Qt") - endif() - endif() - endif() + find_package(QT NAMES Qt6 Qt5 QUIET COMPONENTS Core Gui Widgets PrintSupport) + if(QT_FOUND) + find_package(Qt${QT_VERSION_MAJOR} QUIET COMPONENTS Core Gui Widgets PrintSupport) endif() - if(GECODE_QT_PROBE_ALLOWED) - find_package(Qt6 QUIET COMPONENTS Core Gui Widgets PrintSupport) - if(Qt6_FOUND) - set(GECODE_HAS_QT_RUNTIME TRUE) - set(GECODE_QT_CORE Qt6::Core) - set(GECODE_QT_WIDGETS Qt6::Widgets Qt6::Gui Qt6::PrintSupport) - set(CMAKE_AUTOMOC TRUE) - else() - find_package(Qt5 QUIET COMPONENTS Core Gui Widgets PrintSupport) - if(Qt5_FOUND) - set(GECODE_HAS_QT_RUNTIME TRUE) - set(GECODE_QT_CORE Qt5::Core) - set(GECODE_QT_WIDGETS Qt5::Widgets Qt5::Gui Qt5::PrintSupport) - set(CMAKE_AUTOMOC TRUE) - else() - find_package(Qt4 QUIET) - if(QT4_FOUND) - include(${QT_USE_FILE}) - set(GECODE_HAS_QT_RUNTIME TRUE) - set(GECODE_QT_CORE ${QT_LIBRARIES}) - set(GECODE_QT_WIDGETS ${QT_LIBRARIES}) - set(CMAKE_AUTOMOC TRUE) - endif() - endif() - endif() + if(TARGET Qt6::Core) + set(GECODE_HAS_QT_RUNTIME TRUE) + set(GECODE_QT_CORE Qt6::Core) + set(GECODE_QT_WIDGETS Qt6::Widgets Qt6::Gui Qt6::PrintSupport) + elseif(TARGET Qt5::Core) + set(GECODE_HAS_QT_RUNTIME TRUE) + set(GECODE_QT_CORE Qt5::Core) + set(GECODE_QT_WIDGETS Qt5::Widgets Qt5::Gui Qt5::PrintSupport) endif() endif() @@ -459,36 +401,46 @@ foreach(vis ${GECODE_VIS_FILES}) endforeach() string(JOIN "||" GECODE_VIS_FILES_SERIALIZED ${GECODE_VIS_FILES_FOR_GEN}) -set(GECODE_VAR_TYPE_HPP ${CMAKE_CURRENT_SOURCE_DIR}/gecode/kernel/var-type.hpp) -set(GECODE_VAR_IMP_HPP ${CMAKE_CURRENT_SOURCE_DIR}/gecode/kernel/var-imp.hpp) - -add_custom_command( - OUTPUT ${GECODE_VAR_TYPE_HPP} - COMMAND ${CMAKE_COMMAND} - -DPERL_EXECUTABLE=${PERL_EXECUTABLE} - -DGENVARIMP=${CMAKE_CURRENT_SOURCE_DIR}/misc/genvarimp.perl - -DMODE=-typehpp - -DOUT_FILE=${GECODE_VAR_TYPE_HPP} - -DVIS_FILES_SERIALIZED=${GECODE_VIS_FILES_SERIALIZED} - -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/GenerateVarImp.cmake - DEPENDS ${GECODE_VIS_DEPENDS} ${CMAKE_CURRENT_SOURCE_DIR}/misc/genvarimp.perl ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt ${CMAKE_CURRENT_SOURCE_DIR}/configure.ac - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - VERBATIM -) -add_custom_command( - OUTPUT ${GECODE_VAR_IMP_HPP} - COMMAND ${CMAKE_COMMAND} - -DPERL_EXECUTABLE=${PERL_EXECUTABLE} - -DGENVARIMP=${CMAKE_CURRENT_SOURCE_DIR}/misc/genvarimp.perl - -DMODE=-header - -DOUT_FILE=${GECODE_VAR_IMP_HPP} - -DVIS_FILES_SERIALIZED=${GECODE_VIS_FILES_SERIALIZED} - -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/GenerateVarImp.cmake - DEPENDS ${GECODE_VIS_DEPENDS} ${CMAKE_CURRENT_SOURCE_DIR}/misc/genvarimp.perl ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt ${CMAKE_CURRENT_SOURCE_DIR}/configure.ac - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - VERBATIM -) -add_custom_target(gecode-varimp-gen DEPENDS ${GECODE_VAR_TYPE_HPP} ${GECODE_VAR_IMP_HPP}) +set(GECODE_VAR_TYPE_HPP_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/gecode/kernel/var-type.hpp) +set(GECODE_VAR_IMP_HPP_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/gecode/kernel/var-imp.hpp) +set(GECODE_VAR_TYPE_HPP ${GECODE_VAR_TYPE_HPP_SOURCE}) +set(GECODE_VAR_IMP_HPP ${GECODE_VAR_IMP_HPP_SOURCE}) + +if(GECODE_REGENERATE_VARIMP) + set(GECODE_VAR_TYPE_HPP ${CMAKE_CURRENT_BINARY_DIR}/gecode/kernel/var-type.hpp) + set(GECODE_VAR_IMP_HPP ${CMAKE_CURRENT_BINARY_DIR}/gecode/kernel/var-imp.hpp) + file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/gecode/kernel") + + add_custom_command( + OUTPUT ${GECODE_VAR_TYPE_HPP} + COMMAND ${CMAKE_COMMAND} + -DPERL_EXECUTABLE=${PERL_EXECUTABLE} + -DGENVARIMP=${CMAKE_CURRENT_SOURCE_DIR}/misc/genvarimp.perl + -DMODE=-typehpp + -DOUT_FILE=${GECODE_VAR_TYPE_HPP} + -DVIS_FILES_SERIALIZED=${GECODE_VIS_FILES_SERIALIZED} + -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/GenerateVarImp.cmake + DEPENDS ${GECODE_VIS_DEPENDS} ${CMAKE_CURRENT_SOURCE_DIR}/misc/genvarimp.perl ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt ${CMAKE_CURRENT_SOURCE_DIR}/configure.ac + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + VERBATIM + ) + add_custom_command( + OUTPUT ${GECODE_VAR_IMP_HPP} + COMMAND ${CMAKE_COMMAND} + -DPERL_EXECUTABLE=${PERL_EXECUTABLE} + -DGENVARIMP=${CMAKE_CURRENT_SOURCE_DIR}/misc/genvarimp.perl + -DMODE=-header + -DOUT_FILE=${GECODE_VAR_IMP_HPP} + -DVIS_FILES_SERIALIZED=${GECODE_VIS_FILES_SERIALIZED} + -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/GenerateVarImp.cmake + DEPENDS ${GECODE_VIS_DEPENDS} ${CMAKE_CURRENT_SOURCE_DIR}/misc/genvarimp.perl ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt ${CMAKE_CURRENT_SOURCE_DIR}/configure.ac + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + VERBATIM + ) + add_custom_target(gecode-varimp-gen DEPENDS ${GECODE_VAR_TYPE_HPP} ${GECODE_VAR_IMP_HPP}) +else() + add_custom_target(gecode-varimp-gen) +endif() # --------------------------------------------------------------------------- # Target creation helpers @@ -541,11 +493,15 @@ function(add_gecode_component_library lib) if(GECODE_BUILD_SHARED) add_library(gecode${lib}_shared SHARED ${sources}) target_compile_definitions(gecode${lib}_shared PRIVATE GECODE_BUILD_${libupper}) + target_compile_features(gecode${lib}_shared PUBLIC cxx_std_17) target_include_directories(gecode${lib}_shared PUBLIC $ $ $) + if(GECODE_VISIBILITY_COMPILE_OPTION) + target_compile_options(gecode${lib}_shared PRIVATE ${GECODE_VISIBILITY_COMPILE_OPTION}) + endif() set_target_properties(gecode${lib}_shared PROPERTIES OUTPUT_NAME gecode${lib} VERSION ${GECODE_PROJECT_VERSION} @@ -560,11 +516,15 @@ function(add_gecode_component_library lib) if(GECODE_BUILD_STATIC) add_library(gecode${lib}_static STATIC ${sources}) target_compile_definitions(gecode${lib}_static PRIVATE GECODE_BUILD_${libupper}) + target_compile_features(gecode${lib}_static PUBLIC cxx_std_17) target_include_directories(gecode${lib}_static PUBLIC $ $ $) + if(GECODE_VISIBILITY_COMPILE_OPTION) + target_compile_options(gecode${lib}_static PRIVATE ${GECODE_VISIBILITY_COMPILE_OPTION}) + endif() set_target_properties(gecode${lib}_static PROPERTIES OUTPUT_NAME gecode${lib}) add_dependencies(gecode${lib}_static gecode-varimp-gen) list(APPEND GECODE_INSTALL_TARGETS gecode${lib}_static) @@ -593,6 +553,12 @@ function(gecode_link_component comp) endforeach() endfunction() +function(gecode_enable_automoc_if_exists target_name) + if(TARGET ${target_name}) + set_target_properties(${target_name} PROPERTIES AUTOMOC ON) + endif() +endfunction() + foreach(component ${GECODE_LIBRARY_COMPONENTS}) add_gecode_component_library(${component}) endforeach() @@ -617,8 +583,12 @@ if(GECODE_ENABLE_FLOAT_VARS) if(GECODE_ENABLE_MPFR AND MPFR_FOUND) foreach(kind shared static) if(TARGET gecodefloat_${kind}) - target_link_libraries(gecodefloat_${kind} PUBLIC ${MPFR_LIBRARIES}) - target_include_directories(gecodefloat_${kind} PRIVATE ${MPFR_INCLUDES}) + if(TARGET MPFR::MPFR) + target_link_libraries(gecodefloat_${kind} PUBLIC MPFR::MPFR) + else() + target_link_libraries(gecodefloat_${kind} PUBLIC ${MPFR_LIBRARIES}) + target_include_directories(gecodefloat_${kind} PRIVATE ${MPFR_INCLUDES}) + endif() endif() endforeach() endif() @@ -641,6 +611,8 @@ if(GECODE_ENABLE_DRIVER) gecode_link_component(driver ${driver_deps}) endif() if(GECODE_BUILD_GIST_TARGET) + gecode_enable_automoc_if_exists(gecodegist_shared) + gecode_enable_automoc_if_exists(gecodegist_static) foreach(kind shared static) if(TARGET gecodegist_${kind}) target_link_libraries(gecodegist_${kind} PUBLIC ${GECODE_QT_WIDGETS}) @@ -806,6 +778,10 @@ install(DIRECTORY gecode install(FILES ${PROJECT_BINARY_DIR}/gecode/support/config.hpp DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gecode/support/) +if(GECODE_REGENERATE_VARIMP) + install(FILES ${GECODE_VAR_TYPE_HPP} ${GECODE_VAR_IMP_HPP} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gecode/kernel/) +endif() if(GECODE_ENABLE_FLATZINC) install(DIRECTORY gecode/flatzinc/mznlib/ diff --git a/Makefile.contribs b/Makefile.contribs deleted file mode 100644 index 1958647fdf..0000000000 --- a/Makefile.contribs +++ /dev/null @@ -1,84 +0,0 @@ -# -*-Makefile-*- -# -# Main authors: -# Christian Schulte -# Guido Tack -# Grégoire Dooms -# -# -# Copyright: -# Christian Schulte, 2005 -# Guido Tack, 2005 -# Grégoire Dooms, 2005 -# -# This file is part of Gecode, the generic constraint -# development environment: -# http://www.gecode.org -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# - -CONTRIBS := $(shell ls -d contribs/* 2>/dev/null ) - -contribdirs: - @rm -f configure.ac - @(echo "dnl This file was generated by Makefile.contribs."; \ - echo "dnl Do not edit! Modifications will get lost!"; \ - echo "dnl Edit configure.ac.in instead."; echo ""; \ - cat configure.ac.in \ - ) > configure.ac - @for i in $(CONTRIBS); do \ - if test ! -d $$i ; then continue ; fi; \ - if test -f $$i.dis* ; then \ - echo "Skipping disabled contrib $$i"; \ - elif test -f $$i/configure -a '(' -f $$i/vti.ac -o -f $$i/shortdesc.ac ')' ; then \ - mv configure.ac configure.ac.1; \ - sed -e "s|\(dnl @SUBDIRS@\)|AC_CONFIG_SUBDIRS($$i) \1|g" \ - configure.ac.1 > configure.ac; \ - if test -f $$i/vti.ac; then \ - echo "Add variable contrib from $$i"; \ - mv configure.ac configure.ac.1; \ - (sed -e "s|\(dnl @VTIS@\)|m4_include($$i/vti.ac) \1|g" \ - configure.ac.1 > configure.ac); \ - else \ - mv configure.ac configure.ac.1; \ - echo "Add contrib from $$i"; \ - DESC="`head -n 1 $$i/shortdesc.ac`"; \ - sed -e "s|\(dnl @CONTRIBS@\)|AC_GECODE_ENABLE_CONTRIB($${i#*\/},\"$$DESC\",[]) \1|g" \ - configure.ac.1 > configure.ac; \ - fi ;\ - else \ - if test ! -f $$i/configure; then \ - echo "Skipping contrib $$i : no configure script"; \ - else \ - echo "Skipping contrib $$i : no shortdescr.ac or vis.ac file "; \ - fi; \ - fi;\ - done - @rm -f configure.ac.1 - @echo "\n// STATISTICS: support-any\n" >> gecode/support/config.hpp.in - @echo Running autoconf on generated configure.ac ... - @autoconf - @autoheader - @mv gecode/support/config.hpp.in config.hpp.in.1 - @perl misc/fixautoheader.perl < config.hpp.in.1 \ - > gecode/support/config.hpp.in - @rm config.hpp.in.1 - @echo done. diff --git a/Makefile.in b/Makefile.in index 0fca3dd78c..3e345434f6 100755 --- a/Makefile.in +++ b/Makefile.in @@ -1336,21 +1336,6 @@ makecompletedmessage: @echo make install @echo -# ugly hack by Gr�goire Dooms to call a target on a contribs after evaluating all the variables in this Makefile. -# used as make contribs:cpgraph:doc or make contribs:cpgraph:Makefile.in -.PHONY: contribs\:% -contribs\:%: - $(MAKE) -C $(shell echo $@ | sed 's/\(contribs:[^:]*\):.*/\1/;s+:+/+') $(shell echo $@ | sed 's/contribs:[^:]*:\(.*\)/\1/;s+:+/+') - -# less ugly hack by Guido Tack to call a target -# Just give ICD (in-contrib-dir) and ICT (in-contrib-target) as arguments -# to make incontrib -ICT= -ICD= -.PHONY: incontrib -incontrib: - $(MAKE) -C contribs/$(ICD) $(ICT) - compilesubdirs: @for_subdirs="$(subdirs)"; for i in $$for_subdirs; do \ if test -f $$i/Makefile; then \ diff --git a/README.md b/README.md index b2b20f05a8..6ab8a0484e 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,8 @@ Gecode comes with ## CMake Build Options CMake now exposes options aligned with the Autoconf build switches. +The minimum required CMake version is 3.21. +Qt discovery uses CMake packages (Qt6 or Qt5). | Configure switch | CMake option | Default | |---|---|---| @@ -47,6 +49,9 @@ CMake now exposes options aligned with the Autoconf build switches. Additional parity-oriented options are available for advanced features, including MPFR, allocator/audit toggles, visibility, and freelist sizes. +By default, CMake uses checked-in `gecode/kernel/var-type.hpp` and +`gecode/kernel/var-imp.hpp`; regeneration is opt-in via +`-DGECODE_REGENERATE_VARIMP=ON`. Compatibility aliases are still accepted temporarily: `ENABLE_THREADS`, `ENABLE_GIST`, `BUILD_EXAMPLES`, `ENABLE_CPPROFILER`. diff --git a/cmake/GecodeSources.cmake b/cmake/GecodeSources.cmake index 96c6632005..eb1809eba8 100644 --- a/cmake/GecodeSources.cmake +++ b/cmake/GecodeSources.cmake @@ -1,80 +1,425 @@ # # Native source inventory for the CMake build. -# This file intentionally avoids any parsing of Makefile.in. +# This file intentionally avoids file(GLOB...) so source changes are explicit. # -function(gecode_collect_glob out_var) - set(result) - foreach(pattern IN LISTS ARGN) - file(GLOB matches RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${pattern}") - list(APPEND result ${matches}) - endforeach() - list(REMOVE_DUPLICATES result) - list(SORT result) - set(${out_var} ${result} PARENT_SCOPE) -endfunction() +set(GECODE_SUPPORT_SOURCES + gecode/support/allocator.cpp + gecode/support/exception.cpp + gecode/support/heap.cpp + gecode/support/hw-rnd.cpp + gecode/support/thread/thread.cpp +) -function(gecode_collect_glob_recurse out_var) - set(result) - foreach(pattern IN LISTS ARGN) - file(GLOB_RECURSE matches RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${pattern}") - list(APPEND result ${matches}) - endforeach() - list(REMOVE_DUPLICATES result) - list(SORT result) - set(${out_var} ${result} PARENT_SCOPE) -endfunction() +set(GECODE_KERNEL_SOURCES + gecode/kernel/archive.cpp + gecode/kernel/branch/action.cpp + gecode/kernel/branch/afc.cpp + gecode/kernel/branch/chb.cpp + gecode/kernel/branch/function.cpp + gecode/kernel/core.cpp + gecode/kernel/data/array.cpp + gecode/kernel/data/rnd.cpp + gecode/kernel/exception.cpp + gecode/kernel/gpi.cpp + gecode/kernel/memory/manager.cpp + gecode/kernel/memory/region.cpp + gecode/kernel/trace/filter.cpp + gecode/kernel/trace/general.cpp + gecode/kernel/trace/recorder.cpp + gecode/kernel/trace/tracer.cpp +) -gecode_collect_glob( - GECODE_SUPPORT_SOURCES - "${CMAKE_CURRENT_SOURCE_DIR}/gecode/support/*.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/gecode/support/thread/*.cpp") +set(GECODE_SEARCH_SOURCES + gecode/search/bab.cpp + gecode/search/cpprofiler/tracer.cpp + gecode/search/cutoff.cpp + gecode/search/dfs.cpp + gecode/search/engine.cpp + gecode/search/exception.cpp + gecode/search/lds.cpp + gecode/search/nogoods.cpp + gecode/search/options.cpp + gecode/search/par/pbs.cpp + gecode/search/pbs.cpp + gecode/search/rbs.cpp + gecode/search/seq/dead.cpp + gecode/search/seq/pbs.cpp + gecode/search/seq/rbs.cpp + gecode/search/stop.cpp + gecode/search/tracer.cpp +) -gecode_collect_glob( - GECODE_KERNEL_SOURCES - "${CMAKE_CURRENT_SOURCE_DIR}/gecode/kernel/*.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/gecode/kernel/data/*.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/gecode/kernel/branch/*.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/gecode/kernel/memory/*.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/gecode/kernel/trace/*.cpp") +set(GECODE_INT_SOURCES + gecode/int/arithmetic.cpp + gecode/int/arithmetic/mult.cpp + gecode/int/array.cpp + gecode/int/bin-packing.cpp + gecode/int/bin-packing/conflict-graph.cpp + gecode/int/bin-packing/propagate.cpp + gecode/int/bool.cpp + gecode/int/bool/eqv.cpp + gecode/int/branch.cpp + gecode/int/branch/action.cpp + gecode/int/branch/chb.cpp + gecode/int/branch/val-sel-commit.cpp + gecode/int/branch/view-sel.cpp + gecode/int/branch/view-values.cpp + gecode/int/channel.cpp + gecode/int/channel/link-multi.cpp + gecode/int/channel/link-single.cpp + gecode/int/circuit.cpp + gecode/int/count.cpp + gecode/int/cumulative.cpp + gecode/int/cumulatives.cpp + gecode/int/distinct.cpp + gecode/int/distinct/cbs.cpp + gecode/int/distinct/eqite.cpp + gecode/int/dom.cpp + gecode/int/element.cpp + gecode/int/element/pair.cpp + gecode/int/exception.cpp + gecode/int/exec.cpp + gecode/int/exec/when.cpp + gecode/int/extensional-regular.cpp + gecode/int/extensional-tuple-set.cpp + gecode/int/extensional/dfa.cpp + gecode/int/extensional/tuple-set.cpp + gecode/int/gcc.cpp + gecode/int/int-set.cpp + gecode/int/ldsb.cpp + gecode/int/ldsb/sym-imp.cpp + gecode/int/ldsb/sym-obj.cpp + gecode/int/linear-bool.cpp + gecode/int/linear-int.cpp + gecode/int/linear/bool-post.cpp + gecode/int/linear/int-post.cpp + gecode/int/member.cpp + gecode/int/no-overlap.cpp + gecode/int/nvalues.cpp + gecode/int/order.cpp + gecode/int/order/propagate.cpp + gecode/int/precede.cpp + gecode/int/rel.cpp + gecode/int/relax.cpp + gecode/int/sequence.cpp + gecode/int/sorted.cpp + gecode/int/trace.cpp + gecode/int/trace/tracer.cpp + gecode/int/unary.cpp + gecode/int/unshare.cpp + gecode/int/var-imp/bool.cpp + gecode/int/var-imp/int.cpp + gecode/int/var/bool.cpp + gecode/int/var/int.cpp +) -gecode_collect_glob( - GECODE_SEARCH_SOURCES - "${CMAKE_CURRENT_SOURCE_DIR}/gecode/search/*.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/gecode/search/seq/*.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/gecode/search/par/*.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/gecode/search/cpprofiler/*.cpp") +set(GECODE_SET_SOURCES + gecode/set/array.cpp + gecode/set/bool.cpp + gecode/set/branch.cpp + gecode/set/branch/action.cpp + gecode/set/branch/chb.cpp + gecode/set/branch/ngl.cpp + gecode/set/branch/val-sel-commit.cpp + gecode/set/branch/view-sel.cpp + gecode/set/cardinality.cpp + gecode/set/channel.cpp + gecode/set/convex.cpp + gecode/set/convex/conv.cpp + gecode/set/convex/hull.cpp + gecode/set/distinct.cpp + gecode/set/distinct/atmostOne.cpp + gecode/set/dom.cpp + gecode/set/element.cpp + gecode/set/exception.cpp + gecode/set/exec.cpp + gecode/set/int.cpp + gecode/set/ldsb.cpp + gecode/set/ldsb/sym-imp.cpp + gecode/set/precede.cpp + gecode/set/rel-op-const-cvc.cpp + gecode/set/rel-op-const-cvv.cpp + gecode/set/rel-op-const-vcc.cpp + gecode/set/rel-op-const-vcv.cpp + gecode/set/rel-op-const-vvc.cpp + gecode/set/rel-op-singleton.cpp + gecode/set/rel-op-ternary.cpp + gecode/set/rel-op.cpp + gecode/set/rel-op/post-compl-cvc.cpp + gecode/set/rel-op/post-compl-cvv.cpp + gecode/set/rel-op/post-compl-vvc.cpp + gecode/set/rel-op/post-compl.cpp + gecode/set/rel-op/post-nocompl-cvc.cpp + gecode/set/rel-op/post-nocompl-cvv.cpp + gecode/set/rel-op/post-nocompl-vvc.cpp + gecode/set/rel-op/post-nocompl.cpp + gecode/set/rel.cpp + gecode/set/relax.cpp + gecode/set/sequence.cpp + gecode/set/sequence/seq-u.cpp + gecode/set/sequence/seq.cpp + gecode/set/trace.cpp + gecode/set/trace/tracer.cpp + gecode/set/var-imp/integerset.cpp + gecode/set/var-imp/set.cpp + gecode/set/var/set.cpp +) -gecode_collect_glob_recurse( - GECODE_INT_SOURCES - "${CMAKE_CURRENT_SOURCE_DIR}/gecode/int/*.cpp") +set(GECODE_FLOAT_SOURCES + gecode/float/arithmetic.cpp + gecode/float/array.cpp + gecode/float/bool.cpp + gecode/float/branch.cpp + gecode/float/branch/action.cpp + gecode/float/branch/chb.cpp + gecode/float/branch/val-sel-commit.cpp + gecode/float/branch/view-sel.cpp + gecode/float/channel.cpp + gecode/float/dom.cpp + gecode/float/exception.cpp + gecode/float/exec.cpp + gecode/float/linear.cpp + gecode/float/linear/post.cpp + gecode/float/rel.cpp + gecode/float/relax.cpp + gecode/float/rounding.cpp + gecode/float/trace.cpp + gecode/float/trace/tracer.cpp + gecode/float/transcendental.cpp + gecode/float/trigonometric.cpp + gecode/float/var-imp/float.cpp + gecode/float/var/float.cpp +) -gecode_collect_glob_recurse( - GECODE_SET_SOURCES - "${CMAKE_CURRENT_SOURCE_DIR}/gecode/set/*.cpp") +set(GECODE_MINIMODEL_SOURCES + gecode/minimodel/bool-expr.cpp + gecode/minimodel/dom.cpp + gecode/minimodel/exception.cpp + gecode/minimodel/float-arith.cpp + gecode/minimodel/float-expr.cpp + gecode/minimodel/float-rel.cpp + gecode/minimodel/int-arith.cpp + gecode/minimodel/int-expr.cpp + gecode/minimodel/int-rel.cpp + gecode/minimodel/ipl.cpp + gecode/minimodel/optimize.cpp + gecode/minimodel/reg.cpp + gecode/minimodel/set-expr.cpp + gecode/minimodel/set-rel.cpp +) -gecode_collect_glob_recurse( - GECODE_FLOAT_SOURCES - "${CMAKE_CURRENT_SOURCE_DIR}/gecode/float/*.cpp") +set(GECODE_DRIVER_SOURCES + gecode/driver/options.cpp + gecode/driver/script.cpp +) -gecode_collect_glob( - GECODE_MINIMODEL_SOURCES - "${CMAKE_CURRENT_SOURCE_DIR}/gecode/minimodel/*.cpp") +set(GECODE_GIST_SOURCES + gecode/gist/drawingcursor.cpp + gecode/gist/gecodelogo.cpp + gecode/gist/gist.cpp + gecode/gist/mainwindow.cpp + gecode/gist/node.cpp + gecode/gist/nodestats.cpp + gecode/gist/nodewidget.cpp + gecode/gist/preferences.cpp + gecode/gist/qtgist.cpp + gecode/gist/spacenode.cpp + gecode/gist/stopbrancher.cpp + gecode/gist/textoutput.cpp + gecode/gist/treecanvas.cpp + gecode/gist/visualnode.cpp +) -gecode_collect_glob( - GECODE_DRIVER_SOURCES - "${CMAKE_CURRENT_SOURCE_DIR}/gecode/driver/*.cpp") +set(GECODE_FLATZINC_SOURCES + gecode/flatzinc/branch.cpp + gecode/flatzinc/flatzinc.cpp + gecode/flatzinc/lexer.yy.cpp + gecode/flatzinc/parser.tab.cpp + gecode/flatzinc/registry.cpp +) -gecode_collect_glob( - GECODE_GIST_SOURCES - "${CMAKE_CURRENT_SOURCE_DIR}/gecode/gist/*.cpp") - -gecode_collect_glob( - GECODE_FLATZINC_SOURCES - "${CMAKE_CURRENT_SOURCE_DIR}/gecode/flatzinc/*.cpp") - -gecode_collect_glob_recurse( - GECODE_TEST_SOURCES - "${CMAKE_CURRENT_SOURCE_DIR}/test/*.cpp") +set(GECODE_TEST_SOURCES + test/afc.cpp + test/array.cpp + test/assign.cpp + test/assign/bool.cpp + test/assign/float.cpp + test/assign/int.cpp + test/assign/set.cpp + test/branch.cpp + test/branch/bool.cpp + test/branch/float.cpp + test/branch/int.cpp + test/branch/set.cpp + test/flatzinc.cpp + test/flatzinc/2dpacking.cpp + test/flatzinc/alpha.cpp + test/flatzinc/battleships1.cpp + test/flatzinc/battleships10.cpp + test/flatzinc/battleships2.cpp + test/flatzinc/battleships3.cpp + test/flatzinc/battleships4.cpp + test/flatzinc/battleships5.cpp + test/flatzinc/battleships7.cpp + test/flatzinc/battleships9.cpp + test/flatzinc/blocksworld_instance_1.cpp + test/flatzinc/blocksworld_instance_2.cpp + test/flatzinc/bool_clause.cpp + test/flatzinc/bug232.cpp + test/flatzinc/bug319.cpp + test/flatzinc/bugfix_r6746.cpp + test/flatzinc/bugfix_r7854.cpp + test/flatzinc/cumulatives.cpp + test/flatzinc/cumulatives_full_1.cpp + test/flatzinc/cumulatives_full_2.cpp + test/flatzinc/cumulatives_full_3.cpp + test/flatzinc/cumulatives_full_4.cpp + test/flatzinc/cumulatives_full_5.cpp + test/flatzinc/cumulatives_full_6.cpp + test/flatzinc/cumulatives_full_7.cpp + test/flatzinc/cumulatives_full_8.cpp + test/flatzinc/cutstock.cpp + test/flatzinc/empty_domain_1.cpp + test/flatzinc/empty_domain_2.cpp + test/flatzinc/eq20.cpp + test/flatzinc/factory_planning_instance.cpp + test/flatzinc/golomb.cpp + test/flatzinc/int_set_as_type1.cpp + test/flatzinc/int_set_as_type2.cpp + test/flatzinc/jobshop.cpp + test/flatzinc/jobshop2x2.cpp + test/flatzinc/knights.cpp + test/flatzinc/langford2.cpp + test/flatzinc/latin_squares_fd.cpp + test/flatzinc/magicsq_3.cpp + test/flatzinc/magicsq_4.cpp + test/flatzinc/magicsq_5.cpp + test/flatzinc/multidim_knapsack_simple.cpp + test/flatzinc/no_warn_empty_domain.cpp + test/flatzinc/on_restart_complete.cpp + test/flatzinc/on_restart_last_val_bool.cpp + test/flatzinc/on_restart_last_val_float.cpp + test/flatzinc/on_restart_last_val_int.cpp + test/flatzinc/on_restart_last_val_set.cpp + test/flatzinc/on_restart_sol_bool.cpp + test/flatzinc/on_restart_sol_float.cpp + test/flatzinc/on_restart_sol_int.cpp + test/flatzinc/on_restart_sol_set.cpp + test/flatzinc/oss.cpp + test/flatzinc/output_test.cpp + test/flatzinc/packing.cpp + test/flatzinc/perfsq.cpp + test/flatzinc/perfsq2.cpp + test/flatzinc/photo.cpp + test/flatzinc/product_fd.cpp + test/flatzinc/product_lp.cpp + test/flatzinc/quasigroup_qg5.cpp + test/flatzinc/queen_cp2.cpp + test/flatzinc/queen_ip.cpp + test/flatzinc/queens4.cpp + test/flatzinc/radiation.cpp + test/flatzinc/sat_arith1.cpp + test/flatzinc/sat_array_bool_and.cpp + test/flatzinc/sat_array_bool_or.cpp + test/flatzinc/sat_cmp_reif.cpp + test/flatzinc/sat_eq_reif.cpp + test/flatzinc/shared_array_element.cpp + test/flatzinc/simple_sat.cpp + test/flatzinc/singHoist2.cpp + test/flatzinc/steiner_triples.cpp + test/flatzinc/subtyping.cpp + test/flatzinc/sudoku.cpp + test/flatzinc/template_design.cpp + test/flatzinc/tenpenki_1.cpp + test/flatzinc/tenpenki_2.cpp + test/flatzinc/tenpenki_3.cpp + test/flatzinc/tenpenki_4.cpp + test/flatzinc/tenpenki_5.cpp + test/flatzinc/tenpenki_6.cpp + test/flatzinc/test_approx_bnb.cpp + test/flatzinc/test_array_just_right.cpp + test/flatzinc/test_assigned_var_bounds_bad.cpp + test/flatzinc/test_flatzinc_output_anns.cpp + test/flatzinc/test_fzn_arith.cpp + test/flatzinc/test_fzn_arrays.cpp + test/flatzinc/test_fzn_coercions.cpp + test/flatzinc/test_fzn_comparison.cpp + test/flatzinc/test_fzn_logic.cpp + test/flatzinc/test_fzn_sets.cpp + test/flatzinc/test_int_div.cpp + test/flatzinc/test_int_mod.cpp + test/flatzinc/test_int_ranges_as_values.cpp + test/flatzinc/test_seq_search.cpp + test/flatzinc/timetabling.cpp + test/flatzinc/trucking.cpp + test/flatzinc/warehouses.cpp + test/flatzinc/warehouses_small.cpp + test/flatzinc/wolf_goat_cabbage.cpp + test/flatzinc/zebra.cpp + test/float.cpp + test/float/arithmetic.cpp + test/float/basic.cpp + test/float/channel.cpp + test/float/dom.cpp + test/float/linear.cpp + test/float/mm-lin.cpp + test/float/rel.cpp + test/float/transcendental.cpp + test/float/trigonometric.cpp + test/groups.cpp + test/int.cpp + test/int/arithmetic.cpp + test/int/basic.cpp + test/int/bin-packing.cpp + test/int/bool.cpp + test/int/channel.cpp + test/int/circuit.cpp + test/int/count.cpp + test/int/cumulative.cpp + test/int/cumulatives.cpp + test/int/distinct.cpp + test/int/dom.cpp + test/int/element.cpp + test/int/exec.cpp + test/int/extensional.cpp + test/int/gcc.cpp + test/int/linear.cpp + test/int/member.cpp + test/int/mm-arithmetic.cpp + test/int/mm-bool.cpp + test/int/mm-count.cpp + test/int/mm-lin.cpp + test/int/mm-rel.cpp + test/int/no-overlap.cpp + test/int/nvalues.cpp + test/int/order.cpp + test/int/precede.cpp + test/int/rel.cpp + test/int/sequence.cpp + test/int/sorted.cpp + test/int/unary.cpp + test/int/unshare.cpp + test/ldsb.cpp + test/nogoods.cpp + test/region.cpp + test/search.cpp + test/set.cpp + test/set/channel.cpp + test/set/construct.cpp + test/set/convex.cpp + test/set/distinct.cpp + test/set/dom.cpp + test/set/element.cpp + test/set/exec.cpp + test/set/int.cpp + test/set/mm-set.cpp + test/set/precede.cpp + test/set/rel-op-const.cpp + test/set/rel-op.cpp + test/set/rel.cpp + test/set/sequence.cpp + test/test.cpp +) set(GECODE_FLATZINC_EXE_SOURCE tools/flatzinc/fzn-gecode.cpp) diff --git a/configure.ac b/configure.ac index 09c73aa220..3303bee802 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,3 @@ -dnl This file was generated by Makefile.contribs. -dnl Do not edit! Modifications will get lost! -dnl Edit configure.ac.in instead. - dnl dnl Main authors: dnl Guido Tack @@ -231,10 +227,6 @@ dnl find out what parts the user wants to build AC_GECODE_DOC_SWITCHES -dnl ------------------------------------------------------------------ -dnl Enabling of non-variable contribs -dnl @CONTRIBS@ - dnl ------------------------------------------------------------------ dnl Definition of variable types diff --git a/configure.ac.in b/configure.ac.in index 3420b4f699..3303bee802 100755 --- a/configure.ac.in +++ b/configure.ac.in @@ -227,10 +227,6 @@ dnl find out what parts the user wants to build AC_GECODE_DOC_SWITCHES -dnl ------------------------------------------------------------------ -dnl Enabling of non-variable contribs -dnl @CONTRIBS@ - dnl ------------------------------------------------------------------ dnl Definition of variable types diff --git a/contribs/README b/contribs/README deleted file mode 100644 index 0a341c64ab..0000000000 --- a/contribs/README +++ /dev/null @@ -1,26 +0,0 @@ - GECODE CONTRIBUTIONS -====================================================================== - -1. External contributions -This directory contains external contributions to the Gecode -system. Please see our web pages for more information about the -contributors: - -http://www.gecode.org/contributions.html - -2. Installation -The contributions are distributed together with Gecode to ease -compilation and installation. They are not enabled by default. Please -refer to the installation instructions in the individual -subdirectories if you want to use these contributions. - -3. License issues -The external contributions may be distributed under a license that is -different from the Gecode license. Please see the individual LICENSE -files in the contributed subdirectories. - -4. Bugs -Please do not use the Gecode bugtracking system to report bugs in -external contributions. If you find bugs in contributed code, please -see the contributors' web pages for information on how to contact -them. diff --git a/contribs/qecode/AbstractWorker.hh b/contribs/qecode/AbstractWorker.hh deleted file mode 100755 index a3367df1cc..0000000000 --- a/contribs/qecode/AbstractWorker.hh +++ /dev/null @@ -1,42 +0,0 @@ - /**** , [ Worker.hh ], -Copyright (c) 2010 Universite de Caen Basse Normandie - Jeremie Vautard - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - *************************************************************************/ - -#ifndef __QECODE_ABSTRACT_WORKER__ -#define __QECODE_ABSTRACT_WORKER__ -#include "qecode.hh" -#include -#include "gecode/support.hh" - -using namespace Gecode::Support; - -class QECODE_VTABLE_EXPORT AQWorker : public Runnable { - -public: - QECODE_EXPORT virtual void stopAndReturn()=0; - QECODE_EXPORT virtual void stopAndForget()=0; - QECODE_EXPORT virtual vector workPosition()=0; - QECODE_EXPORT virtual bool mustStop()=0; - QECODE_EXPORT virtual void wake()=0; -// QECODE_EXPORT Strategy solve(); -}; - -#endif diff --git a/contribs/qecode/Doxyfile b/contribs/qecode/Doxyfile deleted file mode 100644 index 8399f58a53..0000000000 --- a/contribs/qecode/Doxyfile +++ /dev/null @@ -1,263 +0,0 @@ -# Doxyfile 1.5.2 - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- -DOXYFILE_ENCODING = UTF-8 -PROJECT_NAME = qecode -PROJECT_NUMBER = 2.1.0 -OUTPUT_DIRECTORY = ./doc -CREATE_SUBDIRS = NO -OUTPUT_LANGUAGE = English -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = YES -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the -ALWAYS_DETAILED_SEC = NO -INLINE_INHERITED_MEMB = NO -FULL_PATH_NAMES = YES -STRIP_FROM_PATH = /Applications/ -STRIP_FROM_INC_PATH = -SHORT_NAMES = NO -JAVADOC_AUTOBRIEF = NO -MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO -INHERIT_DOCS = YES -SEPARATE_MEMBER_PAGES = NO -TAB_SIZE = 9 -ALIASES = -OPTIMIZE_OUTPUT_FOR_C = NO -OPTIMIZE_OUTPUT_JAVA = NO -BUILTIN_STL_SUPPORT = NO -CPP_CLI_SUPPORT = NO -DISTRIBUTE_GROUP_DOC = NO -SUBGROUPING = YES -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- -EXTRACT_ALL = YES -EXTRACT_PRIVATE = YES -EXTRACT_STATIC = YES -EXTRACT_LOCAL_CLASSES = YES -EXTRACT_LOCAL_METHODS = NO -HIDE_UNDOC_MEMBERS = NO -HIDE_UNDOC_CLASSES = NO -HIDE_FRIEND_COMPOUNDS = NO -HIDE_IN_BODY_DOCS = NO -INTERNAL_DOCS = NO -CASE_SENSE_NAMES = NO -HIDE_SCOPE_NAMES = NO -SHOW_INCLUDE_FILES = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = YES -SORT_BRIEF_DOCS = NO -SORT_BY_SCOPE_NAME = NO -GENERATE_TODOLIST = YES -GENERATE_TESTLIST = YES -GENERATE_BUGLIST = YES -GENERATE_DEPRECATEDLIST= YES -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 30 -SHOW_USED_FILES = YES -SHOW_DIRECTORIES = NO -FILE_VERSION_FILTER = -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = NO -WARNINGS = YES -WARN_IF_UNDOCUMENTED = YES -WARN_IF_DOC_ERROR = YES -WARN_NO_PARAMDOC = NO -WARN_FORMAT = "$file:$line: $text" -WARN_LOGFILE = -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = . -INPUT_ENCODING = UTF-8 -FILE_PATTERNS = *.c \ - *.cc \ - *.cxx \ - *.cpp \ - *.c++ \ - *.d \ - *.java \ - *.ii \ - *.ixx \ - *.ipp \ - *.i++ \ - *.inl \ - *.h \ - *.hh \ - *.hxx \ - *.hpp \ - *.h++ \ - *.idl \ - *.odl \ - *.cs \ - *.php \ - *.php3 \ - *.inc \ - *.m \ - *.mm \ - *.dox \ - *.py -RECURSIVE = YES -EXCLUDE = -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = -EXCLUDE_SYMBOLS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = * -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = -FILTER_PATTERNS = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = YES -INLINE_SOURCES = NO -STRIP_CODE_COMMENTS = YES -REFERENCED_BY_RELATION = YES -REFERENCES_RELATION = YES -REFERENCES_LINK_SOURCE = YES -USE_HTAGS = NO -VERBATIM_HEADERS = YES -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = YES -COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = html -HTML_FILE_EXTENSION = .html -HTML_HEADER = -HTML_FOOTER = -HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO -CHM_FILE = -HHC_LOCATION = -GENERATE_CHI = NO -BINARY_TOC = NO -TOC_EXPAND = NO -DISABLE_INDEX = NO -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = NO -TREEVIEW_WIDTH = 250 -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = NO -LATEX_OUTPUT = latex -LATEX_CMD_NAME = latex -MAKEINDEX_CMD_NAME = makeindex -COMPACT_LATEX = NO -PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = -PDF_HYPERLINKS = NO -USE_PDFLATEX = NO -LATEX_BATCHMODE = NO -LATEX_HIDE_INDICES = NO -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = rtf -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = NO -MAN_OUTPUT = man -MAN_EXTENSION = .3 -MAN_LINKS = NO -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = -XML_PROGRAMLISTING = YES -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- -TAGFILES = -GENERATE_TAGFILE = -ALLEXTERNALS = NO -EXTERNAL_GROUPS = YES -PERL_PATH = /usr/bin/perl -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = NO -MSCGEN_PATH = /Applications/Doxygen.app/Contents/Resources/ -HIDE_UNDOC_RELATIONS = YES -HAVE_DOT = YES -CLASS_GRAPH = YES -COLLABORATION_GRAPH = YES -GROUP_GRAPHS = YES -UML_LOOK = NO -TEMPLATE_RELATIONS = NO -INCLUDE_GRAPH = YES -INCLUDED_BY_GRAPH = YES -CALL_GRAPH = NO -CALLER_GRAPH = NO -GRAPHICAL_HIERARCHY = YES -DIRECTORY_GRAPH = YES -DOT_IMAGE_FORMAT = png -DOT_PATH = /Applications/Doxygen.app/Contents/Resources/ -DOTFILE_DIRS = -DOT_GRAPH_MAX_NODES = 50 -DOT_TRANSPARENT = NO -DOT_MULTI_TARGETS = NO -GENERATE_LEGEND = YES -DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = NO diff --git a/contribs/qecode/Makefile.in.in b/contribs/qecode/Makefile.in.in deleted file mode 100644 index acd10dbb0e..0000000000 --- a/contribs/qecode/Makefile.in.in +++ /dev/null @@ -1,162 +0,0 @@ -# Qecode Makefile -# Largely inspired from the map makefile by Gregoire Dooms -# -# Jeremie Vautard, Universite d'Orleans - -# -gecode_top_srcdir = ../../$(top_srcdir) -gecode_top_builddir = ../.. - -qecode_top_srcdir = $(gecode_top_srcdir)/contribs/qecode -qecode_top_builddir = . - -KERNELDLL := $(KERNELDLL:%=../../%) -INTDLL := $(INTDLL:%=../../%) -MMDLL := $(MMDLL:%=../../%) -SEARCHDLL := $(SEARCHDLL:%=../../%) -SUPPORTDLL := $(SUPPORTDLL:%=../../%) -SUPPORTOBJ := $(SUPPORTOBJ:%=../../%) - - -ifeq "$(LIBPREFIX)" "$(LINKPREFIX)" -LINKSUPPORT:=../../$(LINKSUPPORT) -LINKKERNEL:=../../$(LINKKERNEL) -LINKINT:=../../$(LINKINT) -LINKMM:=../../$(LINKMM) -LINKSEARCH:=../../$(LINKSEARCH) -LINKALL := $(LINKMM) $(LINKINT) $(LINKSEARCH) $(LINKKERNEL) -else -EXTRALINKFLAGS := -L../.. -endif - -# -# QECODE COMPONENTS -# - -QECODESRC0 = QCOPPlus.cc myspace.cc OptVar.cc qsolver_qcop.cc qsolver_qcsp.cc Strategy.cc StrategyNode.cc QCSPPlusUnblockable.cc qsolver_unblockable.cc UnblockableViewValBranching.cc Work.cc Worker.cc WorkManager.cc qsolver_parallel.cc -QECODEHDR0 = - - -QECODESRC = $(QECODESRC0) -QECODEHDR = qecode.hh $(QECODEHDR0) -QECODEOBJ = $(QECODESRC:%.cc=%$(OBJSUFFIX)) -QECODEFLAGS = \ - -I$(gecode_top_srcdir) -I$(gecode_top_builddir) \ - -I$(qecode_top_srcdir) -I$(qecode_top_builddir) \ - -L$(gecode_top_builddir) -L$(qecode_top_builddir) -QECODEDLL = $(LIBPREFIX)@QECODE@$(DLLSUFFIX) -QECODESTATICLIB = $(LIBPREFIX)@QECODE@$(STATICLIBSUFFIX) -QECODELIB = $(LIBPREFIX)@QECODE@$(LIBSUFFIX) -LINKQECODE = $(LINKPREFIX)@QECODE@$(LINKSUFFIX) - -LINKALL := $(LINKALL) $(LINKQECODE) - -ALLLIB := $(ALLLIB) $(QECODELIB) - - -ifeq "@BUILDDLL@" "yes" -DLLTARGETS = $(QECODEDLL) -else -DLTARGETS= -endif - -ifeq "@BUILDSTATIC@" "yes" -STATICTARGETS = \ - $(QECODESTATICLIB) -else -STATICTARGETS= -endif - -LIBTARGETS= $(DLLTARGETS) $(STATICTARGETS) - - -all : $(LIBTARGETS) - -# -# Object targets -# - -%$(OBJSUFFIX): $(qecode_top_srcdir)/%.cc - $(CXX) $(CXXFLAGS) $(QECODEFLAGS) \ - @COMPILEOBJ@$@ @CXXIN@ $< -%$(SBJSUFFIX): $(qecode_top_srcdir)/%.cc - $(CXX) $(CXXFLAGS) $(QECODEFLAGS) \ - @COMPILESBJ@$@ @CXXIN@ $< - - - - -# -# DLL Targets -# - -ifeq "$(DLLSUFFIX)" "$(LIBSUFFIX)" -#linux -$(QECODEDLL): $(QECODEOBJ) $(KERNELDLL) $(INTDLL) $(SEARCHDLL) $(SUPPORTDLL) $(MMDLL) - $(CXX) $(DLLFLAGS) $(QECODEOBJ) $(QECODEFLAGS) \ - @DLLPATH@ $(LINKKERNEL) $(LINKSEARCH) $(LINKINT) $(LINKMM) $(LINKSUPPORT) \ - @LINKOUTPUT@$(QECODEDLL) - $(CREATELINK) $@ $(@:%$(DLLSUFFIX)=%$(SOLINKSUFFIX)) - $(CREATELINK) $@ $(@:%$(DLLSUFFIX)=%$(SOSUFFIX)) -else -#win -$(QECODEDLL) $(QECODELIB): $(QECODEOBJ) $(KERNELDLL) $(INTDLL) $(SEARCHDLL) $(SUPPORTDLL) $(MMDLL) - $(CXX) $(DLLFLAGS) $(QECODEOBJ) $(QECODEFLAGS)\ - @DLLPATH@ $(LINKKERNEL) $(LINKSEARCH) $(LINKINT) $(LINKMM) $(LINKSUPPORT) \ - @LINKOUTPUT@$(QECODEDLL) -endif - - -# -# Static libraries -# - -$(QECODESTATICLIB): $(QECODEOBJ) - $(AR) $(ARFLAGS) $@ $(QECODEOBJ) - $(RANLIB) $@ - -# -# EXE targets -# -# - - -#for linux: ? -CXXFLAGS := $(CXXFLAGS) $(QECODEFLAGS) - -# -# Autoconf -# - -$(qecode_top_srcdir)/configure: $(qecode_top_srcdir)/configure.ac - (cd $(qecode_top_srcdir) && autoconf) -config.status: $(qecode_top_srcdir)/configure - ../../config.status --recheck - ./config.status --recheck -# use the sustitutions from gecode to generate the Makefile.in -Makefile.in: $(qecode_top_srcdir)/Makefile.in.in ../../config.status - ../../config.status \ - --file Makefile.in:$(qecode_top_srcdir)/Makefile.in.in - -# use the sustitutions from configure to generate the Makefile -Makefile: Makefile.in ./config.status - ./config.status --file ./Makefile:./Makefile.in - - -.PHONY: clean veryclean distclean -clean: - $(RMF) $(QECODEOBJ) $(QECODESBJ) - -veryclean: clean - $(RMF) $(LIBTARGETS) - $(RMF) $(LIBTARGETS:%$(DLLSUFFIX)=%.exp) $(LIBTARGETS:%$(DLLSUFFIX)=%.lib) - $(RMF) $(LIBTARGETS:%$(DLLSUFFIX)=%.ilk) $(LIBTARGETS:%$(DLLSUFFIX)=%.pdb) - $(RMF) $(QECODEDLL) - -distclean: veryclean - $(RMF) config.log config.status - -.PHONY: doc -doc: $(QECODEHDR) $(QECODESRC) - mkdir -p doc/html - doxygen doxygen.conf diff --git a/contribs/qecode/OptVar.cc b/contribs/qecode/OptVar.cc deleted file mode 100644 index df4e1f9fcf..0000000000 --- a/contribs/qecode/OptVar.cc +++ /dev/null @@ -1,82 +0,0 @@ -/**** , [ OptVar.cc ], -Copyright (c) 2008 Universite d'Orleans - Jeremie Vautard - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - *************************************************************************/ - -#include "OptVar.hh" - -ExistOptVar::ExistOptVar(int var,int scope) { - varId = var; - scopeId=scope; -} - -int ExistOptVar::getVal(Strategy s) { -// cout<<"getval on existoptvar "< scopeId) {cout<<"EOV "< values; values.clear(); - if (s.isFalse()) {cout<<"UOV Try to get opt value on FALSE"<eval(values); - if (s.isDummy()) { - for (int i=0;igetVal(s.getChild(i))); - } - return fct->eval(values); - } - - if (s.scope() == (scopeId-1)) { - for (int i=0;igetVal(s.getChild(i))); - } - return fct->eval(values); - } - - if (s.scope() < (scopeId-1) ) { - if (s.quantifier()) {cout<<"UOV universal scope too soon"< scope-1 -> too far away - cout<<"UOV try to get aggregate on a substrategy not containing required scope"< - -/** \brief Abstract class for an Aggregator -* -* An aggregator is defined as a function Multiset_of_int -> int. From an implementation -* point of view, this multiset is a vector of int. -*/ -class QECODE_VTABLE_EXPORT Aggregator { -public: - virtual int eval(vector values)=0; - virtual ~Aggregator() {} -}; - -/** \brief Sum aggregator -* -* This aggregator computes the sum of all elements of the multiset -*/ -class QECODE_VTABLE_EXPORT AggregatorSum : public Aggregator{ -public: - QECODE_EXPORT virtual int eval(vector values) { - int cpt=0; - for (int i=0;i values) { - int size=values.size(); - if (size == 0) return 0; - int cpt=0; - for (int i=0;invar = nv; - for (int i=0;iv[var] = new IntVar(*rules[i],min,max); - rules[i]->type_of_v[var] = VTYPE_INT; - } - goal->v[var] = new IntVar(*goal,min,max); - goal->type_of_v[var] = VTYPE_INT; - varInitialised[var]=true; - type_of_v[var]=VTYPE_INT; -} - - -void Qcop::QIntVar(int var,IntSet dom) { - if (varInitialised[var]) { - cout<<"Variable "<v[var] = new IntVar(*rules[i],dom); - rules[i]->type_of_v[var] = VTYPE_INT; - } - goal->v[var] = new IntVar(*goal,dom); - goal->type_of_v[var] = VTYPE_INT; - varInitialised[var]=true; - type_of_v[var]=VTYPE_INT; -} - - -void Qcop::QBoolVar(int var) { - if (varInitialised[var]) { - cout<<"Variable "<v[var] = new BoolVar(*rules[i],0,1); - rules[i]->type_of_v[var]=VTYPE_BOOL; - } - goal->v[var] = new BoolVar(*goal,0,1); - goal->type_of_v[var]=VTYPE_BOOL; - varInitialised[var]=true; - type_of_v[var]=VTYPE_BOOL; -} - -MySpace* Qcop::space() { - if (currentDeclareSpace(space()->v[n])); -} - - -BoolVar Qcop::bvar(int n) { - if (!varInitialised[n]) { - cout<<"Variable "<(space()->v[n])); -} - - -int Qcop::nextScope() { - if (currentDeclareSpace == -1) return -1; - currentDeclareSpace++; - if (currentDeclareSpace>nbSpaces) return -1; - return currentDeclareSpace; -} - -void Qcop::makeStructure() { - for (unsigned int i=0;inbSpaces;i++) { - if (rules[i]->status() == SS_FAILED) { - cout<<"MakeStructure : rule space "<status() == SS_FAILED) { - cout<<"MakeStructure : goal space is already failed."<getScope() < scope) {cout<<"aggregated variable out of aggregator scope"<getScope();i++) // Universelle entre aggregateur et variable aggrŽgŽe - if (Quantifiers[i]) - {cout<<"Universal scope between variable and aggregator"<getScope() < scope) {cout<<"optvar out of optimizing scope"<getScope();i++) { - if (Quantifiers[i]) // universelle entre variable et dŽcideur - { cout<<"universal scope between variable and optimizing scope"<nbSpaces) { - cout<<"I return NULL coz of bad scope value (<0)"<status() == SS_FAILED) { - cout<<"I return NULL coz goal is failed"<(goal->clone()); - } - if (rules[scope]->status() == SS_FAILED) { - cout<<"I return NULL coz scope "<(rules[scope]->clone())); -} - - -MySpace* Qcop::getGoal() { - if (goal->status() == SS_FAILED) return NULL; - return static_cast(goal->clone()); -} - - -int Qcop::getOptType(int scope) { - if (Quantifiers[scope]) {cout<<"Try to get OptType on universal scope"<(optim[scope].vars[0]); -} - -Qcop* Qcop::clone() { - bool* qt = new bool[nbSpaces]; - int* nvv = new int[nbSpaces]; - MySpace** zerulz = new MySpace*[nbSpaces]; - Opts* opop = new Opts[nbSpaces]; - int* nbvbs = new int[nbSpaces]; - for (unsigned int i=0;i < nbSpaces;i++) { - qt[i] = this->Quantifiers[i]; - nvv[i] = this->nvar[i]; - zerulz[i] = static_cast(this->rules[i]->clone(false)); - opop[i] = this->optim[i]; - nbvbs[i] = this->nbVarBySpace[i]; - } - - // void** v = new void*[this->n]; - VarType* typeofv = new VarType[n]; - int* wso = new int[n]; - for (unsigned int i=0;itype_of_v[i]; - wso[i] = this->whichSpaceOwns[i]; - } - - Qcop* ret = new Qcop(); - ret->nvar = nvv; - ret->n = this->n; - ret->nbSpaces = this->nbSpaces; - ret->type_of_v = typeofv; - ret->Quantifiers = qt; - ret->rules = zerulz; - ret->goal = static_cast(this->goal->clone(false)); - ret->optim = opop; - ret->nbVarBySpace = nbvbs; - ret->whichSpaceOwns = wso; - ret->varInitialised = this->varInitialised; - currentDeclareSpace = this->currentDeclareSpace; - -return ret; -} \ No newline at end of file diff --git a/contribs/qecode/QCOPPlus.hh b/contribs/qecode/QCOPPlus.hh deleted file mode 100755 index 882386e9d3..0000000000 --- a/contribs/qecode/QCOPPlus.hh +++ /dev/null @@ -1,166 +0,0 @@ -/**** , [ QCOPPlus.hh ], - Copyright (c) 2009 Universite d'Orleans - Jeremie Vautard - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - *************************************************************************/ - -#ifndef __QECODE_QCOP__ -#define __QECODE_QCOP__ - -#include "myspace.hh" -#include "vartype.hh" -#include "OptVar.hh" -#include - - -using namespace std; -using namespace Gecode; -class QECODE_VTABLE_EXPORT Qcop { -private: - struct Opts { - vector vars; // Several Optvars in universal scopes, one in existential ones - int opt_type; // Used in existential scopes : 0 for ANY, 1 for MIN, 2 for MAX. - }; - int* nvar; - int n; - int nbSpaces; -// void** v; - VarType* type_of_v; - - bool* Quantifiers; - MySpace** rules; - MySpace* goal; - Opts* optim; - int* nbVarBySpace; - int* whichSpaceOwns; - bool* varInitialised; - - int currentDeclareSpace; - Qcop() {} -public: - forceinline QECODE_EXPORT int nv() {return n;} - - /** \brief Default constructor for a restricted-quantified space - * - * This is the first step for building a QCSP+/QCOP+ problem. The prefix is defined here. - * @param ns The number of scopes in the prefix. - * @param quant Array of booleans which contains the quantifier of every scope (true for universal, false for existential). - * @param nv Array of integer which contains the number of variables by scope. - */ - QECODE_EXPORT Qcop(int ns, bool* quant,int* nv); - QECODE_EXPORT ~Qcop(); - - /** \brief Defines an integer variable in the quantified space - * - * Defines an integer variable in the quantifies space using a fully declared domain. - * @param var Number of the variable to be defined. - * @param dom The initial domain of the variable. - */ - QECODE_EXPORT void QIntVar(int var,int min,int max); - - /** \brief Defines an integer variable in the quantified space - * - * Defines an integer variable in the quantifies space using a fully declared domain. - * @param var Number of the variable to be defined. - * @param dom The initial domain of the variable. - */ - QECODE_EXPORT void QIntVar(int var,IntSet dom); - - /** \brief Defines a boolean variable in the quantified space - * - * Defines a boolean variable with a full initial domain in the quantified space. - * @param var Number of the variable to be defined. - */ - QECODE_EXPORT void QBoolVar(int var); - - /** \brief Returns the current declarating space - * - * Return the space we are currently declarating constraints in. nextScope() is used to set the nextspace as the current one. - */ - QECODE_EXPORT MySpace* space(); - - /** \brief Returns an integer variable from the space we are currently declaring - * - * Returns an integer variable from the cpace we are currently declaring. Will abort if the variable is not integer. - * @param n The number of the variable to return. - */ - QECODE_EXPORT IntVar var(int n); - - /** \brief Returns a boolean variable from the space we are currently declaring - * - * Returns a boolean variable from the space we are currently declaring. Will abort if the variable is not boolean. - * @param n The number of the variable to return. - */ - QECODE_EXPORT BoolVar bvar(int n); - - /** \brief Switch to the next space for constraint declaration - * - * Switches to the next space for constraint declaration. var, bvar and space methods will now refer to the next rule space (or to the goal space if the current space was the last rule one). - * Returns the new space number, or -1 if it was called while there was no next space to declare constraints in. - */ - QECODE_EXPORT int nextScope(); - - /** \brief Finalizes the object construction - * - * Finalizes the restricted-quantified space construction. Must be invoked once all the variable and all the constraints have been declared, and before the search is performed on this space. - * calling this method is not mandatory, although it is recommanded to besure that the problem have been well built. - * For the existential scopes on which an optimization condition have not been defined yet, this method will post a "Any" optimization condition (i.e. do not optimize). - */ - QECODE_EXPORT void makeStructure(); - - /** \brief returns an aggregate of the problem - * - * Creates an aggregate at a given universal scope. This aggregate is an optimization variable that an existential scope can use for optimizing. - * @param scope the scope where this aggregate will be defined. Must be an unversal scope - * @param opt The optimization variable we want to aggregate. There must not be any universal scope between an agregate and thisoptimization variable. - * @param agg The aggregator function that will be used for this aggregate. - */ - QECODE_EXPORT OptVar* getAggregate(int scope, OptVar* opt, Aggregator* agg); - - /** returns an existential optimization variable - * - * Creates an optimization variable that will have the value of an existential variable defined in the problem. - * @param var the number of the existential variable that must be considered - */ - QECODE_EXPORT OptVar* getExistential(int var); - - /** set an optimization condition on an existential scope - * - * set an optimization condition on a given existential scope of the problem. An optimizaiton condition is composed of an optimization variable (aggregate or existential variable), and of an - * optimization type. - * @param scope the scope on which the optimization condition is posted. Must be existential. - * @param optType the optimization type of the condision we post. 0 is for ANY, 1 is for MIN, 2 is for MAX. - * @param var the optimization variable to be minimized/maximized - */ - QECODE_EXPORT void optimize(int scope, int optType, OptVar* var); - // QECODE_EXPORT void print(); - - QECODE_EXPORT forceinline bool qt_of_var(int v) { return Quantifiers[whichSpaceOwns[v]];} ///< returns uantifier of variable 'v' - QECODE_EXPORT forceinline bool quantification(int scope) {return Quantifiers[scope];} ///< returns quantifier of scope 'scope' - QECODE_EXPORT int spaces(); ///< returns the number of scopes of the problem - QECODE_EXPORT forceinline int nbVarInScope(int scope) {return nbVarBySpace[scope];}///< returns the number of variables present in scope 'scope' - QECODE_EXPORT MySpace* getSpace(int scope);///< returns a copy of the Gecode::Space corresponding to the 'scope'-th restricted quantifier of the problem - QECODE_EXPORT MySpace* getGoal(); - QECODE_EXPORT int getOptType(int scope); ///< returns the optimization type of the 'scope'-th scope of the problem - QECODE_EXPORT OptVar* getOptVar(int scope);///< returns the optimization variable of the 'scope'-th scope of the problem - QECODE_EXPORT Qcop* clone(); ///< makes a copy of the quantified problem - QECODE_EXPORT forceinline int whoOwns(int var) {return whichSpaceOwns[var];} -}; - -#endif diff --git a/contribs/qecode/QCSPPlusUnblockable.cc b/contribs/qecode/QCSPPlusUnblockable.cc deleted file mode 100755 index 7e83c12e53..0000000000 --- a/contribs/qecode/QCSPPlusUnblockable.cc +++ /dev/null @@ -1,239 +0,0 @@ -/**** , [ QCSPPlusUnblockable.cc ], -Copyright (c) 2009 Universite d'Orleans - Jeremie Vautard - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - *************************************************************************/ - -#include "QCSPPlusUnblockable.hh" - -QcspUnblockable::QcspUnblockable(int ns,bool* quant,int* nv) { - n=0; - for (int i=0;i[nbSpaces]; - bvars = new vector[nbSpaces]; -} - - -QcspUnblockable::~QcspUnblockable() { - delete arul; - delete goal; -} - -int QcspUnblockable::spaces() { - return nbSpaces; -} - -void QcspUnblockable::QIntVar(int var,int min,int max) { - if (varInitialised[var]) { - cout<<"Variable "<v[var] = new IntVar(*arul,dom); - arul->type_of_v[var] = VTYPE_INT; - goal->v[var] = new IntVar(*goal,dom); - goal->type_of_v[var] = VTYPE_INT; - varInitialised[var]=true; - type_of_v[var]=VTYPE_INT; -} - - -void QcspUnblockable::QBoolVar(int var) { - if (varInitialised[var]) { - cout<<"Variable "<v[var] = new BoolVar(*arul,0,1); - arul->type_of_v[var]=VTYPE_BOOL; - goal->v[var] = new BoolVar(*goal,0,1); - goal->type_of_v[var]=VTYPE_BOOL; - varInitialised[var]=true; - type_of_v[var]=VTYPE_BOOL; -} - -MySpace* QcspUnblockable::space() { - if (currentDeclareSpace(space()->v[n])); -} - -BoolVar QcspUnblockable::bvar(int n) { - if (!varInitialised[n]) { - cout<<"Variable "<(space()->v[n])); -} - -int QcspUnblockable::nextScope() { - if (currentDeclareSpace == -1) return -1; - currentDeclareSpace++; - if (currentDeclareSpace>nbSpaces) return -1; - return currentDeclareSpace; -} - -void QcspUnblockable::makeStructure() { - for (unsigned int i=0;inbSpaces) { - cout<<"I return NULL coz of bad scope value (<0)"<status() == SS_FAILED) { - cout<<"I return NULL coz goal is failed"<(goal->clone()); - } - if (arul->status() == SS_FAILED) { - cout<<"I return NULL coz scope "<(arul->clone())); - IntVarArgs iva(vars[scope].size()); - BoolVarArgs bva(bvars[scope].size()); - // cout << "sizes : " <(ret->v[idx]) ); - } - for (int i=0;i(ret->v[idx]) ); - } - br->branch(ret,iva,bva); - - return ret; -} - - -MySpace* QcspUnblockable::getGoal() { - if (goal->status() == SS_FAILED) return NULL; - return static_cast(goal->clone()); -} - - -void QcspUnblockable::branch(UnblockableBranching* b) { - br=b; -} diff --git a/contribs/qecode/QCSPPlusUnblockable.hh b/contribs/qecode/QCSPPlusUnblockable.hh deleted file mode 100755 index 8f11e25abd..0000000000 --- a/contribs/qecode/QCSPPlusUnblockable.hh +++ /dev/null @@ -1,140 +0,0 @@ -/**** , [ QCSPPlusUnblockable.hh ], -Copyright (c) 2009 Universite d'Orleans - Jeremie Vautard - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - *************************************************************************/ - -#ifndef __QECODE_UNBLOCKABLE__ -#define __QECODE_UNBLOCKABLE__ - -#include -#include -#include "qecode.hh" -#include "vartype.hh" -#include "UnblockableBranching.hh" -#include "myspace.hh" - - -using namespace std; -using namespace Gecode; - -class QECODE_VTABLE_EXPORT QcspUnblockable { -private : - - int n; - int nbSpaces; - void** v; - VarType* type_of_v; - int* whichSpaceOwns; - unsigned int currentDeclareSpace; - bool* Quantifiers; - MySpace* goal; - int* nbVarBySpace; - bool* varInitialised; - UnblockableBranching* br; - vector* vars; - vector* bvars; - MySpace* arul; - -public: - QECODE_EXPORT int nv() {return n;} - - /** \brief Default constructor for a restricted-quantified space - * - * This is the first step for building a QCSP+/QCOP+ problem. The prefix is defined here. - * @param ns The number of scopes in the prefix. - * @param quant Array of booleans which contains the quantifier of every scope (true for universal, false for existential). - * @param nv Array of integer which contains the number of variables by scope. - */ - QECODE_EXPORT QcspUnblockable(int ns, bool* quant,int* nv); - QECODE_EXPORT ~QcspUnblockable(); - - /** \brief Defines an integer variable in the quantified space - * - * Defines an integer variable in the quantifies space using a fully declared domain. - * @param var Number of the variable to be defined. - * @param dom The initial domain of the variable. - */ - QECODE_EXPORT void QIntVar(int var,int min,int max); - - /** \brief Defines an integer variable in the quantified space - * - * Defines an integer variable in the quantifies space using a fully declared domain. - * @param var Number of the variable to be defined. - * @param dom The initial domain of the variable. - */ - QECODE_EXPORT void QIntVar(int var,IntSet dom); - - /** \brief Defines a boolean variable in the quantified space - * - * Defines a boolean variable with a full initial domain in the quantified space. - * @param var Number of the variable to be defined. - */ - QECODE_EXPORT void QBoolVar(int var); - - /** \brief Returns the current declarating space - * - * Return the space we are currently declarating constraints in. nextScope() is used to set the nextspace as the current one. - */ - QECODE_EXPORT MySpace* space(); - - /** \brief Returns an integer variable from the space we are currently declaring - * - * Returns an integer variable from the cpace we are currently declaring. Will abort if the variable is not integer. - * @param n The number of the variable to return. - */ - QECODE_EXPORT IntVar var(int n); - - /** \brief Returns a boolean variable from the space we are currently declaring - * - * Returns a boolean variable from the space we are currently declaring. Will abort if the variable is not boolean. - * @param n The number of the variable to return. - */ - QECODE_EXPORT BoolVar bvar(int n); - - /** \brief Switch to the next space for constraint declaration - * - * Switches to the next space for constraint declaration. var, bvar and space methods will now refer to the next rule space (or to the goal space if the current space was the last rule one). - * Returns the new space number, or -1 if it was called while there was no next space to declare constraints in. - */ - QECODE_EXPORT int nextScope(); - - /** \brief Finalizes the object construction - * - * Finalizes the restricted-quantified space construction. Must be invoked once all the variable and all the constraints have been declared, and before the search is performed on this space. - * calling this method is not mandatory, although it is recommanded to besure that the problem have been well built. - * For the existential scopes on which an optimization condition have not been defined yet, this method will post a "Any" optimization condition (i.e. do not optimize). - */ - QECODE_EXPORT void makeStructure(); - - QECODE_EXPORT bool qt_of_var(int v); ///< returns uantifier of variable 'v' - QECODE_EXPORT bool quantification(int scope) {return Quantifiers[scope];} ///< returns quantifier of scope 'scope' - QECODE_EXPORT int spaces(); ///< returns the number of scopes of the problem - QECODE_EXPORT int nbVarInScope(int scope) {return nbVarBySpace[scope];}///< returns the number of variables present in scope 'scope' - QECODE_EXPORT MySpace* getSpace(int scope);///< returns a copy of the Gecode::Space corresponding to the scope-th restricted quantifier of the problem - QECODE_EXPORT MySpace* getGoal(); - - /** \brief sets the branching heuristic - * - * Declares the branching heuristic that will be used to solve this problem. - */ - QECODE_EXPORT void branch(UnblockableBranching* b); -}; - -#endif diff --git a/contribs/qecode/README b/contribs/qecode/README deleted file mode 100644 index aa701aa22d..0000000000 --- a/contribs/qecode/README +++ /dev/null @@ -1,6 +0,0 @@ -QeCode is a quantified constraint satisfaction problems (QCSP) solver based on Gecode. -It can also solve QCSP+, an extension of QCSP where quantifiers can be restricted and QCOP+, a quantified optimizaion problem formalism which scopes multi-level programming problems. - -QeCode have been developped at Universite d'Orleans by Jeremie Vautard, Arnaud Lallouet and Marco Benedetti. More info is available on -http://www.univ-orleans.fr/lifo/software/qecode/ - diff --git a/contribs/qecode/Strategy.cc b/contribs/qecode/Strategy.cc deleted file mode 100644 index 697ec1db1e..0000000000 --- a/contribs/qecode/Strategy.cc +++ /dev/null @@ -1,253 +0,0 @@ -/**** , [ bobocheTree.cc ], - Copyright (c) 2008 Universite d'Orleans - Jeremie Vautard - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - *************************************************************************/ - -#include "Strategy.hh" - -StrategyImp::StrategyImp() { - cout<<"Default constructor of StrategyImp should not be called !"<todosUpdate(i); -} - -StrategyImp::StrategyImp(StrategyNode tag) { - // cout<<"Strategy imp constructor"<::iterator i = nodes.begin();i != nodes.end();i++) { - if (((*i).imp->father) == this) { - (*i).imp->father = NULL; - } - } -} - - -Strategy::Strategy() { - // cout<<"strategy default"<imp = imp; - this->imp->pointers++; -} - -Strategy::Strategy(bool qt,int VMin, int VMax, int scope, vector values) { - // cout<<"strategy with values"<pointers)++; -} - - -Strategy& Strategy::operator = (const Strategy& rvalue) { - // cout<<"Strategy = "<pointers)--; - if ( (imp->pointers) == 0) { - // cout<<"no more references for the imp. Delete"<pointers)++; - return *this; -} - - -Strategy::~Strategy() { - // cout<<"strategy destructor"<pointers)--; - if ( (imp->pointers) == 0) { - // cout<<"no more references for the imp. Delete"<zetag; -} - -Strategy Strategy::getFather() { - if (hasFather()) return Strategy(imp->father); - return Dummy(); -} - -bool Strategy::hasFather() { - if (imp->father != NULL) { - for (int i=0;i< imp->father->nodes.size();i++) { - if ((imp->father->nodes[i].imp) == imp) - return true; - } - } - return false; -} - -Strategy Strategy::getChild(int i) { - if (i<0 || i>=degree() ) {cout<<"Child "<nodes[i]; -} - -Strategy Strategy::getSubStrategy(vector position) { - if (position.empty()) return *this; - int deg = degree(); - if (deg == 0) { - cout<<"Did not find substrategy"<attach(child.getChild(i)); - } - } - else { - imp->nodes.push_back(child); - todosUpdate(child.imp->todos); - (child.imp)->father = this->imp; - } -} - -void Strategy::detach(Strategy son) { - - vector::iterator it = imp->nodes.begin(); - while (it != (imp->nodes.end()) && ( (*it).id() != son.id())) { - it++;} - if ( it != imp->nodes.end()) { - todosUpdate(0-((*it).imp->todos)); - (*it).imp->father=NULL; - imp->nodes.erase(it); - } -} - - -void Strategy::detach(unsigned int i) { - if (imp->nodes.size() < i) return; - - vector::iterator it = imp->nodes.begin()+i; - todosUpdate(0-((*it).imp->todos)); - (*it).imp->father=NULL; - imp->nodes.erase(it); -} - -Strategy Strategy::STrue() { - Strategy ret(StrategyNode::STrue()); - return ret; -} - -Strategy Strategy::SFalse() { - Strategy ret(StrategyNode::SFalse()); - return ret; -} - -Strategy Strategy::Dummy() { - Strategy ret(StrategyNode::Dummy()); - return ret; -} - -Strategy Strategy::Stodo() { - Strategy ret(StrategyNode::Todo()); - ret.imp->todos=1; - return ret; -} - -vector Strategy::getPosition() { - vector ret; - Strategy asc = *this; - while (!asc.isDummy()) { -// cout<<"GetPosition adding "< ret2; - ret2.reserve(ret.size() + asc.values().size() +1); - for (int i=0;idegree());i++) { - if ( (((imp->nodes[i]).imp)->father) != imp) { - ret++; - cout<< (((imp->nodes[i]).imp)->father) << " should be " << imp < -#include -#include -#include "StrategyNode.hh" -#include "qecode.hh" - -using namespace std; -class Strategy; - -class StrategyImp { - friend class Strategy; -private: - unsigned int pointers; // number of Strategy objects pointing to this - StrategyNode zetag; // Node information - vector nodes; // children of this node - unsigned int todos; // number of todo nodes recursively present in the children - StrategyImp* father; - void todosUpdate(int i); - StrategyImp(); - -public: - StrategyImp(StrategyNode tag); - ~StrategyImp(); -}; - -/** \brief Strategy of a QCSP+ problem - * - * This class represents a solution of a QCSP+. Basically it consists in the tree-representation of the winning strategy. - * 3 spacial cases exists : the trivially true strategy, the trivially false strategy (used for the UNSAT answer), - * and the "Dummy" node, used to link together each tree of a strategy which first player is universal (such a strategy is not a tree but a forest) - */ -class QECODE_VTABLE_EXPORT Strategy { - friend class StrategyImp; -private: - StrategyImp* imp; - void todosUpdate(int i) {imp->todosUpdate(i);} - Strategy(StrategyImp* imp); -public: - QECODE_EXPORT Strategy(); ///< default constructor - QECODE_EXPORT Strategy(StrategyNode tag); ///< builds a strategy on a given strategy node (deprecated) - - /* \brief builds a one node (sub)strategy - * - * this method builds a one-node strategy that will typically be attached as child of another strategy. A strategy node embeds informations about quantification, - * scope and values of variables that must be provided - * @param qt quantifier of the scope this node represents - * @param VMin index of the first variable of the scope this node represents - * @param VMax index of the last variable of the scope this node represents - * @param values values taken by the variables between VMin and VMax in this part of the strategy - */ - QECODE_EXPORT Strategy(bool qt,int VMin, int VMax, int scope,vector values); - QECODE_EXPORT Strategy(const Strategy& tree); ///< copy constructor - QECODE_EXPORT Strategy& operator = (const Strategy& rvalue); - QECODE_EXPORT ~Strategy(); - QECODE_EXPORT StrategyNode getTag();///< DEPRECATED returns the StrategyNode object corresponding to the root of this strategy - QECODE_EXPORT forceinline unsigned int degree() {return imp->nodes.size();}///< returns this strategy's number of children - QECODE_EXPORT Strategy getChild(int i); ///< returns the i-th child of this strategy - QECODE_EXPORT Strategy getFather(); - QECODE_EXPORT bool hasFather(); - QECODE_EXPORT Strategy getSubStrategy(vector position); ///< returns the substrategy at given position, dummy if does not exists - QECODE_EXPORT void attach(Strategy child);///< attach the strategy given in parameter as a child of the current strategy - QECODE_EXPORT void detach(unsigned int i); ///< detach the i-th child of this strategy (provided it exists) - QECODE_EXPORT void detach(Strategy son); - QECODE_EXPORT forceinline bool isFalse() {return imp->zetag.isFalse();} ///< returns wether this strategy represents the UNSAT answer - QECODE_EXPORT forceinline bool isTrue() {return imp->zetag.isTrue();} ///< returns wether this strategy is trivially true - QECODE_EXPORT forceinline bool isComplete() {return ((imp->todos) == 0);} ///< returns wether this is a complete sub-strategy (without todo nodes) - QECODE_EXPORT forceinline bool isDummy() {return imp->zetag.isDummy();} ///< returns wether this strategy is a set of - QECODE_EXPORT forceinline bool isTodo() {return imp->zetag.isTodo();} ///< return wether this strategy is a "ToDo" marker or not - - QECODE_EXPORT static Strategy STrue(); ///< returns the trivially true strategy - QECODE_EXPORT static Strategy SFalse(); ///< returns the trivially false strategy - QECODE_EXPORT static Strategy Dummy(); ///< returns a "dummy" node - QECODE_EXPORT static Strategy Stodo(); ///< returns a "todo" node - QECODE_EXPORT forceinline bool quantifier() {return imp->zetag.quantifier;} ///< returns the quantifier of the root (true for universal, false for existential) - QECODE_EXPORT forceinline int VMin() {return imp->zetag.Vmin;} ///< returns the index of the first variable of the scope of the root - QECODE_EXPORT forceinline int VMax() {return imp->zetag.Vmax;} ///< returns the index of the last variable of the scope of the root - QECODE_EXPORT forceinline int scope() {return imp->zetag.scope;} ///< returns the scope of the root - QECODE_EXPORT forceinline vector values() {return imp->zetag.valeurs;} ///< returns the values taken by the variables of the scope of the root in this (sub)strategy - QECODE_EXPORT forceinline int value(int var) {return imp->zetag.valeurs[var];} - QECODE_EXPORT forceinline void* id() {return imp;} ///< Return an identifier for this strategy (this identifier is shared among multiples instances of this strategy) - QECODE_EXPORT vector getPosition(); - QECODE_EXPORT forceinline int nbTodos() {return imp->todos;} - - QECODE_EXPORT int checkIntegrity(); -}; - - -#endif diff --git a/contribs/qecode/StrategyNode.cc b/contribs/qecode/StrategyNode.cc deleted file mode 100644 index 922d64dc79..0000000000 --- a/contribs/qecode/StrategyNode.cc +++ /dev/null @@ -1,59 +0,0 @@ -/**** , [ StrategyNode.cc ], -Copyright (c) 2008 Universite d'Orleans - Jeremie Vautard - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - *************************************************************************/ - -#include "StrategyNode.hh" - -StrategyNode::StrategyNode() { - type=0; - quantifier=true; - Vmin=-1; - Vmax=-1; - scope=-1; -} - -StrategyNode::StrategyNode(int typ,bool qt,int min, int max, int sco) { - type=typ; - quantifier=qt; - Vmin=min; - Vmax=max; - scope=sco; -} - -/* -StrategyNode::StrategyNode(const StrategyNode& st) { - cout<<"Strategynode copy constructor"< -using namespace std; -class QECODE_VTABLE_EXPORT StrategyNode { -public: - int type; // 0 = dummy, 1 = empty, 2 = normal, 3 = Todo. - bool quantifier; - int Vmin; - int Vmax; - int scope; - vector valeurs; - - QECODE_EXPORT StrategyNode(); - QECODE_EXPORT StrategyNode(int type,bool qt,int Vmin, int Vmax, int scope); - QECODE_EXPORT ~StrategyNode(); - QECODE_EXPORT static StrategyNode STrue() { return StrategyNode(1,true,-1,-1,-1);} - QECODE_EXPORT static StrategyNode SFalse() { return StrategyNode(1,false,-1,-1,-1);} - QECODE_EXPORT static StrategyNode Dummy() { return StrategyNode(0,true,-1,-1,-1);} - QECODE_EXPORT static StrategyNode Todo() { return StrategyNode(3,false,-1,-1,-1);} - QECODE_EXPORT forceinline bool isFalse() { return ( (type==1) && (quantifier == false) );} - QECODE_EXPORT forceinline bool isTrue() { return ( (type==1) && (quantifier == true) );} - QECODE_EXPORT forceinline bool isDummy() { return (type==0);} - QECODE_EXPORT forceinline bool isTodo() { return (type==3);} -}; -#endif - diff --git a/contribs/qecode/UnblockableBranching.hh b/contribs/qecode/UnblockableBranching.hh deleted file mode 100755 index b9548fde18..0000000000 --- a/contribs/qecode/UnblockableBranching.hh +++ /dev/null @@ -1,34 +0,0 @@ -/**** , [ UnblockableBranching.hh ], -Copyright (c) 2009 Universite d'Orleans - Jeremie Vautard - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - *************************************************************************/ -#ifndef __QECODE_UNBLOCKABLE_BRANCHING__ -#define __QECODE_UNBLOCKABLE_BRANCHING__ - -#include "myspace.hh" - -class UnblockableBranching { -public: - virtual ~UnblockableBranching() {} - virtual void branch(MySpace* s,IntVarArgs ivars, BoolVarArgs bvars)=0; -}; - -#endif - diff --git a/contribs/qecode/UnblockableViewValBranching.cc b/contribs/qecode/UnblockableViewValBranching.cc deleted file mode 100755 index af63201c9b..0000000000 --- a/contribs/qecode/UnblockableViewValBranching.cc +++ /dev/null @@ -1,61 +0,0 @@ -/**** , [ UnblockableViewValBranching.cc ], -Copyright (c) 2009 Universite d'Orleans - Jeremie Vautard - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - *************************************************************************/ - -#include "UnblockableViewValBranching.hh" -#include - -using namespace std; - -UnblockableViewValBranching::UnblockableViewValBranching(IntVarBranch vrb,IntValBranch vlb,bool booleans_before) { - ivrb=vrb; - bvrb=vrb; - ivlb=vlb; - bvlb=vlb; - before=booleans_before; -} - -UnblockableViewValBranching::UnblockableViewValBranching(IntVarBranch Ivrb,IntValBranch Ivlb,IntVarBranch Bvrb,IntValBranch Bvlb,bool booleans_before) { - ivrb=Ivrb; - ivlb=Ivlb; - bvrb=Bvrb; - bvlb=Bvlb; - before=booleans_before; -} - -void UnblockableViewValBranching::branch(MySpace* s,IntVarArgs ivars, BoolVarArgs bvars) { - if (before) { - if (bvars.size() != 0) { - Gecode::branch(*s,bvars,bvrb,bvlb); - } - if (ivars.size() != 0) { - Gecode::branch(*s,ivars,ivrb,ivlb); - } - } - else { - if (ivars.size() != 0) { - Gecode::branch(*s,ivars,ivrb,ivlb); - } - if (bvars.size() != 0) { - Gecode::branch(*s,bvars,bvrb,bvlb); - } - } -} diff --git a/contribs/qecode/UnblockableViewValBranching.hh b/contribs/qecode/UnblockableViewValBranching.hh deleted file mode 100755 index 819ca729aa..0000000000 --- a/contribs/qecode/UnblockableViewValBranching.hh +++ /dev/null @@ -1,45 +0,0 @@ -/**** , [ UnblockableViewValBranching.hh ], -Copyright (c) 2009 Universite d'Orleans - Jeremie Vautard - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - *************************************************************************/ -#ifndef __QECODE_UNBLOK_VIEWVAL_BRANCH__ -#define __QECODE_UNBLOK_VIEWVAL_BRANCH__ - -#include "qecode.hh" -#include "gecode/minimodel.hh" -#include "qecode.hh" -#include "UnblockableBranching.hh" - -class QECODE_VTABLE_EXPORT UnblockableViewValBranching : public UnblockableBranching { -private : - IntVarBranch ivrb; - IntVarBranch bvrb; - IntValBranch ivlb; - IntValBranch bvlb; - bool before; - -public : - QECODE_EXPORT UnblockableViewValBranching(IntVarBranch vrb,IntValBranch vlb,bool booleans_before); - QECODE_EXPORT UnblockableViewValBranching(IntVarBranch Ivrb,IntValBranch Ivlb,IntVarBranch Bvrb,IntValBranch Bvlb,bool booleans_before); - QECODE_EXPORT virtual void branch(MySpace* s,IntVarArgs ivars, BoolVarArgs bvars); -}; - -#endif - diff --git a/contribs/qecode/Work.cc b/contribs/qecode/Work.cc deleted file mode 100644 index acb12b96b5..0000000000 --- a/contribs/qecode/Work.cc +++ /dev/null @@ -1,48 +0,0 @@ -/************************************************************ Work.cc - Copyright (c) 2010 Universite de Caen Basse Normandie - Jeremie Vautard - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - *************************************************************************/ - -#include "Work.hh" -QWork::QWork(int scope,vector root,Gecode::Search::Engine* todo){ - this->theRoot = root; - this->remaining = todo; - this->scope = scope; - this->wait = this->stop = false; -} - -QWork::~QWork() {} - -QWork QWork::Wait() { - QWork ret; - ret.wait=true; - ret.stop=false; - ret.remaining=NULL; - return ret; -} - -QWork QWork::Stop() { - QWork ret; - ret.wait=false; - ret.stop=true; - ret.remaining=NULL; - return ret; -} - diff --git a/contribs/qecode/Work.hh b/contribs/qecode/Work.hh deleted file mode 100644 index 6a2183321c..0000000000 --- a/contribs/qecode/Work.hh +++ /dev/null @@ -1,64 +0,0 @@ -/************************************************************ Work.hh -Copyright (c) 2010 Universite de Caen Basse Normandie - Jeremie Vautard - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - *************************************************************************/ -#ifndef __QECODE_QWORK__ -#define __QECODE_QWORK__ -#include -#include "Strategy.hh" -#include "qecode.hh" -#include "gecode/support.hh" -#include "gecode/search.hh" -#include "gecode/search/support.hh" -#include "gecode/search/sequential/dfs.hh" - -using namespace std; -using namespace Gecode; -using namespace Gecode::Support; - -class QECODE_VTABLE_EXPORT QWork { -private: - bool wait; - bool stop; - vector theRoot; - Gecode::Search::Engine* remaining; - int scope; -public: - QECODE_EXPORT QWork(){wait=stop=0; remaining=NULL; scope=-1;} ///< creates a dummy work. Don't try to solve it. - QECODE_EXPORT QWork(int scope,vector root,Gecode::Search::Engine* todo); - QECODE_EXPORT ~QWork(); - - QECODE_EXPORT static QWork Wait(); - QECODE_EXPORT static QWork Stop(); - - QECODE_EXPORT forceinline bool isWait() {return wait;} - QECODE_EXPORT forceinline bool isStop() {return stop;} - - QECODE_EXPORT forceinline Gecode::Search::Engine* getRemaining() {return this->remaining;} - QECODE_EXPORT vector root() { - vector ret=this->theRoot; - return ret; - } - QECODE_EXPORT forceinline int getScope() {return this->scope;} - QECODE_EXPORT forceinline void clean() {if (!wait && !stop) delete remaining;} -}; - - -#endif diff --git a/contribs/qecode/WorkComparators.hh b/contribs/qecode/WorkComparators.hh deleted file mode 100644 index f85760f4d5..0000000000 --- a/contribs/qecode/WorkComparators.hh +++ /dev/null @@ -1,67 +0,0 @@ -/* - * WorkComparators.hh - * - * - * Created by Jérémie Vautard on 31/03/10. - * Copyright 2010 Université d'Orléans. All rights reserved. - * - */ - -#include "WorkManager.hh" -#include "QCOPPlus.hh" - -class BidonComparator : public WorkComparator { - public : - virtual bool cmp(QWork a,QWork b) { - return false; - } -}; - -class DeepFirstComparator : public WorkComparator { - public : - virtual bool cmp(QWork a,QWork b) { - if (a.root().size() > b.root().size()) return true; - if (a.root().size() < b.root().size()) return false; - return ((a.getRemaining()) < (b.getRemaining())); - } -}; - -class QuantifierThenDepthComparator : public WorkComparator { - private : - Qcop* problem; - bool existsFirst; - bool deepestFirst; - - public : - QuantifierThenDepthComparator(Qcop* p,bool existsFirst,bool deepestFirst) { - this->problem = p; - this->existsFirst = existsFirst; - this->deepestFirst = deepestFirst; - } - virtual bool cmp(QWork a,QWork b) { - bool q1 = (problem->qt_of_var(a.root().size()) != existsFirst); - bool q2 = (problem->qt_of_var(b.root().size()) != existsFirst); - if (q1 && !q2) return true; - if (!q1 && q2) return false; - int d1 = a.root().size(); - int d2 = b.root().size(); - if ( (d1 < d2) != deepestFirst) return true; - return false; - } -}; - -class DepthComparator : public WorkComparator { - private : - bool deepestFirst; - public : - DepthComparator(bool deepestFirst) { - this->deepestfirst = deepestFirst; - } - - virtual bool cmp(QWork a,QWork b) { - int d1 = a.root().size(); - int d2 = b.root().size(); - if ( (d1 < d2) != deepestFirst) return true; - return false; - } -}; diff --git a/contribs/qecode/WorkManager.cc b/contribs/qecode/WorkManager.cc deleted file mode 100644 index 6c0dd71075..0000000000 --- a/contribs/qecode/WorkManager.cc +++ /dev/null @@ -1,376 +0,0 @@ -/************************************************************ WorkManager.cc - Copyright (c) 2010 Universite d'Orleans - Jeremie Vautard - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -*************************************************************************/ - -#include "WorkManager.hh" -bool isPrefix(vector prefix,vector a) { - if (a.size() < prefix.size()) - return false; - else - for (unsigned int i=0;i::iterator i = l.begin(); - while (i != l.end() && cmp->cmp((*i),q)) i++; - l.insert(i,q); -} - -QWork WorkPool::pop() { - QWork ret=l.front(); - l.pop_front(); - return ret; -} - -void WorkPool::trash(vector prefix) { - // cout<<" WPT called on "; - //if (prefix.empty()) cout<<"empty"; - //for (int i=0;i< prefix.size();i++) cout<::iterator i=l.begin(); - while (!(i == l.end())) { - // cout<<"| "; - // cout.flush(); - bool avance=true; - vector root = (*i).root(); - if (isPrefix(prefix,root)) { - (*i).clean(); - i=l.erase(i); - avance = false; - // cout<<"erased"; - } - if (avance) i++; - } - //cout<::iterator i=l.begin();i != l.end();i++) { - //vector root = (*i).root(); - //if (isPrefix(prefix,root)) { - // cout<<" trashing "; - // if (root.empty()) cout<<"empty"; - // for (int j=0;j< root.size();j++) cout<stopAndReturn(); -} - -WorkManager::WorkManager(Qcop* p,WorkComparator* c) : Todos(c) { - problem=p; - vector v; - MySpace* espace=p->getSpace(0); - Options o; - Engine* solutions = new WorkerToEngine(espace,/*sizeof(MySpace),*/o); - QWork first(0,v,solutions); - Todos.push(first); - finished=false; - S = Strategy::Dummy(); - S.attach(Strategy::Stodo()); -} - -QWork WorkManager::getWork(AQWorker* worker) { - // clock_t start = clock(); - // cout< todo,vector position) { - // If the worker is not among the actives ones, ignore his job. Else, withdraw it from the active workers - // and process its result - - // clock_t start = clock(); - // cout<::iterator i = actives.begin(); - while (!(i == actives.end()) && !ok) { - bool avance=true; - if ((*i) == worker) { - // cout<<"RW Worker found in actives. Deleting"<::iterator j = todo.begin();j != todo.end();j++) { - (*j).clean(); - } - // cout<<"RW release"< checkPosition = father.getPosition(); - // if (checkPosition.empty()) cout<<"empty"; - // for (int i=0;i< checkPosition.size();i++) cout<::iterator j = todo.begin();j != todo.end();j++) { - // cout<<"WM todo + 1"<wake(); - } - // cout<<"RW Adding work in Todos : "; - // if ((*j).root().empty()) cout<<"empty"; - // for (int i=0;i< (*j).root().size();i++) cout<<(*j).root()[i]<<" "; - // cout<qt_of_var(position.size() + 1); - if (myscope) { // if ret was a forall node, the father itself is false - // cout<<"RW work is A -> father is false"<::iterator j = todo.begin();j != todo.end();j++) { - (*j).clean(); - } - } - - // cout<<"RW release"< hihi = s.getPosition(); - // if (hihi.empty()) cout<<"empty"; - // for (int i=0;i< hihi.size();i++) cout< hihi = s.getPosition(); - // if (hihi.empty()) cout<<"empty"; - // for (int i=0;i< hihi.size();i++) cout< prefix) { - // cout<<" TW called on "; - // if (prefix.empty()) cout<<"empty"; - // for (int i=0;i< prefix.size();i++) cout<::iterator i=actives.begin();i!=actives.end();i++) { - if (isPrefix(prefix,(*i)->workPosition())) { - // cout<<" TW stopping worker on"; - // vector plop = (*i)->workPosition(); - // if (plop.empty()) cout<<"empty"; - // for (int j=0;j< plop.size();j++) cout<stopAndForget(); - i=actives.erase(i); - i--; - } - } -} - -void WorkManager::printStatus() { - mex.acquire(); - cout<<(finished?"Problem solved":"Problem not solved")< -#include -#include -#include -#include "Strategy.hh" -#include "qecode.hh" -#include "AbstractWorker.hh" -#include "Work.hh" -#include "QCOPPlus.hh" -#include "gecode/minimodel.hh" -#include "gecode/support.hh" -#include "gecode/search.hh" -#include "gecode/search/support.hh" - - -using namespace Gecode; -using namespace std; -using namespace Gecode::Support; -using namespace Gecode::Search; - -class QECODE_VTABLE_EXPORT WorkComparator { - public : - virtual bool cmp(QWork a,QWork b)=0; -}; - -class QECODE_VTABLE_EXPORT WorkPool { -private: - list l; - WorkComparator* cmp; -public: - QECODE_EXPORT WorkPool(WorkComparator* a); - QECODE_EXPORT void push(QWork q); - QECODE_EXPORT QWork pop(); - QECODE_EXPORT bool empty() {return l.empty();} - QECODE_EXPORT QWork top() {return l.front();} - QECODE_EXPORT int size() {return l.size();} - - QECODE_EXPORT void trash(vector prefix); -}; - - -class QECODE_VTABLE_EXPORT WorkManager { -private: - bool finished; - Strategy S; - WorkPool Todos; - list actives; - list idles; - void getNewWorks(); - void updateTrue(Strategy s); - void updateFalse(Strategy s); - void trashWorks(vector prefix); - Strategy result; - Gecode::Support::Mutex mex; // = PTHREAD_MUTEX_INITIALIZER; -public: - Qcop* problem; - - QECODE_EXPORT WorkManager(Qcop* p,WorkComparator* c); - - QECODE_EXPORT QWork getWork(AQWorker* worker); - - QECODE_EXPORT void returnWork(AQWorker* worker,Strategy ret,list todo,vector position); - - QECODE_EXPORT forceinline Strategy getResult() {return S;} - - QECODE_EXPORT forceinline bool isFinished() {mex.acquire();bool ret=finished;mex.release();return ret;} - - QECODE_EXPORT void printStatus(); -}; - -#endif diff --git a/contribs/qecode/Worker.cc b/contribs/qecode/Worker.cc deleted file mode 100644 index 9334a31f58..0000000000 --- a/contribs/qecode/Worker.cc +++ /dev/null @@ -1,285 +0,0 @@ -/**** , [ Worker.cc ], - Copyright (c) 2010 Universite de Caen Basse Normandie- Jeremie Vautard - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - *************************************************************************/ - -#include "Worker.hh" - - -inline vector getTheValues(MySpace* sol,int vmin,int vmax){ - vector zevalues; -// cout< (sol->nbVars())) cout<<"getTheValues mal appele"<type_of_v[i]) { - case VTYPE_INT : - zevalues.push_back( (static_cast(sol->v[i]))->val() ); - break; - case VTYPE_BOOL : - zevalues.push_back( (static_cast(sol->v[i]))->val() ); - break; - default : - cout<<"4Unknown variable type"< 0); -} - -void QWorker::wake() { - // cout<<"Awaking "< QWorker::workPosition() { - // access.acquire(); - // vector ret = currentWork.root(); - // access.release(); - return currentWork.root(); -} - -void QWorker::run() { - - while(true) { - access.acquire(); - stopandforget=0; - finished=false; - todo.clear(); - access.release(); - // cout<<"QWorker "<getWork(this); - // cout<<"QWorker "<returnWork(this,ret,todo,cur.root()); - } - else { - // cout<<"QWorker "<::iterator i(todo.begin());i != todo.end();i++) { - (*i).clean(); - } - todo.clear(); - } - } - } -} - -Strategy QWorker::solve() { - return rsolve(currentWork.getScope(),currentWork.getRemaining()); -} - - -Strategy QWorker::rsolve(int scope,/*vector assignments,*/Engine* L) { - access.acquire(); - bool forget = (stopandforget==2); - access.release(); - if (forget) { - delete L; - return Strategy::Dummy(); - } - - MySpace* sol = static_cast(L->next()); - Strategy ret=Strategy::Dummy(); - bool LwasEmpty = true; - - - while ((sol != NULL) ) { - LwasEmpty=false; - vector assignments = getTheValues(sol,0,sol->nbVars()-1); - Strategy result; - - if (scope == (problem->spaces() - 1) ) { // last scope reached. Verify the goal... - MySpace* g = problem->getGoal(); - for (int i=0;inbVars();i++) { - switch (g->type_of_v[i]) { - case VTYPE_INT : - rel(*g,*(static_cast(g->v[i])) == assignments[i]); - break; - case VTYPE_BOOL : - rel(*g,*(static_cast(g->v[i])) == assignments[i]); - break; - default : - cout<<"Unknown variable type"< solutions(g); - MySpace* goalsol = solutions.next(); - if (goalsol == NULL) { - delete g; - delete L; - result = Strategy::SFalse(); - } - else { - int vmin = ( (scope==0)? 0 : (problem->nbVarInScope(scope-1)) ); - int vmax = (problem->nbVarInScope(scope))-1; - vector zevalues=getTheValues(sol,vmin,vmax); - result=Strategy(problem->quantification(scope),vmin,vmax,scope,zevalues); - result.attach(Strategy::STrue()); - delete g; - // delete sol; - delete goalsol; - } - } - - else { // This is not the last scope... - MySpace* espace = problem->getSpace(scope+1); - for (int i=0;itype_of_v[i]) { - case VTYPE_INT : - rel(*espace,*(static_cast(espace->v[i])) == assignments[i]); - break; - case VTYPE_BOOL : - rel(*espace,*(static_cast(espace->v[i])) == assignments[i]); - break; - default : - cout<<"Unknown variable type"<(espace,/*sizeof(MySpace),*/o); - delete espace; - - access.acquire(); - forget=(stopandforget == 2); - bool stop=(stopandforget==1); - access.release(); - if (forget) { - delete sol; - delete solutions; - return Strategy::Dummy(); - } - if (stop) { - vector root1; - if (scope!=0) {root1= getTheValues(sol,0,problem->nbVarInScope(scope-1)-1);} - QWork current(scope,root1,L); - vector root2 = getTheValues(sol,0,problem->nbVarInScope(scope)-1); - QWork onemore(scope+1,root2,solutions); - todo.push_back(current); - todo.push_back(onemore); - int vmin = ( (scope==0)? 0 : (problem->nbVarInScope(scope-1)) ); - int vmax = (problem->nbVarInScope(scope))-1; - vector zevalues=getTheValues(sol,vmin,vmax); - Strategy toAttach(problem->quantification(scope),vmin,vmax,scope,zevalues); - toAttach.attach(Strategy::Stodo()); - ret.attach(toAttach); - ret.attach(Strategy::Stodo()); - return ret; - } - - result=rsolve(scope+1,solutions); - } - - int vmin = ( (scope == 0) ? 0 : (problem->nbVarInScope(scope-1)) ); - int vmax = (problem->nbVarInScope(scope))-1; - vector zevalues=getTheValues(sol,vmin,vmax); - delete sol; - access.acquire(); - forget=(stopandforget == 2); - access.release(); - if (forget) { - delete L; - return Strategy::Dummy(); - } - if (problem->quantification(scope)) { // current scope is universal - if (result.isFalse()) // one branch fails - { - delete L; - return Strategy::SFalse(); - } - else { - Strategy toAttach(true,vmin,vmax,scope,zevalues); - - toAttach.attach(result); - ret.attach(toAttach); - } - } - else { //current scope is existential - if (!result.isFalse()) { // result not the truivilally false strategy... - if (result.isComplete()) { // ...and has no todo nodes. So... - ret = Strategy(problem->quantification(scope),vmin,vmax,scope,zevalues); - ret.attach(result); - delete L; - return ret; // we return it immediately - } - else { // If result is not false, but still has todo nodes... - Strategy toAttach(problem->quantification(scope),vmin,vmax,scope,zevalues); - toAttach.attach(result); // the node corresponding to the current scope iis added... - ret.attach(toAttach); // and the corresponding strategy is attached to a Dummy node. Next loop in the outer while will need it... - } - } - } - sol = static_cast(L->next()); - } - delete L; - if (problem->quantification(scope)) //universal scope - return (LwasEmpty ? Strategy::STrue() : ret); - else { - if (ret.isComplete()) - return Strategy::SFalse(); - else - return ret; - } -} diff --git a/contribs/qecode/Worker.hh b/contribs/qecode/Worker.hh deleted file mode 100755 index a10adbf60f..0000000000 --- a/contribs/qecode/Worker.hh +++ /dev/null @@ -1,70 +0,0 @@ -/**** , [ Worker.hh ], - Copyright (c) 2010 Universite de Caen Basse Normandie - Jeremie Vautard - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -*************************************************************************/ - -#ifndef __QECODE_WORKER__ -#define __QECODE_WORKER__ -#include "qecode.hh" -#include -#include -#include -#include "QCOPPlus.hh" -#include "myspace.hh" -#include "Strategy.hh" -#include "AbstractWorker.hh" -#include "gecode/support.hh" -#include "gecode/search.hh" -#include "gecode/search/support.hh" -#include "gecode/search/sequential/dfs.hh" -#include "WorkManager.hh" - -using namespace Gecode::Support; -using namespace Gecode::Search; -using namespace Gecode::Search::Sequential; - - -class QECODE_VTABLE_EXPORT QWorker : public AQWorker { - - private: - WorkManager* wm; - Gecode::Support::Event goToWork; - Gecode::Support::Mutex access; - int stopandforget; // 0 : continue, 1 : stop and return, 2 : stop and forget. - Qcop* problem; - QWork currentWork; - list todo; - bool finished; - Strategy rsolve(int scope,/*vector assignments,*/Engine* L); - - - public: - QECODE_EXPORT QWorker(WorkManager* wm) {this->wm=wm; this->problem = wm->problem->clone();} - QECODE_EXPORT ~QWorker(); - QECODE_EXPORT virtual void run(); - QECODE_EXPORT void stopAndReturn(); - QECODE_EXPORT void stopAndForget(); - QECODE_EXPORT vector workPosition(); - QECODE_EXPORT bool mustStop(); - QECODE_EXPORT void wake(); - QECODE_EXPORT Strategy solve(); -}; - -#endif diff --git a/contribs/qecode/clean b/contribs/qecode/clean deleted file mode 100755 index b08bd439c2..0000000000 --- a/contribs/qecode/clean +++ /dev/null @@ -1,5 +0,0 @@ -rm -rf *.o -rm -rf lib* -rm -f Makefile -rm -f Makefile.in - diff --git a/contribs/qecode/configure b/contribs/qecode/configure deleted file mode 100755 index a260c122b4..0000000000 --- a/contribs/qecode/configure +++ /dev/null @@ -1,2843 +0,0 @@ -#! /bin/sh -# From configure.ac Revision. -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for QECODE 1.2. -# -# Report bugs to . -# -# -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# Use a proper internal environment variable to ensure we don't fall - # into an infinite loop, continuously re-executing ourselves. - if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then - _as_can_reexec=no; export _as_can_reexec; - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 - fi - # We don't want this to propagate to other subprocesses. - { _as_can_reexec=; unset _as_can_reexec;} -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1 -test -x / || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - export CONFIG_SHELL - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: jeremie.vautard@univ-orleans.fr about your system, -$0: including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # If we had to re-execute with $CONFIG_SHELL, we're ensured to have - # already done that, so ensure we don't try to do so again and fall - # in an infinite loop. This has already happened in practice. - _as_can_reexec=no; export _as_can_reexec - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='QECODE' -PACKAGE_TARNAME='qecode' -PACKAGE_VERSION='1.2' -PACKAGE_STRING='QECODE 1.2' -PACKAGE_BUGREPORT='jeremie.vautard@univ-orleans.fr' -PACKAGE_URL='' - -ac_unique_file="qecode.hh" -ac_subst_vars='LTLIBOBJS -LIBOBJS -QECODE -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -' - ac_precious_vars='build_alias -host_alias -target_alias' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures QECODE 1.2 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/qecode] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of QECODE 1.2:";; - esac - cat <<\_ACEOF - -Report bugs to . -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -QECODE configure 1.2 -generated by GNU Autoconf 2.69 - -Copyright (C) 2012 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by QECODE $as_me 1.2, which was -generated by GNU Autoconf 2.69. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - $as_echo "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - $as_echo "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - $as_echo "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - -QECODE="qecode" - - -../../config.status --file Makefile.in:Makefile.in.in - -ac_config_commands="$ac_config_commands Makefile.in" - -ac_config_files="$ac_config_files Makefile" - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -# -# If the first sed substitution is executed (which looks for macros that -# take arguments), then branch to the quote section. Otherwise, -# look for a macro that doesn't take arguments. -ac_script=' -:mline -/\\$/{ - N - s,\\\n,, - b mline -} -t clear -:clear -s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g -t quote -s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g -t quote -b any -:quote -s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g -s/\[/\\&/g -s/\]/\\&/g -s/\$/$$/g -H -:any -${ - g - s/^\n// - s/\n/ /g - p -} -' -DEFS=`sed -n "$ac_script" confdefs.h` - - -ac_libobjs= -ac_ltlibobjs= -U= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - - -: "${CONFIG_STATUS=./config.status}" -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by QECODE $as_me 1.2, which was -generated by GNU Autoconf 2.69. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - -Configuration files: -$config_files - -Configuration commands: -$config_commands - -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -QECODE config.status 1.2 -configured by $0, generated by GNU Autoconf 2.69, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2012 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h | --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "Makefile.in") CONFIG_COMMANDS="$CONFIG_COMMANDS Makefile.in" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - - -eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - - - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - diff --git a/contribs/qecode/configure.ac b/contribs/qecode/configure.ac deleted file mode 100644 index 18e4f9c28c..0000000000 --- a/contribs/qecode/configure.ac +++ /dev/null @@ -1,44 +0,0 @@ -dnl -dnl Author: -dnl Jeremie Vautard -dnl -dnl Copyright: -dnl UniversitÂŽ d'Orleans, 2005 -dnl -dnl Largely inspired from the map configure.ac file by GrÂŽgoire Dooms -dnl ***********************************************************[configure.ac] -dnl Copyright (c) 2007, Universite d'Orleans - Jeremie Vautard. -dnl -dnl Permission is hereby granted, free of charge, to any person obtaining a copy -dnl of this software and associated documentation files (the "Software"), to deal -dnl in the Software without restriction, including without limitation the rights -dnl to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -dnl copies of the Software, and to permit persons to whom the Software is -dnl furnished to do so, subject to the following conditions: -dnl -dnl The above copyright notice and this permission notice shall be included in -dnl all copies or substantial portions of the Software. -dnl -dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -dnl AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -dnl OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -dnl THE SOFTWARE. -dnl ************************************************************************* - - -AC_REVISION([$Revision$]) -AC_PREREQ(2.53) -AC_INIT(QECODE, 1.2, jeremie.vautard@univ-orleans.fr) -AC_CONFIG_SRCDIR(qecode.hh) - -dnl the names of the generated dlls -AC_SUBST(QECODE, "qecode") - -../../config.status --file Makefile.in:Makefile.in.in - -AC_CONFIG_COMMANDS([Makefile.in]) -AC_CONFIG_FILES([Makefile]) -AC_OUTPUT diff --git a/contribs/qecode/examples/COMPILING b/contribs/qecode/examples/COMPILING deleted file mode 100644 index 1c9e3de73f..0000000000 --- a/contribs/qecode/examples/COMPILING +++ /dev/null @@ -1,13 +0,0 @@ -To compile the examples, you must add the qecode folder and the gecode folder (i.e. .. and ../../.. from this examples folder) to your include and library paths. These examples have to been linked against the gecodeint, gecodekernel, gecodeminimodel, gecodesupport, and gecodeqecode libraries. If you built the dynamic version of the gecode/qecode libraries, you will also have to add these folders to the dynamic libraries search path. - -Example (with dynamic libs) : - For Linux, using gcc : - $ g++ stress_test.cpp -I.. -I../../.. -L.. -L../../.. -lgecodeqecode -lgecodeminimodel -lgecodesearch -lgecodeint -lgecodekernel -lgecodesupport -lpthread -o stress_test - $ export LD_LIBRARY_PATH="..:../../.." # only if using shared libraries - $ ./stress_test - - For MacOS, using gcc : - $ g++ stress_test.cpp -I.. -I../../.. -L.. -L../../.. -lgecodeqecode -lgecodeminimodel -lgecodesearch -lgecodeint -lgecodekernel -lgecodesupport -lpthread -o stress_test - $ export DYLD_LIBRARY_PATH="..:../../.." # only if using shared libraries - $ ./stress_test - diff --git a/contribs/qecode/examples/MatrixGame.cpp b/contribs/qecode/examples/MatrixGame.cpp deleted file mode 100644 index 07bbdbac3f..0000000000 --- a/contribs/qecode/examples/MatrixGame.cpp +++ /dev/null @@ -1,142 +0,0 @@ -/**** , [ MatrixGame.cpp ], -Copyright (c) 2007 Universite d'Orleans - Arnaud Lallouet - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - *************************************************************************/ - -#include /* for srand, rand et RAND_MAX */ -#include /* for time */ -#include /* for pow */ - -#include - -#include -#include - -#include "qsolver_qcsp.hh" -#include "QCOPPlus.hh" - -#define UNIVERSAL true -#define EXISTENTIAL false - -// The Matrix game consists in a square boolean matrix of size 2^depth. First player cuts it vertically in two parts and removes one half, -// while secodn player do the same, but cutting the matrix horizontally. The game ends when there are only one cell left in the matrix. -// If this last cell has value 1, the first player wins. If it has value 0, the second player wins. - -// The present model of this game is pure QBF, that QeCode can handle (though not as fast as QBF solvers...) - -using namespace MiniModel; - -int main (int argc, char * const argv[]) { - - int depth = 5; // Size of the matrix is 2^depth. Larger values may take long to solve... - int nbDecisionVar = 2*depth; - int nbScope = nbDecisionVar+1; - bool* qtScopes = new bool[nbScope]; - for (int i=0;i=0; i--) - access[i]=access[i+2]*2; - - // debug - for (int i=0; i - -/////////////////////////////////////////////////////////////////////////////////////////// -// This is a model of the nim-fibonacci game. We have a N matches set. First player may // -// take between 1 and N-1 matches. Then, each player may take at most twice the number of// -// matches taken by the last player. Take the last match to win ! // -/////////////////////////////////////////////////////////////////////////////////////////// - -int main() { - for (int N = 10; N<=22;N++) // Initial number of matches - { - clock_t start, finish; - start=clock(); - - int* scopeSize = new int[N+2]; - bool* qtScope = new bool[N+2]; - for (int i=0;i -#include -#include "QCOPPlus.hh" -#include "qsolver_qcop.hh" -#include - -using namespace std; -using namespace Gecode; -using namespace Gecode::Int; - -void printStr(Strategy s,int depth) { - StrategyNode plop = s.getTag(); - for (int glou=0;glou -#include -#include "QCOPPlus.hh" -#include "qsolver_qcop.hh" -#include -#include - -using namespace std; -using namespace Gecode; -using namespace Gecode::Int; - -void printStr(Strategy s,int depth) { - StrategyNode plop = s.getTag(); - for (int glou=0;glou assignment; -void listAssignments(Strategy s) { - StrategyNode tag = s.getTag(); - if (s.isTrue()) { - // We are at the end of a branch : we print the assignment) - for (int i=0;i - -using namespace std; -using namespace Gecode; -using namespace Gecode::Int; - -// This function prints a winning strategy. -void printStr(Strategy s,int depth=0) { - StrategyNode plop = s.getTag(); - for (int glou=0;glou - -using namespace std; - -// This function prints a winning strategy. -void printStr(Strategy s,int depth=0) { - StrategyNode plop = s.getTag(); - for (int glou=0;glou x=1 - int sc1[] = {1}; - bool q1[] = {QECODE_UNIVERSAL}; - Qcop test1(1,q1,sc1); - test1.QIntVar(0,1,3); - IntVarArgs b1(1); - b1[0] = test1.var(0); - branch(*(test1.space()),b1,INT_VAR_SIZE_MIN(),INT_VAL_MIN()); - test1.nextScope(); - rel(*(test1.space()),test1.var(0) == 1); - test1.makeStructure(); - QCSP_Solver s1(&test1); - nodes=0; - Strategy ret1=s1.solve(nodes,INT_MAX,true); - cout<<"Problem 1 : result = "<<(ret1.isFalse()?"FALSE":"TRUE")<<", sould be FALSE."< x=2 - int sc3[] = {1}; - bool q3[] = {QECODE_UNIVERSAL}; - Qcop test3(1,q3,sc3); - test3.QIntVar(0,1,3); - rel(*(test3.space()),test3.var(0) == 1); - - IntVarArgs b3(1); - b3[0] = test3.var(0); - branch(*(test3.space()),b3,INT_VAR_SIZE_MIN(),INT_VAL_MIN()); - - test3.nextScope(); - rel(*(test3.space()),test3.var(0) == 2); - test3.makeStructure();; - QCSP_Solver s3(&test3); - nodes=0; - steps=0; - Strategy ret3=s3.solve(nodes,INT_MAX,true); - cout<<"Problem 3 : result = "<<(ret3.isFalse()?"FALSE":"TRUE")<<", sould be FALSE."< Ey in 1..3 [x=2] -> y=1 - int sc5[] = {1,1}; - bool q5[] = {QECODE_UNIVERSAL,QECODE_EXISTENTIAL}; - Qcop test5(2,q5,sc5); - test5.QIntVar(0,1,3); - test5.QIntVar(1,1,3); - rel(*(test5.space()),test5.var(0) == 1); - - IntVarArgs b5(1); - b5[0] = test5.var(0); - branch(*(test5.space()),b5,INT_VAR_SIZE_MIN(),INT_VAL_MIN()); - - test5.nextScope(); - rel(*(test5.space()),test5.var(0) == 2); - - IntVarArgs b52(2); - b52[0] = test5.var(0); - b52[1] = test5.var(1); - branch(*(test5.space()),b52,INT_VAR_SIZE_MIN(),INT_VAL_MIN()); - - test5.nextScope(); - rel(*(test5.space()),test5.var(1) == 1); - test5.makeStructure(); - QCSP_Solver s5(&test5); - nodes=0; - steps=0; - Strategy ret5=s5.solve(nodes,INT_MAX,true); - cout<<"Problem 5 : result = "<<(ret5.isFalse()?"FALSE":"TRUE")<<", sould be FALSE."< Ey in 1..3 [x=1] -> x=2 - int sc6[] = {1,1}; - bool q6[] = {QECODE_UNIVERSAL,QECODE_EXISTENTIAL}; - Qcop test6(2,q6,sc6); - test6.QIntVar(0,1,3); - test6.QIntVar(1,1,3); - rel(*(test6.space()),test6.var(0) == 1); - - IntVarArgs b6(1); - b6[0] = test6.var(0); - branch(*(test6.space()),b6,INT_VAR_SIZE_MIN(),INT_VAL_MIN()); - - test6.nextScope(); - rel(*(test6.space()),test6.var(0) == 1); - - IntVarArgs b62(2); - b62[0] = test6.var(0); - b62[1] = test6.var(1); - branch(*(test6.space()),b62,INT_VAR_SIZE_MIN(),INT_VAL_MIN()); - - test6.nextScope(); - rel(*(test6.space()),test6.var(0) == 2); - test6.makeStructure(); - QCSP_Solver s6(&test6); - nodes=0; - steps=0; - Strategy ret6=s6.solve(nodes,INT_MAX,true); - cout<<"Problem 6 : result = "<<(ret6.isFalse()?"FALSE":"TRUE")<<", sould be FALSE."< y=0 - int sc7[] = {1,1}; - bool q7[] = {QECODE_EXISTENTIAL,QECODE_UNIVERSAL}; - Qcop test7(2,q7,sc7); - test7.QIntVar(0,1,3); - test7.QIntVar(1,0,3); - - IntVarArgs b7(1); - b7[0] = test7.var(0); - branch(*(test7.space()),b7,INT_VAR_SIZE_MIN(),INT_VAL_MIN()); - - test7.nextScope(); - rel(*(test7.space()),test7.var(1) <= 2); - - IntVarArgs b72(2); - b72[0] = test7.var(0); - b72[1] = test7.var(1); - branch(*(test7.space()),b72,INT_VAR_SIZE_MIN(),INT_VAL_MIN()); - - test7.nextScope(); - rel(*(test7.space()),test7.var(1) == 0); - test7.makeStructure(); - QCSP_Solver s7(&test7); - nodes=0; - steps=0; - Strategy ret7=s7.solve(nodes,INT_MAX,true); - cout<<"Problem 7 : result = "<<(ret7.isFalse()?"FALSE":"TRUE")<<", sould be FALSE."< y=0 - int sc8[] = {1,1}; - bool q8[] = {QECODE_EXISTENTIAL,QECODE_UNIVERSAL}; - Qcop test8(2,q8,sc8); - test8.QIntVar(0,1,3); - test8.QIntVar(1,0,3); - - IntVarArgs b8(1); - b8[0] = test8.var(0); - branch(*(test8.space()),b8,INT_VAR_SIZE_MIN(),INT_VAL_MIN()); - - test8.nextScope(); - rel(*(test8.space()),test8.var(1) == 0); - - IntVarArgs b82(2); - b82[0] = test8.var(0); - b82[1] = test8.var(1); - branch(*(test8.space()),b82,INT_VAR_SIZE_MIN(),INT_VAL_MIN()); - - test8.nextScope(); - rel(*(test8.space()),test8.var(1) == 0); - test8.makeStructure(); - QCSP_Solver s8(&test8); - nodes=0; - steps=0; - Strategy ret8=s8.solve(nodes,INT_MAX,true); - cout<<"Problem 8 : result = "<<(ret8.isFalse()?"FALSE":"TRUE")<<", sould be TRUE."<failed()) return; - IntView xv(x); - IntSetRanges ris(is); - GECODE_ME_FAIL(home,xv.minus_r(home,ris)); -} - -void myAntidom_bool(Space* home, BoolVar x, const IntSet& is, IntConLevel) { - if (home->failed()) return; - BoolView xv(x); - IntSetRanges ris(is); - GECODE_ME_FAIL(home,xv.minus_r(home,ris)); -} - -/* -void myDom_int(Space* home, IntVar x, const IntSet& is, IntConLevel) { - if (home->failed()) return; - IntView xv(x); - IntSetRanges ris(is); - GECODE_ME_FAIL(home,xv.inter_r(home,ris)); -} - -void myDom_bool(Space* home, BoolVar x, const IntSet& is, IntConLevel) { - if (home->failed()) return; - BoolView xv(x); - IntSetRanges ris(is); - GECODE_ME_FAIL(home,xv.inter_r(home,ris)); -} -*/ - -#endif diff --git a/contribs/qecode/myspace.cc b/contribs/qecode/myspace.cc deleted file mode 100755 index 05d6e7c452..0000000000 --- a/contribs/qecode/myspace.cc +++ /dev/null @@ -1,119 +0,0 @@ -/*****************************************************************[myspace.cc] -Copyright (c) 2007, Universite d'Orleans - Jeremie Vautard, Marco Benedetti, -Arnaud Lallouet. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*****************************************************************************/ -#include "./myspace.hh" -#include - - -using namespace std; - -MySpace::MySpace(unsigned int nv) : Space() { - // cout <<"Space with "<(v[i]); - break; - case VTYPE_BOOL : - delete static_cast(v[i]); - break; - default : - cout<<"Unsupported variable type"<(ms.v[i]))); - (static_cast(v[i]))->update(*this,share,*(static_cast(ms.v[i]))); - break; - case VTYPE_BOOL : - v[i] = new BoolVar(*(static_cast(ms.v[i]))); - (static_cast(v[i]))->update(*this,share,*(static_cast(ms.v[i]))); - break; - default: - cout<<"Unsupported variable type"<(v[i])); - cpt++; - } - } - - return ret; -} - -BoolVarArgs MySpace::getBoolVars(unsigned int idMax) { - int cpt=0; - int i=0; - if (n(v[i])); - cpt++; - } - } - - return ret; -} diff --git a/contribs/qecode/myspace.hh b/contribs/qecode/myspace.hh deleted file mode 100755 index f850756bfe..0000000000 --- a/contribs/qecode/myspace.hh +++ /dev/null @@ -1,79 +0,0 @@ -/*****************************************************************[myspace.hh] - Copyright (c) 2007, Universite d'Orleans - Jeremie Vautard, Marco Benedetti, - Arnaud Lallouet. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - *****************************************************************************/ -#ifndef __QECODE_MYSPACE__ -#define __QECODE_MYSPACE__ - -#include "qecode.hh" -#include -#include "gecode/minimodel.hh" -#include "vartype.hh" - -using namespace Gecode; -using namespace Gecode::Int; - -/** \brief A simple extension of Gecode::Space class - * - * A simple extension of the Space class from Gecode, in order to have access to the variables it contains. - */ - -class QECODE_VTABLE_EXPORT MySpace : public Space { - - protected : - unsigned int n; - -public: - /** \brief This array contains all the variables this space contains. - */ - void** v; - - /** \brief This array indicates the type of each variable - */ - VarType* type_of_v; - - /** \brief Constructor of a space with a fixed number of variables - * - * Builds a space which will contain nv variables (the variables themselves are however not declared). - * @param nv the number of variable the space must contain. - */ - QECODE_EXPORT MySpace(unsigned int nv); - QECODE_EXPORT int nbVars() {return n;} - QECODE_EXPORT MySpace(bool share,MySpace& ms); - QECODE_EXPORT virtual MySpace* copy(bool share); - QECODE_EXPORT virtual ~MySpace(); - QECODE_EXPORT int getValue(unsigned int i); ///< returns the value of variable i. If boolean : 0 or 1 (false / true). - - /** \brief Returns the integer variables before idMax - * - * Returns an IntVarArgs containing all the integer variables of index inferior than parameter idMax - */ - QECODE_EXPORT IntVarArgs getIntVars(unsigned int idMax); - - /** \brief Returns the boolean variables before idMax - * - * Returns a BoolVarArgs containing all the boolean variables of index inferior than parameter idMax - */ - QECODE_EXPORT BoolVarArgs getBoolVars(unsigned int idMax); - -}; - -#endif diff --git a/contribs/qecode/qecode.hh b/contribs/qecode/qecode.hh deleted file mode 100644 index 8d77bb7dc1..0000000000 --- a/contribs/qecode/qecode.hh +++ /dev/null @@ -1,56 +0,0 @@ -/**** , [ qecode.hh ], -Copyright (c) 2007 Universite d'Orleans - Jeremie Vautard - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - *************************************************************************/ - -#ifndef __QECODE_HH__ -#define __QECODE_HH__ - -#include "gecode/kernel.hh" - -#if !defined(GECODE_STATIC_LIBS) && \ -(defined(__CYGWIN__) || defined(__MINGW32__) || defined(_MSC_VER)) - -#define QECODE_VTABLE_EXPORT - -#ifdef GECODE_BUILD_QECODE -#define QECODE_EXPORT __declspec( dllexport ) -#else -#define QECODE_EXPORT __declspec( dllimport ) -#endif - -#else - -#ifdef GECODE_GCC_HAS_CLASS_VISIBILITY - -#define QECODE_VTABLE_EXPORT __attribute__ ((visibility("default"))) -#define QECODE_EXPORT __attribute__ ((visibility("default"))) - -#else -#define QECODE_VTABLE_EXPORT -#define QECODE_EXPORT - -#endif -#endif - -#define QECODE_EXISTENTIAL false -#define QECODE_UNIVERSAL true - -#endif diff --git a/contribs/qecode/qsolver_parallel.cc b/contribs/qecode/qsolver_parallel.cc deleted file mode 100644 index 9dc44b201a..0000000000 --- a/contribs/qecode/qsolver_parallel.cc +++ /dev/null @@ -1,41 +0,0 @@ -/************************************************************ qsolver_parallel.cc - Copyright (c) 2010 Universite d'Orleans - Jeremie Vautard - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - *************************************************************************/ - -#include "qsolver_parallel.hh" - -QCSP_Parallel_Solver::QCSP_Parallel_Solver(Qcop* sp,WorkComparator* c,unsigned int nbWorkers) : wm(sp,c) { - workers = new QWorker*[nbWorkers]; - nw = nbWorkers; - for (unsigned int i=0;i -#include -#include "Strategy.hh" -#include "qecode.hh" - - -class QECODE_VTABLE_EXPORT QCSP_Parallel_Solver { - - private : - WorkManager wm; - QWorker** workers; - unsigned int nw; - - public : - - QECODE_EXPORT QCSP_Parallel_Solver(Qcop* sp,WorkComparator* c,unsigned int nbWorkers); - QECODE_EXPORT Strategy solve(); -}; \ No newline at end of file diff --git a/contribs/qecode/qsolver_qcop.cc b/contribs/qecode/qsolver_qcop.cc deleted file mode 100644 index 0cb8706b90..0000000000 --- a/contribs/qecode/qsolver_qcop.cc +++ /dev/null @@ -1,268 +0,0 @@ -/**** , [ qsolver_qcop.cc ], -Copyright (c) 2010 Universite de Caen Basse Normandie - Jeremie Vautard - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - *************************************************************************/ - -#include "qsolver_qcop.hh" -#include - -QCOP_solver::QCOP_solver(Qcop* sp) { - this->sp = sp; - nbRanges=new int; -} - -Strategy QCOP_solver::solve(unsigned long int& nodes) { - vector plop; - plop.clear(); - return rSolve(sp,0,plop,nodes); -} - -Strategy QCOP_solver::rSolve(Qcop* qs,int scope, vector assignments, unsigned long int& nodes) { - nodes++; -// cout<<"rSolve for scope "<spaces()) { -// cout<<"First case"<getGoal(); - if (g == NULL) {/*cout<<"the goal was null"<nbVars();i++) { - switch (g->type_of_v[i]) { - case VTYPE_INT : - rel(*g,*(static_cast(g->v[i])) == assignments[i]); - break; - case VTYPE_BOOL : - rel(*g,*(static_cast(g->v[i])) == assignments[i]); - break; - default : - cout<<"1Unknown variable type"<status() == SS_FAILED) { -// cout<<"goal failed after assignments"<getSpace(scope); - if (espace == NULL) cout<<"I caught a NULL for scope "<type_of_v[i]) { - case VTYPE_INT : - rel(*espace,*(static_cast(espace->v[i])) == assignments[i]); - break; - case VTYPE_BOOL : - rel(*espace,*(static_cast(espace->v[i])) == assignments[i]); - break; - default : - cout<<"2Unknown variable type"<quantification(scope)) { -// cout<<"universal"<status() == SS_FAILED) { -// cout<<"the scope is failed"< solutions(espace); - MySpace* sol = solutions.next(); - if (sol == NULL) { -// cout<<"first sol is null"< assign; - for (int i = 0; inbVars();i++) { - switch (sol->type_of_v[i]) { - case VTYPE_INT : - assign.push_back( (static_cast(sol->v[i]))->val() ); - break; - case VTYPE_BOOL : - assign.push_back( (static_cast(sol->v[i]))->val() ); - break; - default : - cout<<"3Unknown variable type"<nbVarInScope(scope-1)) ); - int vmax = (qs->nbVarInScope(scope))-1; - vector zevalues; - for (int i = vmin; i<=vmax;i++) { - switch (sol->type_of_v[i]) { - case VTYPE_INT : - zevalues.push_back( (static_cast(sol->v[i]))->val() ); - break; - case VTYPE_BOOL : - zevalues.push_back( (static_cast(sol->v[i]))->val() ); - break; - default : - cout<<"4Unknown variable type"<status()) == SS_FAILED) { -// cout<<"the Espace is failed"< solutions(espace); - MySpace* sol =solutions.next(); - if (sol == NULL) { -// cout<<"the first sol is null"<getOptVar(scope); - int opttype = qs->getOptType(scope); - Strategy retour(StrategyNode::SFalse()); - int score= ( (opttype == 1) ? INT_MAX : INT_MIN ); - while (sol != NULL) { -// cout<<"une solution"< assign; - for (int i = 0; inbVars();i++) { - switch (sol->type_of_v[i]) { - case VTYPE_INT : - assign.push_back( (static_cast(sol->v[i]))->val() ); - break; - case VTYPE_BOOL : - assign.push_back( (static_cast(sol->v[i]))->val() ); - break; - default : - cout<<"5Unknown variable type"<nbVarInScope(scope-1) ); - int vmax = qs->nbVarInScope(scope)-1; - vector zevalues; - for (int i = vmin; i<=vmax;i++) { - switch (sol->type_of_v[i]) { - case VTYPE_INT : - zevalues.push_back( (static_cast(sol->v[i]))->val() ); - break; - case VTYPE_BOOL : - zevalues.push_back( (static_cast(sol->v[i]))->val() ); - break; - default : - cout<<"6unknown Variable type"<getVal(candidate); -// cout<<"score of candidate is "< score) { - retour=candidate; - score=score_of_candidate; - } - break; - default : - cout<<"Unknown opt type : "< -#include -#include "gecode/minimodel.hh" -#include "gecode/search.hh" -#include "Strategy.hh" -#include "qecode.hh" - -using namespace Gecode; -/** General QCSP+ / QCOP+ Solver. - * This class is the search engine for Qcop objects. -*/ -class QECODE_VTABLE_EXPORT QCOP_solver { - -private: - int n; - Qcop* sp; - int* nbRanges; - Strategy rSolve(Qcop* qs,int scope,vector assignments,unsigned long int& nodes); -public: - /** Public constructor. - @param sp The problem to solve - */ - QECODE_EXPORT QCOP_solver(Qcop* sp); - - /** Solves the problem and returns a corresponding winning strategy. - @param nodes A reference that is increased by the number of nodes encountered in the search tree. - */ - QECODE_EXPORT Strategy solve(unsigned long int& nodes); -}; - -#endif diff --git a/contribs/qecode/qsolver_qcsp.cc b/contribs/qecode/qsolver_qcsp.cc deleted file mode 100644 index 23db6dba59..0000000000 --- a/contribs/qecode/qsolver_qcsp.cc +++ /dev/null @@ -1,178 +0,0 @@ -/**** , [ QCSP_Solver.cc ], - Copyright (c) 2008 Universite d'Orleans - Jeremie Vautard - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - *************************************************************************/ - -#include "qsolver_qcsp.hh" -#include - -inline vector getTheValues(MySpace* sol,int vmin,int vmax) -{ - vector zevalues; - // cout< (sol->nbVars())) cout<<"getTheValues mal appele"<type_of_v[i]) { - case VTYPE_INT : - zevalues.push_back( (static_cast(sol->v[i]))->val() ); - break; - case VTYPE_BOOL : - zevalues.push_back( (static_cast(sol->v[i]))->val() ); - break; - default : - cout<<"4Unknown variable type"<sp = sp; - nbRanges=new int; -} - -Strategy QCSP_Solver::solve(unsigned long int& nodes, unsigned int limit,bool allStrategies) -{ - this->limit=limit; - MySpace* espace=sp->getSpace(0); - Options o; - Engine* solutions = new WorkerToEngine(espace,/*sizeof(MySpace),*/o); - return rSolve(sp,0,solutions,nodes,allStrategies); -} - - - -Strategy QCSP_Solver::rSolve(Qcop* qs,int scope,Engine* L, unsigned long int& nodes,bool allStrategies) -{ - nodes++; - MySpace* sol = static_cast(L->next()); - Strategy ret=Strategy::Dummy(); - bool LwasEmpty = true; - bool atLeastOneExistential = false; - while ((sol != NULL) ) { - LwasEmpty=false; - vector assignments = getTheValues(sol,0,sol->nbVars()-1); - Strategy result; - - if (scope == (qs->spaces() - 1) ) { // last scope reached. Verify the goal... - MySpace* g = qs->getGoal(); - for (int i=0; inbVars(); i++) { - switch (g->type_of_v[i]) { - case VTYPE_INT : - rel(*g,*(static_cast(g->v[i])) == assignments[i]); - break; - case VTYPE_BOOL : - rel(*g,*(static_cast(g->v[i])) == assignments[i]); - break; - default : - cout<<"Unknown variable type"< solutions(g); - MySpace* goalsol = solutions.next(); - if (goalsol == NULL) { - delete g; - result = Strategy::SFalse(); - } else { - int vmin = ( (scope==0)? 0 : (qs->nbVarInScope(scope-1)) ); - int vmax = (qs->nbVarInScope(scope))-1; - vector zevalues=getTheValues(sol,vmin,vmax); - result = Strategy::STrue(); -// result=Strategy(qs->quantification(scope),vmin,vmax,scope,zevalues); -// result.attach(Strategy::STrue()); - delete g; - // delete sol; - delete goalsol; - } - } - - else { // This is not the last scope... - MySpace* espace = qs->getSpace(scope+1); - for (int i=0; itype_of_v[i]) { - case VTYPE_INT : - rel(*espace,*(static_cast(espace->v[i])) == assignments[i]); - break; - case VTYPE_BOOL : - rel(*espace,*(static_cast(espace->v[i])) == assignments[i]); - break; - default : - cout<<"Unknown variable type"<(espace,/*sizeof(MySpace),*/o); - delete espace; - result=rSolve(qs,scope+1,solutions,nodes,allStrategies); - } - - int vmin = ( (scope == 0) ? 0 : (qs->nbVarInScope(scope-1)) ); - int vmax = (qs->nbVarInScope(scope))-1; - vector zevalues=getTheValues(sol,vmin,vmax); - delete sol; - if (qs->quantification(scope)) { // current scope is universal - if (result.isFalse()) { // one branch fails - delete L; - return Strategy::SFalse(); - } else { - Strategy toAttach(true,vmin,vmax,scope,zevalues); - toAttach.attach(result); - ret.attach(toAttach); - } - } else { //current scope is existential - if (!result.isFalse()) { // result is not the trivially false strategy... - atLeastOneExistential =true; - Strategy toAttach; - if (allStrategies) { - // We want to save every possible strategies. Each correct existential branch will be saved - if (scope >= limit) toAttach = Strategy::STrue(); - else { - toAttach = Strategy(qs->quantification(scope),vmin,vmax,scope,zevalues); - toAttach.attach(result); - } - ret.attach(toAttach); - } else { - //We want only one possible strategy. We found an assignment which leads to a valid substrategy. So, we return it immediately - delete L; - if (scope >= limit) return Strategy::STrue(); - ret = Strategy(qs->quantification(scope),vmin,vmax,scope,zevalues); - ret.attach(result); - return ret; - } - } - } - sol = static_cast(L->next()); - } - delete L; - if (scope>limit) - ret = Strategy::STrue(); - if (qs->quantification(scope)) //universal scope - return (LwasEmpty ? Strategy::STrue() : ret); - else // existnetial Scope - return (atLeastOneExistential ? ret : Strategy::SFalse()); -} diff --git a/contribs/qecode/qsolver_qcsp.hh b/contribs/qecode/qsolver_qcsp.hh deleted file mode 100644 index 6239d55e95..0000000000 --- a/contribs/qecode/qsolver_qcsp.hh +++ /dev/null @@ -1,66 +0,0 @@ -/**** , [ qsolver.hh ], -Copyright (c) 2010 Universite de Caen-Basse Normandie - Jeremie Vautard - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - *************************************************************************/ -#ifndef __QECODE_QSOLVER_QCSP__ -#define __QECODE_QSOLVER_QCSP__ - -#include "QCOPPlus.hh" -#include -#include -#include "gecode/minimodel.hh" -#include "gecode/search.hh" -#include "gecode/search/support.hh" -#include "gecode/search/sequential/dfs.hh" -#include -#include "Strategy.hh" -#include "qecode.hh" - -using namespace std; -using namespace Gecode::Support; -using namespace Gecode::Search; -using namespace Gecode::Search::Sequential; - -/** General QCSP+ / QCOP+ Solver. - * This class is the search engine for Qcop objects. -*/ -class QECODE_VTABLE_EXPORT QCSP_Solver { - -private: - unsigned int limit; - int n; - Qcop* sp; - int* nbRanges; - Strategy rSolve(Qcop* qs,int scope,Engine* L,unsigned long int& nodes,bool allStrategies); -public: - /** Public constructor. - @param sp The problem to solve - */ - QECODE_EXPORT QCSP_Solver(Qcop* sp); - - /** Solves the problem and returns a corresponding winning strategy. - @param nodes : A reference that is increased by the number of nodes encountered in the search tree. - @param limit : limit of the depth of the Strategy object returned. Any branch longer than this limit will be truncated. - @param allStrategies : indicate if the solver should return only one winning strategy, or all of them (condensed in one Strategy object, where existential nodes will not be unique) - */ - QECODE_EXPORT Strategy solve(unsigned long int& nodes,unsigned int limit=INT_MAX,bool allStrategies=false); -}; - -#endif diff --git a/contribs/qecode/qsolver_unblockable.cc b/contribs/qecode/qsolver_unblockable.cc deleted file mode 100755 index 1b9649f0ac..0000000000 --- a/contribs/qecode/qsolver_unblockable.cc +++ /dev/null @@ -1,423 +0,0 @@ -/**** , [ QSolverUnblockable.cc ], -Copyright (c) 2008 Universite d'Orleans - Jeremie Vautard - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*************************************************************************/ - -#include "qsolver_unblockable.hh" -#include - -QSolverUnblockable::QSolverUnblockable(QcspUnblockable* sp) { - this->sp = sp; - nbRanges=new int; -} - -Strategy QSolverUnblockable::solve(unsigned long int& nodes) { - vector plop; - plop.clear(); - return rSolve(sp,0,plop,nodes); -} - -Strategy QSolverUnblockable::rSolve(QcspUnblockable* qs,int scope, vector assignments, unsigned long int& nodes) { - nodes++; - //cout<<"rSolve for scope "<getGoal(); - if (g == NULL) {return Strategy(StrategyNode::SFalse());} - for (int i=0;itype_of_v[i]) { - case VTYPE_INT : - rel(*g,*(static_cast(g->v[i])) == assignments[i]); - break; - case VTYPE_BOOL : - rel(*g,*(static_cast(g->v[i])) == assignments[i]); - break; - default : - cout<<"1Unknown variable type"<status() == SS_FAILED) { - delete g; - return Strategy(StrategyNode::SFalse()); - } - delete g; - - if (scope == qs->spaces()) { - return Strategy(StrategyNode::STrue()); - } - - ///////////////////////////////////////////////////////////////////////////////////////// - // Second case : we are in the middle of the problem... // - ///////////////////////////////////////////////////////////////////////////////////////// - else { - MySpace* espace = qs->getSpace(scope); - if (espace == NULL) cout<<"I caught a NULL for scope "<type_of_v[i]) { - case VTYPE_INT : - rel(*espace,*(static_cast(espace->v[i])) == assignments[i]); - break; - case VTYPE_BOOL : - rel(*espace,*(static_cast(espace->v[i])) == assignments[i]); - break; - default : - cout<<"2Unknown variable type"<quantification(scope)) { - if (espace->status() == SS_FAILED) { - delete espace; - return Strategy(StrategyNode::STrue()); - } - - DFS solutions(espace); - MySpace* sol = solutions.next(); - if (sol == NULL) { - delete espace; - return Strategy(StrategyNode::STrue()); - } - - Strategy retour = StrategyNode::Dummy(); - while (sol != NULL) { - vector assign; - for (int i = 0; inbVarInScope(scope);i++) { - switch (sol->type_of_v[i]) { - case VTYPE_INT : - assign.push_back( (static_cast(sol->v[i]))->val() ); - break; - case VTYPE_BOOL : - assign.push_back( (static_cast(sol->v[i]))->val() ); - break; - default : - cout<<"3Unknown variable type"<nbVarInScope(scope-1)) ); - int vmax = (qs->nbVarInScope(scope))-1; - vector zevalues; - for (int i = vmin; i<=vmax;i++) { - switch (sol->type_of_v[i]) { - case VTYPE_INT : - zevalues.push_back( (static_cast(sol->v[i]))->val() ); - break; - case VTYPE_BOOL : - zevalues.push_back( (static_cast(sol->v[i]))->val() ); - break; - default : - cout<<"4Unknown variable type"<status()) == SS_FAILED) { - delete espace; - return Strategy(StrategyNode::SFalse()); - } - - DFS solutions(espace); - MySpace* sol =solutions.next(); - if (sol == NULL) { - delete espace; - return Strategy(StrategyNode::SFalse()); - } - while (sol != NULL) { - vector assign; - for (int i = 0; inbVarInScope(scope);i++) { - // cout << "i = "<type_of_v[i]) { - case VTYPE_INT : - assign.push_back( (static_cast(sol->v[i]))->val() ); - break; - case VTYPE_BOOL : - assign.push_back( (static_cast(sol->v[i]))->val() ); - break; - default : - cout<<"5Unknown variable type"<nbVarInScope(scope-1) ); - int vmax = qs->nbVarInScope(scope)-1; - vector zevalues; - for (int i = vmin; i<=vmax;i++) { - switch (sol->type_of_v[i]) { - case VTYPE_INT : - zevalues.push_back( (static_cast(sol->v[i]))->val() ); - break; - case VTYPE_BOOL : - zevalues.push_back( (static_cast(sol->v[i]))->val() ); - break; - default : - cout<<"6unknown Variable type"<sp = sp; - nbRanges=new int; -} - -Strategy QSolverUnblockable2::solve(unsigned long int& nodes) { - vector plop; - plop.clear(); - return rSolve(sp,0,plop,nodes); -} - -Strategy QSolverUnblockable2::rSolve(Qcop* qs,int scope, vector assignments, unsigned long int& nodes) { - nodes++; - //cout<<"rSolve for scope "<getGoal(); - if (g == NULL) {return Strategy(StrategyNode::SFalse());} - for (int i=0;itype_of_v[i]) { - case VTYPE_INT : - rel(*g,*(static_cast(g->v[i])) == assignments[i]); - break; - case VTYPE_BOOL : - rel(*g,*(static_cast(g->v[i])) == assignments[i]); - break; - default : - cout<<"1Unknown variable type"<status() == SS_FAILED) { - delete g; - return Strategy(StrategyNode::SFalse()); - } - delete g; - - if (scope == qs->spaces()) { - return Strategy(StrategyNode::STrue()); - } - - ///////////////////////////////////////////////////////////////////////////////////////// - // Second case : we are in the middle of the problem... // - ///////////////////////////////////////////////////////////////////////////////////////// - else { - MySpace* espace = qs->getSpace(scope); - if (espace == NULL) cout<<"I caught a NULL for scope "<type_of_v[i]) { - case VTYPE_INT : - rel(*espace,*(static_cast(espace->v[i])) == assignments[i]); - break; - case VTYPE_BOOL : - rel(*espace,*(static_cast(espace->v[i])) == assignments[i]); - break; - default : - cout<<"2Unknown variable type"<quantification(scope)) { - if (espace->status() == SS_FAILED) { - delete espace; - return Strategy(StrategyNode::STrue()); - } - - DFS solutions(espace); - MySpace* sol = solutions.next(); - if (sol == NULL) { - delete espace; - return Strategy(StrategyNode::STrue()); - } - - Strategy retour = StrategyNode::Dummy(); - while (sol != NULL) { - vector assign; - for (int i = 0; inbVarInScope(scope);i++) { - switch (sol->type_of_v[i]) { - case VTYPE_INT : - assign.push_back( (static_cast(sol->v[i]))->val() ); - break; - case VTYPE_BOOL : - assign.push_back( (static_cast(sol->v[i]))->val() ); - break; - default : - cout<<"3Unknown variable type"<nbVarInScope(scope-1)) ); - int vmax = (qs->nbVarInScope(scope))-1; - vector zevalues; - for (int i = vmin; i<=vmax;i++) { - switch (sol->type_of_v[i]) { - case VTYPE_INT : - zevalues.push_back( (static_cast(sol->v[i]))->val() ); - break; - case VTYPE_BOOL : - zevalues.push_back( (static_cast(sol->v[i]))->val() ); - break; - default : - cout<<"4Unknown variable type"<status()) == SS_FAILED) { - delete espace; - return Strategy(StrategyNode::SFalse()); - } - - DFS solutions(espace); - MySpace* sol =solutions.next(); - if (sol == NULL) { - delete espace; - return Strategy(StrategyNode::SFalse()); - } - while (sol != NULL) { - vector assign; - for (int i = 0; inbVarInScope(scope);i++) { - // cout << "i = "<type_of_v[i]) { - case VTYPE_INT : - assign.push_back( (static_cast(sol->v[i]))->val() ); - break; - case VTYPE_BOOL : - assign.push_back( (static_cast(sol->v[i]))->val() ); - break; - default : - cout<<"5Unknown variable type"<nbVarInScope(scope-1) ); - int vmax = qs->nbVarInScope(scope)-1; - vector zevalues; - for (int i = vmin; i<=vmax;i++) { - switch (sol->type_of_v[i]) { - case VTYPE_INT : - zevalues.push_back( (static_cast(sol->v[i]))->val() ); - break; - case VTYPE_BOOL : - zevalues.push_back( (static_cast(sol->v[i]))->val() ); - break; - default : - cout<<"6unknown Variable type"< -#include -#include "gecode/minimodel.hh" -#include "gecode/search.hh" -#include "Strategy.hh" -#include "qecode.hh" - -using namespace Gecode; - -/** Unblockable QCSP+ Solver. -* This class is the search engine for unblockable QCSP+ defined with the qpecial QcspUnblockable class. -*/ -class QECODE_VTABLE_EXPORT QSolverUnblockable { - -private: - int n; - QcspUnblockable* sp; - int* nbRanges; - Strategy rSolve(QcspUnblockable* qs,int scope,vector assignments,unsigned long int& nodes); - -public: - /** Public constructor. - @param sp The problem to solve - */ - QECODE_EXPORT QSolverUnblockable(QcspUnblockable* sp); - - /** Solves the problem and returns a corresponding winning strategy. - @param nodes A reference that is increased by the number of nodes encountered in the search tree. - */ - QECODE_EXPORT Strategy solve(unsigned long int& nodes); -}; - - -/** Unblockable QCSP+ Solver. -* This class is the search engine for unblockable QCSP+ defined with the general Qcop class. -*/ -class QECODE_VTABLE_EXPORT QSolverUnblockable2 { - -private: - int n; - Qcop* sp; - int* nbRanges; - Strategy rSolve(Qcop* qs,int scope,vector assignments,unsigned long int& nodes); - -public: - /** Public constructor. - @param sp The problem to solve - */ - QECODE_EXPORT QSolverUnblockable2(Qcop* sp); - - /** Solves the problem and returns a corresponding winning strategy. - WARNING : Defined optimization conditions and aggregates are NOT taken into account. - @param nodes A reference that is increased by the number of nodes encountered in the search tree. - */ - QECODE_EXPORT Strategy solve(unsigned long int& nodes); -}; - -#endif diff --git a/contribs/qecode/shortdesc.ac b/contribs/qecode/shortdesc.ac deleted file mode 100644 index 9d96dacfab..0000000000 --- a/contribs/qecode/shortdesc.ac +++ /dev/null @@ -1 +0,0 @@ -Qecode - A quantified constraint solver \ No newline at end of file diff --git a/contribs/qecode/vartype.hh b/contribs/qecode/vartype.hh deleted file mode 100644 index fa51ba97c1..0000000000 --- a/contribs/qecode/vartype.hh +++ /dev/null @@ -1,31 +0,0 @@ -/**** qecode2, [ vartype.hh ], -Copyright (c) 2007 Universite d'Orleans - Jeremie Vautard - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - *************************************************************************/ - -#ifndef QECODE_VARTYPE -#define QECODE_VARTYPE - -enum VarType { - VTYPE_INT, - VTYPE_BOOL -}; - -#endif diff --git a/contribs/quacode/CMakeLists.txt b/contribs/quacode/CMakeLists.txt deleted file mode 100644 index 47c58b73a9..0000000000 --- a/contribs/quacode/CMakeLists.txt +++ /dev/null @@ -1,200 +0,0 @@ -# -# Main authors: -# Vincent Barichard -# -# Copyright: -# Vincent Barichard, 2013 -# -# Last modified: -# $Date$ by $Author$ -# $Revision$ -# -# This file is part of Quacode: -# http://quacode.barichard.com -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# - -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) - -SET(GECODE_SRC "${CMAKE_SOURCE_DIR}/../.." CACHE PATH "Path where GeCode source is installed") -SET(GECODE_BIN "${GECODE_SRC}" CACHE PATH "Path where GeCode libs and binaries are installed") -SET(BUILD_EXAMPLES ON CACHE BOOL "Build examples or not") - -# If the user specifies -DCMAKE_BUILD_TYPE on the command line, take their definition -# and dump it in the cache along with proper documentation, otherwise set CMAKE_BUILD_TYPE -# to Debug prior to calling PROJECT() -# -IF(NOT DEFINED CMAKE_BUILD_TYPE) - # Check if Gecode is configured with --enable-debug - FILE(STRINGS ${GECODE_BIN}/config.status GECODE_DEBUG_BUILD REGEX "S\\[\"DEBUG_BUILD\"\\]=") - IF(GECODE_DEBUG_BUILD MATCHES "yes") - SET(QUACODE_BUILD_TYPE "Debug") - ELSE() - SET(QUACODE_BUILD_TYPE "Release") - ENDIF() - - SET(CMAKE_BUILD_TYPE "${QUACODE_BUILD_TYPE}" CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.") -ENDIF() - -PROJECT(Quacode) -SET(CMAKE_CXX_FLAGS "-std=c++11") - -SET(CMAKE_VERBOSE_MAKEFILE TRUE) - -# Check if Gecode is configured with --enable-audit -FILE(STRINGS ${GECODE_BIN}/config.status GECODE_AUDIT REGEX "D\\[\"GECODE_AUDIT\"\\]=") -IF(GECODE_AUDIT) - SET(QUACODE_AUDIT TRUE) -ELSE() - SET(QUACODE_AUDIT FALSE) -ENDIF() -SET(LOG_AUDIT ${QUACODE_AUDIT} CACHE BOOL "Set to true to generate log output.") - -IF(UNIX) - # determine, whether we want a static binary - SET(STATIC_LINKING FALSE CACHE BOOL "Build a static binary?") - # do we want static libraries? - IF(STATIC_LINKING) - SET(BUILD_SHARED_LIBS OFF) - # To know in source file that we compil static - ADD_DEFINITIONS(-DQUACODE_STATIC_LIBS) - # When STATIC_LINKING is TRUE, than cmake looks for libraries ending - # with .a. This is for linux only! - SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a") - SET(CMAKE_EXE_LINKER_FLAGS "-static") - # Remove flags to get rid off all the -Wl,Bydnamic - SET(CMAKE_EXE_LINK_DYNAMIC_C_FLAGS) - SET(CMAKE_EXE_LINK_DYNAMIC_CXX_FLAGS) - # Use static libs for Boost - SET(Boost_USE_STATIC_LIBS ON) - SET(Boost_USE_STATIC_RUNTIME ON) - ELSE(STATIC_LINKING) - SET(BUILD_SHARED_LIBS ON) - ENDIF(STATIC_LINKING) -ELSE(UNIX) - SET(BUILD_SHARED_LIBS ON) -ENDIF(UNIX) - -SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_MODULE_PATH}) -FIND_PACKAGE(Gecode) - -IF(NOT GECODE_FOUND) - MESSAGE(FATAL_ERROR "Gecode is needed, consider to install it") -ELSE (NOT GECODE_FOUND) - INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) - INCLUDE_DIRECTORIES(${GECODE_BIN}) - INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) - INCLUDE_DIRECTORIES(${GECODE_SRC}) - - LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) - LINK_DIRECTORIES(${GECODE_BIN}) - - IF (CMAKE_COMPILER_IS_GNUCXX) - ADD_DEFINITIONS(-Wall) - ADD_DEFINITIONS(-Wextra) - ADD_DEFINITIONS(-Wno-unused-local-typedefs) - ADD_DEFINITIONS(-fimplement-inlines) - ADD_DEFINITIONS(-fno-inline-functions) - ADD_DEFINITIONS(-pipe) - ADD_DEFINITIONS(-fPIC) - SET(CMAKE_CXX_FLAGS_DEBUG "-ggdb") - ENDIF () - - IF (LOG_AUDIT) - ADD_DEFINITIONS(-DLOG_AUDIT) - ENDIF() - - INCLUDE(CheckCXXCompilerFlag) - check_cxx_compiler_flag(-fvisibility=hidden HAVE_VISIBILITY_HIDDEN_FLAG) - IF (HAVE_VISIBILITY_HIDDEN_FLAG) - ADD_DEFINITIONS(-fvisibility=hidden) - ADD_DEFINITIONS(-DQUACODE_GCC_HAS_CLASS_VISIBILITY) - ENDIF() - - FIND_PACKAGE(Threads) - - SET(QUACODE_HEADERS - quacode/qcsp.hh - quacode/qspaceinfo.hh - quacode/support/dynamic-list.hh - quacode/support/log.hh - quacode/search/sequential/qpath.hh - quacode/search/sequential/qdfs.hh - quacode/qint/qbool.hh - ) - SET(QUACODE_HPP - quacode/qspaceinfo.hpp - quacode/search/qdfs.hpp - quacode/qint/watch.hpp - quacode/qint/qbool/clause.hpp - quacode/qint/qbool/eq.hpp - quacode/qint/qbool/eqv.hpp - quacode/qint/qbool/or.hpp - quacode/qint/qbool/xor.hpp - quacode/qint/qbool/xorv.hpp - ) - SET(QUACODE_SRCS - quacode/qspaceinfo.cpp - quacode/support/log.cpp - quacode/search/qdfs.cpp - quacode/search/sequential/qpath.cpp - quacode/qint/qbool/qbool.cpp - ${GECODE_SRC}/gecode/search/meta/nogoods.cpp - ) - SET(QUACODE_EXAMPLES_SRCS - examples/qbf.cpp - examples/qdimacs.cpp - examples/nim-fibo.cpp - examples/matrix-game.cpp - examples/connect-four.cpp - examples/baker.cpp - examples/rndQCSP.cpp - ) - - SOURCE_GROUP("Hpp Files" REGULAR_EXPRESSION ".hpp") - - SET_SOURCE_FILES_PROPERTIES(${ALL_HEADERS} PROPERTIES HEADER_FILE_ONLY TRUE) - SET_SOURCE_FILES_PROPERTIES(${ALL_HPP} PROPERTIES HEADER_FILE_ONLY TRUE) - - ADD_LIBRARY(quacode ${QUACODE_SRCS} ${QUACODE_HEADERS} ${QUACODE_HPP}) - TARGET_LINK_LIBRARIES(quacode ${GECODE_LIBRARIES}) - SET_TARGET_PROPERTIES(quacode PROPERTIES COMPILE_DEFINITIONS "BUILD_QUACODE_LIB") - INSTALL(TARGETS quacode LIBRARY DESTINATION lib ARCHIVE DESTINATION lib/static) - SET(QUACODE_LIBRARIES quacode) - - IF(BUILD_EXAMPLES) - # Add targets for examples - FOREACH (example ${QUACODE_EXAMPLES_SRCS}) - GET_FILENAME_COMPONENT(exampleBin ${example} NAME_WE) - ADD_EXECUTABLE(${exampleBin} ${example}) - TARGET_LINK_LIBRARIES(${exampleBin} ${QUACODE_LIBRARIES} ${GECODE_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) - INSTALL(TARGETS ${exampleBin} RUNTIME DESTINATION bin) - - # set -static, when STATIC_LINKING is TRUE and set LINK_SEARCH_END_STATIC - # to remove the additional -bdynamic from the linker line. - IF(UNIX AND STATIC_LINKING) - SET(CMAKE_EXE_LINKER_FLAGS "-static") - SET_TARGET_PROPERTIES(${exampleBin} PROPERTIES LINK_SEARCH_END_STATIC 1) - ENDIF(UNIX AND STATIC_LINKING) - ENDFOREACH () - ENDIF(BUILD_EXAMPLES) - -ENDIF(NOT GECODE_FOUND) diff --git a/contribs/quacode/FindGecode.cmake b/contribs/quacode/FindGecode.cmake deleted file mode 100644 index b2453e2846..0000000000 --- a/contribs/quacode/FindGecode.cmake +++ /dev/null @@ -1,94 +0,0 @@ -# -# Main authors: -# Vincent Barichard -# -# Copyright: -# Vincent Barichard, 2013 -# -# Last modified: -# $Date$ by $Author$ -# $Revision$ -# -# This file is part of Quacode: -# http://quacode.barichard.com -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# CMake package to find Gecode libraries and set usefull variables - -SET(GECODE_SEARCH_PATH ${GECODE_BIN} /usr/lib /usr/local/lib) - -FILE(STRINGS ${GECODE_BIN}/config.status GECODE_DLL_ARCH LIMIT_COUNT 1 REGEX "S\\[\"DLL_ARCH\"\\]=") -STRING(REGEX MATCH "=\"[^\"]*" GECODE_DLL_ARCH "${GECODE_DLL_ARCH}") -STRING(SUBSTRING "${GECODE_DLL_ARCH}" 2 -1 GECODE_DLL_ARCH) - -FIND_LIBRARY(GECODE_KERNEL_LIBRARIES gecodekernel${GECODE_DLL_ARCH} ${GECODE_SEARCH_PATH}) - -IF(GECODE_KERNEL_LIBRARIES) - SET(GECODE_FOUND TRUE) - SET(GECODE_LIBRARIES ${GECODE_KERNEL_LIBRARIES}) - - FIND_LIBRARY(GECODE_SUPPORT_LIBRARIES gecodesupport${GECODE_DLL_ARCH} ${GECODE_SEARCH_PATH}) - IF(GECODE_SUPPORT_LIBRARIES) - SET(GECODE_LIBRARIES ${GECODE_SUPPORT_LIBRARIES} ${GECODE_LIBRARIES}) - ENDIF(GECODE_SUPPORT_LIBRARIES) - - FIND_LIBRARY(GECODE_INT_LIBRARIES gecodeint${GECODE_DLL_ARCH} ${GECODE_SEARCH_PATH}) - IF(GECODE_INT_LIBRARIES) - SET(GECODE_LIBRARIES ${GECODE_INT_LIBRARIES} ${GECODE_LIBRARIES}) - ENDIF(GECODE_INT_LIBRARIES) - - FIND_LIBRARY(GECODE_FLOAT_LIBRARIES gecodefloat${GECODE_DLL_ARCH} ${GECODE_SEARCH_PATH}) - IF(GECODE_FLOAT_LIBRARIES) - SET(GECODE_LIBRARIES ${GECODE_FLOAT_LIBRARIES} ${GECODE_LIBRARIES}) - ENDIF(GECODE_FLOAT_LIBRARIES) - - FIND_LIBRARY(GECODE_SET_LIBRARIES gecodeset${GECODE_DLL_ARCH} ${GECODE_SEARCH_PATH}) - IF(GECODE_SET_LIBRARIES) - SET(GECODE_LIBRARIES ${GECODE_SET_LIBRARIES} ${GECODE_LIBRARIES}) - ENDIF(GECODE_SET_LIBRARIES) - - FIND_LIBRARY(GECODE_SEARCH_LIBRARIES gecodesearch${GECODE_DLL_ARCH} ${GECODE_SEARCH_PATH}) - IF(GECODE_SEARCH_LIBRARIES) - SET(GECODE_LIBRARIES ${GECODE_SEARCH_LIBRARIES} ${GECODE_LIBRARIES}) - ENDIF(GECODE_SEARCH_LIBRARIES) - - FIND_LIBRARY(GECODE_MINIMODEL_LIBRARIES gecodeminimodel${GECODE_DLL_ARCH} ${GECODE_SEARCH_PATH}) - IF(GECODE_MINIMODEL_LIBRARIES) - SET(GECODE_LIBRARIES ${GECODE_MINIMODEL_LIBRARIES} ${GECODE_LIBRARIES}) - ENDIF(GECODE_MINIMODEL_LIBRARIES) - - FIND_LIBRARY(GECODE_DRIVER_LIBRARIES gecodedriver${GECODE_DLL_ARCH} ${GECODE_SEARCH_PATH}) - IF(GECODE_DRIVER_LIBRARIES) - SET(GECODE_LIBRARIES ${GECODE_DRIVER_LIBRARIES} ${GECODE_LIBRARIES}) - ENDIF(GECODE_DRIVER_LIBRARIES) - - FIND_LIBRARY(GECODE_GIST_LIBRARIES gecodegist${GECODE_DLL_ARCH} ${GECODE_SEARCH_PATH}) - IF(GECODE_GIST_LIBRARIES) - SET(GECODE_LIBRARIES ${GECODE_GIST_LIBRARIES} ${GECODE_LIBRARIES}) - ENDIF(GECODE_GIST_LIBRARIES) - -ENDIF(GECODE_KERNEL_LIBRARIES) - -IF(GECODE_FOUND) - MESSAGE(STATUS "Found GECODE: ${GECODE_LIBRARIES}") -ELSE (GECODE_FOUND) - MESSAGE(STATUS "Could not find GECODE") -ENDIF(GECODE_FOUND) diff --git a/contribs/quacode/LICENSE b/contribs/quacode/LICENSE deleted file mode 100644 index b7d21f7ee9..0000000000 --- a/contribs/quacode/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ - QUACODE LICENSE AGREEMENT - -This software and its documentation are copyrighted by the -individual authors as listed in each file. The following -terms apply to all files associated with the software unless -explicitly disclaimed in individual files. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/contribs/quacode/README b/contribs/quacode/README deleted file mode 100644 index 69d838c4c1..0000000000 --- a/contribs/quacode/README +++ /dev/null @@ -1,26 +0,0 @@ -Quacode is a quantified constraint satisfaction -problems (QCSP) solver based on Gecode. - -Quacode have been developped by Vincent Barichard. -More info is available on http://quacode.barichard.com - -To compile Quacode, you have to install cmake. To setup the -compilation process for your environment, you can launch -cmake by invoking - cmake . -in the toplevel Quacode directory. - -By default, 'make install' will install all the files in -'/usr/local/bin', '/usr/local/lib' etc. You can specify -an installation prefix other than '/usr/local' setting the -'CMAKE_INSTALL_PREFIX' option, -for instance 'cmake -DCMAKE_INSTALL_PREFIX:PATH=$HOME .' - -Then you can compile the code by invoking - make -in the toplevel Quacode directory. - -After a successful compilation, you can install Quacode -library and examples by invoking - make install -in the build directory. diff --git a/contribs/quacode/doxygen/Doxyfile.conf b/contribs/quacode/doxygen/Doxyfile.conf deleted file mode 100644 index 6d2bd82f90..0000000000 --- a/contribs/quacode/doxygen/Doxyfile.conf +++ /dev/null @@ -1,2362 +0,0 @@ -# -# Main authors: -# Vincent Barichard -# -# Copyright: -# Vincent Barichard, 2014 -# -# Last modified: -# $Date$ by $Author$ -# $Revision$ -# -# This file is part of Quacode: -# http://quacode.barichard.com -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Doxyfile 1.8.7 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. -# -# All text after a double hash (##) is considered a comment and is placed in -# front of the TAG it is preceding. -# -# All text after a single hash (#) is considered a comment and will be ignored. -# The format is: -# TAG = value [value, ...] -# For lists, items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (\" \"). - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all text -# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv -# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv -# for the list of possible encodings. -# The default value is: UTF-8. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by -# double-quotes, unless you are using Doxywizard) that should identify the -# project for which the documentation is generated. This name is used in the -# title of most generated pages and in a few other places. -# The default value is: My Project. - -PROJECT_NAME = Quacode - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. This -# could be handy for archiving the generated documentation or if some version -# control system is used. - -PROJECT_NUMBER = 1.0.0 - -# Using the PROJECT_BRIEF tag one can provide an optional one line description -# for a project that appears at the top of each page and should give viewer a -# quick idea about the purpose of the project. Keep the description short. - -PROJECT_BRIEF = "Quantified Constraint Satisfaction Problems Solver" - -# With the PROJECT_LOGO tag one can specify an logo or icon that is included in -# the documentation. The maximum height of the logo should not exceed 55 pixels -# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo -# to the output directory. - -PROJECT_LOGO = /home/vincent/Sources/quacode/privateMisc/logo_quacode.png - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path -# into which the generated documentation will be written. If a relative path is -# entered, it will be relative to the location where doxygen was started. If -# left blank the current directory will be used. - -OUTPUT_DIRECTORY = ../../builds/doxygen - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- -# directories (in 2 levels) under the output directory of each output format and -# will distribute the generated files over these directories. Enabling this -# option can be useful when feeding doxygen a huge amount of source files, where -# putting all generated files in the same directory would otherwise causes -# performance problems for the file system. -# The default value is: NO. - -CREATE_SUBDIRS = NO - -# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII -# characters to appear in the names of generated files. If set to NO, non-ASCII -# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode -# U+3044. -# The default value is: NO. - -ALLOW_UNICODE_NAMES = YES - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, -# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), -# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, -# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, -# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, -# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, -# Ukrainian and Vietnamese. -# The default value is: English. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member -# descriptions after the members that are listed in the file and class -# documentation (similar to Javadoc). Set to NO to disable this. -# The default value is: YES. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief -# description of a member or function before the detailed description -# -# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. -# The default value is: YES. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator that is -# used to form the text in various listings. Each string in this list, if found -# as the leading text of the brief description, will be stripped from the text -# and the result, after processing the whole list, is used as the annotated -# text. Otherwise, the brief description is used as-is. If left blank, the -# following values are used ($name is automatically replaced with the name of -# the entity):The $name class, The $name widget, The $name file, is, provides, -# specifies, contains, represents, a, an and the. - -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# doxygen will generate a detailed section even if there is only a brief -# description. -# The default value is: NO. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. -# The default value is: NO. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path -# before files name in the file list and in the header files. If set to NO the -# shortest path that makes the file name unique will be used -# The default value is: YES. - -FULL_PATH_NAMES = YES - -# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. -# Stripping is only done if one of the specified strings matches the left-hand -# part of the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the path to -# strip. -# -# Note that you can specify absolute paths here, but also relative paths, which -# will be relative from the directory where doxygen is started. -# This tag requires that the tag FULL_PATH_NAMES is set to YES. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the -# path mentioned in the documentation of a class, which tells the reader which -# header file to include in order to use a class. If left blank only the name of -# the header file containing the class definition is used. Otherwise one should -# specify the list of include paths that are normally passed to the compiler -# using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but -# less readable) file names. This can be useful is your file systems doesn't -# support long names like on DOS, Mac, or CD-ROM. -# The default value is: NO. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the -# first line (until the first dot) of a Javadoc-style comment as the brief -# description. If set to NO, the Javadoc-style will behave just like regular Qt- -# style comments (thus requiring an explicit @brief command for a brief -# description.) -# The default value is: NO. - -JAVADOC_AUTOBRIEF = NO - -# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first -# line (until the first dot) of a Qt-style comment as the brief description. If -# set to NO, the Qt-style will behave just like regular Qt-style comments (thus -# requiring an explicit \brief command for a brief description.) -# The default value is: NO. - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a -# multi-line C++ special comment block (i.e. a block of //! or /// comments) as -# a brief description. This used to be the default behavior. The new default is -# to treat a multi-line C++ comment block as a detailed description. Set this -# tag to YES if you prefer the old behavior instead. -# -# Note that setting this tag to YES also means that rational rose comments are -# not recognized any more. -# The default value is: NO. - -MULTILINE_CPP_IS_BRIEF = YES - -# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the -# documentation from any documented member that it re-implements. -# The default value is: YES. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a -# new page for each member. If set to NO, the documentation of a member will be -# part of the file/class/namespace that contains it. -# The default value is: NO. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen -# uses this value to replace tabs by spaces in code fragments. -# Minimum value: 1, maximum value: 16, default value: 4. - -TAB_SIZE = 4 - -# This tag can be used to specify a number of aliases that act as commands in -# the documentation. An alias has the form: -# name=value -# For example adding -# "sideeffect=@par Side Effects:\n" -# will allow you to put the command \sideeffect (or @sideeffect) in the -# documentation, which will result in a user-defined paragraph with heading -# "Side Effects:". You can put \n's in the value part of an alias to insert -# newlines. - -ALIASES = - -# This tag can be used to specify a number of word-keyword mappings (TCL only). -# A mapping has the form "name=value". For example adding "class=itcl::class" -# will allow you to use the command class in the itcl::class meaning. - -TCL_SUBST = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. For -# instance, some of the names that are used will be different. The list of all -# members will be omitted, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or -# Python sources only. Doxygen will then generate output that is more tailored -# for that language. For instance, namespaces will be presented as packages, -# qualified scopes will look different, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources. Doxygen will then generate output that is tailored for Fortran. -# The default value is: NO. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for VHDL. -# The default value is: NO. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given -# extension. Doxygen has a built-in mapping, but you can override or extend it -# using this tag. The format is ext=language, where ext is a file extension, and -# language is one of the parsers supported by doxygen: IDL, Java, Javascript, -# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: -# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: -# Fortran. In the later case the parser tries to guess whether the code is fixed -# or free formatted code, this is the default for Fortran type files), VHDL. For -# instance to make doxygen treat .inc files as Fortran files (default is PHP), -# and .f files as C (default is Fortran), use: inc=Fortran f=C. -# -# Note For files without extension you can use no_extension as a placeholder. -# -# Note that for custom extensions you also need to set FILE_PATTERNS otherwise -# the files are not read by doxygen. - -EXTENSION_MAPPING = - -# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments -# according to the Markdown format, which allows for more readable -# documentation. See http://daringfireball.net/projects/markdown/ for details. -# The output of markdown processing is further processed by doxygen, so you can -# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in -# case of backward compatibilities issues. -# The default value is: YES. - -MARKDOWN_SUPPORT = YES - -# When enabled doxygen tries to link words that correspond to documented -# classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by by putting a % sign in front of the word -# or globally by setting AUTOLINK_SUPPORT to NO. -# The default value is: YES. - -AUTOLINK_SUPPORT = YES - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should set this -# tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); -# versus func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. -# The default value is: NO. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. -# The default value is: NO. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen -# will parse them like normal C++ but will assume all classes use public instead -# of private inheritance when no explicit protection keyword is present. -# The default value is: NO. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate -# getter and setter methods for a property. Setting this option to YES will make -# doxygen to replace the get and set methods by a property in the documentation. -# This will only work if the methods are indeed getting or setting a simple -# type. If this is not the case, or you want to show the methods anyway, you -# should set this option to NO. -# The default value is: YES. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. -# The default value is: NO. - -DISTRIBUTE_GROUP_DOC = NO - -# Set the SUBGROUPING tag to YES to allow class member groups of the same type -# (for instance a group of public functions) to be put as a subgroup of that -# type (e.g. under the Public Functions section). Set it to NO to prevent -# subgrouping. Alternatively, this can be done per class using the -# \nosubgrouping command. -# The default value is: YES. - -SUBGROUPING = NO - -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions -# are shown inside the group in which they are included (e.g. using \ingroup) -# instead of on a separate page (for HTML and Man pages) or section (for LaTeX -# and RTF). -# -# Note that this feature does not work in combination with -# SEPARATE_MEMBER_PAGES. -# The default value is: NO. - -INLINE_GROUPED_CLASSES = NO - -# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions -# with only public data fields or simple typedef fields will be shown inline in -# the documentation of the scope in which they are defined (i.e. file, -# namespace, or group documentation), provided this scope is documented. If set -# to NO, structs, classes, and unions are shown on a separate page (for HTML and -# Man pages) or section (for LaTeX and RTF). -# The default value is: NO. - -INLINE_SIMPLE_STRUCTS = NO - -# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or -# enum is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically be -# useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. -# The default value is: NO. - -TYPEDEF_HIDES_STRUCT = NO - -# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This -# cache is used to resolve symbols given their name and scope. Since this can be -# an expensive process and often the same symbol appears multiple times in the -# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small -# doxygen will become slower. If the cache is too large, memory is wasted. The -# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range -# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 -# symbols. At the end of a run doxygen will report the cache usage and suggest -# the optimal cache size from a speed point of view. -# Minimum value: 0, maximum value: 9, default value: 0. - -LOOKUP_CACHE_SIZE = 0 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. Private -# class members and static file members will be hidden unless the -# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. -# Note: This will also disable the warnings about undocumented members that are -# normally produced when WARNINGS is set to YES. -# The default value is: NO. - -EXTRACT_ALL = YES - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will -# be included in the documentation. -# The default value is: NO. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal -# scope will be included in the documentation. -# The default value is: NO. - -EXTRACT_PACKAGE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file will be -# included in the documentation. -# The default value is: NO. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO -# only classes defined in header files are included. Does not have any effect -# for Java sources. -# The default value is: YES. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local methods, -# which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO only methods in the interface are -# included. -# The default value is: NO. - -EXTRACT_LOCAL_METHODS = YES - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base name of -# the file that contains the anonymous namespace. By default anonymous namespace -# are hidden. -# The default value is: NO. - -EXTRACT_ANON_NSPACES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all -# undocumented members inside documented classes or files. If set to NO these -# members will be included in the various overviews, but no documentation -# section is generated. This option has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_MEMBERS = YES - -# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. If set -# to NO these classes will be included in the various overviews. This option has -# no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_CLASSES = YES - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# (class|struct|union) declarations. If set to NO these declarations will be -# included in the documentation. -# The default value is: NO. - -HIDE_FRIEND_COMPOUNDS = YES - -# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO these -# blocks will be appended to the function's detailed documentation block. -# The default value is: NO. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation that is typed after a -# \internal command is included. If the tag is set to NO then the documentation -# will be excluded. Set it to YES to include the internal documentation. -# The default value is: NO. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file -# names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. -# The default value is: system dependent. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES the -# scope will be hidden. -# The default value is: NO. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of -# the files that are included by a file in the documentation of that file. -# The default value is: YES. - -SHOW_INCLUDE_FILES = YES - -# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each -# grouped member an include statement to the documentation, telling the reader -# which file to include in order to use the member. -# The default value is: NO. - -SHOW_GROUPED_MEMB_INC = NO - -# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include -# files with double quotes in the documentation rather than with sharp brackets. -# The default value is: NO. - -FORCE_LOCAL_INCLUDES = NO - -# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the -# documentation for inline members. -# The default value is: YES. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the -# (detailed) documentation of file and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. -# The default value is: YES. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief -# descriptions of file, namespace and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. Note that -# this will also influence the order of the classes in the class list. -# The default value is: NO. - -SORT_BRIEF_DOCS = NO - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the -# (brief and detailed) documentation of class members so that constructors and -# destructors are listed first. If set to NO the constructors will appear in the -# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. -# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief -# member documentation. -# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting -# detailed member documentation. -# The default value is: NO. - -SORT_MEMBERS_CTORS_1ST = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy -# of group names into alphabetical order. If set to NO the group names will -# appear in their defined order. -# The default value is: NO. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by -# fully-qualified names, including namespaces. If set to NO, the class list will -# be sorted only by class name, not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the alphabetical -# list. -# The default value is: NO. - -SORT_BY_SCOPE_NAME = YES - -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper -# type resolution of all parameters of a function it will reject a match between -# the prototype and the implementation of a member function even if there is -# only one candidate or it is obvious which candidate to choose by doing a -# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still -# accept a match between prototype and implementation in such cases. -# The default value is: NO. - -STRICT_PROTO_MATCHING = NO - -# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the -# todo list. This list is created by putting \todo commands in the -# documentation. -# The default value is: YES. - -GENERATE_TODOLIST = NO - -# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the -# test list. This list is created by putting \test commands in the -# documentation. -# The default value is: YES. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug -# list. This list is created by putting \bug commands in the documentation. -# The default value is: YES. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) -# the deprecated list. This list is created by putting \deprecated commands in -# the documentation. -# The default value is: YES. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional documentation -# sections, marked by \if ... \endif and \cond -# ... \endcond blocks. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the -# initial value of a variable or macro / define can have for it to appear in the -# documentation. If the initializer consists of more lines than specified here -# it will be hidden. Use a value of 0 to hide initializers completely. The -# appearance of the value of individual variables and macros / defines can be -# controlled using \showinitializer or \hideinitializer command in the -# documentation regardless of this setting. -# Minimum value: 0, maximum value: 10000, default value: 30. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES the list -# will mention the files that were used to generate the documentation. -# The default value is: YES. - -SHOW_USED_FILES = YES - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This -# will remove the Files entry from the Quick Index and from the Folder Tree View -# (if specified). -# The default value is: YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces -# page. This will remove the Namespaces entry from the Quick Index and from the -# Folder Tree View (if specified). -# The default value is: YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command command input-file, where command is the value of the -# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided -# by doxygen. Whatever the program writes to standard output is used as the file -# version. For an example see the documentation. - -FILE_VERSION_FILTER = "doxygen/getrevision.sh" - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed -# by doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. To create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. You can -# optionally specify a file name after the option, if omitted DoxygenLayout.xml -# will be used as the name of the layout file. -# -# Note that if you run doxygen from a directory containing a file called -# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE -# tag is left empty. - -LAYOUT_FILE = - -# The CITE_BIB_FILES tag can be used to specify one or more bib files containing -# the reference definitions. This must be a list of .bib files. The .bib -# extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. -# For LaTeX the style of the bibliography can be controlled using -# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the -# search path. Do not use file names with spaces, bibtex cannot handle them. See -# also \cite for info how to create references. - -CITE_BIB_FILES = - -#--------------------------------------------------------------------------- -# Configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated to -# standard output by doxygen. If QUIET is set to YES this implies that the -# messages are off. -# The default value is: NO. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES -# this implies that the warnings are on. -# -# Tip: Turn warnings on while writing the documentation. -# The default value is: YES. - -WARNINGS = YES - -# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate -# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag -# will automatically be disabled. -# The default value is: YES. - -WARN_IF_UNDOCUMENTED = YES - -# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some parameters -# in a documented function, or documenting parameters that don't exist or using -# markup commands wrongly. -# The default value is: YES. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that -# are documented, but have no documentation for their parameters or return -# value. If set to NO doxygen will only warn about wrong or incomplete parameter -# documentation, but not about the absence of documentation. -# The default value is: NO. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that doxygen -# can produce. The string should contain the $file, $line, and $text tags, which -# will be replaced by the file and line number from which the warning originated -# and the warning text. Optionally the format may contain $version, which will -# be replaced by the version of the file (if it could be obtained via -# FILE_VERSION_FILTER) -# The default value is: $file:$line: $text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning and error -# messages should be written. If left blank the output is written to standard -# error (stderr). - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# Configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag is used to specify the files and/or directories that contain -# documented source files. You may enter file names like myfile.cpp or -# directories like /usr/src/myproject. Separate the files or directories with -# spaces. -# Note: If this tag is empty the current directory is searched. - -INPUT = - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses -# libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: http://www.gnu.org/software/libiconv) for the list of -# possible encodings. -# The default value is: UTF-8. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank the -# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, -# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, -# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, -# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, -# *.qsf, *.as and *.js. - -FILE_PATTERNS = *.c \ - *.cc \ - *.cpp \ - *.h \ - *.hh \ - *.hpp \ - *.md - -# The RECURSIVE tag can be used to specify whether or not subdirectories should -# be searched for input files as well. -# The default value is: NO. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should be -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. -# -# Note that relative paths are relative to the directory from which doxygen is -# run. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or -# directories that are symbolic links (a Unix file system feature) are excluded -# from the input. -# The default value is: NO. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories for example use the pattern */test/* - -EXCLUDE_PATTERNS = *privateMisc/* - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories use the pattern */test/* - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or directories -# that contain example code fragments that are included (see the \include -# command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank all -# files are included. - -EXAMPLE_PATTERNS = * - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude commands -# irrespective of the value of the RECURSIVE tag. -# The default value is: NO. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or directories -# that contain images that are to be included in the documentation (see the -# \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command: -# -# -# -# where is the value of the INPUT_FILTER tag, and is the -# name of an input file. Doxygen will then use the output that the filter -# program writes to standard output. If FILTER_PATTERNS is specified, this tag -# will be ignored. -# -# Note that the filter must not add or remove lines; it is applied before the -# code is scanned, but not when the output code is generated. If lines are added -# or removed, the anchors will not be placed correctly. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: pattern=filter -# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how -# filters are used. If the FILTER_PATTERNS tag is empty or if none of the -# patterns match the file name, INPUT_FILTER is applied. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER ) will also be used to filter the input files that are used for -# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). -# The default value is: NO. - -FILTER_SOURCE_FILES = NO - -# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and -# it is also possible to disable source filtering for a specific pattern using -# *.ext= (so without naming a filter). -# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. - -FILTER_SOURCE_PATTERNS = - -# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that -# is part of the input, its contents will be placed on the main page -# (index.html). This can be useful if you have a project on for instance GitHub -# and want to reuse the introduction page also for the doxygen output. - -USE_MDFILE_AS_MAINPAGE = - -#--------------------------------------------------------------------------- -# Configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will be -# generated. Documented entities will be cross-referenced with these sources. -# -# Note: To get rid of all source code in the generated output, make sure that -# also VERBATIM_HEADERS is set to NO. -# The default value is: NO. - -SOURCE_BROWSER = YES - -# Setting the INLINE_SOURCES tag to YES will include the body of functions, -# classes and enums directly into the documentation. -# The default value is: NO. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any -# special comment blocks from generated source code fragments. Normal C, C++ and -# Fortran comments will always remain visible. -# The default value is: YES. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES then for each documented -# function all documented functions referencing it will be listed. -# The default value is: NO. - -REFERENCED_BY_RELATION = NO - -# If the REFERENCES_RELATION tag is set to YES then for each documented function -# all documented entities called/used by that function will be listed. -# The default value is: NO. - -REFERENCES_RELATION = NO - -# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES, then the hyperlinks from functions in REFERENCES_RELATION and -# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will -# link to the documentation. -# The default value is: YES. - -REFERENCES_LINK_SOURCE = YES - -# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the -# source code will show a tooltip with additional information such as prototype, -# brief description and links to the definition and documentation. Since this -# will make the HTML file larger and loading of large files a bit slower, you -# can opt to disable this feature. -# The default value is: YES. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -SOURCE_TOOLTIPS = YES - -# If the USE_HTAGS tag is set to YES then the references to source code will -# point to the HTML generated by the htags(1) tool instead of doxygen built-in -# source browser. The htags tool is part of GNU's global source tagging system -# (see http://www.gnu.org/software/global/global.html). You will need version -# 4.8.6 or higher. -# -# To use it do the following: -# - Install the latest version of global -# - Enable SOURCE_BROWSER and USE_HTAGS in the config file -# - Make sure the INPUT points to the root of the source tree -# - Run doxygen as normal -# -# Doxygen will invoke htags (and that will in turn invoke gtags), so these -# tools must be available from the command line (i.e. in the search path). -# -# The result: instead of the source browser generated by doxygen, the links to -# source code will now point to the output of htags. -# The default value is: NO. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a -# verbatim copy of the header file for each class for which an include is -# specified. Set to NO to disable this. -# See also: Section \class. -# The default value is: YES. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# Configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all -# compounds will be generated. Enable this if the project contains a lot of -# classes, structs, unions or interfaces. -# The default value is: YES. - -ALPHABETICAL_INDEX = YES - -# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in -# which the alphabetical index list will be split. -# Minimum value: 1, maximum value: 20, default value: 5. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all classes will -# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag -# can be used to specify a prefix (or a list of prefixes) that should be ignored -# while generating the index headers. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output -# The default value is: YES. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a -# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of -# it. -# The default directory is: html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each -# generated HTML page (for example: .htm, .php, .asp). -# The default value is: .html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a user-defined HTML header file for -# each generated HTML page. If the tag is left blank doxygen will generate a -# standard header. -# -# To get valid HTML the header file that includes any scripts and style sheets -# that doxygen needs, which is dependent on the configuration options used (e.g. -# the setting GENERATE_TREEVIEW). It is highly recommended to start with a -# default header using -# doxygen -w html new_header.html new_footer.html new_stylesheet.css -# YourConfigFile -# and then modify the file new_header.html. See also section "Doxygen usage" -# for information on how to generate the default header that doxygen normally -# uses. -# Note: The header is subject to change so you typically have to regenerate the -# default header when upgrading to a newer version of doxygen. For a description -# of the possible markers and block names see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each -# generated HTML page. If the tag is left blank doxygen will generate a standard -# footer. See HTML_HEADER for more information on how to generate a default -# footer and what special commands can be used inside the footer. See also -# section "Doxygen usage" for information on how to generate the default footer -# that doxygen normally uses. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style -# sheet that is used by each HTML page. It can be used to fine-tune the look of -# the HTML output. If left blank doxygen will generate a default style sheet. -# See also section "Doxygen usage" for information on how to generate the style -# sheet that doxygen normally uses. -# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as -# it is more robust and this tag (HTML_STYLESHEET) will in the future become -# obsolete. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_STYLESHEET = - -# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user- -# defined cascading style sheet that is included after the standard style sheets -# created by doxygen. Using this option one can overrule certain style aspects. -# This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefor more robust against future updates. -# Doxygen will copy the style sheet file to the output directory. For an example -# see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_STYLESHEET = - -# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or -# other source files which should be copied to the HTML output directory. Note -# that these files will be copied to the base HTML output directory. Use the -# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these -# files. In the HTML_STYLESHEET file, use the file name only. Also note that the -# files will be copied as-is; there are no commands or markers available. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_FILES = - -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the stylesheet and background images according to -# this color. Hue is specified as an angle on a colorwheel, see -# http://en.wikipedia.org/wiki/Hue for more information. For instance the value -# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 -# purple, and 360 is red again. -# Minimum value: 0, maximum value: 359, default value: 220. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_HUE = 220 - -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors -# in the HTML output. For a value of 0 the output will use grayscales only. A -# value of 255 will produce the most vivid colors. -# Minimum value: 0, maximum value: 255, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_SAT = 100 - -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the -# luminance component of the colors in the HTML output. Values below 100 -# gradually make the output lighter, whereas values above 100 make the output -# darker. The value divided by 100 is the actual gamma applied, so 80 represents -# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not -# change the gamma. -# Minimum value: 40, maximum value: 240, default value: 80. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_GAMMA = 80 - -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting this -# to NO can help when comparing the output of multiple runs. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_TIMESTAMP = YES - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_SECTIONS = NO - -# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries -# shown in the various tree structured indices initially; the user can expand -# and collapse entries dynamically later on. Doxygen will expand the tree to -# such a level that at most the specified number of entries are visible (unless -# a fully collapsed tree already exceeds this amount). So setting the number of -# entries 1 will produce a full collapsed tree by default. 0 is a special value -# representing an infinite number of entries and will result in a full expanded -# tree by default. -# Minimum value: 0, maximum value: 9999, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_INDEX_NUM_ENTRIES = 100 - -# If the GENERATE_DOCSET tag is set to YES, additional index files will be -# generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: http://developer.apple.com/tools/xcode/), introduced with -# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a -# Makefile in the HTML output directory. Running make will produce the docset in -# that directory and running make install will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at -# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html -# for more information. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_DOCSET = NO - -# This tag determines the name of the docset feed. A documentation feed provides -# an umbrella under which multiple documentation sets from a single provider -# (such as a company or product suite) can be grouped. -# The default value is: Doxygen generated docs. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# This tag specifies a string that should uniquely identify the documentation -# set bundle. This should be a reverse domain-name style string, e.g. -# com.mycompany.MyDocSet. Doxygen will append .docset to the name. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify -# the documentation publisher. This should be a reverse domain-name style -# string, e.g. com.mycompany.MyDocSet.documentation. -# The default value is: org.doxygen.Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_ID = org.doxygen.Publisher - -# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. -# The default value is: Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_NAME = Publisher - -# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three -# additional HTML index files: index.hhp, index.hhc, and index.hhk. The -# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on -# Windows. -# -# The HTML Help Workshop contains a compiler that can convert all HTML output -# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML -# files are now used as the Windows 98 help format, and will replace the old -# Windows help format (.hlp) on all Windows platforms in the future. Compressed -# HTML files also contain an index, a table of contents, and you can search for -# words in the documentation. The HTML workshop also contains a viewer for -# compressed HTML files. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_HTMLHELP = NO - -# The CHM_FILE tag can be used to specify the file name of the resulting .chm -# file. You can add a path in front of the file if the result should not be -# written to the html output directory. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_FILE = - -# The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler ( hhc.exe). If non-empty -# doxygen will try to run the HTML help compiler on the generated index.hhp. -# The file has to be specified with full path. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -HHC_LOCATION = - -# The GENERATE_CHI flag controls if a separate .chi index file is generated ( -# YES) or that it should be included in the master .chm file ( NO). -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -GENERATE_CHI = NO - -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) -# and project file content. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_INDEX_ENCODING = - -# The BINARY_TOC flag controls whether a binary table of contents is generated ( -# YES) or a normal table of contents ( NO) in the .chm file. Furthermore it -# enables the Previous and Next buttons. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members to -# the table of contents of the HTML help documentation and to the tree view. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -TOC_EXPAND = NO - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that -# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help -# (.qch) of the generated HTML documentation. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify -# the file name of the resulting .qch file. The path specified is relative to -# the HTML output folder. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help -# Project output. For more information please see Qt Help Project / Namespace -# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_NAMESPACE = org.doxygen.Project - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt -# Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- -# folders). -# The default value is: doc. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_VIRTUAL_FOLDER = doc - -# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom -# filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's filter section matches. Qt Help Project / Filter Attributes (see: -# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_SECT_FILTER_ATTRS = - -# The QHG_LOCATION tag can be used to specify the location of Qt's -# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the -# generated .qhp file. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHG_LOCATION = - -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be -# generated, together with the HTML files, they form an Eclipse help plugin. To -# install this plugin and make it available under the help contents menu in -# Eclipse, the contents of the directory containing the HTML and XML files needs -# to be copied into the plugins directory of eclipse. The name of the directory -# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. -# After copying Eclipse needs to be restarted before the help appears. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_ECLIPSEHELP = NO - -# A unique identifier for the Eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have this -# name. Each documentation set should have its own identifier. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. - -ECLIPSE_DOC_ID = org.doxygen.Project - -# If you want full control over the layout of the generated HTML pages it might -# be necessary to disable the index and replace it with your own. The -# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top -# of each HTML page. A value of NO enables the index and the value YES disables -# it. Since the tabs in the index contain the same information as the navigation -# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -DISABLE_INDEX = NO - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. If the tag -# value is set to YES, a side panel will be generated containing a tree-like -# index structure (just like the one that is generated for HTML Help). For this -# to work a browser that supports JavaScript, DHTML, CSS and frames is required -# (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can -# further fine-tune the look of the index. As an example, the default style -# sheet generated by doxygen has an example that shows how to put an image at -# the root of the tree instead of the PROJECT_NAME. Since the tree basically has -# the same information as the tab index, you could consider setting -# DISABLE_INDEX to YES when enabling this option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_TREEVIEW = NO - -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that -# doxygen will group on one line in the generated HTML documentation. -# -# Note that a value of 0 will completely suppress the enum values from appearing -# in the overview section. -# Minimum value: 0, maximum value: 20, default value: 4. -# This tag requires that the tag GENERATE_HTML is set to YES. - -ENUM_VALUES_PER_LINE = 4 - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used -# to set the initial width (in pixels) of the frame in which the tree is shown. -# Minimum value: 0, maximum value: 1500, default value: 250. -# This tag requires that the tag GENERATE_HTML is set to YES. - -TREEVIEW_WIDTH = 250 - -# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to -# external symbols imported via tag files in a separate window. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -EXT_LINKS_IN_WINDOW = NO - -# Use this tag to change the font size of LaTeX formulas included as images in -# the HTML documentation. When you change the font size after a successful -# doxygen run you need to manually remove any form_*.png images from the HTML -# output directory to force them to be regenerated. -# Minimum value: 8, maximum value: 50, default value: 10. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_FONTSIZE = 10 - -# Use the FORMULA_TRANPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are not -# supported properly for IE 6.0, but are supported on all modern browsers. -# -# Note that when changing this option you need to delete any form_*.png files in -# the HTML output directory before the changes have effect. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_TRANSPARENT = YES - -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# http://www.mathjax.org) which uses client side Javascript for the rendering -# instead of using prerendered bitmaps. Use this if you do not have LaTeX -# installed or if you want to formulas look prettier in the HTML output. When -# enabled you may also need to install MathJax separately and configure the path -# to it using the MATHJAX_RELPATH option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -USE_MATHJAX = NO - -# When MathJax is enabled you can set the default output format to be used for -# the MathJax output. See the MathJax site (see: -# http://docs.mathjax.org/en/latest/output.html) for more details. -# Possible values are: HTML-CSS (which is slower, but has the best -# compatibility), NativeMML (i.e. MathML) and SVG. -# The default value is: HTML-CSS. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_FORMAT = HTML-CSS - -# When MathJax is enabled you need to specify the location relative to the HTML -# output directory using the MATHJAX_RELPATH option. The destination directory -# should contain the MathJax.js script. For instance, if the mathjax directory -# is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax -# Content Delivery Network so you can quickly see the result without installing -# MathJax. However, it is strongly recommended to install a local copy of -# MathJax from http://www.mathjax.org before deployment. -# The default value is: http://cdn.mathjax.org/mathjax/latest. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest - -# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax -# extension names that should be enabled during MathJax rendering. For example -# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_EXTENSIONS = - -# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces -# of code that will be used on startup of the MathJax code. See the MathJax site -# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an -# example see the documentation. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_CODEFILE = - -# When the SEARCHENGINE tag is enabled doxygen will generate a search box for -# the HTML output. The underlying search engine uses javascript and DHTML and -# should work on any modern browser. Note that when using HTML help -# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) -# there is already a search function so this one should typically be disabled. -# For large projects the javascript based search engine can be slow, then -# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to -# search using the keyboard; to jump to the search box use + S -# (what the is depends on the OS and browser, but it is typically -# , /