diff --git a/CMakeLists.txt b/CMakeLists.txt index 738f024e6e..880df016d5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,10 +20,6 @@ if(UNIX AND NOT APPLE AND NOT DEFINED OpenGL_GL_PREFERENCE) set(OpenGL_GL_PREFERENCE LEGACY) endif() -if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-reorder") -endif() - find_package(OpenGL REQUIRED) find_package(OpenColorIO REQUIRED) @@ -501,6 +497,8 @@ add_executable(${OLIVE_TARGET} target_compile_definitions(${OLIVE_TARGET} PRIVATE ${OLIVE_DEFINITIONS}) +target_compile_options(${OLIVE_TARGET} PRIVATE $<$:-Wno-reorder>) + set(CMAKE_INCLUDE_CURRENT_DIR ON) target_link_libraries(${OLIVE_TARGET}