Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

Commit 320b4c1

Browse files
committed
Merge pull request #370 from dawagner/cmake-compile-options
CMake: Use add_compile_options when applicable
2 parents 5437d88 + a9e5b15 commit 320b4c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@ if(WIN32)
8080
# and thus are not to be used by the client. A better fix would be to export
8181
# only public methods instead of the whole class, but they are too many to
8282
# do that. A separated plugin interface would fix that.
83-
set_property(DIRECTORY PROPERTY COMPILE_OPTIONS /W4 /FIiso646.h -wd4127 -wd4251)
83+
add_compile_options(/W4 /FIiso646.h -wd4127 -wd4251)
8484

8585
# FIXME: Once we have removed all warnings on windows, add the /WX flags if
8686
# FATAL_WARNINGS is enabled
8787
else()
88-
set_property(DIRECTORY PROPERTY COMPILE_OPTIONS -Wall -Wextra -Wconversion -Wno-sign-conversion
88+
add_compile_options(-Wall -Wextra -Wconversion -Wno-sign-conversion
8989
$<$<BOOL:FATAL_WARNINGS>:-Werror>)
9090
endif()
9191

0 commit comments

Comments
 (0)