Re: [CMake] Release flags on one target in debug build type

2017-05-05 Thread Dan Liew
On 5 May 2017 at 19:45, Konstantin Tokarev wrote: > Hello, > > Is there any clear way to build specific target in "Debug" mode with flags > that it would have in "Release"? > > In particular, build this specific target without effect of > CMAKE_CXX_FLAGS_DEBUG and CMAKE_C_FLAGS_DEBUG, while pres

Re: [CMake] Release flags on one target in debug build type

2017-05-05 Thread Konstantin Tokarev
05.05.2017, 23:22, "Michael Ellery" : >>  On May 5, 2017, at 11:45 AM, Konstantin Tokarev wrote: >> >>  Hello, >> >>  Is there any clear way to build specific target in "Debug" mode with flags >> that it would have in "Release"? >> >>  In particular, build this specific target without effect of

Re: [CMake] Release flags on one target in debug build type

2017-05-05 Thread Michael Ellery
> On May 5, 2017, at 11:45 AM, Konstantin Tokarev wrote: > > Hello, > > Is there any clear way to build specific target in "Debug" mode with flags > that it would have in "Release"? > > In particular, build this specific target without effect of > CMAKE_CXX_FLAGS_DEBUG and CMAKE_C_FLAGS_DEBU

[CMake] Release flags on one target in debug build type

2017-05-05 Thread Konstantin Tokarev
Hello, Is there any clear way to build specific target in "Debug" mode with flags that it would have in "Release"? In particular, build this specific target without effect of CMAKE_CXX_FLAGS_DEBUG and CMAKE_C_FLAGS_DEBUG, while preserving flags added by target_compile_options -- Regards, Kon

Re: [CMake] setting environment variable for ctest

2017-05-05 Thread CHEVRIER, Marc
Use the ENVIRONMENT property of your tests (see https://cmake.org/cmake/help/v3.7/prop_test/ENVIRONMENT.html). On 05/05/2017, 16:29, "CMake on behalf of Juan E. Sanchez" wrote: Hello, It appears that when I invoke ctest through cmake, the environment variables I export from m

Re: [CMake] setting environment variable for ctest

2017-05-05 Thread Juan E. Sanchez
It this possible to set for all tests as one line? This would require changing dozens of tests. Regards, Juan On 5/5/17 9:31 AM, CHEVRIER, Marc wrote: Use the ENVIRONMENT property of your tests (see https://cmake.org/cmake/help/v3.7/prop_test/ENVIRONMENT.html). On 05/05/2017, 16:29, "CMake

[CMake] setting environment variable for ctest

2017-05-05 Thread Juan E. Sanchez
Hello, It appears that when I invoke ctest through cmake, the environment variables I export from my bash shell are being ignored: DYLD_INSERT_LIBRARIES PATH Is there a way to tell cmake to pass the user environment all the way down to the environment for my tested application. This is on M

[CMake] Does JOB_POOL_[COMPILE|LINK] work with custom_target?

2017-05-05 Thread Eric Noulard
Hi all, We have a bunch of custom_target and a subset of them should be run in sequence. So we tried to define: set_property(GLOBAL PROPERTY JOB_POOLS exclusive=1) and then: set_property(TARGET my_custom_target PROPERTY JOB_POOL_COMPILE exclusive) set_property(TARGET my_custom_target PROPERTY J

Re: [CMake] Circular dependencies with Ninja, not with Unix Makefiles

2017-05-05 Thread Ignacio Fernández Galván via CMake
Well, in my real case this happens even with out-of-source builds, which also occurs in the test case if I change: set (OUT ${CMAKE_BINARY_DIR}/ext) in ext/CMakeLists.txt. Sure, I can avoid it by renaming the file or target, but I thought this is something that could be avoided by either (a)

Re: [CMake] avoiding finding system libraries (motivation is superbuilds)

2017-05-05 Thread Robert Maynard
Have you tried using CMAKE_PREFIX_PATH instead of CMAKE_INSTALL_PREFIX? On Thu, May 4, 2017 at 5:13 PM, Kris Thielemans wrote: > Hi > > > > Short question: if we have a library/include files installed both in the > usual system locations and outside, how do we force CMake to find the > latter? (

Re: [CMake] Circular dependencies with Ninja, not with Unix Makefiles

2017-05-05 Thread Robert Maynard
Hi, This is caused by doing an in source build and thereby causing the issue. The custom command is outputting a file called 'foo', which is also the chosen name of a target in the ninja file. All of this results in ninja conflating the two and causing a circular dependency. Your options are to n