Commit bebff778 authored by Henning Janssen's avatar Henning Janssen

Nicer format in test_EDsolver

parent 50e545fa
......@@ -12,7 +12,7 @@ else()
if (NOT FLEUR_USE_ARPACK)
set(TEST_LIBRARIES "${FLEUR_LIBRARIES};${ADD_STRING}")
try_compile(FLEUR_USE_ARPACK ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/cmake/tests/test_ARPACK.f
LINK_LIBRARIES ${TEST_LIBRARIES})
LINK_LIBRARIES ${TEST_LIBRARIES})
if (FLEUR_USE_ARPACK)
set(FLEUR_ARPACK_LIBRARIES ${TEST_LIBRARIES})
else()
......@@ -32,7 +32,7 @@ if (NOT FLEUR_USE_EDSOLVER)
#try adding -lEDsolver to the linker options
set(TEST_LIBRARIES "${FLEUR_ARPACK_LIBRARIES};-lEDsolver")
try_compile(FLEUR_USE_EDSOLVER ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/cmake/tests/test_EDsolver.f90
LINK_LIBRARIES ${TEST_LIBRARIES})
LINK_LIBRARIES ${TEST_LIBRARIES})
if(FLEUR_USE_EDSOLVER)
set(FLEUR_EDSOLVER_LIBRARIES ${TEST_LIBRARIES})
else()
......@@ -47,23 +47,29 @@ if (DEFINED CLI_FLEUR_USE_EDSOLVER)
if (CLI_FLEUR_USE_EDSOLVER)
if (NOT FLEUR_USE_EDSOLVER)
if (NOT FLEUR_USE_ARPACK)
message(WARNING "You asked for the EDsolver library but cmake couldn't find the ARPACK library, which is a prerequisite for the EDsolver. Please check your configuration or install the ARPACK library.")
message(WARNING "You asked for the EDsolver library but cmake couldn't find the ARPACK library,
which is a prerequisite for the EDsolver.
Please check your configuration or install the ARPACK library.")
else()
message(WARNING "You asked for the EDsolver library but cmake couldn't find it. We will try to download and compile the EDsolver library along with FLEUR")
message(WARNING "You asked for the EDsolver library but cmake couldn't find it.
We will try to download and compile the EDsolver library along with FLEUR")
if(NOT EXISTS "${PROJECT_SOURCE_DIR}/external/edsolver-library/src")
find_package(Git REQUIRED)
execute_process(COMMAND ${GIT_EXECUTABLE} submodule init -v external/edsolver-library WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} RESULT_VARIABLE _res_init)
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update -v WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} RESULT_VARIABLE _res_update)
execute_process(COMMAND ${GIT_EXECUTABLE} submodule init -v external/edsolver-library
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} RESULT_VARIABLE _res_init)
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update -v
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} RESULT_VARIABLE _res_update)
if( ${_res_init} GREATER 0 OR ${_res_update} GREATER 0 )
message(FATAL_ERROR "EDsolver source could not be downloaded.\n"
"We tried: 'git submodule init external/edsolver-library && git submodule update' and resulted in error" )
"We tried: 'git submodule init external/edsolver-library
&& git submodule update' and resulted in error" )
endif()
if(NOT EXISTS "${PROJECT_SOURCE_DIR}/external/edsolver-library/src")
#If someone has no access to the repository but tries to to git submodule init/update
#It will complete with no error but nothing will happen
message(FATAL_ERROR "It seems that you asked for the EDsolver library to be pulled from git.
This is a private repository.
If you already have access please configure your git to log you in automatically.
If you already have access, please configure your git to log you in automatically.
If not contact he.janssen@fz-juelich.de")
endif()
endif()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment