diff options
Diffstat (limited to 'Tests/RunCMake')
4 files changed, 14 insertions, 0 deletions
diff --git a/Tests/RunCMake/XcodeProject/PerConfigPerSourceFlags-result.txt b/Tests/RunCMake/XcodeProject/PerConfigPerSourceFlags-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/XcodeProject/PerConfigPerSourceFlags-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/XcodeProject/PerConfigPerSourceFlags-stderr.txt b/Tests/RunCMake/XcodeProject/PerConfigPerSourceFlags-stderr.txt new file mode 100644 index 0000000..6500649 --- /dev/null +++ b/Tests/RunCMake/XcodeProject/PerConfigPerSourceFlags-stderr.txt @@ -0,0 +1,8 @@ +^CMake Error in CMakeLists.txt: + Xcode does not support per-config per-source COMPILE_FLAGS: + + \$<\$<CONFIG:Debug>:-DMYDEBUG> + + specified for source: + + .*/Tests/RunCMake/XcodeProject/main.c$ diff --git a/Tests/RunCMake/XcodeProject/PerConfigPerSourceFlags.cmake b/Tests/RunCMake/XcodeProject/PerConfigPerSourceFlags.cmake new file mode 100644 index 0000000..99cec5b --- /dev/null +++ b/Tests/RunCMake/XcodeProject/PerConfigPerSourceFlags.cmake @@ -0,0 +1,3 @@ +enable_language(C) +add_executable(main main.c) +set_property(SOURCE main.c PROPERTY COMPILE_FLAGS "$<$<CONFIG:Debug>:-DMYDEBUG>") diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake index d43c80d..60912c2 100644 --- a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake +++ b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake @@ -13,6 +13,8 @@ if (NOT XCODE_VERSION VERSION_LESS 6) run_cmake(XcodePlatformFrameworks) endif() +run_cmake(PerConfigPerSourceFlags) + # Use a single build tree for a few tests without cleaning. if(NOT XCODE_VERSION VERSION_LESS 5) |