Skip to content

Commit b77a710

Browse files
pcaspersjenkins
authored andcommitted
Merge branch 'QPR-13368' into 'master'
QPR-13368 use flat namespace on OSX Closes QPR-13368 See merge request qs/oreplus!2752
1 parent fcdf518 commit b77a710

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

cmake/commonSettings.cmake

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
include(CheckCXXCompilerFlag)
2-
if(CMAKE_MINOR_VERSION GREATER 18 OR CMAKE_MINOR_VERSION EQUAL 18)
3-
include(CheckLinkerFlag)
4-
endif()
2+
include(CheckLinkerFlag)
53

64
include(${CMAKE_CURRENT_LIST_DIR}/writeAll.cmake)
75

@@ -142,8 +140,11 @@ else()
142140

143141
# add pthread flag
144142
add_compiler_flag("-pthread" usePThreadCompilerFlag)
145-
if(CMAKE_MINOR_VERSION GREATER 18 OR CMAKE_MINOR_VERSION EQUAL 18)
146-
add_linker_flag("-pthread" usePThreadLinkerFlag)
143+
add_linker_flag("-pthread" usePThreadLinkerFlag)
144+
145+
# use flat namespace to fix symbol lookup issues and align with linux more closely
146+
if (APPLE)
147+
add_linker_flag("-flat_namespace" supportsFlatNameSpace)
147148
endif()
148149

149150
if(QL_USE_PCH)

0 commit comments

Comments
 (0)