File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,13 @@ if(APPLE OR WIN32)
12
12
set (CMAKE_SHARED_MODULE_SUFFIX ".scx" )
13
13
endif ()
14
14
15
- option (CPP11 "Build with c++11." ON )
15
+ # The below monstrosity sets compiler flags for SSE (Streaming SIMD Extensions). Among many other things, SSE protects
16
+ # against denormal numbers, which are known to cause glitchy audio in some cases.
17
+
18
+ # Some processors do not support SSE and will produce errors if you try to add SSE flags, so we also have to introduce
19
+ # conditional logic to guard against those errors.
20
+
21
+ # It's a real mess, and generally there's no need to touch it :)
16
22
17
23
if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
18
24
add_definitions (-fvisibility=hidden)
@@ -54,11 +60,10 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
54
60
add_definitions (-march=native)
55
61
endif ()
56
62
57
- if (CPP11)
58
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" )
59
- if (CMAKE_COMPILER_IS_CLANG)
60
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++" )
61
- endif ()
63
+ # Plugin headers require C++11, which must be explicitly enabled for gcc and clang.
64
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" )
65
+ if (CMAKE_COMPILER_IS_CLANG)
66
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++" )
62
67
endif ()
63
68
endif ()
64
69
if (MINGW)
You can’t perform that action at this time.
0 commit comments