1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-15 03:48:02 +08:00

Tests: Add case for Xcode per-config per-source COMPILE_FLAGS diagnostic

This commit is contained in:
Brad King
2016-10-28 11:18:15 -04:00
parent 1e4bb35894
commit 9a58517df4
4 changed files with 14 additions and 0 deletions

View File

@@ -0,0 +1 @@
1

View File

@@ -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$

View File

@@ -0,0 +1,3 @@
enable_language(C)
add_executable(main main.c)
set_property(SOURCE main.c PROPERTY COMPILE_FLAGS "$<$<CONFIG:Debug>:-DMYDEBUG>")

View File

@@ -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)