[CMake] adding extra files to distribution

2012-09-05 Thread Jack Stalnaker
Hi, I'm new to CMake, but quite familiar with Autotools. I am trying to do something that is probably quite simple, but I cannot find any documentation for. The distribution creation mechanism is difficult to learn because of the lack of documentation. For instance, it seems (though I'm not sure

[CMake] numerical option at compile time

2012-09-06 Thread Jack Stalnaker
Using autoconf, I could specify a numerical option using AC_ARG_ENABLE. This was useful for specifying a logging level at compile time. I could pass --enable-logging=8 to the configure script to enable deep logging. Is there a way to do this with cmake? Seems like option only allows yes or no

Re: [CMake] cpack -C CPackSourceConfig.cmake not making source package

2012-09-07 Thread Jack Stalnaker
files first), but I got the same results. It's still only packing the bin directory with the built file. Thanks for the help. On Fri, Sep 7, 2012 at 11:52 AM, Eric Noulard eric.noul...@gmail.comwrote: 2012/9/7 Jack Stalnaker jack.stalna...@gmail.com: Even if I download the tutorial sources

Re: [CMake] cpack -C CPackSourceConfig.cmake not making source package

2012-09-07 Thread Jack Stalnaker
Ignore the last paragraph of my previous message. That was with the '-C' option. On Fri, Sep 7, 2012 at 12:10 PM, Jack Stalnaker jack.stalna...@gmail.comwrote: --config worked. Wow, if -C is the wrong option, I wish it wouldn't appear in the tutorial and in the wiki section on creating

[CMake] CPack source distribution recursing out of control

2012-09-17 Thread Jack Stalnaker
Hi, I'm not sure what I'm doing wrong, but when I run cpack --config CPackSourceConfig.cmake -G TGZ, the operation runs forever and produces archives on the order of dozens of gigabytes. As far as cpack goes, I don't have much specified other than include(cpack) and the version variables. I do

Re: [CMake] CPack source distribution recursing out of control

2012-09-18 Thread Jack Stalnaker
:27 AM, Eric Noulard eric.noul...@gmail.comwrote: 2012/9/18 Jack Stalnaker jack.stalna...@gmail.com: Hi, I'm not sure what I'm doing wrong, but when I run cpack --config CPackSourceConfig.cmake -G TGZ, the operation runs forever and produces archives on the order of dozens of gigabytes

[CMake] check_function_exists failing for gcc built-in functions?

2012-09-19 Thread Jack Stalnaker
Hi, I'm having trouble with check_function_exists() when it comes to built-in functions in gcc. If I create just a simple C++ file with a call to sqrt() or pow() and have a CMakeLists.txt with the following lines, include (CheckFunctionExists) check_function_exists(sqrt HAVE_SQRT) cmake fails

[CMake] Fortran_FORMAT

2014-03-13 Thread Jack Stalnaker
Can someone provide an example of Fortran_FORMAT in use? I cannot find anything other than a definition of the property online. Does one use set_target_properties(tgt PROPERTIES Fortran_FORMAT FREE) ? That doesn't seem to alter the compiler flags. -- Powered by www.kitware.com Please keep

Re: [CMake] Fortran_FORMAT

2014-03-14 Thread Jack Stalnaker
I figured it out. My version of Cmake (2.8.2) does not have the Fortran_FORMAT property. Thanks! On Thu, Mar 13, 2014 at 1:15 PM, Nils Gladitz nilsglad...@gmail.com wrote: On 13.03.2014 17:40, Jack Stalnaker wrote: Can someone provide an example of Fortran_FORMAT in use? I cannot find

[CMake] CMAKE_CURRENT_LIST_DIR equivalent 2.8.2

2014-03-14 Thread Jack Stalnaker
I'm stuck at 2.8.2. Is there an equivalent or a workaround for CMAKE_CURRENT_LIST_DIR in this version? Thanks. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake

[CMake] check_fortrant_compiler_flag?

2014-06-20 Thread Jack Stalnaker
I see that there are standard modules for checking C and C++ compiler flags, but there is no equivalent for fortran. Gfortran and ifort, for instance, have different flags for changing/supporting source code format and line length restrictions, so it would be very useful to be able to check which

[CMake] CMP0022 not set

2015-11-11 Thread Jack Stalnaker
I'm getting a new warning from cmake version 2.8.12 Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link interface. etc... Target "xxx" has an INTERFACE_LINK_PROPERTIES property ... I've not set this property anywhere explicitly. I'm getting the warning from a

[CMake] actually using cmake alternative to convenience libraries

2015-11-17 Thread Jack Stalnaker
I'm trying to figure out the best way to handle something that was a convenience lib under autotools. I realize that there's a FAQ entry here: https://cmake.org/Wiki/CMake_FAQ#Does_CMake_support_.22convenience.22_libraries.3F But its terse 2 paragraphs don't say how to actually do what it

[CMake] detecting fortran c interface

2015-11-04 Thread Jack Stalnaker
Hi, I see that there is a built-in FortranCInterface module that provides a lot of useful information for calling Fortran from C and C++. However, is there a module that does the opposite? Specifically, I need to check that the Fortran compiler supports calling C routines. In our autoconf script

