Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / openmp / runtime / cmake / LibompDefinitions.cmake
blob46beec79f701b1b94726d4516b801334555efdb6
2 #//===----------------------------------------------------------------------===//
3 #//
4 #// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 #// See https://llvm.org/LICENSE.txt for license information.
6 #// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 #//
8 #//===----------------------------------------------------------------------===//
11 function(libomp_get_definitions_flags cppflags)
12   set(cppflags_local)
14   if(WIN32)
15     libomp_append(cppflags_local "-D _CRT_SECURE_NO_WARNINGS")
16     libomp_append(cppflags_local "-D _CRT_SECURE_NO_DEPRECATE")
17     libomp_append(cppflags_local "-D _WINDOWS")
18     libomp_append(cppflags_local "-D _WINNT")
19     libomp_append(cppflags_local "-D _WIN32_WINNT=0x0501")
20     libomp_append(cppflags_local "-D _USRDLL")
21     libomp_append(cppflags_local "-D _ITERATOR_DEBUG_LEVEL=0" IF_TRUE DEBUG_BUILD)
22     libomp_append(cppflags_local "-D _DEBUG" IF_TRUE DEBUG_BUILD)
23   else()
24     libomp_append(cppflags_local "-D _GNU_SOURCE")
25     libomp_append(cppflags_local "-D _REENTRANT")
26   endif()
28   # CMake doesn't include CPPFLAGS from environment, but we will.
29   set(${cppflags} ${cppflags_local} ${LIBOMP_CPPFLAGS} $ENV{CPPFLAGS} PARENT_SCOPE)
30 endfunction()