summaryrefslogtreecommitdiff
path: root/src/pal/tests/palsuite
diff options
context:
space:
mode:
authorJeremy Koritzinsky <jekoritz@microsoft.com>2019-06-05 14:48:55 -0700
committerGitHub <noreply@github.com>2019-06-05 14:48:55 -0700
commit90dd13ee1bd497d7724c2b1d0fd833d42f7001ad (patch)
treeae6167d368f59598c6dd6c71e3280d1af0485f02 /src/pal/tests/palsuite
parentd7e49efa6b41afb2b7a9ee3adc8f0850b968562a (diff)
downloadcoreclr-90dd13ee1bd497d7724c2b1d0fd833d42f7001ad.tar.gz
coreclr-90dd13ee1bd497d7724c2b1d0fd833d42f7001ad.tar.bz2
coreclr-90dd13ee1bd497d7724c2b1d0fd833d42f7001ad.zip
Use Modern CMake features instead of CMAKE_CXX_FLAGS (#24861)
* Convert C++ standard settings and warning options from CMAKE_<LANG>_FLAGS to Modern CMake isms. * More $<COMPILE_LANGUAGE> generator expressions instead of CMAKE_CXX_FLAGS. * Use $<COMPILE_LANGUAGE:CXX> for all -fpermissive usage * Fix generator expression that generates multiple flags * Fix invalid use of CMAKE_CXX_FLAGS instead of CMAKE_C_FLAGS. * Treat AppleClang as though it is Clang (match pre-3.0 behavior). * Update our build system to understand that AppleClang is distinct from Clang and remove CMP0025 policy setting. * PR Feedback.
Diffstat (limited to 'src/pal/tests/palsuite')
-rw-r--r--src/pal/tests/palsuite/CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pal/tests/palsuite/CMakeLists.txt b/src/pal/tests/palsuite/CMakeLists.txt
index 6726165caf..00a4301784 100644
--- a/src/pal/tests/palsuite/CMakeLists.txt
+++ b/src/pal/tests/palsuite/CMakeLists.txt
@@ -14,13 +14,13 @@ endif()
list(APPEND COMMON_TEST_LIBRARIES coreclrpal)
-if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wno-incompatible-pointer-types-discards-qualifiers)
add_compile_options(-Wno-int-to-void-pointer-cast)
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
add_compile_options(-Wno-sign-compare)
add_compile_options(-Wno-narrowing)
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive" )
+ add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-fpermissive>)
add_compile_options(-Wno-int-to-pointer-cast)
endif()