Commit 507e5629 authored by COULAUD Olivier's avatar COULAUD Olivier
parents d7a72e3f fa06c40b
......@@ -35,7 +35,7 @@ if(SCALFMM_ADDON_CKERNELAPI)
)
# Install lib
install( TARGETS scalfmmckernelapi ARCHIVE DESTINATION lib )
install( TARGETS scalfmmckernelapi ARCHIVE DESTINATION lib LIBRARY DESTINATION lib)
# Install header
SET(my_include_dirs "Src")
......
......@@ -146,8 +146,9 @@ typedef void (*Callback_free_cell)(void*);
* @brief Callback used to know the size of userData.
* @param level current level of current cell
* @param morton_index of the current cell
* @param userData : ptr to user's kernel
*/
typedef FSize (*Callback_get_cell_size)(int level, long long morton_index);
typedef FSize (*Callback_get_cell_size)(int level, long long morton_index, void * userData);
/**
* @brief Callback used to serialize userdata inside an array of size
......
......@@ -11,17 +11,21 @@
#include "Utils/FMpi.hpp"
#include "FUserKernelEngine.hpp"
#include "BalanceTree/FLeafBalance.hpp"
#include "Utils/FLeafBalance.hpp"
#include "Files/FMpiTreeBuilder.hpp"
#include "Containers/FVector.hpp"
#include "Core/FFmmAlgorithmThreadProc.hpp"
class CoreCellDist : public CoreCell, public FAbstractSendable{
int level;
void * userKernelData;
public:
CoreCellDist() : level(-1){
CoreCellDist() : level(-1),userKernelData(nullptr){
}
void init_UserKernelData(void * in){
this->userKernelData = in;
}
/**
......@@ -32,7 +36,7 @@ public:
FBasicCell::save<BufferWriterClass>(buffer);
buffer << level;
if(user_cell_descriptor.user_get_size){
FSize sizeToSave = user_cell_descriptor.user_get_size(level,getMortonIndex());
FSize sizeToSave = user_cell_descriptor.user_get_size(level,getMortonIndex(),userKernelData);
char * temp = new char[sizeToSave];
user_cell_descriptor.user_copy_cell(CoreCell::getContainer(),sizeToSave,(void *) temp);
buffer.write(temp,sizeToSave);
......@@ -48,7 +52,7 @@ public:
FBasicCell::restore<BufferReaderClass>(buffer);
buffer >> level;
if(user_cell_descriptor.user_restore_cell){
FSize sizeToSave = user_cell_descriptor.user_get_size(level,getMortonIndex());
FSize sizeToSave = user_cell_descriptor.user_get_size(level,getMortonIndex(),userKernelData);
char * temp = new char[sizeToSave];
buffer.fillArray(temp,sizeToSave);
CoreCell::setContainer(user_cell_descriptor.user_restore_cell(level,temp));
......@@ -61,7 +65,7 @@ public:
*/
template <class BufferWriterClass>
void serializeUp(BufferWriterClass& buffer) const {
FSize sizeToSave = user_cell_descriptor.user_get_size(level,getMortonIndex());
FSize sizeToSave = user_cell_descriptor.user_get_size(level,getMortonIndex(),userKernelData);
char * temp = new char[sizeToSave];
user_cell_descriptor.user_copy_cell(CoreCell::getContainer(),sizeToSave,(void *) temp);
buffer.write(temp,sizeToSave);
......@@ -69,7 +73,7 @@ public:
}
template <class BufferWriterClass>
void serializeDown(BufferWriterClass& buffer) const {
FSize sizeToSave = user_cell_descriptor.user_get_size(level,getMortonIndex());
FSize sizeToSave = user_cell_descriptor.user_get_size(level,getMortonIndex(),userKernelData);
char * temp = new char[sizeToSave];
user_cell_descriptor.user_copy_cell(CoreCell::getContainer(),sizeToSave,(void *) temp);
buffer.write(temp,sizeToSave);
......@@ -77,7 +81,7 @@ public:
}
template <class BufferReaderClass>
void deserializeUp(BufferReaderClass& buffer) const {
FSize sizeToSave = user_cell_descriptor.user_get_size(level,getMortonIndex());
FSize sizeToSave = user_cell_descriptor.user_get_size(level,getMortonIndex(),userKernelData);
char * temp = new char[sizeToSave];
buffer.fillArray(temp,sizeToSave);
CoreCell::setContainer(user_cell_descriptor.user_restore_cell(level,temp));
......@@ -86,7 +90,7 @@ public:
}
template <class BufferReaderClass>
void deserializeDown(BufferReaderClass& buffer) const {
FSize sizeToSave = user_cell_descriptor.user_get_size(level,getMortonIndex());
FSize sizeToSave = user_cell_descriptor.user_get_size(level,getMortonIndex(),userKernelData);
char * temp = new char[sizeToSave];
buffer.fillArray(temp,sizeToSave);
CoreCell::setContainer(user_cell_descriptor.user_restore_cell(level,temp));
......@@ -99,7 +103,8 @@ public:
*/
FSize getSavedSize() const {
FSize toReturn = user_cell_descriptor.user_get_size(level,
getMortonIndex())
getMortonIndex(),
userKernelData)
+ FBasicCell::getSavedSize() //Size of storage needed for Basic Cell
+ sizeof(int) //Size of storage needed for this class
+ sizeof(nullptr); //Size of storage needed for the parent class
......@@ -107,12 +112,14 @@ public:
}
FSize getSavedSizeUp() const{
FSize toReturn = user_cell_descriptor.user_get_size(level,
getMortonIndex());
getMortonIndex(),
userKernelData);
return toReturn;
}
FSize getSavedSizeDown() const{
FSize toReturn = user_cell_descriptor.user_get_size(level,
getMortonIndex());
getMortonIndex(),
userKernelData);
return toReturn;
}
};
......@@ -451,6 +458,10 @@ public:
Parent::boxWidthAtLeafLevel = BoxWidth/(2<<TreeHeight);
printf("Tree Height : %d \n",TreeHeight);
octreeDist = new OctreeClass(TreeHeight,FMath::Min(3,TreeHeight-1),BoxWidth,FPoint<FReal>(BoxCenter));
//There : for each cell, set a ptr to UserkernelData
octreeDist->forEachCell([&](CoreCellDist * currCell){
currCell->init_UserKernelData(Parent::getKernelPtr()->getUserKernelDatas());
});
}
void user_kernel_config( Scalfmm_Kernel_Descriptor userKernel, void * userDatas){
......
......@@ -324,9 +324,6 @@ protected:
OctreeClass* getTree() const {
return octree;
}
CoreKernelClass * getKernelPtr() const {
return kernel;
}
public:
......@@ -353,6 +350,10 @@ public:
}
}
CoreKernelClass * getKernelPtr() {
return kernel;
}
virtual void user_kernel_config( Scalfmm_Kernel_Descriptor userKernel, void * userDatas){
if(!kernel){
kernel = new CoreKernelClass(userKernel,userDatas);
......
......@@ -105,7 +105,7 @@ void cheb_resetCell(int level, long long morton_index, int* tree_position,
* @brief Following functions are defined in order to serialize the
* cells
*/
FSize cheb_get_size(int level, long long morton_index){
FSize cheb_get_size(int level, long long morton_index, void * userData){
return ChebCell_getSize(level,morton_index);
}
......
......@@ -17,69 +17,68 @@ OPTION( SCALFMM_ADDON_FMMAPI "Set to ON to build ScaFMM FMM API interface" OFF )
# if ask to build addon
if(SCALFMM_ADDON_FMMAPI)
# first build lib scalfmmapi
set(LIBRARY_OUTPUT_PATH ../lib/${CMAKE_BUILD_TYPE})
# first build lib scalfmmapi
set(LIBRARY_OUTPUT_PATH ../lib/${CMAKE_BUILD_TYPE})
# Searching all cpp file
file( GLOB_RECURSE source_lib_files Src/*.cpp )
# Searching all cpp file
file( GLOB_RECURSE source_lib_files Src/*.cpp )
# Adding cpp files to project
add_library( scalfmmapi ${source_lib_files} )
# Adding cpp files to project
add_library( scalfmmapi ${source_lib_files} )
# Add blas library (even if it is set to off)
target_link_libraries( scalfmmapi scalfmm)
# Add blas library (even if it is set to off)
target_link_libraries( scalfmmapi scalfmm)
# Adding the entire project dir as an include dir
INCLUDE_DIRECTORIES(
${SCALFMM_BINARY_DIR}/Src
${SCALFMM_SOURCE_DIR}/Src
# Adding the entire project dir as an include dir
INCLUDE_DIRECTORIES(
${SCALFMM_BINARY_DIR}/Src
${SCALFMM_SOURCE_DIR}/Src
${SCALFMM_INCLUDES}
)
# Install lib
install( TARGETS scalfmmapi ARCHIVE DESTINATION lib )
# Install header
SET(my_include_dirs "Src")
file( GLOB hpp_in_dir Src/*.hpp )
INSTALL( FILES ${hpp_in_dir} DESTINATION include/ScalFmm/FmmApi )
file( GLOB_RECURSE source_tests_files Tests/*.cpp )
INCLUDE_DIRECTORIES( ${SCALFMM_BINARY_DIR}/Src )
# Then build test files
foreach(exec ${source_tests_files})
get_filename_component(
execname ${exec}
NAME_WE
)
set(compile_exec "TRUE")
foreach(fuse_key ${FUSE_LIST})
file(STRINGS "${exec}" lines_fuse REGEX "@FUSE_${fuse_key}")
if(lines_fuse)
if( NOT SCALFMM_USE_${fuse_key} )
MESSAGE( STATUS "This needs ${fuse_key} = ${exec}" )
set(compile_exec "FALSE")
endif()
endif()
endforeach()
# Dependency are OK
if( compile_exec )
add_executable( ${execname} ${exec} )
# link to scalfmm and scalfmmapi
target_link_libraries(
${execname}
${scalfmm_lib}
scalfmmapi
${BLAS_LIBRARIES}
${LAPACK_LIBRARIES}
${SCALFMM_LIBRARIES}
)
endif()
endforeach(exec)
endif()
# Install lib
install( TARGETS scalfmmapi ARCHIVE DESTINATION lib LIBRARY DESTINATION lib )
# Install header
SET(my_include_dirs "Src")
file( GLOB hpp_in_dir Src/*.hpp )
INSTALL( FILES ${hpp_in_dir} DESTINATION include/ScalFmm/FmmApi )
file( GLOB_RECURSE source_tests_files Tests/*.cpp )
INCLUDE_DIRECTORIES( ${SCALFMM_BINARY_DIR}/Src )
# Then build test files
foreach(exec ${source_tests_files})
get_filename_component(
execname ${exec}
NAME_WE
)
set(compile_exec "TRUE")
foreach(fuse_key ${FUSE_LIST})
file(STRINGS "${exec}" lines_fuse REGEX "@FUSE_${fuse_key}")
if(lines_fuse)
if( NOT SCALFMM_USE_${fuse_key} )
MESSAGE( STATUS "This needs ${fuse_key} = ${exec}" )
set(compile_exec "FALSE")
endif()
endif()
endforeach()
# Dependency are OK
if( compile_exec )
add_executable( ${execname} ${exec} )
# link to scalfmm and scalfmmapi
target_link_libraries(
${execname}
${scalfmm_lib}
scalfmmapi
${BLAS_LIBRARIES}
${LAPACK_LIBRARIES}
${SCALFMM_LIBRARIES}
)
endif()
endforeach(exec)
endif()
......@@ -171,7 +171,9 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
set(SSE_FLAGS "-axSSE4.2 -march=native")
endif(APPLE)
#-Wshadow -Wpointer-arith -Wcast-qual -Wconversion -Wall -Wnosign-conversion ")
else()
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "XL")
set(SCALFMM_CXX_FLAGS "${SCALFMM_CXX_FLAGS} -mcpu=power8 -mtune=power8")
else() #if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# NOT INTEL
if(NOT SCALFMM_USE_MPI)
include(CheckCCompilerFlag)
......
......@@ -34,6 +34,8 @@ enum RegistersNum {
// we would like to have the same name for not windows
#define cpuid __cpuid
#elif _ARCH_PPC
#error("PPC")
#else
// Else we have to ask the CPU directly by executin cpuid.
......@@ -75,7 +77,7 @@ void cpuid(int CPUInfo[4],int InfoType){
#endif
#ifndef _ARCH_PPC
bool CPUInfoGetEAX(const int CPUInfo[4], const int position){
return (CPUInfo[EaxRegister] & ((int)1 << position)) != 0;
}
......@@ -309,6 +311,9 @@ std::list<CpuProperty> getProperties(){
return properties;
}
#else
// POWER (IBM)
#endif
///////////////////////////////////////////////////////////////////////////
......
......@@ -3,7 +3,7 @@
# @copyright (c) 2009-2014 The University of Tennessee and The University
# of Tennessee Research Foundation.
# All rights reserved.
# @copyright (c) 2012-2014 Inria. All rights reserved.
# @copyright (c) 2012-2016 Inria. All rights reserved.
# @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
#
###
......@@ -20,20 +20,72 @@
#
# @version 0.9.0
# @author Xavier Lacoste
# @author Florent Pruvost
# @date 30-01-2015
#
# Define auxilary variables:
# Update CMAKE auxilary variables:
# - CMAKE_C_FLAGS: C compiler flags
# - CMAKE_CXX_FLAGS: CXX compiler flags
# - CMAKE_Fortran_FLAGS: Fortran compiler flags
# - CMAKE_Fortran_PREPROCESS_FLAGS : force C preprocessor.
# - CMAKE_Fortran_FREEFORM_FLAG : Force free format.
# - CMAKE_Fortran
###
if (MORSE_ENABLE_WARNING)
IF(CMAKE_Fortran_COMPILER_ID MATCHES GNU)
if(CMAKE_C_COMPILER_ID MATCHES GNU)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
elseif(CMAKE_C_COMPILER_ID MATCHES Intel)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w3 -diag-disable:remark")
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES GNU)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
elseif(CMAKE_CXX_COMPILER_ID MATCHES Intel)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w3 -diag-disable:remark")
endif()
if(CMAKE_Fortran_COMPILER_ID MATCHES GNU)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Wall")
elseif(CMAKE_Fortran_COMPILER_ID MATCHES Intel)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -warn all -diag-disable:remark")
endif()
endif(MORSE_ENABLE_WARNING)
if (MORSE_ENABLE_COVERAGE)
if(CMAKE_C_COMPILER_ID MATCHES GNU)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --coverage")
else()
message(FATAL_ERROR "Code coverage is only available with the GNU C (gcc)"
"\n compiler, please turn MORSE_ENABLE_COVERAGE OFF\n.")
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES GNU)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage")
else()
message(FATAL_ERROR "Code coverage is only available with the GNU CXX"
"\n (g++) compiler, please turn MORSE_ENABLE_COVERAGE OFF\n.")
endif()
if(CMAKE_Fortran_COMPILER_ID MATCHES GNU)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} --coverage")
else()
message(FATAL_ERROR "Code coverage is only available with the GNU"
"\n Fortran (gfortran) compiler, please turn MORSE_ENABLE_COVERAGE"
"\n OFF\n.")
endif()
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage")
endif(MORSE_ENABLE_COVERAGE)
if(CMAKE_Fortran_COMPILER_ID MATCHES GNU)
list(APPEND CMAKE_Fortran_PREPROCESS_FLAGS "-cpp")
list(APPEND CMAKE_Fortran_FREEFORM_FLAG "-ffree-form")
ELSEIF(CMAKE_Fortran_COMPILER_ID MATCHES Intel)
elseif(CMAKE_Fortran_COMPILER_ID MATCHES Intel)
list(APPEND CMAKE_Fortran_PREPROCESS_FLAG "-fpp")
list(APPEND CMAKE_Fortran_FREEFORM_FLAG "")
ENDIF()
endif()
......@@ -37,60 +37,60 @@ include(PrintFindStatus)
function(FindHeader _libname _header_to_find)
# save _libname upper and lower case
string(TOUPPER ${_libname} LIBNAME)
string(TOLOWER ${_libname} libname)
# save _libname upper and lower case
string(TOUPPER ${_libname} LIBNAME)
string(TOLOWER ${_libname} libname)
# Looking for include
# -------------------
# Looking for include
# -------------------
# Add system include paths to search include
# ------------------------------------------
unset(_inc_env)
if(WIN32)
string(REPLACE ":" ";" _inc_env "$ENV{INCLUDE}")
else()
string(REPLACE ":" ";" _path_env "$ENV{INCLUDE}")
list(APPEND _inc_env "${_path_env}")
string(REPLACE ":" ";" _path_env "$ENV{C_INCLUDE_PATH}")
list(APPEND _inc_env "${_path_env}")
string(REPLACE ":" ";" _path_env "$ENV{CPATH}")
list(APPEND _inc_env "${_path_env}")
string(REPLACE ":" ";" _path_env "$ENV{INCLUDE_PATH}")
list(APPEND _inc_env "${_path_env}")
endif()
list(APPEND _inc_env "${CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES}")
list(APPEND _inc_env "${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES}")
list(REMOVE_DUPLICATES _inc_env)
# Add system include paths to search include
# ------------------------------------------
unset(_inc_env)
if(WIN32)
string(REPLACE ":" ";" _inc_env "$ENV{INCLUDE}")
else()
string(REPLACE ":" ";" _path_env "$ENV{INCLUDE}")
list(APPEND _inc_env "${_path_env}")
string(REPLACE ":" ";" _path_env "$ENV{C_INCLUDE_PATH}")
list(APPEND _inc_env "${_path_env}")
string(REPLACE ":" ";" _path_env "$ENV{CPATH}")
list(APPEND _inc_env "${_path_env}")
string(REPLACE ":" ";" _path_env "$ENV{INCLUDE_PATH}")
list(APPEND _inc_env "${_path_env}")
endif()
list(APPEND _inc_env "${CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES}")
list(APPEND _inc_env "${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES}")
list(REMOVE_DUPLICATES _inc_env)
# Try to find the _header_to_find in the given paths
# --------------------------------------------------
# call cmake macro to find the header path
if(${LIBNAME}_INCDIR)
set(${LIBNAME}_${_header_to_find}_DIRS "${LIBNAME}_${_header_to_find}_DIRS-NOTFOUND")
find_path(${LIBNAME}_${_header_to_find}_DIRS
NAMES ${_header_to_find}
HINTS ${${LIBNAME}_INCDIR})
elseif(${LIBNAME}_DIR)
set(${LIBNAME}_${_header_to_find}_DIRS "${LIBNAME}_${_header_to_find}_DIRS-NOTFOUND")
find_path(${LIBNAME}_${_header_to_find}_DIRS
NAMES ${_header_to_find}
HINTS ${${LIBNAME}_DIR}
PATH_SUFFIXES include)
else()
set(${LIBNAME}_${_header_to_find}_DIRS "${LIBNAME}_${_header_to_find}_DIRS-NOTFOUND")
find_path(${LIBNAME}_${_header_to_find}_DIRS
NAMES ${_header_to_find}
HINTS ${_inc_env})
endif()
mark_as_advanced(${LIBNAME}_${_header_to_find}_DIRS)
# Try to find the _header_to_find in the given paths
# --------------------------------------------------
# call cmake macro to find the header path
if(${LIBNAME}_INCDIR)
set(${LIBNAME}_${_header_to_find}_DIRS "${LIBNAME}_${_header_to_find}_DIRS-NOTFOUND")
find_path(${LIBNAME}_${_header_to_find}_DIRS
NAMES ${_header_to_find}
HINTS ${${LIBNAME}_INCDIR})
elseif(${LIBNAME}_DIR)
set(${LIBNAME}_${_header_to_find}_DIRS "${LIBNAME}_${_header_to_find}_DIRS-NOTFOUND")
find_path(${LIBNAME}_${_header_to_find}_DIRS
NAMES ${_header_to_find}
HINTS ${${LIBNAME}_DIR}
PATH_SUFFIXES include)
else()
set(${LIBNAME}_${_header_to_find}_DIRS "${LIBNAME}_${_header_to_find}_DIRS-NOTFOUND")
find_path(${LIBNAME}_${_header_to_find}_DIRS
NAMES ${_header_to_find}
HINTS ${_inc_env})
endif()
mark_as_advanced(${LIBNAME}_${_header_to_find}_DIRS)
# Print status if not found
# -------------------------
if (NOT ${LIBNAME}_${_header_to_find}_DIRS)
Print_Find_Header_Status(${libname} ${_header_to_find})
endif ()
# Print status if not found
# -------------------------
if (NOT ${LIBNAME}_${_header_to_find}_DIRS)
Print_Find_Header_Status(${libname} ${_header_to_find})
endif ()
endfunction(FindHeader)
......
......@@ -3,7 +3,7 @@
# @copyright (c) 2009-2014 The University of Tennessee and The University
# of Tennessee Research Foundation.
# All rights reserved.
# @copyright (c) 2012-2014 Inria. All rights reserved.
# @copyright (c) 2012-2016 Inria. All rights reserved.
# @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
#
###
......@@ -31,7 +31,7 @@
include(CheckFunctionExists)
# To colorize messages
include(ColorizeMessage)
#include(ColorizeMessage)
# To find headers and libs
include(FindHeadersAndLibs)
......@@ -49,9 +49,11 @@ include(Ressources)
# Add the path where we handle our FindFOO.cmake to seek for liraries
list(APPEND CMAKE_MODULE_PATH ${MORSE_CMAKE_MODULE_PATH}/find)
option(MORSE_VERBOSE_FIND_PACKAGE "Add additional messages concerning no found packages" OFF)
#message("-- ${BoldGreen}MORSE_VERBOSE_FIND_PACKAGE is set to OFF, turn it ON to get"
# "information about packages not found${ColourReset}")
option(MORSE_ENABLE_WARNING "Enable warning messages" OFF)
option(MORSE_ENABLE_COVERAGE "Enable flags for coverage test" OFF)
#option(MORSE_VERBOSE_FIND_PACKAGE "Add additional messages concerning packages not found" OFF)
#message(STATUS "MORSE_VERBOSE_FIND_PACKAGE is set to OFF, turn it ON to get"
# " information about packages not found")
##
## @end file MorseInit.cmake
......
......@@ -16,7 +16,7 @@
# Univ. of Tennessee,
# King Abdullah Univesity of Science and Technology
# Univ. of California Berkeley,
# Univ. of Colorado Denver.
# Univ. of Colorado Denver.
#
# @version 0.9.0
# @author Cedric Castagnede
......@@ -27,43 +27,43 @@
###
MACRO(PARSE_ARGUMENTS prefix arg_names option_names)
set(DEFAULT_ARGS)
foreach(arg_name ${arg_names})
set(${prefix}_${arg_name})
endforeach(arg_name)
foreach(option ${option_names})
set(${prefix}_${option} FALSE)
endforeach(option)
set(DEFAULT_ARGS)
foreach(arg_name ${arg_names})
set(${prefix}_${arg_name})
endforeach(arg_name)
foreach(option ${option_names})
set(${prefix}_${option} FALSE)
endforeach(option)
set(current_arg_name DEFAULT_ARGS)
set(current_arg_list)
foreach(arg ${ARGN})
set(larg_names ${arg_names})
list(FIND larg_names "${arg}" is_arg_name)
if(is_arg_name GREATER -1)
set(${prefix}_${current_arg_name} ${current_arg_list})
set(current_arg_name ${arg})
set(current_arg_list)
else(is_arg_name GREATER -1)
set(loption_names ${option_names})
list(FIND loption_names "${arg}" is_option)
if(is_option GREATER -1)
set(${prefix}_${arg} TRUE)
else(is_option GREATER -1)
set(current_arg_list ${current_arg_list} ${arg})
endif(is_option GREATER -1)
endif(is_arg_name GREATER -1)
endforeach(arg)
set(${prefix}_${current_arg_name} ${current_arg_list})
set(current_arg_name DEFAULT_ARGS)
set(current_arg_list)
foreach(arg ${ARGN})
set(larg_names ${arg_names})
list(FIND larg_names "${arg}" is_arg_name)
if(is_arg_name GREATER -1)
set(${prefix}_${current_arg_name} ${current_arg_list})
set(current_arg_name ${arg})
set(current_arg_list)
else(is_arg_name GREATER -1)
set(loption_names ${option_names})
list(FIND loption_names "${arg}" is_option)
if(is_option GREATER -1)
set(${prefix}_${arg} TRUE)
else(is_option GREATER -1)
set(current_arg_list ${current_arg_list} ${arg})
endif(is_option GREATER -1)
endif(is_arg_name GREATER -1)
endforeach(arg)
set(${prefix}_${current_arg_name} ${current_arg_list})
ENDMACRO(PARSE_ARGUMENTS)
MACRO(CAR var)
set(${var} ${ARGV1})
set(${var} ${ARGV1})
ENDMACRO(CAR)
MACRO(CDR var junk)
set(${var} ${ARGN})
set(${var} ${ARGN})
ENDMACRO(CDR)