MPC
MPC copied to clipboard
CMake support to build ACE+TAO including IDL targets
Combined with CMake scripts in this example, this PR enables building ACE+TAO with IDL generation (following #164). The example links two dozen different ACE+TAO libraries including some orbsvcs with no manual hard-coding.
I made minimal modifications, doing most in IDL_FILES_TARGET_SOURCES()
.
Key changes:
- The minimum CMake had to be raised to 3.20, as before that,
target_sources()
silently failed when applied to targets fromadd_custom_command()
. This causes sources generated from IDL into different directories to fail to be detected by CMake for dependency resolution purposes.- This must be done for all CMakeLists, as if any parent file has version < 3.20, this bug occurs.
- To handle IDL files, MPC
custom_types
(e.g. AnyTypeCode_Idl) are emitted as object library targets. They have to be something, as MPC sets several properties of the named target, includingset_target_properties()
,target_compile_definitions()
, andtarget_link_directories()
, which error otherwise. Also, the emittedIDL_FILES_TARGET_SOURCES()
macro currently adds all generated sources to the target, to ensure CMake interprets them as being in the source directory for dependency purposes (won't happen otherwise, even though I tell CMake absolute paths). Note that these IDL object library targets are purely bookkeeping, and are not actually built.- The scope passed to the macro is changed to
PRIVATE
, or else the following error occurs:
- The scope passed to the macro is changed to
[100%] Building CXX object CMakeFiles/TrivialTest.dir/ACE_wrappers/TAO/orbsvcs/orbsvcs/RtecBaseC.cpp.o
In file included from /Users/dev/Downloads/Test/ACE_wrappers/TAO/orbsvcs/orbsvcs/RtecBaseC.cpp:29:
/Users/dev/Downloads/Test/ACE_wrappers/TAO/orbsvcs/orbsvcs/RtecBaseC.h:41:15: fatal error: 'orbsvcs/svc_utils_export.h' file not found
#include /**/ "orbsvcs/svc_utils_export.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/TrivialTest.dir/ACE_wrappers/TAO/orbsvcs/orbsvcs/RtecBaseC.cpp.o] Error 1
make[1]: *** [CMakeFiles/TrivialTest.dir/all] Error 2
make: *** [all] Error 2
Considerations that went into this:
- The object library target works, but…
- An interface library would also make more sense, for IDL files at least. However those can only have
INTERFACE
properties, while we setPUBLIC
andPRIVATE
properties. - The most generic choice would be
add_custom_target()
, but that would require disabling thetarget_compile_definitions()
andtarget_link_directories()
forcustom_only
targets (which is doable) and also making the macro callsPRIVATE
. It has other issues too. - The most "CMake" thing would be to emit different targets for stub, skel, and anyop files, and have consumers link those (which would bring in the appropriate objects with the right scope). But we can't do that right now, since the MPC projects that consume IDL files (e.g. AnyTypeCode) reference the individual files, not the IDL project.
- Thus I use an object library.
- An interface library would also make more sense, for IDL files at least. However those can only have
-
IDL_FILES_TARGET_SOURCES()
calculates absolute paths for CMake, but preserves passing relative paths totao_idl
as required
Considerations before merging
Before merging, I'd like to know if it's possible to fix the TAO_IDL_BE_VIS_*
issue. (The targets are completely empty, so CMake complains. I just ~comment out~ programmatically delete those 8 lines of $TAO_ROOT/TAO_IDL/CMakeLists.txt
. See linked example.)
I'm also wondering if it's possible to generate the three CMake scripts in the appropriate area, maybe when tao_idl
is defined. Or potentially be emitted into a ConfigAceTao.cmake
module.
I've updated my example implementation to use pure CMake, using a FindAceTao.cmake
module. It currently has four hacks, from most to least egregious:
- It programmatically deletes the
CMakeLists.TAO_IDL_BE_VIS_[A-Z]
includes in${TAO_ROOT}/TAO_IDL/CMakeLists.txt
(see OP) - It creates
${ACE_ROOT}/ace/config.h
and${ACE_ROOT}/include/makeinclude/platform_macros.GNU
based on templates. - For demonstrative purposes, it uses a hardcoded source release (7.0.11).
- It clones this branch of
MPC
into the source distribution. That could be deleted after this is merged & released, although it also services backwards compatibility.
We should have a github action with cmake usage in the mpc project, currently only in ace/tao
Just ping me and I'll rebase the PR as needed.
Could someone explain why /TAO/TAO_IDL/GNUmakefile.TAO_IDL_BE_VIS_[ACEIOSUV]
exist, but produce empty build files? The hack that FindAceTao.cmake uses to programmatically delete them should be fixed before this is merged.
We need a cmake github CI action (see ACE/TAO master) in order to make sure changes here don't break building ACE/TAO
I may need help with this. Are you referring to this workflow?
…
Done Building Project "C:\Users\Dev\Git\test-cmake-acetao\build\opt\ACE_wrappers\TAO\orbsvcs\orbsvcs\TAO_CosNotification_Serv.vcxproj" (default targets).
PrepareForBuild:
Creating directory "TrivialTest.dir\Debug\".
Creating directory "C:\Users\Dev\Git\test-cmake-acetao\build\Debug\".
Creating directory "TrivialTest.dir\Debug\TrivialTest.tlog\".
InitializeBuildStatus:
Creating "TrivialTest.dir\Debug\TrivialTest.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
CustomBuild:
Building Custom Rule C:/Users/Dev/Git/test-cmake-acetao/CMakeLists.txt
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\CL.exe /c /I"C:\Users\Dev\Git\test-cmake-acetao\opt\ACE_wrappers" /I"C:\Users\Dev\Git\test-cmake-acetao\opt\ACE_wrappers\TAO" /I"C:\Users\Dev\Git\test-cmake-acetao\opt\ACE_wrappers\TAO\orbsvcs" /Zi /nologo /W1 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D "MPC_LIB_MODIFIER=\"d\"" /D TAO_HAS_VALUETYPE_OUT_INDIRECTION /D TAO_HAS_TYPED_EVENT_CHANNEL /D "CMAKE_INTDIR=\"Debug\"" /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"TrivialTest.dir\Debug\\" /Fd"TrivialTest.dir\Debug\vc142.pdb" /external:W1 /Gd /TP /errorReport:queue "C:\Users\Dev\Git\test-cmake-acetao\main.cpp"
main.cpp
Link:
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\link.exe /ERRORREPORT:QUEUE /OUT:"C:\Users\Dev\Git\test-cmake-acetao\build\Debug\TrivialTest.exe" /INCREMENTAL /ILK:"TrivialTest.dir\Debug\TrivialTest.ilk" /NOLOGO "C:\Users\Dev\Git\test-cmake-acetao\opt\ACE_wrappers\lib\ACEd.lib" "C:\Users\Dev\Git\test-cmake-acetao\opt\ACE_wrappers\lib\ACE_ETCLd.lib" "C:\Users\Dev\Git\test-cmake-acetao\opt\ACE_wrappers\lib\ACE_ETCL_Parserd.lib" "C:\Users\Dev\Git\test-cmake-acetao\opt\ACE_wrappers\lib\TAOd.lib" "C:\Users\Dev\Git\test-cmake-acetao\opt\ACE_wrappers\lib\TAO_AnyTypeCoded.lib" "C:\Users\Dev\Git\test-cmake-acetao\opt\ACE_wrappers\lib\TAO_CodecFactoryd.lib" "C:\Users\Dev\Git\test-cmake-acetao\opt\ACE_wrappers\lib\TAO_CosConcurrencyd.lib" "C:\Users\Dev\Git\test-cmake-acetao\opt\ACE_wrappers\lib\TAO_CosEventd.lib" "C:\Users\Dev\Git\test-cmake-acetao\opt\ACE_wrappers\lib\TAO_CosEvent_Servd.lib" "C:\Users\Dev\Git\test-cmake-acetao\opt\ACE_wrappers\lib\TAO_CosEvent_Skeld.lib" "C:\Users\Dev\Git\test-cmake-acetao\opt\ACE_wrappers\lib\TAO_CosNamingd.lib" "C:\Users\Dev\Git\test-cmake-acetao\opt\ACE_wrappers\lib\TAO_CosNaming_Servd.lib" "C:\Users\Dev\Git\test-cmake-acetao\opt\ACE_wrappers\lib\TAO_CosNaming_Skeld.lib" "C:\Users\Dev\Git\test-cmake-acetao\opt\ACE_wrappers\lib\TAO_CosNotificationd.lib" "C:\Users\Dev\Git\test-cmake-acetao\opt\ACE_wrappers\lib\TAO_CosNotification_Servd.lib" "C:\Users\Dev\Git\test-cmake-acetao\opt\ACE_wrappers\lib\TAO_CosNotification_Skeld.lib" "C:\Users\Dev\Git\test-cmake-acetao\opt\ACE_wrappers\lib\TAO_DynamicAnyd.lib" "C:\Users\Dev\Git\test-cmake-acetao\opt\ACE_wrappers\lib\TAO_DynamicInterfaced.lib" "C:\Users\Dev\Git\test-cmake-acetao\opt\ACE_wrappers\lib\TAO_ETCLd.lib" "C:\Users\Dev\Git\test-cmake-acetao\opt\ACE_wrappers\lib\TAO_IFR_Clientd.lib" "C:\Users\Dev\Git\test-cmake-acetao\opt\ACE_wrappers\lib\TAO_IORTabled.lib" "C:\Users\Dev\Git\test-cmake-acetao\opt\ACE_wrappers\lib\TAO_Messagingd.lib" "C:\Users\Dev\Git\test-cmake-acetao\opt\ACE_wrappers\lib\TAO_PId.lib" "C:\Users\Dev\Git\test-cmake-acetao\opt\ACE_wrappers\lib\TAO_PortableServerd.lib" "C:\Users\Dev\Git\test-cmake-acetao\opt\ACE_wrappers\lib\TAO_Svc_Utilsd.lib" "C:\Users\Dev\Git\test-cmake-acetao\opt\ACE_wrappers\lib\TAO_Valuetyped.lib" iphlpapi.lib TAO_IFR_Clientd.lib TAO_DynamicInterfaced.lib TAO_IORTabled.lib TAO_CosNaming_Skeld.lib TAO_CosNamingd.lib ACE_ETCL_Parserd.lib TAO_ETCLd.lib TAO_DynamicAnyd.lib TAO_CosNotification_Skeld.lib TAO_Svc_Utilsd.lib TAO_CosEvent_Skeld.lib TAO_CosNotificationd.lib TAO_CosEventd.lib TAO_Messagingd.lib ACE_ETCLd.lib TAO_PId.lib TAO_Valuetyped.lib TAO_CodecFactoryd.lib TAO_PortableServerd.lib TAO_AnyTypeCoded.lib TAOd.lib ACEd.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"C:/Users/Dev/Git/test-cmake-acetao/build/Debug/TrivialTest.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:/Users/Dev/Git/test-cmake-acetao/build/Debug/TrivialTest.lib" /MACHINE:X64 /machine:x64 TrivialTest.dir\Debug\main.obj
LINK : fatal error LNK1104: cannot open file 'TAO_IFR_Clientd.lib' [C:\Users\Dev\Git\test-cmake-acetao\build\TrivialTest.vcxproj]
Done Building Project "C:\Users\Dev\Git\test-cmake-acetao\build\TrivialTest.vcxproj" (default targets) -- FAILED.
Done Building Project "C:\Users\Dev\Git\test-cmake-acetao\build\ALL_BUILD.vcxproj" (default targets) -- FAILED.
Build FAILED.
"C:\Users\Dev\Git\test-cmake-acetao\build\ALL_BUILD.vcxproj" (default target) (1) ->
"C:\Users\Dev\Git\test-cmake-acetao\build\TrivialTest.vcxproj" (default target) (3) ->
"C:\Users\Dev\Git\test-cmake-acetao\build\opt\ACE_wrappers\TAO\tao\CodecFactory\TAO_CodecFactory.vcxproj" (default target) (13) ->
(CustomBuild target) ->
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5): warning MSB8065: Custom build for item "C:\Users\Dev\Git\test-cmake-acetao\opt\ACE_wrappers\TAO\tao\CodecFactory\IOP_Codec.pidl" succeeded, but specified output "c:\users\dev\git\test-cmake-acetao\build\opt\ace_wrappers\tao\tao\codecfactory" has not been created. This may cause incremental build to work incorrectly. [C:\Users\Dev\Git\test-cmake-acetao\build\opt\ACE_wrappers\TAO\tao\CodecFactory\TAO_CodecFactory.vcxproj]
"C:\Users\Dev\Git\test-cmake-acetao\build\ALL_BUILD.vcxproj" (default target) (1) ->
"C:\Users\Dev\Git\test-cmake-acetao\build\TrivialTest.vcxproj" (default target) (3) ->
"C:\Users\Dev\Git\test-cmake-acetao\build\opt\ACE_wrappers\TAO\orbsvcs\orbsvcs\TAO_CosEvent_Serv.vcxproj" (default target) (16) ->
"C:\Users\Dev\Git\test-cmake-acetao\build\opt\ACE_wrappers\TAO\tao\IFR_Client\TAO_IFR_Client.vcxproj" (default target) (25) ->
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5): warning MSB8065: Custom build for item "C:\Users\Dev\Git\test-cmake-acetao\opt\ACE_wrappers\TAO\tao\IFR_Client\IFR_Base.pidl" succeeded, but specified output "c:\users\dev\git\test-cmake-acetao\build\opt\ace_wrappers\tao\tao\ifr_client" has not been created. This may cause incremental build to work incorrectly. [C:\Users\Dev\Git\test-cmake-acetao\build\opt\ACE_wrappers\TAO\tao\IFR_Client\TAO_IFR_Client.vcxproj]
"C:\Users\Dev\Git\test-cmake-acetao\build\ALL_BUILD.vcxproj" (default target) (1) ->
"C:\Users\Dev\Git\test-cmake-acetao\build\TrivialTest.vcxproj" (default target) (3) ->
"C:\Users\Dev\Git\test-cmake-acetao\build\opt\ACE_wrappers\TAO\orbsvcs\orbsvcs\TAO_CosNaming_Serv.vcxproj" (default target) (26) ->
"C:\Users\Dev\Git\test-cmake-acetao\build\opt\ACE_wrappers\TAO\tao\IORTable\TAO_IORTable.vcxproj" (default target) (28) ->
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5): warning MSB8065: Custom build for item "C:\Users\Dev\Git\test-cmake-acetao\opt\ACE_wrappers\TAO\tao\IORTable\IORTable.pidl" succeeded, but specified output "c:\users\dev\git\test-cmake-acetao\build\opt\ace_wrappers\tao\tao\iortable" has not been created. This may cause incremental build to work incorrectly. [C:\Users\Dev\Git\test-cmake-acetao\build\opt\ACE_wrappers\TAO\tao\IORTable\TAO_IORTable.vcxproj]
"C:\Users\Dev\Git\test-cmake-acetao\build\ALL_BUILD.vcxproj" (default target) (1) ->
"C:\Users\Dev\Git\test-cmake-acetao\build\TrivialTest.vcxproj" (default target) (3) ->
(Link target) ->
LINK : fatal error LNK1104: cannot open file 'TAO_IFR_Clientd.lib' [C:\Users\Dev\Git\test-cmake-acetao\build\TrivialTest.vcxproj]
3 Warning(s)
1 Error(s)
No idea why. C:\Users\Dev\Git\test-cmake-acetao\opt\ACE_wrappers\lib\TAO_IFR_Clientd.lib
exists, but I'm not sure why TAO_IFR_Clientd
is passed twice to the linker.
It could be a coincidence, but CMake generation on unix also prints a couple warnings about IFR_Client
when building it, however everything links correct in the end:
[ 97%] Built target TAO_DynamicInterface
opt/ACE_wrappers/TAO/tao/IFR_Client/CMakeFiles/TAO_IFR_Client.dir/build.make:94: warning: overriding commands for target `opt/ACE_wrappers/TAO/tao/IFR_Client'
opt/ACE_wrappers/TAO/tao/IFR_Client/CMakeFiles/TAO_IFR_Client.dir/build.make:82: warning: ignoring old commands for target `opt/ACE_wrappers/TAO/tao/IFR_Client'
opt/ACE_wrappers/TAO/tao/IFR_Client/CMakeFiles/TAO_IFR_Client.dir/build.make:94: warning: overriding commands for target `opt/ACE_wrappers/TAO/tao/IFR_Client'
opt/ACE_wrappers/TAO/tao/IFR_Client/CMakeFiles/TAO_IFR_Client.dir/build.make:82: warning: ignoring old commands for target `opt/ACE_wrappers/TAO/tao/IFR_Client'
[ 97%] Built target TAO_IFR_Client
…
ACE_ETCL.vcxproj -> C:\Users\Dev\Git\vplk\opt\ACE_wrappers\lib\ACE_ETCLd.dll
ACE_ETCL_Parser.vcxproj -> C:\Users\Dev\Git\vplk\opt\ACE_wrappers\lib\ACE_ETCL_Parserd.dll
Generating C:/Users/Dev/Git/vplk/opt/ACE_wrappers/TAO/tao/CodecFactory/IOP_CodecC.h, ., C:/Users/Dev/Git/vplk/opt/ACE_wrappers/TAO/tao/CodecFactory/IOP_CodecS.h, C:/Users/Dev/Git/vplk/opt/ACE_wrappers/TAO/tao/CodecFactory/IOP_CodecA.h, C:/Users/Dev/Git/vplk/opt/ACE_wrappers/TAO/tao/CodecFactory/IOP_CodecC.cpp tao-idli_4xRhFS.cpp
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5): warning MSB8065: Custom build for item "C:\Users\Dev\Git\vplk\opt\ACE_wrappers\TAO\tao\CodecFactory\IOP_Codec.pidl" succeeded, but specified output "c:\users\dev\git\vplk\build\opt\ace_wrappers\tao\tao\codecfactory" has not been created. This may cause incremental build to work incorrectly. [C:\Users\Dev\Git\vplk\build\opt\ACE_wrappers\TAO\tao\CodecFactory\TAO_CodecFactory.vcxproj]
CDR_Encaps_Codec.cpp
CodecFactory.cpp
CodecFactory_impl.cpp
IOP_CodecC.cpp
IOP_Codec_includeC.cpp
Generating Code...
TAO_CodecFactory.vcxproj -> C:\Users\Dev\Git\vplk\opt\ACE_wrappers\lib\TAO_CodecFactoryd.dll
TAO_CosEvent_Skel.vcxproj -> C:\Users\Dev\Git\vplk\opt\ACE_wrappers\lib\TAO_CosEvent_Skeld.dll
…
What's different about these three libraries?
We need a cmake github CI action (see ACE/TAO master) in order to make sure changes here don't break building ACE/TAO
I may need help with this. Are you referring to this workflow?
Yes
Could someone explain why
/TAO/TAO_IDL/GNUmakefile.TAO_IDL_BE_VIS_[ACEIOSUV]
exist, but produce empty build files? The hack that FindAceTao.cmake uses to programmatically delete them should be fixed before this is merged.
They are not empty in static builds. It seems like they were added to work around some platform limit on the size (in objects or symbols or ??) of archive libraries on that platform.
It is reasonable to consider removing that workaround. But that's not part of the MPC repository - please create an issue or PR in ACE_TAO.
@mitza-oci Ok, I will also try to edit the CMake generation to account for them then. My goal is to provide retroactive support for valid MPC files & ACE+TAO versions (hence I included checks for post-7.0.11 ACE+TAO in FindAceTao.cmake
), so if they are valid MPC, the generated CMake should not error.
How does one enable SSL or IPv6 when generating from MPC? I see that the MPC files in /ace/SSL/
get included by TAO_ACE.mwc
, but report that ssl
and ace_for_tao
are required (and ace_for_tao.mpc
also requires ace_for_tao
). It is as simple as invoking MPC with -features=ssl,ace_for_tao
?
Generating 'cmake' output using TAO_ACE.mwc
Skipping ACE_XML_Utils (XML.mpc); it requires xerces.
Skipping ACE_FlReactor (ace_flreactor.mpc); it requires fl.
Skipping ACE_FOR_TAO (ace_for_tao.mpc); it requires ace_for_tao.
Skipping ACE_Qt5Reactor_moc (ace_qt5reactor.mpc); it requires qt5.
Skipping ACE_Qt5Reactor (ace_qt5reactor.mpc); it requires qt5.
Skipping ACE_Qt4Reactor_moc (ace_qt4reactor.mpc); it requires qt4.
Skipping ACE_Qt4Reactor (ace_qt4reactor.mpc); it requires qt4.
Skipping ACE_XtReactor (ace_xtreactor.mpc); it requires xt.
Skipping ACE_TkReactor (ace_tkreactor.mpc); it requires tk.
Skipping QoS (qos.mpc); it requires qos.
Skipping ace_svcconf_gen (svcconfgen.mpc); it requires ace_svcconf_gen.
Skipping ACE_FoxReactor (ace_foxreactor.mpc); it requires fox.
Skipping SSL (ssl.mpc); it requires ssl.
Skipping SSL_FOR_TAO (ssl_for_tao.mpc); it requires ssl.
Skipping INet_SSL (inet_ssl.mpc); it requires ssl.
Skipping TAO_XtResource (XtResource.mpc); it requires xt.
Skipping TAO_TkResource (TkResource.mpc); it requires tk.
Skipping Bzip2Compressor (Bzip2Compressor.mpc); it requires bzip2.
Skipping LzoCompressor (LzoCompressor.mpc); it requires lzo1.
Skipping ZlibCompressor (ZlibCompressor.mpc); it requires zlib.
Skipping TAO_QtResource (QtResource.mpc); it requires dummy_label.
Skipping TAO_FlResource (FlResource.mpc); it requires fl.
Skipping TAO_FoxResource (FoxResource.mpc); it requires fox.
Skipping TAO_IDL_GEN (tao_idl_fe.mpc); it requires tao_idl_fe_gen.
Skipping wxNamingViewer (wxNamingViewer.mpc); it requires wxWindows.
Skipping NamingViewer (NamingViewer.mpc); it requires mfc.
Skipping SSLIOP (SSLIOP.mpc); it requires ssl.
You can either modify $ACE_ROOT/bin/MakeProjectCreator/default.features
and add the line:
ssl=1
or
You can add them to your MPC command line: -features ssl=1
The ace_for_tao
feature isn't required to use SSL.
I rewrote the commits to fix a bug with linking and installation, and another with out-of-source builds. I've also updated my reference implementation of FindAceTao.cmake
and idl_files.cmake
to reflect these.
With the reference implementation (and its TAO_IDL_BE_VIS_[ACEIOSUV]
workaround), I believe ACE+TAO 7.0.11 (and later, and possibly earlier) now builds and installs properly and idiomatically with CMake on Windows & macOS. Linux and features like ssl
next.
Where in the ACE+TAO MPC configuration do you define the version of the C++ standard that the ACE+TAO source currently requires?
I currently have to manually add C++11:
target_compile_features(ACE PUBLIC cxx_std_11)
target_compile_features(TAO PUBLIC cxx_std_11)
Where in the ACE+TAO MPC configuration do you define the version of the C++ standard that the ACE+TAO source currently requires?
I'm don't think there's a place where MPC itself is concerned with that. As far as I know it's assumed until checked here (Note: it was C++11 until recently). These macros come from the platform config files like this one for g++
. So to have a proper CMake check probably requires manually injecting it in the ace.mpc
.
@iguessthislldo I would argue that the minimum C++ standard required by the source is something the MPC project files should be concerned with and declare, as the compiler must be told by the build system which version to use. MPC shouldn't just assume the compiler will use the latest standard it can (and compilers do not generally, as each C++ standard introduces many breaking changes).
And after all, 7.0.12's source will now error if the standard less than C++14. So the MPC project file should declare a minimum standard for the source, so users and build systems don't have to do this manually.
@iguessthislldo I would argue that the minimum C++ standard required by the source is something the MPC project files should be concerned with and declare, as the compiler must be told by the build system which version to use.
MPC shouldn't just assume the compiler will use the latest standard it can (and compilers do not generally, as each C++ standard introduces many breaking changes).
MPC is not assuming that.
And after all, 7.0.12's source will now error if the standard less than C++14. So the MPC project file should declare a minimum standard for the source, so users and build systems don't have to do this manually.
This is not what MPC does. MPC generates projects and has a number of mechanisms for customizing those projects, it's not a complete configuration system like CMake.