Re: [CMake] Python project using Cmake

2015-10-22 Thread Matthew Keeler
/CMakeParseArguments.html Sorry I don’t have more specifics. -- Matt Keeler On October 21, 2015 at 16:21:36, srinivas boppu (srinivas.bo...@gmail.com<mailto:srinivas.bo...@gmail.com>) wrote: Hi Matthew Keeler, Thanks for your quick reply. My project is a pure python project. I wanted to use cmake and

Re: [CMake] Python project using Cmake

2015-10-21 Thread Matthew Keeler
What are you trying to do? Are you trying to build Python C extensions? If so then the FindPythonLibs module will help you in that regard. It will determine if the Python development files are installed and populate variables with the necessary paths to provide to link_directories and

Re: [CMake] Porting to CMAKE and utilizing the CPack

2015-11-12 Thread Matthew Keeler
Installing arbitrary files is accomplished by adding install commands into your CMakeLists. The documentation for the command is here: https://cmake.org/cmake/help/v3.3/command/install.html For something like an init script or systemd unit file they are going to live outside the normal

[CMake] Is there a variable containing the C flags that would be used to compile something in a directory

2015-09-29 Thread Matthew Keeler
There are various variables like CMAKE_C_FLAGS_ that can influence the final flags sent to the compiler. Is there a variable that exists or a function to call to get the final C flags. What I am trying to do is invoke a custom command to run make on an external source tree. This makefile has

Re: [CMake] cmake install target doesn't run ldconfig after installing library

2016-06-16 Thread Matthew Keeler
CMake won’t and in my opinion shouldn’t implicitly invoke ldconfig for you. There are many scenarios and platforms where this is incorrect behavior and some such as running install to prepare for packaging that CMake wouldn’t reliably be able to detect. If you want to provide the functionality

Re: [CMake] cmake install target doesn't run ldconfig after installing library

2016-06-17 Thread Matthew Keeler
BDIRECTORY(src)` in my main CMakeLists.txt. I put the command `install(CODE "execute_process(COMMAND ldconfig)")` after `ADD_SUBDIRECTORY(src)` . But It still run ldconfig before the installation of shared libraries in src sub folder. On Thu, Jun 16, 2016 at 9:02 PM, Matthew Keeler

Re: [CMake] Calling a Python Testing Script from CMake/CTest

2016-02-24 Thread Matthew Keeler
${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/sample_test.py WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH} ) --  Matthew Keeler On February 24, 2016 at 09:15:10, George Ryan (george.r...@geospectrum.ca) wrote: Hi, I am having difficulty getting a python script to run a C++ subprocess

[CMake] OBJECT Libraries with Xcode Generator

2016-04-06 Thread Matthew Keeler
d instead. However the $<TARGET_OBJECTS:…> generator expression seems to be referencing an incorrect name. Is there any workaround so that for the Xcode generator it will not store all the build artifacts in a single directory and not use the object file name with the unique id in it and sec

Re: [CMake] OBJECT Libraries with Xcode Generator

2016-04-06 Thread Matthew Keeler
first. Oh well. Thanks for the info. --  Matthew Keeler On April 6, 2016 at 16:06:11, Brad King (brad.k...@kitware.com) wrote: On 04/06/2016 03:47 PM, Gregor Jasny wrote: > On 06/04/16 20:32, Matthew Keeler wrote: >> clang: error: no such file or directory: >> '.../lib/exam

[CMake] LINK_FLAGS directory property

2016-04-27 Thread Matthew Keeler
Is there an equivalent directory property for the target level LINK_FLAGS property. I can’t see anything according to the documentation but was hoping there was an oversight and something actually existed. What I am trying to do is pass extra flags to the linker for every target in my project

Re: [CMake] LINK_FLAGS directory property

2016-05-02 Thread Matthew Keeler
this in a subdirectory: string( REPLACE "-Wl,--as-needed" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}" ) Cheers, Attila > On 27 Apr 2016, at 17:57, Matthew Keeler <mkee...@tenable.com> wrote: > > Is there an equivalent direc

Re: [CMake] Custom target for running tests as part of the build

2016-08-23 Thread Matthew Keeler
One thing I see immediately is this line: $ > ${TEST_NAME}.output || cat ${TEST_NAME}.output Unless ${TEST_NAME}.output doesn’t exist cat is going to have a successful exit status and cause the whole COMMAND to be successful. Something like “|| (cat ${TEST_NAME}.output

Re: [CMake] How can I create a C executable and C++ library from the same source

2018-01-17 Thread Matthew Keeler
Whether what you want exactly is possible I dont know. If you are just wanting your C++ test library to be able to test your C source then I would still let them compile as C and just extern “C” { #include }. When it gets linked all together it should be fine. This is how I usually do testing of