Skip to content

Commit

Permalink
Fix previous changes around -fvisibility=hidden that is required on o…
Browse files Browse the repository at this point in the history
…sx ci
  • Loading branch information
fspindle committed Jul 16, 2023
1 parent a4acf65 commit 9295490
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions cmake/AddExtraCompilationFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ macro(add_extra_compiler_option option)
if(CMAKE_BUILD_TYPE)
set(CMAKE_TRY_COMPILE_CONFIGURATION ${CMAKE_BUILD_TYPE})
endif()
vp_check_flag_support(CXX "${option}" _varname "")
vp_check_flag_support(CXX "${option}" _varname "${VISP_EXTRA_CXX_FLAGS} ${ARGN}")
if(_varname)
list(APPEND VISP_EXTRA_CXX_FLAGS ${option})
set(VISP_EXTRA_CXX_FLAGS "${VISP_EXTRA_CXX_FLAGS} ${option}")
endif()

vp_check_flag_support(C "${option}" _varname "")
vp_check_flag_support(C "${option}" _varname "${VISP_EXTRA_C_FLAGS} ${ARGN}")
if(_varname)
list(APPEND VISP_EXTRA_C_FLAGS ${option})
set(VISP_EXTRA_C_FLAGS "${VISP_EXTRA_C_FLAGS} ${option}")
endif()
endmacro()

Expand Down Expand Up @@ -126,7 +126,7 @@ if(BUILD_COVERAGE)
endif()

if(CMAKE_COMPILER_IS_GNUCXX)
if(WIN32 AND NOT ((CMAKE_CXX_COMPILER MATCHES "clang") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang")))
if(NOT (WIN32 AND ((CMAKE_CXX_COMPILER MATCHES "clang") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))))
add_extra_compiler_option(-fvisibility=hidden)
endif()

Expand Down Expand Up @@ -215,6 +215,7 @@ if(MSVC)
add_extra_compiler_option("-Wno-zero-as-null-pointer-constant")
add_extra_compiler_option("-Wno-cast-function-type") # ViSP
add_extra_compiler_option("-Wno-comma")
add_extra_compiler_option("-Wno-deprecated-copy-dtor")
add_extra_compiler_option("-Wno-deprecated-dynamic-exception-spec")
add_extra_compiler_option("-Wno-format-nonliteral")
add_extra_compiler_option("-Wno-global-constructors")
Expand Down

0 comments on commit 9295490

Please sign in to comment.