Re: [CMake] actually using cmake alternative to convenience libraries

2015-11-17 Thread Jack Stalnaker
to target_link_libraries later. Am I missing something, or is there a way to somehow attach the necessary external libraries to the object library as well? Thanks, --Jack On Tue, Nov 17, 2015 at 11:14 AM, Bill Hoffman <bill.hoff...@kitware.com> wrote: > On 11/17/2015 10:37 AM, Jack Stalna

Re: [CMake] actually using cmake alternative to convenience libraries

2015-11-18 Thread Jack Stalnaker
am trying to envision the alternative since otherwise cmake seems so convenient and clean compared to autotools. --Jack On Wed, Nov 18, 2015 at 7:16 AM, Magnus Therning <mag...@therning.org> wrote: > On Tue, Nov 17, 2015 at 09:37:25AM -0600, Jack Stalnaker wrote: > > I'm trying t

[CMake] FindMPI uses wrong fortran include path

2016-02-10 Thread Jack Stalnaker
Hi, If I call FindMPI, it successfully finds Intel MPI, including all the proper include paths etc. However, when I compile MPI code, I get an error message saying that the mod file (called by "use mpi" in the code) was not compiled by this compiler. The problem appears to be that the Intel

Re: [CMake] FindMPI uses wrong fortran include path

2016-02-10 Thread Jack Stalnaker
This seems to be the same issue discussed here: https://cmake.org/pipermail/cmake-developers/2014-December/023831.html which refers to a bug marked fixed here: http://www.cmake.org/Bug/view.php?id=15182 However, I'm still getting the issue in 3.5.0-rc1 On Wed, Feb 10, 2016 at 12:24 PM, Jack

[CMake] FindMPI prefer mpirun over mpiexec

2016-02-12 Thread Jack Stalnaker
Hi, Is there a way to make FindMPI prefer the name 'mpirun' over 'mpiexec'? They have different meanings to Intel's MPI. By default, FindMPI locates mpiexec, which runs the MPD based MPI. I'd rather use mpirun. FindMPI knows mpirun, but in FindMPI.cmake, it looks like mpirun is searched after

[CMake] ifort: command line remark #10148: option 'i_dynamic' not supported

2016-02-09 Thread Jack Stalnaker
Hi, I am using cmake 2.8.12.2, and I'm getting this warning when I attempt to link a fortran program or library. ifort: command line remark #10148: option 'i_dynamic' not supported I cannot find very much about this error searching the web. What does this mean? Thanks -- Powered by

[CMake] exclude a dependency from export

2016-01-22 Thread Jack Stalnaker
Is there any way to exclude a dependency from an export? If I build a static library target "A" but do not wish to install it, and then link that target to another target "B" using target_link_libraries(B A), and then attempt to export B, I get the error message: install (EXPORT "B" ...) includes

Re: [CMake] exclude a dependency from export

2016-01-22 Thread Jack Stalnaker
/latest/command/target_link_libraries.html#libraries-for-a-target-and-or-its-dependents > > On Fri, Jan 22, 2016 at 9:14 AM, Jack Stalnaker <omnij...@gmail.com> > wrote: > > Is there any way to exclude a dependency from an export? If I build a > static > > library target &qu

Re: [CMake] exclude a dependency from export

2016-01-22 Thread Jack Stalnaker
f the code tree, and it pollutes the system library folder. On Fri, Jan 22, 2016 at 1:20 PM, Jack Stalnaker <jack.stalna...@gmail.com> wrote: > Private doesn't work because the names in A need to be part of the public > interface. > > On Fri, Jan 22, 2016 at 11:51 AM, Nicho

[CMake] Visual Studios platform choice

2016-09-07 Thread Jack Stalnaker
Hi, I understand from reading this newgroup (e.g. https://cmake.org/pipermail/cmake/2013-March/053775.html) that the only way to support multiple platforms in Visual Studio is to run CMake multiple times, once for each platform. I'm porting some linux based code to the Windows world, and the

[CMake] visual studio tries to link to non-existent static version of lib

2016-08-23 Thread Jack Stalnaker
The following works on Linux, for both GNU and Intel compilers: add_library(mylib SHARED ${mylib_sources}) target_link_libraries(mylib ${mylib_libraries}) ... add_executable(test_mylib test_mylib.c) target_link_libraries(test_mylib mylib ${test_mylib_libraries}) add_test (TestMylib test_mylib)

[CMake] make install gives cmake link errors for libstdc++

2016-10-25 Thread Jack Stalnaker
I'm having an odd problem. I built and installed cmake in a non-standard location, using a compiler different from the system compiler on linux. Cmake compiles without complaint, and installs without complaint. When I attempt to build a piece of software using cmake, the configuration and build

[CMake] Cannot generate a safe runtime search path with mex and matlab

2016-11-01 Thread Jack Stalnaker
I am running into an error "Cannot generate a sage runtime search path for target because files in some directories may conflict with libraries in implicit directories." I understand from the error message why this is happening, but I'm not certain how to get around it. In my CMakeLists.txt