Commit 1972cdba authored by alainm's avatar alainm
Browse files

version used for the initial Merge


git-svn-id: https://svn.oca.eu/codes/DISK/fargOCA/tags/fargo3D@2385 d5a9fe6a-16c7-4aab-97df-e63fc41ba8b9

Former-commit-id: 8ff05b3bf280ff6553b3f1f861f66f09a7332332
parent d2238105
OLDBUILD = sequential
BUILD = sequential
cmake_minimum_required(VERSION 2.8)
project("Fargo ADC" CXX C)
enable_language(C)
enable_language(CXX)
enable_testing()
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
message(INFO " Compiling with ${CMAKE_CXX_COMPILER}")
find_package(OpenMP)
if (OPENMP_FOUND)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
message(INFO "\t Found OpenMP option ${OpenMP_C_FLAGS}.")
else ()
message(WARN "\t Could not find OpenMP compilation option.")
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
find_package(MPI)
if(NOT MPI_C_FOUND)
message(FATAL "\t No MPI found, install one.")
endif()
include_directories(${CMAKE_SOURCE_DIR}/include)
include_directories(${MPI_CXX_INCLUDE_PATH})
#set(Boost_USE_STATIC_LIBS ON)
#set(Boost_USE_MULTITHREADED OFF)
#set(Boost_USE_DEBUG_RUNTIME OFF)
set(Boost_NO_BOOST_CMAKE ON)
find_package(Boost)
# COMPONENTS program_options)
if(Boost_FOUND)
message(STATUS "Boost include dir: ${Boost_INCLUDE_DIR}")
include_directories(${Boost_INCLUDE_DIR})
#link_directories(${Boost_LIBRARY_DIR})
endif()
add_executable(fargo mainADC.cpp)
target_link_libraries(fargo fargoADC)
add_custom_command(
OUTPUT include/ADC/global_ex.h
COMMAND ${CMAKE_SOURCE_DIR}/globalvaradc.pl
COMMAND ${CMAKE_COMMAND} -E copy_if_different global_ex_adc.hnew include/ADC/global_ex.h
DEPENDS include/ADC/global.h globalvaradc.pl
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMENT "Building globalvar headers."
VERBATIM
)
add_custom_target(global_vars DEPENDS include/ADC/global_ex.h)
add_custom_command(
OUTPUT include/ADC/param.h include/ADC/param_noex.h
COMMAND ${CMAKE_SOURCE_DIR}/varparseradc.pl
COMMAND ${CMAKE_COMMAND} -E copy_if_different param.hnew include/ADC/param.h
COMMAND ${CMAKE_COMMAND} -E copy_if_different param_noex.hnew include/ADC/param_noex.h
DEPENDS src/ADC/var.cpp varparseradc.pl
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMENT "Building param headers."
VERBATIM
)
add_custom_target(param_vars DEPENDS include/ADC/param.h include/ADC/param_noex.h)
add_executable(adimvalue adimvalue.cpp)
target_link_libraries(adimvalue m)
add_executable(convert convert.cpp)
target_link_libraries(convert m)
add_test(test_adim_value ./test_adim_value.sh)
configure_file(test_adim_value.sh test_adim_value.sh @ONLY)
add_subdirectory(tools)
add_subdirectory(test)
add_subdirectory(src/ADC)
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "ADC/fundamental.h"
using namespace ADC;
static
double
computeadimvalue(double dimvalue,
double nm, double nl, double nt, double nu);
static
double
computedimvalue(double adimvalue,
double nm, double nl, double nt, double nu);
const double Msol = 2.0e30; // masse du soleil
const double AU = 1.5e11; // dist Terre-Soleil en metres
const double annee = 3.1558e7; // nb de secondes dans un an
const double tempref = 2.5797e5; // T tq R/mu = 1
/* Les dimensions sont notees
M (masse),
L (longueur),
T (temps) et
U (temperature) */
int main() {
double nl, nm, nt, nu;
char charquoi;
double dimvalue, adimvalue;
printf ("Voulez-vous calculer une grandeur adimensionnee ou dimensionnee? Taper A ou D...\n");
scanf ("%s", &charquoi);
if ( (charquoi != 'A') && (charquoi != 'D') ){
printf ("Abruti, tu dois taper un A ou un D!! Essaie encore :) \n");
return 0;
}
if ( charquoi == 'A') {
printf ("Taper la valeur de la grandeur que vous souhaiter calculer adimensionnée\n");
scanf ("%lg", &dimvalue);
printf ("Il me faut connaitre la dimension de la grandeur a adimensionner.\nNotons-la pow(M,nm) x pow(L,nl) x pow(T,nt) x pow(U,nu),\nou M=masse, L=longueur, T=temps et U=temperature\n");
printf ("valeur de nm?\n");
scanf ("%lg", &nm);
printf ("valeur de nl?\n");
scanf ("%lg", &nl);
printf ("valeur de nt?\n");
scanf ("%lg", &nt);
printf ("valeur de nu?\n");
scanf ("%lg", &nu);
adimvalue = computeadimvalue (dimvalue, nm, nl, nt, nu);
printf ("La valeur adimensionnee recherchee est:\n");
printf ("adimvalue = %lg\n",adimvalue);
}
if ( charquoi == 'D') {
printf ("Taper la valeur de la grandeur que vous souhaiter calculer dimensionnée\n");
scanf ("%lg", &adimvalue);
printf ("Il me faut connaitre la dimension de la grandeur a dimensionner.\nNotons-la pow(M,nm) x pow(L,nl) x pow(T,nt) x pow(U,nu),\nou M=masse, L=longueur, T=temps et U=temperature\n");
printf ("valeur de nm?\n");
scanf ("%lg", &nm);
printf ("valeur de nl?\n");
scanf ("%lg", &nl);
printf ("valeur de nt?\n");
scanf ("%lg", &nt);
printf ("valeur de nu?\n");
scanf ("%lg", &nu);
dimvalue = computedimvalue (adimvalue, nm, nl, nt, nu);
printf ("La valeur dimensionnee recherchee est:\n");
printf ("dimvalue = %.2le en kg^%.1g m^%.1g s^%.1g kelvin^%.1g\n",dimvalue,nm,nl,nt,nu);
}
return 0;
}
double
computeadimvalue(double dimvalue,
double nm, double nl, double nt, double nu)
{
double den, adimvalue;
den = pow(Msol,nm) * pow(AU,nl) * pow(annee/2.0/PI,nt) * pow(tempref,nu);
adimvalue = dimvalue / den;
return adimvalue;
}
double
computedimvalue(double adimvalue,
double nm, double nl, double nt, double nu)
{
double num, dimvalue;
num = pow(Msol,nm) * pow(AU,nl) * pow(annee/2.0/PI,nt) * pow(tempref,nu);
dimvalue = adimvalue * num;
return dimvalue;
}
#.rst:
# CMakeParseArguments
# -------------------
#
#
#
# CMAKE_PARSE_ARGUMENTS(<prefix> <options> <one_value_keywords>
# <multi_value_keywords> args...)
#
# CMAKE_PARSE_ARGUMENTS() is intended to be used in macros or functions
# for parsing the arguments given to that macro or function. It
# processes the arguments and defines a set of variables which hold the
# values of the respective options.
#
# The <options> argument contains all options for the respective macro,
# i.e. keywords which can be used when calling the macro without any
# value following, like e.g. the OPTIONAL keyword of the install()
# command.
#
# The <one_value_keywords> argument contains all keywords for this macro
# which are followed by one value, like e.g. DESTINATION keyword of the
# install() command.
#
# The <multi_value_keywords> argument contains all keywords for this
# macro which can be followed by more than one value, like e.g. the
# TARGETS or FILES keywords of the install() command.
#
# When done, CMAKE_PARSE_ARGUMENTS() will have defined for each of the
# keywords listed in <options>, <one_value_keywords> and
# <multi_value_keywords> a variable composed of the given <prefix>
# followed by "_" and the name of the respective keyword. These
# variables will then hold the respective value from the argument list.
# For the <options> keywords this will be TRUE or FALSE.
#
# All remaining arguments are collected in a variable
# <prefix>_UNPARSED_ARGUMENTS, this can be checked afterwards to see
# whether your macro was called with unrecognized parameters.
#
# As an example here a my_install() macro, which takes similar arguments
# as the real install() command:
#
# ::
#
# function(MY_INSTALL)
# set(options OPTIONAL FAST)
# set(oneValueArgs DESTINATION RENAME)
# set(multiValueArgs TARGETS CONFIGURATIONS)
# cmake_parse_arguments(MY_INSTALL "${options}" "${oneValueArgs}"
# "${multiValueArgs}" ${ARGN} )
# ...
#
#
#
# Assume my_install() has been called like this:
#
# ::
#
# my_install(TARGETS foo bar DESTINATION bin OPTIONAL blub)
#
#
#
# After the cmake_parse_arguments() call the macro will have set the
# following variables:
#
# ::
#
# MY_INSTALL_OPTIONAL = TRUE
# MY_INSTALL_FAST = FALSE (this option was not used when calling my_install()
# MY_INSTALL_DESTINATION = "bin"
# MY_INSTALL_RENAME = "" (was not used)
# MY_INSTALL_TARGETS = "foo;bar"
# MY_INSTALL_CONFIGURATIONS = "" (was not used)
# MY_INSTALL_UNPARSED_ARGUMENTS = "blub" (no value expected after "OPTIONAL"
#
#
#
# You can then continue and process these variables.
#
# Keywords terminate lists of values, e.g. if directly after a
# one_value_keyword another recognized keyword follows, this is
# interpreted as the beginning of the new option. E.g.
# my_install(TARGETS foo DESTINATION OPTIONAL) would result in
# MY_INSTALL_DESTINATION set to "OPTIONAL", but MY_INSTALL_DESTINATION
# would be empty and MY_INSTALL_OPTIONAL would be set to TRUE therefor.
#=============================================================================
# Copyright 2010 Alexander Neundorf <neundorf@kde.org>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
if(__CMAKE_PARSE_ARGUMENTS_INCLUDED)
return()
endif()
set(__CMAKE_PARSE_ARGUMENTS_INCLUDED TRUE)
function(CMAKE_PARSE_ARGUMENTS prefix _optionNames _singleArgNames _multiArgNames)
# first set all result variables to empty/FALSE
foreach(arg_name ${_singleArgNames} ${_multiArgNames})
set(${prefix}_${arg_name})
endforeach()
foreach(option ${_optionNames})
set(${prefix}_${option} FALSE)
endforeach()
set(${prefix}_UNPARSED_ARGUMENTS)
set(insideValues FALSE)
set(currentArgName)
# now iterate over all arguments and fill the result variables
foreach(currentArg ${ARGN})
list(FIND _optionNames "${currentArg}" optionIndex) # ... then this marks the end of the arguments belonging to this keyword
list(FIND _singleArgNames "${currentArg}" singleArgIndex) # ... then this marks the end of the arguments belonging to this keyword
list(FIND _multiArgNames "${currentArg}" multiArgIndex) # ... then this marks the end of the arguments belonging to this keyword
if(${optionIndex} EQUAL -1 AND ${singleArgIndex} EQUAL -1 AND ${multiArgIndex} EQUAL -1)
if(insideValues)
if("${insideValues}" STREQUAL "SINGLE")
set(${prefix}_${currentArgName} ${currentArg})
set(insideValues FALSE)
elseif("${insideValues}" STREQUAL "MULTI")
list(APPEND ${prefix}_${currentArgName} ${currentArg})
endif()
else()
list(APPEND ${prefix}_UNPARSED_ARGUMENTS ${currentArg})
endif()
else()
if(NOT ${optionIndex} EQUAL -1)
set(${prefix}_${currentArg} TRUE)
set(insideValues FALSE)
elseif(NOT ${singleArgIndex} EQUAL -1)
set(currentArgName ${currentArg})
set(${prefix}_${currentArgName})
set(insideValues "SINGLE")
elseif(NOT ${multiArgIndex} EQUAL -1)
set(currentArgName ${currentArg})
set(${prefix}_${currentArgName})
set(insideValues "MULTI")
endif()
endif()
endforeach()
# propagate the result variables to the caller:
foreach(arg_name ${_singleArgNames} ${_multiArgNames} ${_optionNames})
set(${prefix}_${arg_name} ${${prefix}_${arg_name}} PARENT_SCOPE)
endforeach()
set(${prefix}_UNPARSED_ARGUMENTS ${${prefix}_UNPARSED_ARGUMENTS} PARENT_SCOPE)
endfunction()
#.rst:
# FindBoost
# ---------
#
# Find Boost include dirs and libraries
#
# Use this module by invoking find_package with the form::
#
# find_package(Boost
# [version] [EXACT] # Minimum or EXACT version e.g. 1.36.0
# [REQUIRED] # Fail with error if Boost is not found
# [COMPONENTS <libs>...] # Boost libraries by their canonical name
# ) # e.g. "date_time" for "libboost_date_time"
#
# This module finds headers and requested component libraries OR a CMake
# package configuration file provided by a "Boost CMake" build. For the
# latter case skip to the "Boost CMake" section below. For the former
# case results are reported in variables::
#
# Boost_FOUND - True if headers and requested libraries were found
# Boost_INCLUDE_DIRS - Boost include directories
# Boost_LIBRARY_DIRS - Link directories for Boost libraries
# Boost_LIBRARIES - Boost component libraries to be linked
# Boost_<C>_FOUND - True if component <C> was found (<C> is upper-case)
# Boost_<C>_LIBRARY - Libraries to link for component <C> (may include
# target_link_libraries debug/optimized keywords)
# Boost_VERSION - BOOST_VERSION value from boost/version.hpp
# Boost_LIB_VERSION - Version string appended to library filenames
# Boost_MAJOR_VERSION - Boost major version number (X in X.y.z)
# Boost_MINOR_VERSION - Boost minor version number (Y in x.Y.z)
# Boost_SUBMINOR_VERSION - Boost subminor version number (Z in x.y.Z)
# Boost_LIB_DIAGNOSTIC_DEFINITIONS (Windows)
# - Pass to add_definitions() to have diagnostic
# information about Boost's automatic linking
# displayed during compilation
#
# This module reads hints about search locations from variables::
#
# BOOST_ROOT - Preferred installation prefix
# (or BOOSTROOT)
# BOOST_INCLUDEDIR - Preferred include directory e.g. <prefix>/include
# BOOST_LIBRARYDIR - Preferred library directory e.g. <prefix>/lib
# Boost_NO_SYSTEM_PATHS - Set to ON to disable searching in locations not
# specified by these hint variables. Default is OFF.
# Boost_ADDITIONAL_VERSIONS
# - List of Boost versions not known to this module
# (Boost install locations may contain the version)
#
# and saves search results persistently in CMake cache entries::
#
# Boost_INCLUDE_DIR - Directory containing Boost headers
# Boost_LIBRARY_DIR - Directory containing Boost libraries
# Boost_<C>_LIBRARY_DEBUG - Component <C> library debug variant
# Boost_<C>_LIBRARY_RELEASE - Component <C> library release variant
#
# Users may set these hints or results as cache entries. Projects
# should not read these entries directly but instead use the above
# result variables. Note that some hint names start in upper-case
# "BOOST". One may specify these as environment variables if they are
# not specified as CMake variables or cache entries.
#
# This module first searches for the Boost header files using the above
# hint variables (excluding BOOST_LIBRARYDIR) and saves the result in
# Boost_INCLUDE_DIR. Then it searches for requested component libraries
# using the above hints (excluding BOOST_INCLUDEDIR and
# Boost_ADDITIONAL_VERSIONS), "lib" directories near Boost_INCLUDE_DIR,
# and the library name configuration settings below. It saves the
# library directory in Boost_LIBRARY_DIR and individual library
# locations in Boost_<C>_LIBRARY_DEBUG and Boost_<C>_LIBRARY_RELEASE.
# When one changes settings used by previous searches in the same build
# tree (excluding environment variables) this module discards previous
# search results affected by the changes and searches again.
#
# Boost libraries come in many variants encoded in their file name.
# Users or projects may tell this module which variant to find by
# setting variables::
#
# Boost_USE_MULTITHREADED - Set to OFF to use the non-multithreaded
# libraries ('mt' tag). Default is ON.
# Boost_USE_STATIC_LIBS - Set to ON to force the use of the static
# libraries. Default is OFF.
# Boost_USE_STATIC_RUNTIME - Set to ON or OFF to specify whether to use
# libraries linked statically to the C++ runtime
# ('s' tag). Default is platform dependent.
# Boost_USE_DEBUG_RUNTIME - Set to ON or OFF to specify whether to use
# libraries linked to the MS debug C++ runtime
# ('g' tag). Default is ON.
# Boost_USE_DEBUG_PYTHON - Set to ON to use libraries compiled with a
# debug Python build ('y' tag). Default is OFF.
# Boost_USE_STLPORT - Set to ON to use libraries compiled with
# STLPort ('p' tag). Default is OFF.
# Boost_USE_STLPORT_DEPRECATED_NATIVE_IOSTREAMS
# - Set to ON to use libraries compiled with
# STLPort deprecated "native iostreams"
# ('n' tag). Default is OFF.
# Boost_COMPILER - Set to the compiler-specific library suffix
# (e.g. "-gcc43"). Default is auto-computed
# for the C++ compiler in use.
# Boost_THREADAPI - Suffix for "thread" component library name,
# such as "pthread" or "win32". Names with
# and without this suffix will both be tried.
# Boost_NAMESPACE - Alternate namespace used to build boost with
# e.g. if set to "myboost", will search for
# myboost_thread instead of boost_thread.
#
# Other variables one may set to control this module are::
#
# Boost_DEBUG - Set to ON to enable debug output from FindBoost.
# Please enable this before filing any bug report.
# Boost_DETAILED_FAILURE_MSG
# - Set to ON to add detailed information to the
# failure message even when the REQUIRED option
# is not given to the find_package call.
# Boost_REALPATH - Set to ON to resolve symlinks for discovered
# libraries to assist with packaging. For example,
# the "system" component library may be resolved to
# "/usr/lib/libboost_system.so.1.42.0" instead of
# "/usr/lib/libboost_system.so". This does not
# affect linking and should not be enabled unless
# the user needs this information.
#
# On Visual Studio and Borland compilers Boost headers request automatic
# linking to corresponding libraries. This requires matching libraries
# to be linked explicitly or available in the link library search path.
# In this case setting Boost_USE_STATIC_LIBS to OFF may not achieve
# dynamic linking. Boost automatic linking typically requests static
# libraries with a few exceptions (such as Boost.Python). Use::
#
# add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS})
#
# to ask Boost to report information about automatic linking requests.
#
# Example to find Boost headers only::
#
# find_package(Boost 1.36.0)
# if(Boost_FOUND)
# include_directories(${Boost_INCLUDE_DIRS})
# add_executable(foo foo.cc)
# endif()
#
# Example to find Boost headers and some *static* libraries::
#
# set(Boost_USE_STATIC_LIBS ON) # only find static libs
# set(Boost_USE_MULTITHREADED ON)
# set(Boost_USE_STATIC_RUNTIME OFF)
# find_package(Boost 1.36.0 COMPONENTS date_time filesystem system ...)
# if(Boost_FOUND)
# include_directories(${Boost_INCLUDE_DIRS})
# add_executable(foo foo.cc)
# target_link_libraries(foo ${Boost_LIBRARIES})
# endif()
#
# Boost CMake
# ^^^^^^^^^^^
#
# If Boost was built using the boost-cmake project it provides a package
# configuration file for use with find_package's Config mode. This
# module looks for the package configuration file called
# BoostConfig.cmake or boost-config.cmake and stores the result in cache
# entry "Boost_DIR". If found, the package configuration file is loaded
# and this module returns with no further action. See documentation of
# the Boost CMake package configuration for details on what it provides.
#
# Set Boost_NO_BOOST_CMAKE to ON to disable the search for boost-cmake.
#=============================================================================
# Copyright 2006-2012 Kitware, Inc.
# Copyright 2006-2008 Andreas Schneider <mail@cynapses.org>
# Copyright 2007 Wengo
# Copyright 2007 Mike Jackson
# Copyright 2008 Andreas Pakulat <apaku@gmx.de>
# Copyright 2008-2012 Philip Lowman <philip@yhbt.com>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
#-------------------------------------------------------------------------------
# Before we go searching, check whether boost-cmake is available, unless the
# user specifically asked NOT to search for boost-cmake.
#
# If Boost_DIR is set, this behaves as any find_package call would. If not,
# it looks at BOOST_ROOT and BOOSTROOT to find Boost.
#
if (NOT Boost_NO_BOOST_CMAKE)
# If Boost_DIR is not set, look for BOOSTROOT and BOOST_ROOT as alternatives,
# since these are more conventional for Boost.
if ("$ENV{Boost_DIR}" STREQUAL "")
if (NOT "$ENV{BOOST_ROOT}" STREQUAL "")
set(ENV{Boost_DIR} $ENV{BOOST_ROOT})
elseif (NOT "$ENV{BOOSTROOT}" STREQUAL "")
set(ENV{Boost_DIR} $ENV{BOOSTROOT})
endif()
endif()
# Do the same find_package call but look specifically for the CMake version.
# Note that args are passed in the Boost_FIND_xxxxx variables, so there is no
# need to delegate them to this find_package call.
find_package(Boost QUIET NO_MODULE)
mark_as_advanced(Boost_DIR)
# If we found boost-cmake, then we're done. Print out what we found.
# Otherwise let the rest of the module try to find it.
if (Boost_FOUND)
message("Boost ${Boost_FIND_VERSION} found.")
if (Boost_FIND_COMPONENTS)
message("Found Boost components:")
message(" ${Boost_FIND_COMPONENTS}")
endif()
return()
endif()
endif()
#-------------------------------------------------------------------------------
# FindBoost functions & macros
#
############################################
#
# Check the existence of the libraries.
#
############################################
# This macro was taken directly from the FindQt4.cmake file that is included
# with the CMake distribution. This is NOT my work. All work was done by the
# original authors of the FindQt4.cmake file. Only minor modifications were
# made to remove references to Qt and make this file more generally applicable
# And ELSE/ENDIF pairs were removed for readability.
#########################################################################
macro(_Boost_ADJUST_LIB_VARS basename)
if(Boost_INCLUDE_DIR )
if(Boost_${basename}_LIBRARY_DEBUG AND Boost_${basename}_LIBRARY_RELEASE)
# if the generator supports configuration types then set
# optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value
if(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
set(Boost_${basename}_LIBRARY optimized ${Boost_${basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG})
else()
# if there are no configuration types and CMAKE_BUILD_TYPE has no value
# then just use the release libraries
set(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE} )
endif()
# FIXME: This probably should be set for both cases
set(Boost_${basename}_LIBRARIES optimized ${Boost_${basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG})
endif()
# if only the release version was found, set the debug variable also to the release version
if(Boost_${basename}_LIBRARY_RELEASE AND NOT Boost_${basename}_LIBRARY_DEBUG)
set(Boost_${basename}_LIBRARY_DEBUG ${Boost_${basename}_LIBRARY_RELEASE})
set(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE})
set(Boost_${basename}_LIBRARIES ${Boost_${basename}_LIBRARY_RELEASE})
endif()
# if only the debug version was found, set the release variable also to the debug version
if(Boost_${basename}_LIBRARY_DEBUG AND NOT Boost_${basename}_LIBRARY_RELEASE)
set(Boost_${basename}_LIBRARY_RELEASE ${Boost_${basename}_LIBRARY_DEBUG})
set(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_DEBUG})
set(Boost_${basename}_LIBRARIES ${Boost_${basename}_LIBRARY_DEBUG})
endif()
# If the debug & release library ends up being the same, omit the keywords
if(${Boost_${basename}_LIBRARY_RELEASE} STREQUAL ${Boost_${basename}_LIBRARY_DEBUG})
set(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE} )
set(Boost_${basename}_LIBRARIES ${Boost_${basename}_LIBRARY_RELEASE} )
endif()
if(Boost_${basename}_LIBRARY)
set(Boost_${basename}_FOUND ON)
endif()
endif()