Re: [CMake] [FYI] clang-3.4 vs cmake-3.11.0 (How to build CMake so it works on an older Linux?)

2018-04-04 Thread suzuki toshiya
Sorry for bothering subscribers for posting about C++11 environment instead of cmake itself. Now I understand building gcc >= 4.8.5 manually might be easier, in comparison with the quest of libc++ for clang-3.4. https://stackoverflow.com/questions/39332406/install-libc-on-ubuntu Regards, mpsuzuki

Re: [CMake] [FYI] clang-3.4 vs cmake-3.11.0 (How to build CMake so it works on an older Linux?)

2018-04-04 Thread suzuki toshiya
Dear Bo Zhou, Sorry, I've confirmed by myself. By default, clang-3.4 for Ubuntu prioritizes old g++ header files, and clang header files are searched as a fallback. I can customize the searching order by -nostdinc++... Regards, mpsuzuki suzuki toshiya wrote: > Dear Bo Zhou, > > Thank you for pr

Re: [CMake] [FYI] clang-3.4 vs cmake-3.11.0 (How to build CMake so it works on an older Linux?)

2018-04-04 Thread suzuki toshiya
Dear Bo Zhou, Thank you for prompt reply. > Be aware that GCC suite actually is independent from the libstdc++, so if you > have a newer compiler, the compiler might still pick the older libstdc++ > without the new API. Oh, so, even if I installed clang-3.4, still it uses older (maybe C++03) l

Re: [CMake] [FYI] clang-3.4 vs cmake-3.11.0 (How to build CMake so it works on an older Linux?)

2018-04-04 Thread Bo Zhou
The emplace() is new API from C++11. Be aware that GCC suite actually is independent from the libstdc++, so if you have a newer compiler, the compiler might still pick the older libstdc++ without the new API. This issue doesn't exist at Windows, since Visual Studio is a complete sytem. This issu

[CMake] [FYI] clang-3.4 vs cmake-3.11.0 (How to build CMake so it works on an older Linux?)

2018-04-04 Thread suzuki toshiya
$ clang++ --version Ubuntu clang version 3.4-1ubuntu3~precise2 (tags/RELEASE_34/final) (based on LLVM 3.4) Target: x86_64-pc-linux-gnu Thread model: posix But I got following abort: cmake-3.11.0/Source/cmLocalGenerator.cxx:553:36: error: no member named 'emplace' in 'std::unordered_map, cm

Re: [CMake] How to build CMake so it works on an older Linux?

2018-04-04 Thread suzuki toshiya
Dear Bo Zhou, Thank you for the info! Now I'm checking Ubuntu 12.04 in LXC. So, gcc-4.8.5 or later would be needed for C++11, it seems that the last version of gcc officially provided for Ubuntu-12 was 4.7. oh. According to https://clang.llvm.org/cxx_status.html , clang-3.3 supports C++11, and the

Re: [CMake] How to build CMake so it works on an older Linux?

2018-04-04 Thread Bo Zhou
The latest CMake requires C++11 compiler, so what you need is just a newer GCC which supports C++11 at your platform, that's it. Usually the ABI is not the problem but the libstdc++, you can use a old Ubuntu with old libstdc++ but build CMake with new compiler and make sure it links with old libst

[CMake] How to build CMake so it works on an older Linux?

2018-04-04 Thread Eric Wing
I just discovered that CMake no longer builds on my Ubuntu 12.04. I need to build binaries that are compatible with that ABI. I see that your binary distribution of CMake 3.11 still works on Ubuntu 12.04. Can you tell me what you do to achieve this? What are you doing for your official builds? Ar

[CMake] Why isn't target_link_libraries not enough in some cases?

2018-04-04 Thread Saad Khattak
Hi, I am fetching and building SDL2 using FetchContent and then using target_link_libraries(MyExe SDL2) in the hopes that the required include directories and libraries will be added populated properly. The example project can be found here: https://github.com/samaursa/cmake_fetch_content_SDL2 U

[CMake] (no subject)

2018-04-04 Thread Anthony Zukaitis
On windows I found an issue with Visual studio where intel fortran was attempting to preprocess lowercase .f90 files. Intel's documentation states that it does not preprocess these files. Looking into the cmake source code I found: in Modules/Platform/Windows-Intel-Fortran line 3: set(_COMPILE

Re: [CMake] Overloading/shadowing/redefining CMake intrinsic commands

2018-04-04 Thread Zaak Beekman
Hi Robert, Thanks so much for the speedy response. That is certainly dangerous looking. I'm sure everyone will want to buy me a beer/coffee after I crash their machines during configuration. I almost wish you had responded "impossible" because now I have the temptation of trying it out! Thanks, Z

Re: [CMake] Overloading/shadowing/redefining CMake intrinsic commands

2018-04-04 Thread Robert Maynard
See https://cmake.org/pipermail/cmake/2011-March/043320.html for a discussion on overloading functions and the dangers that can occur. On Wed, Apr 4, 2018 at 11:38 AM, Zaak Beekman wrote: > I have been moving towards modern CMake where > includes/compiler-flags/libraries/etc. are using target pr

[CMake] Overloading/shadowing/redefining CMake intrinsic commands

2018-04-04 Thread Zaak Beekman
I have been moving towards modern CMake where includes/compiler-flags/libraries/etc. are using target properties and transitive usage requirements which has greatly simplified setting up Modern Fortran build systems. In addition, if you're going to vendor all/most of your package's dependencies and