Commit b482089a authored by Daniel Wortmann's avatar Daniel Wortmann

Updated cmake build system

parent 0e81fcd4
......@@ -79,13 +79,13 @@ if (${FLEUR_USE_SERIAL})
target_compile_definitions(fleur PUBLIC ${FLEUR_DEFINITIONS})
target_link_libraries(fleur ${FLEUR_LIBRARIES})
target_link_libraries(fleur juDFT)
set_target_properties(fleur PROPERTIES Fortran_MODULE_DIRECTORY fleur_modules COMPILE_OPTIONS "-IjuDFT_modules;-Ifleur_modules")
set_target_properties(fleur PROPERTIES Fortran_MODULE_DIRECTORY modules/fleur COMPILE_OPTIONS -Imodules/fleur)
#inpgen executable
add_executable(inpgen ${inpgen_F77} ${inpgen_F90} ${juDFT_SRC_F90} ${c_filesInpgen})
target_compile_definitions(inpgen PUBLIC ${FLEUR_DEFINITIONS})
target_link_libraries(inpgen ${FLEUR_LIBRARIES})
target_link_libraries(inpgen juDFT)
set_target_properties(inpgen PROPERTIES Fortran_MODULE_DIRECTORY inpgen_modules COMPILE_OPTIONS "-IjuDFT_modules;-Iinpgen_modules")
set_target_properties(inpgen PROPERTIES Fortran_MODULE_DIRECTORY modules/inpgen COMPILE_OPTIONS -Imodules/inpgen)
endif()
#parallel executables
if(${FLEUR_USE_MPI})
......@@ -94,7 +94,7 @@ if(${FLEUR_USE_MPI})
target_compile_definitions(fleur_MPI PUBLIC ${FLEUR_MPI_DEFINITIONS})
target_link_libraries(fleur_MPI ${FLEUR_LIBRARIES})
target_link_libraries(fleur_MPI juDFT)
set_target_properties(fleur_MPI PROPERTIES Fortran_MODULE_DIRECTORY fleur_MPI_modules COMPILE_OPTIONS "-IjuDFT_modules;-Ifleur_MPI_modules")
set_target_properties(fleur_MPI PROPERTIES Fortran_MODULE_DIRECTORY modules/fleur_MPI COMPILE_OPTIONS -Imodules/fleur_MPI)
endif ()
......
......@@ -45,5 +45,5 @@ add_executable(diag_test ${diag_test_files})
target_compile_definitions(diag_test PUBLIC ${FLEUR_DEFINITIONS})
target_link_libraries(diag_test ${FLEUR_LIBRARIES})
target_link_libraries(diag_test juDFT)
set_target_properties(diag_test PROPERTIES Fortran_MODULE_DIRECTORY diag_test_modules COMPILE_OPTIONS "-IjuDFT_modules;-Idiag_test_modules")
set_target_properties(diag_test PROPERTIES Fortran_MODULE_DIRECTORY modules/diag_test COMPILE_OPTIONS -Imodules/diag_test RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/tools")
if (${FLEUR_USE_HDF5})
set(judft_HDF
juDFT/hdf_accessprp.F90
......@@ -28,4 +31,5 @@ juDFT/xmlOutput.F90
)
target_compile_definitions(juDFT PUBLIC ${FLEUR_DEFINITIONS})
target_link_libraries(juDFT ${FLEUR_LIBRARIES})
set_target_properties(juDFT PROPERTIES Fortran_MODULE_DIRECTORY juDFT_modules COMPILE_OPTIONS -IjuDFT_modules)
include_directories("${CMAKE_CURRENT_BINARY_DIR}/modules/juDFT")
set_target_properties(juDFT PROPERTIES Fortran_MODULE_DIRECTORY modules/juDFT)
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