Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Ian Collins Newsgroups: comp.lang.c++ Subject: Re: Examples of current platforms/architectures where sizeof(void*) > Date: Thu, 9 Sep 2021 10:58:13 +1200 Lines: 37 Message-ID: References: <3a825e94-940c-49c5-990a-554a6bcc35a4n@googlegroups.com> <_XsXI.31292$o45.12466@fx46.iad> <87a6kuhchx.fsf@nosuchdomain.example.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net 3K9X0wO9O2z3R+4JnC9WkwNbsXNjyW+DJGG3+cJ8VCFDEsrMw0 Cancel-Lock: sha1:LNsG3UTC2+GTXu7zfreqqpxL6OY= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 In-Reply-To: Content-Language: en-US Xref: csiph.com comp.lang.c++:81105 On 08/09/2021 22:29, MisterMule@stubborn.uk wrote: > On Wed, 8 Sep 2021 09:38:24 +1200 > Ian Collins wrote: >> On 08/09/2021 04:41, Paavo Helde wrote: >>> >>> I guess one can write Fortran in any language, including CMake. My CMake >>> files are pretty clean, partially thanks to putting all common settings >>> into a common file which is included by the top-level CMakeLists.txt. >>> >>> In a typical CMakeLists.txt in a leaf directory I just say that what >>> files need to be compiled (typically *.cpp and *.h), into which library >>> they must be be linked into, and what third-party libraries are >>> involved. That's all what I'm interested in, and CMake will take care of >>> generating all the technical details. That's literally 5 CMake commands: >>> >>> target_include_directories(...) >>> target_link_directories(...) >>> target_link_libraries(...) >>> file(GLOB MY_SOURCES *.cpp *.h) >>> target_sources(... ${MY_SOURCES}) >>> >>> Cannot imagine it could be much simpler. All details I want to see and >>> control are visible, and all the technical details which I'm not >>> interested in are hidden. >> >> Not only that, you only have to change your top level rules to build for >> a new target and/or platform. Being able to emit ninja files or >> makefiles makes cross platform building on Unix like platforms and >> Windows trivial. > > I've written cross platform code for years. Generally its 1 or 2 lines in > the Makefile that need to be commented in/out. How is CMake any simpler? Windows? -- Ian.