[CMake] cmake - node-gyp

2018-06-26 Thread Stéphane Ancelot
Hi, I am trying to migrate an existing Makefile to cmake that is using node-gyp. I have had a binding.gyp file that would need being generated with the libraries paths aqnd include paths. The problem is that I don't know how to do this. The final binding.gyp file should look as follow : #

Re: [CMake] How can I compile and link modular code into a single DLL with MSVC?

2018-06-26 Thread Jason Heeris
On Wed, 27 Jun 2018 at 15:00, Innokentiy Alaytsev wrote: > Do you create declspec declaration by hand? It may worth looking at the > GenerateExportHeader > > Thanks, this will probably be very useful! > Is it the code that yo

Re: [CMake] How can I compile and link modular code into a single DLL with MSVC?

2018-06-26 Thread Innokentiy Alaytsev
Hello! First of all, a side note: Jason Heeris wrote > (Not shown: the macros to create the declspec declaration that MSVC needs > to know what to export in the DLL. It's a type in moduleN and some > functions in common.) Do you create declspec declaration by hand? It may worth looking at the

[CMake] CMake fixup_bundle DESTDIR problem

2018-06-26 Thread Randolph M. Fritz
Under what circumstances does cmake place a fixup_bundle command in dependencies.cmake? I've got a problem where fixup_bundle is being created without reference to DESTDIR, and install fails when DESTDIR is used. This is the generated dependencies.cmake file: function(gp_item_default_embedded_pat

[CMake] weird linking breaks debugging?

2018-06-26 Thread Victor Mataré
Hi all, On Linux, if I'm creating a lib and an executable: add_library(something SHARED ${LIB_SRC}) add_executable(some-exec ${EXEC_SRC}) target_link_libraries(some-exec something) Then the linker always links against libsomething.so instead of -lsomething. For some reason this causes the shared

[CMake] How can I compile and link modular code into a single DLL with MSVC?

2018-06-26 Thread Jason Heeris
This is a follow-on from "Linking object libraries into a Windows DLL in 3.12rc1"[1] - I figured since I'm reframing that question I should start a new thread. I have a project that has some common code and about a hundred modules. The modules can have dependencies on each other (only ever as a di

Re: [CMake] race condition with target_objects

2018-06-26 Thread Juan E. Sanchez
Hello Brad, Thanks for finding the issue. I had simply replaced the shared library I was using with the name of the TARGET_OBJECTS generator. The shared objects are great. It helps me bypass Apple security issues when a system interpreter loads a shared library, which loads another shared

Re: [CMake] race condition with target_objects

2018-06-26 Thread Brad King
On 06/26/2018 01:32 PM, Juan E. Sanchez wrote: > The likely problem is that the symdiff_objects and the symdiff_tcl are > in side-by-side directories. They are both added using ADD_SUBDIRECTORY > one level up. If I put symdiff_python before symdiff_tcl, then that > target will fail. Please fi

Re: [CMake] race condition with target_objects

2018-06-26 Thread Juan E. Sanchez
Hi, The likely problem is that the symdiff_objects and the symdiff_tcl are in side-by-side directories. They are both added using ADD_SUBDIRECTORY one level up. If I put symdiff_python before symdiff_tcl, then that target will fail. Please fix your Makefile generator. Regards, Juan On

Re: [CMake] Dos Line endings on response files when cross compiling.

2018-06-26 Thread Brad King
On 06/20/2018 10:42 AM, Gebhard, Joseph wrote: > traced it down to dos line ending in the objects1.rsp file.  It was looking > for a ctrl+M character on the end of the file name. > After a little playing around with this we determined that 3.7.2 works fine, > but 3.9, 3.10 and 3.11.3 all have this

[CMake] race condition with target_objects

2018-06-26 Thread Brad King
On 06/25/2018 03:09 PM, Juan E. Sanchez wrote: > ADD_LIBRARY(symdiff_objects OBJECT ${CXX_SRCS} ${MC_SRCS}) > set_property(TARGET symdiff_objects PROPERTY POSITION_INDEPENDENT_CODE ON) > TARGET_LINK_LIBRARIES (symdiff_tcl $ > ${TCL_ARCHIVE}) > > How do I tell cmake to wait? Strange, our test sui

Re: [CMake] Linking object libraries into a Windows DLL in 3.12rc1

2018-06-26 Thread Jason Heeris
On Tue, Jun 26, 2018 at 7:36 PM, Deniz Bahadir wrote: Yes, you have overlooked an important detail. Only usage-requirements are transitive, the object-files are only propagated to directly dependent targets (not to indirectly dependent ones) *and only if they have a link/archive step* Ah

Re: [CMake] Linking object libraries into a Windows DLL in 3.12rc1

2018-06-26 Thread Deniz Bahadir
Hi Jason, Am 26.06.2018 um 07:45 schrieb Jason Heeris: ... https://gitlab.com/snippets/1728169 Have I misunderstood how object library usage requirements and dependencies propagate? I would appreciate any pointers on this. Yes, you have overlooked an important detail. Only usage-requireme