summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/target_compile_options/CMP0101-BEFORE_keyword.cmake
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2020-01-10 18:13:09 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2020-01-11 00:25:25 (GMT)
commit2678e310537a965b531cfc2c1f54fc72aac9d7d5 (patch)
tree6eaba42609646e732b70a71302095b87853d543e /Tests/RunCMake/target_compile_options/CMP0101-BEFORE_keyword.cmake
parent3795dea6f1d4ca9bc1a2131173ed190f6c362fbe (diff)
downloadCMake-2678e310537a965b531cfc2c1f54fc72aac9d7d5.zip
CMake-2678e310537a965b531cfc2c1f54fc72aac9d7d5.tar.gz
CMake-2678e310537a965b531cfc2c1f54fc72aac9d7d5.tar.bz2
target_compile_options: ensure BEFORE keyword is handled in all scopes
Fixes: #20200
Diffstat (limited to 'Tests/RunCMake/target_compile_options/CMP0101-BEFORE_keyword.cmake')
-rw-r--r--Tests/RunCMake/target_compile_options/CMP0101-BEFORE_keyword.cmake15
1 files changed, 15 insertions, 0 deletions
diff --git a/Tests/RunCMake/target_compile_options/CMP0101-BEFORE_keyword.cmake b/Tests/RunCMake/target_compile_options/CMP0101-BEFORE_keyword.cmake
new file mode 100644
index 0000000..577427f
--- /dev/null
+++ b/Tests/RunCMake/target_compile_options/CMP0101-BEFORE_keyword.cmake
@@ -0,0 +1,15 @@
+
+enable_language(C)
+
+cmake_policy (SET CMP0101 OLD)
+
+add_executable (CMP0101_OLD CMP0101.c)
+target_compile_options (CMP0101_OLD PRIVATE -UBEFORE_KEYWORD)
+target_compile_options (CMP0101_OLD BEFORE PRIVATE -DBEFORE_KEYWORD)
+
+
+cmake_policy (SET CMP0101 NEW)
+
+add_executable (CMP0101_NEW CMP0101.c)
+target_compile_options (CMP0101_NEW PRIVATE -UBEFORE_KEYWORD)
+target_compile_options (CMP0101_NEW BEFORE PRIVATE -DBEFORE_KEYWORD)