CMake: Including the command "target_compile_options" in the project file.

This commit is contained in:
Tércio Martins
2019-05-09 03:55:46 +10:00
committed by itsmattkc
parent 87756c6a48
commit 893a94b5c9
+2 -4
View File
@@ -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 $<$<CXX_COMPILER_ID:GNU>:-Wno-reorder>)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
target_link_libraries(${OLIVE_TARGET}