diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 7d684f4eab6..857c8ea8373 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -136,3 +136,14 @@ jobs: working-directory: ${{github.workspace}}/build shell: bash run: cmake --build . --target install + + - name: Test Install Tree + working-directory: ${{github.workspace}}/build + shell: bash + run: | + cmake -S $GITHUB_WORKSPACE/doc/tutorial -B test_install -DCMAKE_PREFIX_PATH=${{github.workspace}}/install + cmake --build test_install + test_install/test_runtime + if [ "X${{ matrix.task_backend }}" = "XThreads" ]; then # if built more than just MADWorld run the HF test + test_install/simple_hf + fi diff --git a/CMakeLists.txt b/CMakeLists.txt index 1ea04988621..169c067afc3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -730,13 +730,6 @@ install(FILES DESTINATION "${MADNESS_INSTALL_CMAKEDIR}/modules" COMPONENT madness-config) -# sample CMakeLists.txt -configure_file( - ${PROJECT_SOURCE_DIR}/doc/devsamp/CMakeLists.txt.sample.in - ${PROJECT_BINARY_DIR}/doc/devsamp/CMakeLists.txt.sample - @ONLY -) - # Create the version file write_basic_package_version_file(madness-config-version.cmake VERSION ${MADNESS_VERSION} COMPATIBILITY AnyNewerVersion) diff --git a/cmake/madness-config.cmake.in b/cmake/madness-config.cmake.in index 700b6c54d93..5aeecbf1f7d 100644 --- a/cmake/madness-config.cmake.in +++ b/cmake/madness-config.cmake.in @@ -1,18 +1,16 @@ # - CMAKE Config file for the MADNESS package # # Valid COMPONENTS: world tensor misc tensor linalg tinyxml muparser mra chem -# If MADNESS_FIND_COMPONENTS only contains world, will load the subset of targets -# necessary for MADworld # # The following variables are defined: -# MADNESS_FOUND - System has the MADNESS package -# MADNESS_INCLUDE_DIRS - The MADNESS include directory -# MADNESS_LIBRARIES - The MADNESS libraries and their dependencies -# MADNESS_INSTALL_LIBRARY_DIR - Where MADNESS libraries will be installed (same for CONFIG files imported from the build and install trees) -# MADNESS__FOUND - System has the specified MADNESS COMPONENT -# MADNESS__LIBRARY - The MADNESS COMPONENT library -# MADNESS_F77_INTEGER_SIZE - The default F77 integer size used for BLAS calls -# MADNESS_ASSUMES_ASLR_DISABLED - Whether MADNESS assumes ASLR to be disabled +# madness_FOUND - System has the MADNESS package +# madness_INCLUDE_DIRS - The MADNESS include directory +# madness_LIBRARIES - The MADNESS libraries and their dependencies +# madness_INSTALL_LIBRARY_DIR - Where MADNESS libraries will be installed (same for CONFIG files imported from the build and install trees) +# madness__FOUND - System has the specified MADNESS COMPONENT +# madness__LIBRARY - The MADNESS COMPONENT library +# madness_F77_INTEGER_SIZE - The default F77 integer size used for BLAS calls +# madness_ASSUMES_ASLR_DISABLED - Whether MADNESS assumes ASLR to be disabled # # Additionally MADNESS exports the following variables from its dependent packages: # = LAPACK = @@ -29,19 +27,19 @@ # MPIEXEC_POSTFLAGS Flags to pass to MPIEXEC_EXECUTABLE after other flags # Set package version -set(MADNESS_VERSION "@MADNESS_VERSION@") +set(madness_VERSION "@MADNESS_VERSION@") @PACKAGE_INIT@ -set(MADNESS_CMAKE_TOOLCHAIN_FILE "@CMAKE_TOOLCHAIN_FILE@") +set(madness_CMAKE_TOOLCHAIN_FILE "@CMAKE_TOOLCHAIN_FILE@") # ensure that CMAKE_SYSTEM_NAME matches what was used to compile MADNESS if (NOT CMAKE_SYSTEM_NAME STREQUAL @CMAKE_SYSTEM_NAME@) set (ERROR_MESSAGE "CMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}, does not match CMAKE_SYSTEM_NAME=@CMAKE_SYSTEM_NAME@ used to compile MADNESS") - if (MADNESS_CMAKE_TOOLCHAIN_FILE) + if (madness_CMAKE_TOOLCHAIN_FILE) set (ERROR_MESSAGE "${ERROR_MESSAGE}; make sure to use toolchain @CMAKE_TOOLCHAIN_FILE@ to compile your code!") message (FATAL_ERROR "${ERROR_MESSAGE}") - endif(MADNESS_CMAKE_TOOLCHAIN_FILE) + endif(madness_CMAKE_TOOLCHAIN_FILE) endif() # check for prereqs: @@ -52,8 +50,8 @@ if (NOT TARGET Threads::Threads) endif() # 2. Cereal -set(MADNESS_HAS_CEREAL @MADNESS_HAS_CEREAL@) -if (MADNESS_HAS_CEREAL) +set(madness_HAS_CEREAL @MADNESS_HAS_CEREAL@) +if (madness_HAS_CEREAL) get_filename_component(cereal_DIR "@cereal_CONFIG@" DIRECTORY) find_package(cereal QUIET CONFIG HINTS "${cereal_DIR}") if (NOT TARGET cereal) @@ -62,103 +60,71 @@ if (MADNESS_HAS_CEREAL) INTERFACE_INCLUDE_DIRECTORIES "${cereal_INCLUDE_DIRS}" INTERFACE_COMPILE_DEFINITIONS "CEREAL_THREAD_SAFE=1") endif(NOT TARGET cereal) -endif(MADNESS_HAS_CEREAL) - -# determine if only looking for MADworld ... this is a common scenario that loads a subset of targets -set(MADNESS_FIND_WORLD_ONLY FALSE) -list(LENGTH MADNESS_FIND_COMPONENTS MADNESS_FIND_NUM_COMPONENTS) -list(FIND MADNESS_FIND_COMPONENTS world MADNESS_FIND_COMPONENTS_world_idx) -if (MADNESS_FIND_NUM_COMPONENTS EQUAL 1 AND MADNESS_FIND_COMPONENTS_world_idx GREATER -1) - set(MADNESS_FIND_WORLD_ONLY TRUE) -endif() - -# Include library IMPORT targets -if(NOT TARGET MADworld) - include("${CMAKE_CURRENT_LIST_DIR}/madness-targets.cmake") -endif(NOT TARGET MADworld) -if(NOT MADNESS_FIND_WORLD_ONLY) - set(MADNESS_TOP_TARGET_LIBRARY madness) - set(MADNESS_TARGET_COMPONENT madness) -else(NOT MADNESS_FIND_WORLD_ONLY) - set(MADNESS_TOP_TARGET_LIBRARY MADworld) - set(MADNESS_TARGET_COMPONENT world) -endif(NOT MADNESS_FIND_WORLD_ONLY) +endif(madness_HAS_CEREAL) # Set the madness libraries target -set(MADNESS_LIBRARIES ${MADNESS_TOP_TARGET_LIBRARY}) +set(madness_LIBRARIES madness) -set(MADNESS_SOURCE_DIR "@MADNESS_SOURCE_DIR@") -set(MADNESS_BINARY_DIR "@MADNESS_BINARY_DIR@") +set(madness_SOURCE_DIR "@MADNESS_SOURCE_DIR@") +set(madness_BINARY_DIR "@MADNESS_BINARY_DIR@") # Set Elemental variables -set(MADNESS_HAS_ELEMENTAL @MADNESS_HAS_ELEMENTAL@) -set(MADNESS_HAS_ELEMENTAL_EMBEDDED @MADNESS_HAS_ELEMENTAL_EMBEDDED@) +set(madness_HAS_ELEMENTAL @MADNESS_HAS_ELEMENTAL@) +set(madness_HAS_ELEMENTAL_EMBEDDED @MADNESS_HAS_ELEMENTAL_EMBEDDED@) -set(MADNESS_INSTALL_LIBRARY_DIR "@PACKAGE_MADNESS_INSTALL_LIBDIR@") -set(MADNESS_BUILD_INCLUDE_DIRS "${MADNESS_SOURCE_DIR}/src" ":" "${MADNESS_BINARY_DIR}/src") -set(MADNESS_INSTALL_INCLUDE_DIRS "@PACKAGE_MADNESS_INSTALL_INCLUDEDIR@" ":" +set(madness_INSTALL_LIBRARY_DIR "@PACKAGE_MADNESS_INSTALL_LIBDIR@") +set(madness_BUILD_INCLUDE_DIRS "${madness_SOURCE_DIR}/src" ":" "${madness_BINARY_DIR}/src") +set(madness_INSTALL_INCLUDE_DIRS "@PACKAGE_MADNESS_INSTALL_INCLUDEDIR@" ":" "@PACKAGE_MADNESS_INSTALL_INCLUDEDIR@/madness/external") -if (MADNESS_HAS_ELEMENTAL) - if(MADNESS_HAS_ELEMENTAL_EMBEDDED) +if (madness_HAS_ELEMENTAL) + if(madness_HAS_ELEMENTAL_EMBEDDED) set(Elemental_SOURCE_DIR "@Elemental_SOURCE_DIR@") set(Elemental_BINARY_DIR "@Elemental_BINARY_DIR@") - list(APPEND MADNESS_BUILD_INCLUDE_DIRS + list(APPEND madness_BUILD_INCLUDE_DIRS "${Elemental_SOURCE_DIR}/include" "${Elemental_BINARY_DIR}/include" "${Elemental_SOURCE_DIR}/external/pmrrr/include" "${Elemental_BINARY_DIR}/external/pmrrr/include") - else(MADNESS_HAS_ELEMENTAL_EMBEDDED) + else(madness_HAS_ELEMENTAL_EMBEDDED) set(Elemental_SOURCE_DIR "@ELEMENTAL_SOURCE_DIR@") set(Elemental_BINARY_DIR "@ELEMENTAL_BINARY_DIR@") # elemental package and component name depends on version set(ELEMENTAL_PACKAGE_NAME @ELEMENTAL_PACKAGE_NAME@) set(ELEMENTAL_CONFIGURE_NAME @ELEMENTAL_CONFIG_NAME@) # where to look for elemental cmake config file - if(CMAKE_CURRENT_LIST_DIR EQUAL MADNESS_BINARY_DIR) + if(CMAKE_CURRENT_LIST_DIR EQUAL madness_BINARY_DIR) set(Elemental_DIR "${Elemental_BINARY_DIR}") else() set(Elemental_DIR "${PACKAGE_PREFIX_DIR}/CMake/elemental") endif() find_package(${ELEMENTAL_CONFIGURE_NAME} REQUIRED COMPONENTS REQUIRED ${ELEMENTAL_PACKAGE_NAME}) - list(APPEND MADNESS_BUILD_INCLUDE_DIRS + list(APPEND madness_BUILD_INCLUDE_DIRS "${Elemental_SOURCE_DIR}/include" "${Elemental_BINARY_DIR}/include" "${Elemental_SOURCE_DIR}/external/pmrrr/include" "${Elemental_BINARY_DIR}/external/pmrrr/include" "${Elemental_SOURCE_DIR}/external/pmrrr/suite_sparse" "${Elemental_BINARY_DIR}/external/pmrrr/suite_sparse" ) - endif(MADNESS_HAS_ELEMENTAL_EMBEDDED) -endif(MADNESS_HAS_ELEMENTAL) + endif(madness_HAS_ELEMENTAL_EMBEDDED) +endif(madness_HAS_ELEMENTAL) -# define MADNESS_INCLUDE_DIRS according to where we are compiling: MADNESS build tree or outside -# external packages should use MADNESS_BUILD_INCLUDE_DIRS and MADNESS_INSTALL_INCLUDE_DIRS directly -if(CMAKE_CURRENT_LIST_DIR EQUAL MADNESS_BINARY_DIR) - set(MADNESS_INCLUDE_DIRS "${MADNESS_BUILD_INCLUDE_DIRS}") +# define madness_INCLUDE_DIRS according to where we are compiling: MADNESS build tree or outside +# external packages should use madness_BUILD_INCLUDE_DIRS and madness_INSTALL_INCLUDE_DIRS directly +if(CMAKE_CURRENT_LIST_DIR EQUAL madness_BINARY_DIR) + set(madness_INCLUDE_DIRS "${madness_BUILD_INCLUDE_DIRS}") else() - set(MADNESS_INCLUDE_DIRS "${MADNESS_INSTALL_INCLUDE_DIRS}") + set(madness_INCLUDE_DIRS "${madness_INSTALL_INCLUDE_DIRS}") endif() -# Set component variables -foreach(_comp ${MADNESS_FIND_COMPONENTS}) - if(TARGET MAD${_comp}) - set(MADNESS_${_comp}_FOUND TRUE) - set(MADNESS_${_comp}_LIBRARY MAD${_comp}) - else() - set(MADNESS_${_comp}_FOUND FALSE) - set(MADNESS_${_comp}_LIBRARY "MADNESS_${_comp}_LIBRARY-NOTFOUND") - endif() -endforeach() - # Set the Fortran 77 integer size (4 or 8) -set(MADNESS_F77_INTEGER_SIZE @FORTRAN_INTEGER_SIZE@) +set(madness_F77_INTEGER_SIZE @FORTRAN_INTEGER_SIZE@) # whether MADNESS assumes ASLR to be disabled -set(MADNESS_ASSUMES_ASLR_DISABLED "@MADNESS_ASSUMES_ASLR_DISABLED@") - -check_required_components(${MADNESS_TARGET_COMPONENT}) +set(madness_ASSUMES_ASLR_DISABLED "@MADNESS_ASSUMES_ASLR_DISABLED@") -set(MADNESS_FOUND TRUE) +# list of dependencies of MADworld +set(madness_MADWORLD_INTERFACE_LINK_LIBRARIES "@MADNESS_MADWORLD_INTERFACE_LINK_LIBRARIES@") ########### LAPACK ############ # this is formatted to be added to CMAKE_REQUIRED_LIBRARIES @@ -172,27 +138,26 @@ set(MPIEXEC_EXECUTABLE "@MPIEXEC_EXECUTABLE@" CACHE FILEPATH "Executable for run set(MPIEXEC_NUMPROC_FLAG "@MPIEXEC_NUMPROC_FLAG@" CACHE STRING "Maximum number of processors available to run MPI applications") set(MPIEXEC_PREFLAGS "@MPIEXEC_PREFLAGS@" CACHE STRING "Flag used by MPI to specify the number of processes for mpiexec") set(MPIEXEC_POSTFLAGS "@MPIEXEC_POSTFLAGS@" CACHE STRING "These flags will be placed after all flags passed to mpiexec") - -########### PaRSEC ############ -# if MADworld depends on PaRSEC, enable C language and load MPI_C -get_target_property(_madworld_link_libraries MADworld INTERFACE_LINK_LIBRARIES) +# load MPI::MPI_CXX ... also, if MADworld depends on PaRSEC, enable C language and load MPI_C cmake_policy(SET CMP0057 NEW) # treat IN_LIST as operator -if (MPI::MPI_CXX IN_LIST _madworld_link_libraries) +if (MPI::MPI_CXX IN_LIST madness_MADWORLD_INTERFACE_LINK_LIBRARIES) set(_mpi_languages CXX) - if (PaRSEC::parsec IN_LIST _madworld_link_libraries) - enable_language(C) - list(APPEND _mpi_languages C) - if (NOT TARGET PaRSEC::parsec) - include( CMakeFindDependencyMacro ) - get_filename_component(_parsec_config_dir "@PaRSEC_CONFIG@" DIRECTORY) - find_dependency(PaRSEC CONFIG REQUIRED COMPONENTS parsec PATHS "${_parsec_config_dir}" NO_DEFAULT_PATH) - endif() - endif() - find_package(MPI REQUIRED COMPONENTS "${_mpi_languages}") +endif() +if (PaRSEC::parsec IN_LIST madness_MADWORLD_INTERFACE_LINK_LIBRARIES) + enable_language(C) + list(APPEND _mpi_languages C) +endif() +find_package(MPI REQUIRED COMPONENTS "${_mpi_languages}") + +########### PaRSEC ############ +if (PaRSEC::parsec IN_LIST madness_MADWORLD_INTERFACE_LINK_LIBRARIES AND NOT TARGET PaRSEC::parsec) + include( CMakeFindDependencyMacro ) + get_filename_component(_parsec_config_dir "@PaRSEC_CONFIG@" DIRECTORY) + find_dependency(PaRSEC CONFIG REQUIRED COMPONENTS parsec PATHS "${_parsec_config_dir}" NO_DEFAULT_PATH) endif() ########### TBB ############ -if (TBB::tbb IN_LIST _madworld_link_libraries) +if (TBB::tbb IN_LIST madness_MADWORLD_INTERFACE_LINK_LIBRARIES) if (NOT TARGET TBB::tbb) include( CMakeFindDependencyMacro ) if ("@TBB_CONFIG@") @@ -207,20 +172,9 @@ endif() ########### LibXC ############ if (@LIBXC_FOUND@) - message("Hello worl") - message(@LIBXC_INCLUDE_DIRS@/..) - -# cmake_path(GET @LIBXC_INCLUDE_DIRS@ PARENT_PATH LIBXC_ROOT_DIR) -# message("ay ay" "${LIBXC_INCLUDE_DIRS}") -# -# -# set(MADNESS_INCLUDE_DIRS "${MADNESS_INCLUDE_DIRS}" ":" "@LIBXC_INCLUDE_DIRS@") -# get_filename_component(LIBXC_ROOT_DIR "@LIBXC_INCLUDE_DIRS@/.." DIRECTORY) - - message("LIBXC_ROOT_DIR" "${LIBXC_ROOT_DIR}") - + #message("LIBXC_ROOT_DIR" "${LIBXC_ROOT_DIR}") set(LIBXC_ROOT_DIR "@LIBXC_INCLUDE_DIRS@/..") - message("LIBXC_ROOT_DIR" "${LIBXC_ROOT_DIR}") + #message("LIBXC_ROOT_DIR" "${LIBXC_ROOT_DIR}") set(LIBXC_INCLUDE_DIRS "${LIBXC_INCLUDE_DIRS}" ":" "@LIBXC_INCLUDE_DIRS@") set(LIBXC_LIBRARIES "@LIBXC_LIBRARIES@") set(LIBXC_FOUND 1) @@ -233,3 +187,24 @@ endif() if (LAPACK_LIBRARIES MATCHES Threads::Threads AND NOT TARGET Threads::Threads) find_package(Threads REQUIRED) endif() + +# Include library IMPORT targets +if(NOT TARGET madness) + include("${CMAKE_CURRENT_LIST_DIR}/madness-targets.cmake") +endif(NOT TARGET madness) + +# Set component variables +foreach(_comp ${madness_FIND_COMPONENTS}) + if(("${_comp}" STREQUAL madness AND TARGET madness) OR TARGET MAD${_comp}) + set(madness_${_comp}_FOUND TRUE) + set(madness_${_comp}_LIBRARY MAD${_comp}) + else() + set(madness_${_comp}_FOUND FALSE) + set(madness_${_comp}_LIBRARY "madness_${_comp}_LIBRARY-NOTFOUND") + endif() +endforeach() + +# done +set(madness_FOUND TRUE) +check_required_components(madness) + diff --git a/cmake/modules/AddMADLibrary.cmake b/cmake/modules/AddMADLibrary.cmake index 13b373f4084..6ead8819d11 100644 --- a/cmake/modules/AddMADLibrary.cmake +++ b/cmake/modules/AddMADLibrary.cmake @@ -87,13 +87,6 @@ macro(add_mad_library _name _source_files _header_files _dep_mad_comp _include_d endforeach(_dep ${_dep_mad_comp}) set_target_properties(${targetname} PROPERTIES LINK_FLAGS "${LINK_FLAGS}") target_compile_features(${targetname} INTERFACE "cxx_std_${CMAKE_CXX_STANDARD}") - # if (CMAKE_CXX_STANDARD GREATER_EQUAL 20) # volatile issues now (mostly) fixed properly, so restore warnings - # if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") - # target_compile_options(MAD${_name} PUBLIC "-Wno-deprecated-volatile") - # elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU") - # target_compile_options(MAD${_name} PUBLIC "-Wno-volatile") - # endif() - # endif() endmacro() diff --git a/doc/devsamp/simple_hf.cpp b/doc/devsamp/simple_hf.cpp deleted file mode 100644 index 02647cec23a..00000000000 --- a/doc/devsamp/simple_hf.cpp +++ /dev/null @@ -1,92 +0,0 @@ -#include -#include - -using namespace madness; - -int main(int argc, char* argv[]) { - World& world=initialize(argc,argv); - startup(world,argc,argv,true); - FunctionDefaults<3>::set_cubic_cell(-10,10); - FunctionDefaults<3>::set_k(8); - FunctionDefaults<3>::set_truncate_mode(1); - FunctionDefaults<3>::set_thresh(1.e-5); - double lo=1.e-4; - - try { - // set up molecule - Atom O( 0.0, 0.0, 0.2, 8, 8); - Atom H1(0.0, 1.4,-0.8, 1, 1); - Atom H2(0.0,-1.4,-0.8, 1, 1); - Molecule molecule({O,H1,H2},1.e-6); - molecule.print(); - long nocc=long(molecule.total_nuclear_charge())/2; - - // define Fock operator - auto T=Kinetic(world); - auto J=Coulomb(world,lo,FunctionDefaults<3>::get_thresh()); - auto K=Exchange(world,lo,FunctionDefaults<3>::get_thresh()); - auto V=Nuclear(world,molecule); - - // compute hcore guess - AtomicBasisSet aobasis("sto-3g"); - auto aos=SCF::project_ao_basis_only(world,aobasis,molecule); - auto hcoremat=T(aos,aos) + V(aos,aos); - auto smat=matrix_inner(world,aos,aos); - Tensor U,e; - sygv(hcoremat,smat,1,U,e); // solves gen. eigenvalue problem: A x = e B x - auto orbitals=transform(world,aos,U(_,Slice(0,nocc-1))); // orbitals are lowest nocc AOs after diagonalization - - // set up KAIN solver - auto solver=nonlinear_vector_solver(world, orbitals.size()); - - // solves F |i> = f_{ij} |j> <=> (T-f_{ii} ) |i> = -(J - K + V) |i> + \sum_{j/neq i> f_{ij} |j> - BSHApply bsh_apply(world); - - int maxiter=30; - for (int iter=0; iter + +int task (int i) { return i + 1; } + +int main(int argc, char* argv[]) { + using namespace madness; + + World &world = initialize(argc, argv); + const auto me = world.rank(); + const auto nproc = world.size(); + + Future f; + if (me == 0) { + f = world.taskq.add(&task, 0); + for (auto t = 1; t != 1000; ++t) { + const auto proc = t % nproc; + f = world.taskq.add( + proc, &task, f); + } + } + world.gop.fence(); + if (f.get() != 1000) + abort(); + + finalize(); + return 0; +} + diff --git a/src/madness/CMakeLists.txt b/src/madness/CMakeLists.txt index 0e60e5ce8dc..23f335ec627 100644 --- a/src/madness/CMakeLists.txt +++ b/src/madness/CMakeLists.txt @@ -39,7 +39,7 @@ if (NOT MADNESS_BUILD_MADWORLD_ONLY) add_subdirectory(tensor) add_subdirectory(mra) add_subdirectory(chem) -# Create the super library that contains all MADNESS libraries + # Create the super library that contains all MADNESS libraries add_library(madness $ $ $ ${MADTENSOR_MTXMQ_OBJ} @@ -49,9 +49,7 @@ if (NOT MADNESS_BUILD_MADWORLD_ONLY) endif(NOT MADNESS_BUILD_MADWORLD_ONLY) # Set the dependencies for the super-library -if(CXX11_COMPILE_FLAG) - target_compile_options(madness INTERFACE $) -endif() +target_compile_features(madness INTERFACE "cxx_std_${CMAKE_CXX_STANDARD}") # DISABLEPIE flag can break linking of dependent libraries (e.g. on Linux using gcc6) # instead for each dependent executable target T do: # target_link_libraries(T MADNESS_DISABLEPIE_LINKER_FLAGS) diff --git a/src/madness/world/CMakeLists.txt b/src/madness/world/CMakeLists.txt index de41f776845..10c32a0cd83 100644 --- a/src/madness/world/CMakeLists.txt +++ b/src/madness/world/CMakeLists.txt @@ -82,10 +82,9 @@ if (WORLD_GET_DEFAULT_DISABLED) target_compile_definitions(${targetname} PUBLIC -DMADNESS_DISABLE_WORLD_GET_DEFAULT=1) endif (WORLD_GET_DEFAULT_DISABLED) -# recent PaRSEC does export its targets -#if (TARGET PaRSEC::parsec) -# add_subproject_parsec_target_to_export_set("madness" "world") -#endif() +# record the list of dependencies to be used in madness-config.cmake +get_target_property(MADNESS_MADWORLD_INTERFACE_LINK_LIBRARIES MADworld INTERFACE_LINK_LIBRARIES) +set(MADNESS_MADWORLD_INTERFACE_LINK_LIBRARIES "${MADNESS_MADWORLD_INTERFACE_LINK_LIBRARIES}" CACHE INTERNAL "public library dependencies of MADworld" FORCE) if(BUILD_TESTING)