File tree Expand file tree Collapse file tree 5 files changed +22
-105
lines changed Expand file tree Collapse file tree 5 files changed +22
-105
lines changed Original file line number Diff line number Diff line change 1
- #
2
- # If Clang is used and deployment target is not specified
3
- # with MACOSX_DEPLOYMENT_TARGET environment variable, make
4
- # sure that clang's native implementation of C++ std
5
- # libarary (libc++) is used. Otherwise clang defaults to
6
- # GNU version (libstdc++) which is outdated and does
7
- # not handle C++11 well.
8
- #
9
- # TODO: Add option to use the default runtime if user wishes
10
- # so.
11
- #
12
1
13
- function (set_visibility )
14
- add_compile_options (-fvisibility-ms-compat )
15
- endfunction ()
2
+ function (enable_cxx11 )
16
3
17
- # ???
4
+ #
5
+ # If Clang is used and deployment target is not specified
6
+ # with MACOSX_DEPLOYMENT_TARGET environment variable, make
7
+ # sure that clang's native implementation of C++ std
8
+ # libarary (libc++) is used. Otherwise clang defaults to
9
+ # GNU version (libstdc++) which is outdated and does
10
+ # not handle C++11 well.
11
+ #
12
+ # TODO: Add option to use the default runtime if user wishes
13
+ # so.
14
+ #
18
15
19
- if ( CMAKE_CXX_COMPILER_ID MATCHES "Clang"
20
- AND NOT DEFINED ENV{MACOSX_DEPLOYMENT_TARGET}
21
- AND NOT CMAKE_SYSTEM_NAME MATCHES "Linux" )
16
+ add_flags ( CXX -std=c++11 -stdlib=libc++ )
17
+
18
+ endfunction ( )
22
19
23
- list (APPEND CPP11FLAGS -stdlib=libc++ )
24
20
25
- endif ()
21
+ function (set_visibility )
22
+ add_compile_options (-fvisibility-ms-compat )
23
+ endfunction ()
24
+
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ endfunction()
39
39
40
40
41
41
function (enable_pic )
42
- add_compile_options (CXX -KPIC )
42
+ add_flags (CXX -KPIC )
43
43
endfunction ()
44
44
45
45
Original file line number Diff line number Diff line change @@ -150,9 +150,9 @@ function(merge_libraries TARGET)
150
150
# Note: empty.c is not really needed, but cmake does not accept a library
151
151
# target with no sources.
152
152
153
- set_property (SOURCE "${LIBUTILS_SCRIPT_DIR} /empty.c " PROPERTY LANGUAGE CXX )
153
+ set_property (SOURCE "${LIBUTILS_SCRIPT_DIR} /empty.cc " PROPERTY LANGUAGE CXX )
154
154
155
- add_library (${TARGET} ${TYPE} "${LIBUTILS_SCRIPT_DIR} /empty.c " )
155
+ add_library (${TARGET} ${TYPE} "${LIBUTILS_SCRIPT_DIR} /empty.cc " )
156
156
target_link_libraries (${TARGET} PRIVATE ${ARGN} )
157
157
158
158
#
File renamed without changes.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments