[CMAKE] Get rid of the set_cpp macro
authorJérôme Gardou <jerome.gardou@reactos.org>
Fri, 18 Sep 2020 07:34:18 +0000 (09:34 +0200)
committerJérôme Gardou <zefklop@users.noreply.github.com>
Tue, 20 Oct 2020 19:44:54 +0000 (21:44 +0200)
commitd6ea8659c87cbbb60a6ba3760c14f6d5aaf0fbba
tree5821bdf8594e1f702c30cb8f1d467ce09eb1f122
parent980ce77316eb3de9b50e6106a7af9aa28e93415b
[CMAKE] Get rid of the set_cpp macro

Instead of messing with global variables and the like, we introduce two target properties:
 - WITH_CXX_EXCEPTIONS: if you want to use C++ exceptions
 - WITH_CXX_RTTI: if you need RTTI in your module
You can use the newly introduced set_target_cpp_properties function, with WITH_EXCEPTIONS and WITH_RTTI arguments
We also introduce two libraries :
 - cpprt: for C++ runtime routines
 - cppstl: for the C++ standard template library

NB: On GCC, this requires to create imported libraries with the related built-in libraries:libsupc++, limingwex, libstdc++

Finally, we manage the relevant flags with the ad-hoc generator expressions

So, if you don't need exceptions, nor RTTI, nor use any runtime at all: you simply have nothing else to do than add your C++ file to your module
69 files changed:
CMakeLists.txt
base/applications/atactl/CMakeLists.txt
base/applications/charmap_new/CMakeLists.txt
base/applications/drwtsn32/CMakeLists.txt
base/applications/fltmc/CMakeLists.txt
base/applications/games/solitaire/CMakeLists.txt
base/applications/games/spider/CMakeLists.txt
base/applications/msconfig_new/CMakeLists.txt
base/applications/mspaint/CMakeLists.txt
base/applications/network/telnet/CMakeLists.txt
base/applications/rapps/CMakeLists.txt
base/applications/sndrec32/CMakeLists.txt
base/shell/explorer/CMakeLists.txt
base/shell/rshell/CMakeLists.txt
dll/directx/ksproxy/CMakeLists.txt
dll/opengl/glu32/CMakeLists.txt
dll/shellext/acppage/CMakeLists.txt
dll/shellext/fontext/CMakeLists.txt
dll/shellext/mydocs/CMakeLists.txt
dll/shellext/netshell/CMakeLists.txt
dll/shellext/ntobjshex/CMakeLists.txt
dll/shellext/sendmail/CMakeLists.txt
dll/shellext/shellbtrfs/CMakeLists.txt
dll/shellext/stobject/CMakeLists.txt
dll/shellext/zipfldr/CMakeLists.txt
dll/win32/browseui/CMakeLists.txt
dll/win32/browseui/shellbars/CMakeLists.txt
dll/win32/browseui/shellfind/CMakeLists.txt
dll/win32/devmgr/CMakeLists.txt
dll/win32/framedyn/CMakeLists.txt
dll/win32/msgina/CMakeLists.txt
dll/win32/shell32/CMakeLists.txt
dll/win32/shell32/shelldesktop/CMakeLists.txt
dll/win32/shell32/shellmenu/CMakeLists.txt
dll/win32/shlwapi/CMakeLists.txt
drivers/filesystems/udfs/CMakeLists.txt
drivers/storage/ide/uniata/CMakeLists.txt
drivers/usb/usbaudio/CMakeLists.txt
drivers/wdm/audio/backpln/portcls/CMakeLists.txt
drivers/wdm/audio/drivers/CMIDriver/CMakeLists.txt
drivers/wdm/audio/drivers/CMIDriver/cmicontrol/CMakeLists.txt
drivers/wdm/audio/drivers/CMIDriver/cpl/CMakeLists.txt
drivers/wdm/audio/hdaudbus/CMakeLists.txt
modules/rosapps/applications/devutils/gdb2/CMakeLists.txt
modules/rosapps/applications/devutils/shlextdbg/CMakeLists.txt
modules/rosapps/applications/explorer-old/CMakeLists.txt
modules/rosapps/applications/fraginator/CMakeLists.txt
modules/rosapps/applications/net/netreg/CMakeLists.txt
modules/rosapps/applications/net/roshttpd/CMakeLists.txt
modules/rosapps/applications/sysutils/fontsub/CMakeLists.txt
modules/rosapps/applications/sysutils/regexpl/CMakeLists.txt
modules/rosapps/lib/vfdlib/CMakeLists.txt
modules/rostests/apitests/apphelp/CMakeLists.txt
modules/rostests/apitests/atl/CMakeLists.txt
modules/rostests/apitests/browseui/CMakeLists.txt
modules/rostests/apitests/fontext/CMakeLists.txt
modules/rostests/apitests/msgina/CMakeLists.txt
modules/rostests/apitests/ole32/CMakeLists.txt
modules/rostests/apitests/shell32/CMakeLists.txt
modules/rostests/apitests/zipfldr/CMakeLists.txt
modules/rostests/rosautotest/CMakeLists.txt
sdk/cmake/CMakeMacros.cmake
sdk/cmake/gcc.cmake
sdk/cmake/msvc.cmake
sdk/lib/3rdparty/cardlib/CMakeLists.txt
sdk/lib/3rdparty/stlport/CMakeLists.txt
sdk/lib/comsupp/CMakeLists.txt
sdk/lib/cpprt/CMakeLists.txt
sdk/lib/drivers/sound/stdunk/CMakeLists.txt