Skip to content

Commit

Permalink
build: don't pass -fno-builtin unless it works
Browse files Browse the repository at this point in the history
Previously, we passed it whenever the compiler wasn't MSVC.  PGI,
however, doesn't support -fno-builtin (and isn't MSVC).  According
to PGI's documentation --no_builtin should work, but in practice
that doesn't seem to be the case.  pgc++ accepts --builtin but not
--no_builtin, pgcc doesn't take either.
  • Loading branch information
nemequ committed Feb 12, 2017
1 parent 26df120 commit 9695913
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ if (MSVC)
endif (MSVC)

# https://cmake.org/Bug/view.php?id=8246
if(NOT MSVC)
check_c_compiler_flag("-fno-builtin" CFLAG_fno_builtin)
if(CFLAG_fno_builtin)
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -fno-builtin")
endif()

Expand Down

0 comments on commit 9695913

Please sign in to comment.