Re: [CMake] Change compiler for certain files in the project

2017-10-30 Thread Aaron Boxer
From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of P F via CMake > Sent: Saturday, October 28, 2017 9:22 AM > To: Aaron Boxer > Cc: cmake > Subject: Re: [CMake] Change compiler for certain files in the project > > > > On Oct 28, 2017, at 9:50 AM, Aaron Boxer wrote: >

Re: [CMake] Change compiler for certain files in the project

2017-10-30 Thread Aaron Boxer
On Sat, Oct 28, 2017 at 11:22 AM, P F wrote: > > > On Oct 28, 2017, at 9:50 AM, Aaron Boxer wrote: > > > > Hello, > > > > I have a cmake project on linux, and I would like to change the compiler > > for certain files from g++ to another, llvm-based co

[CMake] Change compiler for certain files in the project

2017-10-28 Thread Aaron Boxer
Hello, I have a cmake project on linux, and I would like to change the compiler for certain files from g++ to another, llvm-based compiler called hcc. (hcc is AMDs HIP compiler for GPGPU) Is there a way of doing this in my cmake file ? Thanks, Aaron -- Powered by www.kitware.com Please keep

[CMake] Setting different compiler for certain files

2017-10-26 Thread Aaron Boxer
I am working on a project where most files can use standard gcc compiler, but a few need to use a different one. How can I specify that these files should be compiled with this other compiler ? Thanks. Aaron -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at:

Re: [CMake] cmakedefine based on find_package

2017-07-27 Thread Aaron Boxer
Never mind, figured it out :) #cmakedefine OPENCL_FOUND On Thu, Jul 27, 2017 at 9:23 AM, Aaron Boxer wrote: > Hello, > > I am using find_package to find the OpenCL install on my system. > Finding the package sets OPENCL_FOUND to true. > I would like to create a #define in the

[CMake] cmakedefine based on find_package

2017-07-27 Thread Aaron Boxer
Hello, I am using find_package to find the OpenCL install on my system. Finding the package sets OPENCL_FOUND to true. I would like to create a #define in the code that will match this cmake variable, so I have set #cmakedefine HAVE_OPENCL @OPENCL_FOUND@ in my config.h.cmake.in file. However, I

Re: [CMake] Exception handling warning on windows

2017-07-23 Thread Aaron Boxer
Never mind, figured it out :) IF(MSVC) SET(CMAKE_CXX_FLAGS "/EHsc") ENDIF(MSVC) On Sun, Jul 23, 2017 at 8:35 PM, Aaron Boxer wrote: > Hello, > > I am getting the following warning when building my project on Visual > Studio 14: > > warning C4530: C++ except

[CMake] Exception handling warning on windows

2017-07-23 Thread Aaron Boxer
Hello, I am getting the following warning when building my project on Visual Studio 14: warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc Is there a cmake option to enable unwind semantics on windows ? Thanks, Aaron -- Powered by www.kitware.com P

Re: [CMake] Trouble finding libjpeg package on ubuntu

2017-05-29 Thread Aaron Boxer
Damn!!! Unix is case sensitive. find_package(JPEG) works. On Sun, May 28, 2017 at 9:37 PM, Aaron Boxer wrote: > Hello, > I would like cmake to find the libjpeg installation on my ubuntu system. > > I have the > > find_package(jpeg) line in my cmake file, and this works

[CMake] Fwd: Re: Trouble finding libjpeg package on ubuntu

2017-05-29 Thread Aaron Boxer
-- Forwarded message -- From: "Aaron Boxer" Date: May 29, 2017 6:42 AM Subject: Re: [CMake] Trouble finding libjpeg package on ubuntu To: "Michele Portolan" Cc: Yes, installed dev version. On May 29, 2017 2:57 AM, "Michele Portolan" wrote: > D

[CMake] Trouble finding libjpeg package on ubuntu

2017-05-28 Thread Aaron Boxer
Hello, I would like cmake to find the libjpeg installation on my ubuntu system. I have the find_package(jpeg) line in my cmake file, and this works on windows, but on Ubuntu with libjpeg-turbo installed, it can't find it. Here is a list of the install directories for the libjpeg-turbo8-dev packa

Re: [CMake] Strange test failure

