mirror of
https://github.com/clangen/musikcube.git
synced 2024-12-25 15:14:35 +00:00
Fix compiler flags for GCC < 9
This commit is contained in:
parent
e34ad7a08d
commit
b1fe7c35d6
@ -1,8 +1,8 @@
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -Wno-unused-result -Wno-deprecated-declarations")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG -g -frtti -fexceptions")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -std=c++17 -DDEBUG -g -frtti -fexceptions")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG")
|
||||
|
||||
# enable for additional memory checking with fsanitize
|
||||
# set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g3 -fsanitize=address,undefined")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2 -frtti -fexceptions -Wno-psabi")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -std=c++17 -O2 -frtti -fexceptions -Wno-psabi")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O2 -Wno-psabi")
|
||||
|
@ -88,6 +88,11 @@ if(NOT HAVE_CXX_ATOMICS_WITHOUT_LIB)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)
|
||||
message(STATUS "[build] detected old gcc, manually adding -lstdc++fs")
|
||||
set (musikcube_LINK_LIBS ${musikcube_LINK_LIBS} stdc++fs)
|
||||
endif()
|
||||
|
||||
message(STATUS "[build] musikcube_LINK_LIBS: " ${musikcube_LINK_LIBS})
|
||||
|
||||
add_subdirectory(src/musikcore)
|
||||
|
Loading…
Reference in New Issue
Block a user