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)
1212set (CMAKE_SHARED_MODULE_SUFFIX ".scx" )
1313endif ()
1414
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 :)
1622
1723if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
1824 add_definitions (-fvisibility=hidden)
@@ -54,11 +60,10 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
5460 add_definitions (-march=native)
5561 endif ()
5662
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++" )
6267 endif ()
6368endif ()
6469if (MINGW)
You can’t perform that action at this time.
0 commit comments