2017-01-21 Thread Aaron Boxer
Thanks, Nils, I figured it out. On Jan 20, 2017 2:41 AM, "Nils Gladitz" wrote: > On 01/20/2017 12:59 AM, Aaron Boxer wrote: > > I have a test in my ctest suite that fails both with >> and without a ! at the beginning of the test. >> >> So, >> >&g

[CMake] Strange test failure

2017-01-19 Thread Aaron Boxer
I have a test in my ctest suite that fails both with and without a ! at the beginning of the test. So, FOO -BAR -BAZ fails and !FOO -BAR -BAZ fails. Any ideas, or how can I get more info on the failure ? Thanks. Aaron -- Powered by www.kitware.com Please keep messages on-topic and check

Re: [CMake] Tracing ctest crash on windows

2017-01-05 Thread Aaron Boxer
ike that - instead CTest just fires up your test executable >> and does clever things with the output. In the same way you can just set >> your test project as startup-project, and debug it like any other >> executable. >> >> Sincerely, >> Jakob >> >>

[CMake] Tracing ctest crash on windows

2017-01-04 Thread Aaron Boxer
Hello, I am on windows, with visual studio 2015. Some of my ctest tests are crashing with exception. Is there a way of debugging these tests ? When I run in debug mode, I get an exception dialog, but can't drop into debugging environment. Thanks, Aaron -- Powered by www.kitware.com Please keep

[CMake] cmake - ified libjpeg source code

2016-10-25 Thread Aaron Boxer
Hello, I am looking for a cmake-ified jpeg library to add to another cmake project. Any recommendations? Thanks, Aaron -- 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 CM

Re: [CMake] Force copy of files

2016-10-14 Thread Aaron Boxer
Never mind, figured this one out: use copy_if_different On Fri, Oct 14, 2016 at 1:34 PM, Aaron Boxer wrote: > I have the following lines in my cmake file > > > foreach(f ${MyFiles}) > add_custom_command(TARGET ${OPENJPEG_PLUGIN_NAME} PRE_BUILD > COMMA

[CMake] Force copy of files

2016-10-14 Thread Aaron Boxer
I have the following lines in my cmake file foreach(f ${MyFiles}) add_custom_command(TARGET ${OPENJPEG_PLUGIN_NAME} PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${f} $) endforeach() in order to copy MyFiles to MyFolder. If these files already exist

Re: [CMake] Need help generating a config file

2016-10-13 Thread Aaron Boxer
Eric, thanks, I figured it out. On Thu, Oct 13, 2016 at 3:27 PM, Eric Noulard wrote: > > > 2016-10-13 21:18 GMT+02:00 Aaron Boxer : > >> Hello, >> >> I have a foo.h.cmake.in file that I am using to generate a >> foo_config.hfile. >>

Re: [CMake] Need help generating a config file

2016-10-13 Thread Aaron Boxer
Thanks a lot, Eric. So, I have two cmake variables, and I want to #define FOO_DEFINE if one or the other is set, otherwise I don't want FOO_DEFINE defines at all. Is this possible ? On Thu, Oct 13, 2016 at 3:27 PM, Eric Noulard wrote: > > > 2016-10-13 21:18 GMT+02:

[CMake] Need help generating a config file

2016-10-13 Thread Aaron Boxer
Hello, I have a foo.h.cmake.in file that I am using to generate a foo_config.hfile. Here is the line in my cmake file that generates the header: configure_file(${CMAKE_CURRENT_SOURCE_DIR}/foo.h.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/foo_config.h @ONLY) I would like to define or und

[CMake] ASAN error

2016-04-12 Thread Aaron Boxer
Hello, I am running on Ubuntu 15.10, with g++ 5.2.1 I have built my cmake project with ASAN and UBSAN. When I run the ctest nightly memory check, all of my tests fail with the error Shadow memory range interleaves with an existing memory mapping. ASan cannot proceed correctly. ABORTING Has anyo

Re: [CMake] Delete CDash project

2016-03-25 Thread Aaron Boxer
Never mind - you can do this using the not very obvious "unsubscribe" option in manage subscription. On Fri, Mar 25, 2016 at 10:43 AM, Aaron Boxer wrote: > Does anyone know how to delete a CDash project? There doesn't seem to be > any way to do this on the website

[CMake] Delete CDash project

2016-03-25 Thread Aaron Boxer
Does anyone know how to delete a CDash project? There doesn't seem to be any way to do this on the website. Thanks! Aaron -- 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

Re: [CMake] How to suppress valgrind errors reported by NightlyMemCheck ?

2016-03-20 Thread Aaron Boxer
LGRIND_OPTS "--suppressions=/path/to/your_suppression_file.supp") > > > or > > > export VALGRIND_OPTS="--suppressions=/path/to/your_suppression_file.supp" > > Excellent, thanks for your help. This worked for me. Aaron > > > Best regards, > > Xavier > &

