diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index cc230750fb..942d5d3026 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.7) project(DeePMD) -if (CMAKE_COMPILER_IS_GNU) +if (CMAKE_COMPILER_IS_GNUCXX) set(CMAKE_LINK_WHAT_YOU_USE TRUE) endif ()