Skip to content

Commit

Permalink
Merge pull request #536 from njzjz/only_link_what_you_use_on_gnu
Browse files Browse the repository at this point in the history
only enable link what you use on GNU compilers
  • Loading branch information
amcadmus authored Apr 20, 2021
2 parents 4cd609d + ee8c419 commit 0c57047
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion source/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 3.7)
project(DeePMD)
set(CMAKE_LINK_WHAT_YOU_USE TRUE)
if (CMAKE_COMPILER_IS_GNU)
set(CMAKE_LINK_WHAT_YOU_USE TRUE)
endif ()

# build cpp or python interfaces
if (NOT DEFINED BUILD_CPP_IF)
Expand Down

0 comments on commit 0c57047

Please sign in to comment.