[CMake] How to suppress valgrind errors reported by NightlyMemCheck ?

2016-03-20 Thread Aaron Boxer
My program links to libstdc++. It turns out there is a well-known false positive from valgrind regarding libstdc++ memory pools. http://valgrind.org/docs/manual/faq.html#faq.reports How may I suppress this error when running ctest -D NightlyMemCheck ? Thanks, Aaron -- Powered by www.kitware.c

Re: [CMake] CMAKE_USE_PTHREADS_INIT cleanup

2016-03-20 Thread Aaron Boxer
On Sun, Mar 20, 2016 at 8:46 AM, Aaron Boxer wrote: > I recently added pthreads to my cmake program. > When I run valgrind, I get a "blocks still reachable" warning, > coming from dl_init. > > I suspect that pthreads is not cleaning up properly. Is there a way >

[CMake] CMAKE_USE_PTHREADS_INIT cleanup

2016-03-20 Thread Aaron Boxer
I recently added pthreads to my cmake program. When I run valgrind, I get a "blocks still reachable" warning, coming from dl_init. I suspect that pthreads is not cleaning up properly. Is there a way of ensuring that the shared library for pthreads gets cleaned up correctly via cmake? i.e. a match

Re: [CMake] best way of parsing test results from ctest + valgrind

2016-03-02 Thread Aaron Boxer
Thanks, Dave! Since this is an open source project, I just set up a CDash instance on my.cdash.org. Cheers, Aaron On Wed, Mar 2, 2016 at 5:19 AM, Dave Flogeras wrote: > On Tue, Mar 1, 2016 at 8:15 PM, Aaron Boxer wrote: > > Hello, > > I am just getting started on using

[CMake] best way of parsing test results from ctest + valgrind

2016-03-01 Thread Aaron Boxer
Hello, I am just getting started on using valgrind memory analysis for my tests. When I run ctest with nightly memory check, I get an XML document, but it is very hard to read the results. What is the best way of reading this doc? Thanks! Aaron -- Powered by www.kitware.com Please keep messages

Re: [CMake] CMAKE_THREAD_LIBS_INIT

2016-03-01 Thread Aaron Boxer
OK, figured this one out too. Thank again, Caleb! On Tue, Mar 1, 2016 at 10:48 AM, Aaron Boxer wrote: > Hello, > I am getting link error "undefined reference to pthread_create" > > I have added ${CMAKE_THREAD_LIBS_INIT} in my cmake link line, > and I have added

[CMake] CMAKE_THREAD_LIBS_INIT

2016-03-01 Thread Aaron Boxer
Hello, I am getting link error "undefined reference to pthread_create" I have added ${CMAKE_THREAD_LIBS_INIT} in my cmake link line, and I have added FIND_PACKAGE(Threads REQUIRED). Here is a link to my cmake file: https://github.com/GrokImageCompression/opendcp/blob/master/libopendcp/CMakeList

Re: [CMake] CMAKE_DL_LIBS

2016-03-01 Thread Aaron Boxer
li/CMakeLists.txt > > and the lines for the exe that is not linking are found here: > > TARGET_LINK_LIBRARIES(opendcp_j2k ${CMAKE_DL_LIBS} ${OPENDCP_LIB} ) > > > This is an open source proj, by the way. I can send you a few short lines > about how to build on Ubuntu, if you are int

[CMake] CMAKE_DL_LIBS

2016-03-01 Thread Aaron Boxer
Hello! I have a CMAKE project that creates an executable that links with a static lib from a second CMAKE project. The static lib requires the dlopen and dlclose symbols. So, when I link the first project, I add ${CMAKE_DL_LIBS} to the CMake file. However, I still get an error about "undefined re

Re: [CMake] CMAKE_DL_LIBS

2016-03-01 Thread Aaron Boxer
On Tue, Mar 1, 2016 at 9:06 AM, Aaron Boxer wrote: > Hello! > I have a CMAKE project that creates an executable that links with a static > lib > from a second CMAKE project. The static lib requires the dlopen and dlclose > symbols. > > So, when I link the first project, I ad

