Re: [CMake] reusing CMAKELISTS.txt

2017-11-06 Thread Craig Scott
You can re-use the same CMakeLists.txt with add_subdirectory as long as each call specifies a different binary directory. Not saying this is a particularly good design, but it is allowable. E.g. # First time with a particular value of someVar set(someVar 1234) add_subdirectory(foo foo1) # Do it a

Re: [CMake] reusing CMAKELISTS.txt

2017-11-06 Thread Konstantin Tokarev
> I have a CMAKELIST.txt file which can be used for more than 1 subdirectory. > > Is there a way to "reuse" this CMAKELISTS.txt file? > > I have tried placing this file at a common folder and then to place a > shortcut or softlink in the sub-directories. Instead of link you can create CMakeLi

Re: [CMake] CMake, Mingw-w64 32 bit exception handling.

2017-11-06 Thread Brad King
On 08/24/2017 04:13 AM, Arne Kjetil Andersen wrote: > result in -lgcc_eh being added... The cause has been identified and reported here: https://gitlab.kitware.com/cmake/cmake/issues/17436 -Brad -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://w

Re: [CMake] reusing CMAKELISTS.txt

2017-11-06 Thread Sylvain Joubert
Le 06/11/2017 à 20:36, llvm 999 a écrit : I have a CMAKELIST.txt file which can be used for more than 1 subdirectory. Is there a way to "reuse" this CMAKELISTS.txt file? As such I don't think so. I have tried placing this file at a common folder and then to place a shortcut or softlink i

[CMake] reusing CMAKELISTS.txt

2017-11-06 Thread llvm 999
I have a CMAKELIST.txt file which can be used for more than 1 subdirectory. Is there a way to "reuse" this CMAKELISTS.txt file? I have tried placing this file at a common folder and then to place a shortcut or softlink in the sub-directories. But, this does not work. CMAKE does not seem to re

Re: [CMake] Source modification using CMake

2017-11-06 Thread Nicholas Yue
Hi Brian, Have you consider ExternaProject() ? It has a patching feature. https://cmake.org/cmake/help/v3.0/module/ExternalProject.html Cheers On Mon, 6 Nov 2017 at 07:35 brian heim wrote: > Hi list, > > Hope you're doing well. I have a question about using CMake to patch the > source code

Re: [CMake] custom_command and compile_commands.json

2017-11-06 Thread Moreland, Kenneth
Máté, I don’t know anything about the CMAKE_EXPORT_COMPILE_COMMANDS feature, but I can attest that the UseLATEX commands are all created with add_custom_command (with some add_custom_target commands to set up the targets). Someone who knows the CMAKE_EXPORT_COMPILE_COMMANDS feature will have to

[CMake] Source modification using CMake

2017-11-06 Thread brian heim
Hi list, Hope you're doing well. I have a question about using CMake to patch the source code in a project I work on. This is the situation: - Project includes C++ transpiled from a different specialized language - That transpiler is not cross-platform, so we include transpiled C++ in our source