[CMake] find_package(Threads) leads to CMake Error: TRY_RUN() invoked in cross-compiling mode

2017-08-03 Thread Steffen Dettmer
Hi, I tried to fix linux (p)thread usage on a proprietary, somewhat complex (300-400 cmake files, ca 30.000 lines) cmake project. We have CMAKE_TOOLCHAIN_FILEs for the cross compiling platforms. These set(CMAKE_SYSTEM_NAME Linux), CMAKE_C_FLAGS(-D_REENTRANT... CACHE STRING "" FORCE)) and so

Re: [CMake] find_package(Threads) leads to CMake Error: TRY_RUN() invoked in cross-compiling mode

2017-08-03 Thread Steffen Dettmer
a small correction: On Thu, Aug 3, 2017 at 5:59 PM, Steffen Dettmer <steffen.dett...@gmail.com> wrote: > Building C object CMakeFiles/cmTC_47cd8.dir/CheckForPthreads.c.o > /opt/xyzcross/x86-linux2/bin/powerpc-linux-gnu-gcc --sysroot=... >-o CMakeFiles/cmTC_47cd8.dir/Check

[CMake] CMAKE_BUILD_TYPE does not work in CMAKE_TOOLCHAIN_FILE - how to proceed?

2017-04-26 Thread Steffen Dettmer
Hi, I'm new to cmake and we started using it to build proprietary embedded projects with a proprietary toolchain. We love the new build system's performance and its simplicity! Compared with what we were used to have, it is just superior in every aspect we met, really great! We hopefully based

Re: [CMake] with 3.9 my testprj breaks: mylib_autogen/include: No such file or directory

2017-08-08 Thread Steffen Dettmer
Hi, On Mon, Aug 7, 2017 at 8:04 PM, Brad King <brad.k...@kitware.com> wrote: > On 08/07/2017 09:01 AM, Steffen Dettmer wrote: > > There is an include path to mylib_autogen/include as -I for g++, but > > this directory does not exist and I get: > > > >

Re: [CMake] with cmake-3.9 my testprj breaks, I need to add "add_executable(Qt4::rcc IMPORTED)"

2017-08-08 Thread Steffen Dettmer
Hi! thanks for your quick reply. On Mon, Aug 7, 2017 at 7:56 PM, Robert Maynard wrote: > > CMake Error: Qt4::rcc target not found hello_world > > Did this work pre CMake 3.9? Yes, it did. However I missed that some of our CMakeLists.txt has "add_executable(Qt4::moc

Re: [CMake] HOWTO cmake compatiblity?

2017-08-09 Thread Steffen Dettmer
Hi, > > > So far I think we need to install cmake into a versionized > > > directory and invoke it: I tested with versionized directory and it works really well. For example when having a symlink /opt/toolchain/1.0.0/bin/cmake -> /opt/cmake/3.6.2/bin/cmake it can be used as: $ export

[CMake] with cmake-3.9 my testprj breaks, I need to add "add_executable(Qt4::rcc IMPORTED)"

2017-08-07 Thread Steffen Dettmer
Hi, I have a cmake test project that builds a "hello world" with our cross toolchain. There are selfmade TOOLCHAINFILES for the targets. They define QT variables like: set(BT_QT_4_7_3_PATH.../taget/Qt-4.7.3) set(QT_BINARY_DIR${BT_QT_4_7_3_PATH}/bin) set(QT_LIBRARY_DIR

[CMake] HOWTO cmake compatiblity?

2017-08-07 Thread Steffen Dettmer
Hi, I like to learn how you use cmake in environments were reproducibility is an issue. Background: We are used to simply install cmake in default $PATH, but I noticed cmake is not backward-compatible. Of course this is not surprising, it is really complex with many nice features and of

[CMake] with 3.9 my testprj breaks: mylib_autogen/include: No such file or directory

2017-08-07 Thread Steffen Dettmer
Hi, I made a fix for [1] and tested cmake master branch, but noticed that this cmake version does not compile my test project anymore (v.3.8.2: OK; v3.9.0: FAIL). There is an include path to $buildir/$subproject/mylib_autogen/include as -I for g++, but this directory does not exist and I get:

Re: [CMake] HOWTO cmake compatiblity?

2017-08-07 Thread Steffen Dettmer
On Mon, Aug 7, 2017 at 3:44 PM, Rolf Eike Beer <e...@sf-mail.de> wrote: > Steffen Dettmer wrote: >> So far I think we need to install cmake into a versionized >> directory and invoke it: >> >> v1.0.0/bin/cmake -DTOOLCHAIN=v1.0.0/target1.cmake >> >&g

[CMake] Why is obj.dir/depend.make.tmp not renamed to obj.dir/depend.make?

2018-11-07 Thread Steffen Dettmer
Hi, One (of really many) build trees contains a file "depend.make.tmp" and ignores dependencies leading to broken (incremental) builds. There also is a "depend.make" file in the same directory saying "Empty dependencies file. This may be replaced when dependencies are built.", so I assume the tmp

[CMake] cmake, ccache, CCACHE_BASEDIR: wrong paths in compiler error messages

2020-02-26 Thread Steffen Dettmer
Hi, I hope I can still post here? I don't have a "discourse" account. Let me summarize what we have here. We have projects with some hunderds CMakeLists.txt. The "main" typically use several add_subdirectory directives for the use libraries in form of: add_subdirectory(${path_lib_a} liba)