Re: [CMake] undefined reference to 'pthread_create'

2016-02-04 Thread Aaron Boxer
Thanks, guys This is working now. Cheers, Aaron On Thu, Feb 4, 2016 at 1:05 PM, J Decker wrote: > On Thu, Feb 4, 2016 at 9:55 AM, Aaron Boxer wrote: > > Thanks. So, even though threading is part of the standard, I still need > to > > link to pthreads library ? > >

Re: [CMake] undefined reference to 'pthread_create'

2016-02-04 Thread Aaron Boxer
g the link to the pthread library. I could be wrong. > > Try and add this to your cmake file: > > find_package (Threads) > > target_link_libraries (myexecutable/lib ${CMAKE_THREAD_LIBS_INIT}) > > > > Sent from my iPhone > > On Feb 4, 2016, at 10:42 AM, Aaron Boxer w

[CMake] undefined reference to 'pthread_create'

2016-02-04 Thread Aaron Boxer
Hello, I have a cmake project that uses C++11 threads. I have added the lines set (CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) CMAKE version is 3.2.2, running on Ubuntu. When I try to build, I get the error undefined reference to `pthread_create` Any ideas on how to fix this?

Re: [CMake] Loading Plugins

2014-10-31 Thread Aaron Boxer
On Fri, Oct 31, 2014 at 5:48 PM, J Decker wrote: > > really nothing at all to do with cmake; a couple macros and you can > support cross-platform... a few less and you can init interfaces pretty > easily > at the end of init or during early discovery of functions, if they fail > you can fillt

[CMake] Loading Plugins

2014-10-31 Thread Aaron Boxer
Hello! I have a C CMake project, and I would like to add the following feature: 1) define an interface for a second dynamic library 2) look in a specified folder at runtime, and try to load this library 3) if loading fails, then get notified of this fact, so that I can use statically linked fall-

Re: [CMake] Build cmake child project from cmake parent project

2014-02-20 Thread Aaron Boxer
Thanks very much, Magnus! I will try it out. (your tag line made me laugh) Cheers, Aaron On Thu, Feb 20, 2014 at 1:21 AM, Magnus Therning wrote: > On Wed, Feb 19, 2014 at 06:24:44PM -0500, Aaron Boxer wrote: > > I have cmake two projects, with project 2 added as a git submodule in &g

[CMake] Build cmake child project from cmake parent project

2014-02-19 Thread Aaron Boxer
I have cmake two projects, with project 2 added as a git submodule in project 1. I would like to build project 2 from project 1. How can I do this? I tried add_subdirectory, but this is just for adding source directories. I want to use the project 2 cmake files to build it. Thanks! -- Powered

Re: [CMake] Fwd: Error running CMake on Win 7 64

2013-06-19 Thread Aaron Boxer
Sergei, Yes, thanks very much for testing this out. I was able to build the project on another system. Cheers, Aaron On Wed, Jun 19, 2013 at 2:37 PM, Sergei Nikulov wrote: > > > > @Sergei >> >> >> When I click "configure", I choose "Visual Studio 2010 Win64" as my >> compiler. >> >> >> Then I

[CMake] Fwd: Error running CMake on Win 7 64

2013-06-19 Thread Aaron Boxer
-- Forwarded message -- From: Aaron Boxer Date: Wed, Jun 19, 2013 at 11:47 AM Subject: Re: [CMake] Error running CMake on Win 7 64 To: Sergei Nikulov @Sergei When I click "configure", I choose "Visual Studio 2010 Win64" as my compiler. Then I get

Re: [CMake] Error running CMake on Win 7 64

2013-06-19 Thread Aaron Boxer
Thanks, Sergei. Yes, I have visual studio 2008, 2010 and 2012 installed. And I have built VTK on this system. Aaron On Wed, Jun 19, 2013 at 11:13 AM, Sergei Nikulov wrote: > 2013/6/19 Aaron Boxer > >> Hello, >> >> I am trying to run cmake on a project (openjpeg) >&g

[CMake] Error running CMake on Win 7 64

2013-06-19 Thread Aaron Boxer
Hello, I am trying to run cmake on a project (openjpeg) using CMake 2.8.11 GUI, and I get the following errors: The C compiler identification is unknown Check if the system is big endian Searching 16 bit integer CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/TestBigEnd