mirror of
https://github.com/reactos/CMake.git
synced 2025-04-04 08:11:35 +00:00
Tests: Cover set_property for buildsystem directory properties
Extend the RunCMake.set_property test with cases covering buildsystem directory properties: * COMPILE_DEFINITIONS * COMPILE_OPTIONS * INCLUDE_DIRECTORIES Also test a non-buildsystem property to document the equivalence in behavior.
This commit is contained in:
parent
fb45c37160
commit
ed258d606b
@ -1 +1,2 @@
|
|||||||
-- Target COMPILE_DEFINITIONS is 'a;b;c;d;;e'
|
-- Target COMPILE_DEFINITIONS is 'a;b;c;d;;e'
|
||||||
|
-- Directory COMPILE_DEFINITIONS is 'a;b;c;d;;e'
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
include(Common.cmake)
|
include(Common.cmake)
|
||||||
test_target_property(COMPILE_DEFINITIONS)
|
test_target_property(COMPILE_DEFINITIONS)
|
||||||
|
test_directory_property(COMPILE_DEFINITIONS)
|
||||||
|
@ -1 +1,2 @@
|
|||||||
-- Target COMPILE_OPTIONS is 'a;b;c;d;;e'
|
-- Target COMPILE_OPTIONS is 'a;b;c;d;;e'
|
||||||
|
-- Directory COMPILE_OPTIONS is 'a;b;c;d;;e'
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
include(Common.cmake)
|
include(Common.cmake)
|
||||||
test_target_property(COMPILE_OPTIONS)
|
test_target_property(COMPILE_OPTIONS)
|
||||||
|
test_directory_property(COMPILE_OPTIONS)
|
||||||
|
@ -12,3 +12,17 @@ macro(test_target_property PROP)
|
|||||||
message(STATUS "Target ${PROP} is '${val}'")
|
message(STATUS "Target ${PROP} is '${val}'")
|
||||||
set_property(TARGET CustomTarget PROPERTY ${PROP})
|
set_property(TARGET CustomTarget PROPERTY ${PROP})
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
macro(test_directory_property PROP)
|
||||||
|
set_property(DIRECTORY PROPERTY ${PROP} x)
|
||||||
|
set_property(DIRECTORY PROPERTY ${PROP})
|
||||||
|
set_property(DIRECTORY APPEND PROPERTY ${PROP})
|
||||||
|
set_property(DIRECTORY PROPERTY ${PROP} a)
|
||||||
|
set_property(DIRECTORY APPEND PROPERTY ${PROP} "")
|
||||||
|
set_property(DIRECTORY APPEND PROPERTY ${PROP} b c)
|
||||||
|
set_property(DIRECTORY APPEND PROPERTY ${PROP})
|
||||||
|
set_property(DIRECTORY APPEND PROPERTY ${PROP} "d;;e")
|
||||||
|
get_property(val DIRECTORY PROPERTY ${PROP})
|
||||||
|
message(STATUS "Directory ${PROP} is '${val}'")
|
||||||
|
set_property(DIRECTORY PROPERTY ${PROP})
|
||||||
|
endmacro()
|
||||||
|
@ -1 +1,2 @@
|
|||||||
-- Target INCLUDE_DIRECTORIES is 'a;b;c;d;;e'
|
-- Target INCLUDE_DIRECTORIES is 'a;b;c;d;;e'
|
||||||
|
-- Directory INCLUDE_DIRECTORIES is 'a;b;c;d;;e'
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
include(Common.cmake)
|
include(Common.cmake)
|
||||||
test_target_property(INCLUDE_DIRECTORIES)
|
test_target_property(INCLUDE_DIRECTORIES)
|
||||||
|
test_directory_property(INCLUDE_DIRECTORIES)
|
||||||
|
@ -1 +1,2 @@
|
|||||||
-- Target USER_PROP is 'a;b;c;d;;e'
|
-- Target USER_PROP is 'a;b;c;d;;e'
|
||||||
|
-- Directory USER_PROP is 'a;b;c;d;;e'
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
include(Common.cmake)
|
include(Common.cmake)
|
||||||
test_target_property(USER_PROP)
|
test_target_property(USER_PROP)
|
||||||
|
test_directory_property(USER_PROP)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user