Skip to content

Commit 61366ca

Browse files
committed
Add -no-integrated-cpp for G++ < 9
1 parent 3d6958d commit 61366ca

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,13 @@ configure_file(include/OpenShotVersion.h.in include/OpenShotVersion.h @ONLY)
8383
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/include/OpenShotVersion.h
8484
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libopenshot)
8585

86+
#### Work around a GCC < 9 bug with handling of _Pragma() in macros
87+
#### See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55578
88+
if ((${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") AND
89+
(${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS "9.0.0"))
90+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -no-integrated-cpp")
91+
endif()
92+
8693
#### Enable C++11 (for std::shared_ptr support)
8794
set(CMAKE_CXX_STANDARD 11)
8895
set(CMAKE_CXX_STANDARD_REQUIRED ON)

0 commit comments

Comments
 (0)