Skip to content

Commit 094cdfd

Browse files
committed
update cmake file
1 parent 43b4b90 commit 094cdfd

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,6 @@ if(DEFINED NEP_DIR)
655655

656656
if(NEP_FOUND)
657657
add_compile_definitions(__NEP)
658-
add_compile_options(-Wl,--no-as-needed)
659658
target_link_libraries(${ABACUS_BIN_NAME} NEP::nep_cpu)
660659
endif()
661660
endif()

cmake/FindNEP.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ if(NEP_FOUND)
3737
if(NOT TARGET NEP::nep_cpu)
3838
add_library(NEP::nep_cpu UNKNOWN IMPORTED)
3939
set_target_properties(NEP::nep_cpu PROPERTIES
40+
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
4041
IMPORTED_LOCATION "${NEP_LIBRARY}"
4142
INTERFACE_INCLUDE_DIRECTORIES "${NEP_INCLUDE_DIR}"
4243
)

toolchain/scripts/stage4/install_nepcpu.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,12 @@ prepend_path LD_LIBRARY_PATH "$pkg_install_dir/lib"
131131
prepend_path LD_RUN_PATH "$pkg_install_dir/lib"
132132
prepend_path LIBRARY_PATH "$pkg_install_dir/lib"
133133
prepend_path CPATH "$pkg_install_dir/include"
134+
prepend_path CMAKE_PREFIX_PATH "$pkg_install_dir"
134135
export LD_LIBRARY_PATH="$pkg_install_dir/lib":\${LD_LIBRARY_PATH}
135136
export LD_RUN_PATH="$pkg_install_dir/lib":\${LD_RUN_PATH}
136137
export LIBRARY_PATH="$pkg_install_dir/lib":\${LIBRARY_PATH}
137138
export CPATH="$pkg_install_dir/include":\${CPATH}
139+
export CMAKE_PREFIX_PATH="$pkg_install_dir":\${CMAKE_PREFIX_PATH}
138140
EOF
139141
cat "${BUILDDIR}/setup_nepcpu" >> $SETUPFILE
140142
fi

0 commit comments

Comments
 (0)