From 1e137c3c20d57871c740561f36eb264057efbd1c Mon Sep 17 00:00:00 2001 From: dyzheng Date: Tue, 5 Nov 2024 17:35:27 +0800 Subject: [PATCH] Fix: not build useless library without ENABLE_LCAO --- .../module_gint/CMakeLists.txt | 3 +++ .../module_hcontainer/CMakeLists.txt | 4 ++++ .../hamilt_pwdft/operator_pw/CMakeLists.txt | 17 +++++++++-------- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/source/module_hamilt_lcao/module_gint/CMakeLists.txt b/source/module_hamilt_lcao/module_gint/CMakeLists.txt index 7f0be6821e..e0e1e2e4cb 100644 --- a/source/module_hamilt_lcao/module_gint/CMakeLists.txt +++ b/source/module_hamilt_lcao/module_gint/CMakeLists.txt @@ -1,4 +1,5 @@ #add_subdirectory(kernels/cuda) +if(ENABLE_LCAO) list(APPEND objects gint.cpp @@ -69,4 +70,6 @@ IF (BUILD_TESTING) if(ENABLE_MPI) add_subdirectory(test) endif() +endif() + endif() \ No newline at end of file diff --git a/source/module_hamilt_lcao/module_hcontainer/CMakeLists.txt b/source/module_hamilt_lcao/module_hcontainer/CMakeLists.txt index d6f58c7182..65db746a84 100644 --- a/source/module_hamilt_lcao/module_hcontainer/CMakeLists.txt +++ b/source/module_hamilt_lcao/module_hcontainer/CMakeLists.txt @@ -1,3 +1,5 @@ +if(ENABLE_LCAO) + list(APPEND objects base_matrix.cpp atom_pair.cpp @@ -22,4 +24,6 @@ IF (BUILD_TESTING) if(ENABLE_MPI) add_subdirectory(test) endif() +endif() + endif() \ No newline at end of file diff --git a/source/module_hamilt_pw/hamilt_pwdft/operator_pw/CMakeLists.txt b/source/module_hamilt_pw/hamilt_pwdft/operator_pw/CMakeLists.txt index c8370d1083..83f7955dbb 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/operator_pw/CMakeLists.txt +++ b/source/module_hamilt_pw/hamilt_pwdft/operator_pw/CMakeLists.txt @@ -7,12 +7,13 @@ list(APPEND operator_ks_pw_srcs velocity_pw.cpp ) -add_library( - operator_ks_pw - OBJECT - ${operator_ks_pw_srcs} -) +# this library is included in hamilt_pwdft now +#add_library( +# operator_ks_pw +# OBJECT +# ${operator_ks_pw_srcs} +#) -if(ENABLE_COVERAGE) - add_coverage(operator_ks_pw) -endif() +#if(ENABLE_COVERAGE) +# add_coverage(operator_ks_pw) +#endif()