[cmake] Add EXTRA_COMPILE_FLAGS to samples & unitTests
Add the additional compiler flags added by -DEXIV2_TEAM_EXTRA_WARNINGS=ON to the targets in samples/ & unitTests/ This fixes #204
This commit is contained in:
parent
1e016f82e7
commit
8b7941b733
@ -35,6 +35,8 @@ set( SAMPLES
|
||||
foreach(entry ${SAMPLES})
|
||||
string( REPLACE ".cpp" "" target ${entry})
|
||||
add_executable( ${target} ${target}.cpp )
|
||||
set_target_properties(${target} PROPERTIES
|
||||
COMPILE_FLAGS ${EXTRA_COMPILE_FLAGS})
|
||||
list(APPEND APPLICATIONS ${target})
|
||||
add_test( ${target}_test ${target} )
|
||||
target_link_libraries( ${target} PRIVATE exiv2lib)
|
||||
|
||||
@ -24,3 +24,7 @@ target_compile_definitions(unit_tests
|
||||
PRIVATE
|
||||
GTEST_LINKED_AS_SHARED_LIBRARY=1
|
||||
)
|
||||
|
||||
set_target_properties( unit_tests PROPERTIES
|
||||
COMPILE_FLAGS ${EXTRA_COMPILE_FLAGS}
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user