Skip to content

Commit

Permalink
cmake: set -stdlib=libc++ globally
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <[email protected]>
  • Loading branch information
falkTX committed Jul 20, 2023
1 parent c25d18b commit d1810f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ set(CMAKE_VISIBILITY_INLINES_HIDDEN TRUE)

set_property(GLOBAL PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)

if(APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
endif()

#######################################################################################################################
# fix compat with cmake < 3.26

Expand Down Expand Up @@ -164,15 +168,13 @@ function(set_common_target_properties TARGET)

target_compile_options(${TARGET}
PRIVATE
$<$<BOOL:${APPLE}>:-stdlib=libc++>
$<$<BOOL:${MSVC}>:/wd4244>
$<$<BOOL:${MSVC}>:/wd4267>
$<$<BOOL:${MSVC}>:/wd4273>
)

target_link_options(${TARGET}
PRIVATE
$<$<BOOL:${APPLE}>:-stdlib=libc++>
$<$<C_COMPILER_ID:GNU>:-Wl,--no-undefined>
)

Expand Down
2 changes: 1 addition & 1 deletion cmake/Info-framework.plist.in
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
<string>@CARLA_OSX_DEPLOYMENT_TARGET@</string>
<key>NSHumanReadableCopyright</key>
<string>(C) 2011-2023 Filipe Coelho.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version</string>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version.</string>
</dict>
</plist>

0 comments on commit d1810f7

Please sign in to comment.