CompileDefinitions: Add unit test for setting empty content.
This commit is contained in:
parent
8d336875b3
commit
c1bf1a59ff
|
@ -143,6 +143,7 @@ add_RunCMake_test(Swift)
|
|||
add_RunCMake_test(TargetObjects)
|
||||
add_RunCMake_test(TargetSources)
|
||||
add_RunCMake_test(find_dependency)
|
||||
add_RunCMake_test(CompileDefinitions)
|
||||
add_RunCMake_test(CompileFeatures)
|
||||
add_RunCMake_test(WriteCompilerDetectionHeader)
|
||||
if(NOT WIN32)
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
|
@ -0,0 +1,3 @@
|
|||
include(RunCMake)
|
||||
|
||||
run_cmake(SetEmpty)
|
|
@ -0,0 +1 @@
|
|||
0
|
|
@ -0,0 +1,3 @@
|
|||
RESULT1=A;;B
|
||||
RESULT2=
|
||||
RESULT3=-DBAR
|
|
@ -0,0 +1,12 @@
|
|||
|
||||
set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS A "" B)
|
||||
get_property(result DIRECTORY PROPERTY COMPILE_DEFINITIONS)
|
||||
message("RESULT1=${result}")
|
||||
|
||||
set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS)
|
||||
get_property(result DIRECTORY PROPERTY COMPILE_DEFINITIONS)
|
||||
message("RESULT2=${result}")
|
||||
|
||||
set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS -DBAR)
|
||||
get_property(result DIRECTORY PROPERTY COMPILE_DEFINITIONS)
|
||||
message("RESULT3=${result}")
|
Loading…
Reference in New Issue