Skip to content

Commit 0c57047

Browse files
authored
Merge pull request #536 from njzjz/only_link_what_you_use_on_gnu
only enable link what you use on GNU compilers
2 parents 4cd609d + ee8c419 commit 0c57047

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

source/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
cmake_minimum_required(VERSION 3.7)
22
project(DeePMD)
3-
set(CMAKE_LINK_WHAT_YOU_USE TRUE)
3+
if (CMAKE_COMPILER_IS_GNU)
4+
set(CMAKE_LINK_WHAT_YOU_USE TRUE)
5+
endif ()
46

57
# build cpp or python interfaces
68
if (NOT DEFINED BUILD_CPP_IF)

0 commit comments

Comments
 (0)