Skip to content

Commit

Permalink
Use compiler instead of gcc for variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
j-rivero committed Oct 11, 2017
1 parent 17a6c33 commit 3fb1525
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ set_target_properties(${PROJECT_NAME} PROPERTIES
#################################################
# Macro to check for visibility capability in compiler
# Original idea from: https://gitorious.org/ferric-cmake-stuff/
macro (check_gcc_visibility)
macro (check_compiler_visibility)
include (CheckCXXCompilerFlag)
check_cxx_compiler_flag(-fvisibility=hidden GCC_SUPPORTS_VISIBILITY)
check_cxx_compiler_flag(-fvisibility=hidden COMPILER_SUPPORTS_VISIBILITY)
endmacro()

if (UNIX)
check_gcc_visibility()
if (GCC_SUPPORTS_VISIBILITY)
check_compiler_visibility()
if (COMPILER_SUPPORTS_VISIBILITY)
set_target_properties(${PROJECT_NAME}
PROPERTIES COMPILE_FLAGS "-fvisibility=hidden")
endif()
Expand Down

0 comments on commit 3fb1525

Please sign in to comment.