Re: [CMake] compiler independent compiler flags

2016-02-17 Thread Ruslan Baratov via CMake
On 17-Feb-16 17:23, Nagy-Egri Máté Ferenc via CMake wrote: Unfortunately, I cannot help you in this regard, though I am surprised how little attention this question gained. I too feel that CMake could do better both in this regard. While ABI detection is very well done, BUILD_TYPE seems to be

[CMake] file(SHA1) vs string(SHA1) consistency

2016-02-25 Thread Ruslan Baratov via CMake
Hi, Following code produce same SHA1 on Linux: cmake_minimum_required(VERSION 3.0) set(test_string "a\nb") set(test_file "test.file") string(SHA1 sha1_string "${test_string}") file(WRITE "${test_file}" "${test_string}") file(SHA1 "${test_file}" sha1_file) message("sha1:"

Re: [CMake] EFFECTIVE_PLATFORM_NAME not expanded in TARGET_* generator expressions on iOS

2016-03-21 Thread Ruslan Baratov via CMake
On 21-Mar-16 19:42, Vladimír Vondruš wrote: Hello, I came across this problem when trying to use XCTest macros ( https://cmake.org/cmake/help/latest/module/FindXCTest.html ) on iOS. When compiling for OSX, ctest properly executes all test cases, but when targeting iOS or iOS simulator, all th

Re: [CMake] EFFECTIVE_PLATFORM_NAME not expanded in TARGET_* generator expressions on iOS

2016-03-29 Thread Ruslan Baratov via CMake
On 29-Mar-16 16:14, Vladimír Vondruš wrote: I saw that commit, yes. Since there is no additional round of variable expansion, wouldn't it be better to expand the ${EFFECTIVE_PLATFORM_NAME} to at least something fixed (based on the value of CMAKE_OSX_SYSROOT), instead of making the generator exp

Re: [CMake] EFFECTIVE_PLATFORM_NAME not expanded in TARGET_* generator expressions on iOS

2016-03-29 Thread Ruslan Baratov via CMake
The note about CMAKE_IOS_INSTALL_COMBINED is related to value of CMAKE_OSX_SYSROOT. `${EFFECTIVE_PLATFORM_NAME}` as far as I understand used on build step too, it's not only installation (`cmTarget::ComputeOutputDir`). As alternative you can try to hardcode `LIBRARY_OUTPUT_DIRECTORY` so both si

Re: [CMake] in source makefile / helper script that enables building out of source?

2016-05-14 Thread Ruslan Baratov via CMake
On 11-May-16 16:58, Steve Lorimer wrote: I've recently changed over from using boost-build (http://www.boost.org/build/) to cmake. Boost build builds in-source. I've become quite used to building and searching etc from the source root ~/src $ b2 module ~/src $ git grep foo This work

[CMake] CMake terminology

2016-06-24 Thread Ruslan Baratov via CMake
Hi, I have a question about CMake terminology. When we are using CMake GUI there are two buttons "Configure" and "Generate", hence we have two stages: 1. Configure step, when we do configuring project, effectively creating file with cache variables (which we can modify) without really genera

Re: [CMake] CMake terminology

2016-06-24 Thread Ruslan Baratov via CMake
hoose Please run configure step by: cmake -H. -B_builds or Please run generate step by: cmake -H. -B_builds ? May be both versions are correct? Or both incorrect? Ruslo On Fri, Jun 24, 2016 at 4:06 PM, Ruslan Baratov via CMake wrote: Hi, I have a question about CMake terminology. When w

Re: [CMake] CMake terminology

2016-06-24 Thread Ruslan Baratov via CMake
Or both incorrect? Ruslo On Fri, Jun 24, 2016 at 4:06 PM, Ruslan Baratov via CMake wrote: Hi, I have a question about CMake terminology. When we are using CMake GUI there are two buttons "Configure" and "Generate", hence we have two stages: 1. Configure step, when we

Re: [CMake] CMake terminology

2016-06-24 Thread Ruslan Baratov via CMake
r those new to CMake. YMMV. On Saturday, 25 June 2016, Ruslan Baratov via CMake <mailto:cmake@cmake.org>> wrote: On 24-Jun-16 23:49, Robert Maynard wrote: Please run the configure and generate steps by It's too long :) Also it doesn't express the fact that

Re: [CMake] CMake terminology

2016-06-25 Thread Ruslan Baratov via CMake
uot;cmake configure+generate" step. Also by one step you can trigger events from different "times", i.e. "cmake --build _builds --target install" will run "Install time" which can trigger commands from "Build time", which even can trigger commands fro

Re: [CMake] CMake terminology

2016-06-25 Thread Ruslan Baratov via CMake
explaining that there are different "time" because CMake is a buid system **generator** and not a build tool seems very important to me. Some action may be run during CMake time some may be done during Build time. For me CMake run is configure+generate. I did gave a tu

Re: [CMake] [iOS] What is the correct way to add resources to an XCode project

2016-06-28 Thread Ruslan Baratov via CMake
Hi, I have used two approaches which is not based on assets directories. First is to save icons to resources with special names. In this case Xcode will add them automatically, see: * https://github.com/forexample/testapp/blob/9202304134862f043af740af27dc7efb3b3f565d/CMakeLists.txt#L28 Secon

Re: [CMake] How do you handle recursive dependencies in CMake

2016-07-01 Thread Ruslan Baratov via CMake
Hi, On 30-Jun-16 16:01, Sven Baars wrote: I don't think this is a solution to the problem, since then it seems like the build will still fail for all our users unless they also build all their packages from inside hunter. What do you mean by "from inside hunter"? Users have to add 'hunter_add_p

Re: [CMake] Need ideas/opinions on third party library management

2016-08-13 Thread Ruslan Baratov via CMake
Hi, Robert According to your GitHub account you've send a trivial patch about a year ago to the Hunter (https://github.com/ruslo/hunter) package manager. So I wonder what is your experience, have you tried it? Have you run into some troubles? Thanks, Ruslo On 12-Aug-16 22:59, Robert Dailey

Re: [CMake] [cmake-developers] Need ideas/opinions on third party library management

2016-08-16 Thread Ruslan Baratov via CMake
On 16-Aug-16 13:52, Florent Castelli wrote: For example, Boost is used by 5 platforms: Windows, OSX, Linux, Android and iOS. Each platform has a different CPU target (or many 32/64bit, x86/ARM). Each platform has many compilers. Some platforms have instrumentation options (Debug / Release, ASan,

Re: [CMake] [cmake-developers] Need ideas/opinions on third party library management

2016-08-16 Thread Ruslan Baratov via CMake
On 16-Aug-16 17:04, Florent Castelli wrote: On 16 Aug 2016, at 15:29, Ruslan Baratov > wrote: On 16-Aug-16 13:52, Florent Castelli wrote: For example, Boost is used by 5 platforms: Windows, OSX, Linux, Android and iOS. Each platform has a different CPU target

Re: [CMake] Need ideas/opinions on third party library management

2016-08-16 Thread Ruslan Baratov via CMake
On 13-Aug-16 03:12, Elizabeth A. Fischer wrote: I don't think CMake is the best place to do it, for a number of reasons. I would not try to re-invent the wheel here. Can you provide any details? I personally think that CMake is a natural and the only place where it should be done. On 16-Au

Re: [CMake] [cmake-developers] Need ideas/opinions on third party library management

2016-08-16 Thread Ruslan Baratov via CMake
On 16-Aug-16 16:37, Florent Castelli wrote: Well, I tried upstreaming the new build scripts to some projects and it didn’t go well. Some of the reasons I’ve heard of: - Windows developpers don’t use CMake, they have project files on the repository. The CMake files for Windows will never be u

Re: [CMake] [cmake-developers] Need ideas/opinions on third party library management

2016-08-17 Thread Ruslan Baratov via CMake
On 17-Aug-16 08:36, Elizabeth A. Fischer wrote: > > I don't think CMake is the best place to do it, > Can you provide any details? I personally think that CMake is a > natural and the only place where it should be done. The most important reason here is because there are combinatorially many ver

Re: [CMake] [cmake-developers] Need ideas/opinions on third party library management

2016-08-17 Thread Ruslan Baratov via CMake
On 17-Aug-16 04:29, Florent Castelli wrote: The Boost source download is cached outside of the build directory in a unique folder. So it’s effectively only done once for all platforms and then reused. This is true for local machines and for custom build servers like your personal Jenkins. For

Re: [CMake] Adding Cmake version in online documentation

2016-11-08 Thread Ruslan Baratov via CMake
On 08-Nov-16 22:11, Dvir Yitzchaki wrote: > But how do you know which version to declare on cmake_minimum_required? I do hit this too. This would be a very useful feature. Sometimes I have to manually "scan" the docs to figure out some simple facts about newly introduces variables/commands. On 08

Re: [CMake] Adding Cmake version in online documentation

2016-11-08 Thread Ruslan Baratov via CMake
On 09-Nov-16 06:01, Nils Gladitz wrote: > On 08.11.2016 20:26, Albrecht Schlosser wrote: > >> >> I'd like to have a list of release dates (I'm not sure if there is >> one) as well as the exact version a feature was introduced to write >> CMakeLists.txt files that run on really old CMake versions. >

Re: [CMake] Adding Cmake version in online documentation

2016-11-08 Thread Ruslan Baratov via CMake
On 08-Nov-16 23:33, Nils Gladitz wrote: > On 11/08/2016 04:17 PM, Ruslan Baratov wrote: > >> On 08-Nov-16 22:22, Nils Gladitz wrote: >>> Strictly speaking cmake_minimum_required(VERSION) is not about command >>> availability but rather about behavior (cmake policies). >> Except it's exactly opposit

Re: [CMake] Adding Cmake version in online documentation

2016-11-09 Thread Ruslan Baratov via CMake
On 09-Nov-16 16:22, Nils Gladitz wrote: > On 09.11.2016 04:29, Ruslan Baratov wrote: >> On 08-Nov-16 23:33, Nils Gladitz wrote: >>> On 11/08/2016 04:17 PM, Ruslan Baratov wrote: >>> Except it's exactly opposite :) `cmake_minimum_required` is about new features/commands, and policies is ab

Re: [CMake] Adding Cmake version in online documentation

2016-11-09 Thread Ruslan Baratov via CMake
On 09-Nov-16 16:22, Nils Gladitz wrote: > On 09.11.2016 03:47, Ruslan Baratov wrote: >> On 09-Nov-16 06:01, Nils Gladitz wrote: >>> I think the git tag creation dates should roughly equate release dates: >>> https://cmake.org/gitweb?p=cmake.git;a=tags >> What about the future releases? There w

Re: [CMake] Adding Cmake version in online documentation

2016-11-09 Thread Ruslan Baratov via CMake
On 09-Nov-16 19:51, Nils Gladitz wrote: > On 09.11.2016 12:04, Ruslan Baratov wrote: >> On 09-Nov-16 16:22, Nils Gladitz wrote: >>> On 09.11.2016 04:29, Ruslan Baratov wrote: On 08-Nov-16 23:33, Nils Gladitz wrote: > On 11/08/2016 04:17 PM, Ruslan Baratov wrote: > >> Except it's ex

Re: [CMake] Adding Cmake version in online documentation

2016-11-09 Thread Ruslan Baratov via CMake
Can you show the real code? The code that in your opinion doesn't violate the "right way of policy usage"? On 09-Nov-16 22:14, Nils Gladitz wrote: > On 09.11.2016 14:57, Ruslan Baratov wrote: >> >> Again policies are not meant to be feature toggles. >> You can do a lot of things and there may be v

Re: [CMake] Adding Cmake version in online documentation

2016-11-09 Thread Ruslan Baratov via CMake
On 09-Nov-16 23:00, Nils Gladitz wrote: > On 09.11.2016 15:52, Ruslan Baratov wrote: >> Can you show the real code? The code that in your opinion doesn't >> violate the "right way of policy usage"? > > It is not a question about code. It is a question about context and > use case. You just said tha

[CMake] CMake based package manager

2014-06-23 Thread Ruslan Baratov via CMake
Hi, I'm developing a project that is a kind of wrapper of ExternalProject_Add and allow it to be more reusable. User interface is quite simple. For example adding Boost: hunter_add_package(Boost COMPONENTS system filesystem) find_package(Boost REQUIRED system filesystem) ... or GTest

Re: [CMake] organizing export link libraries

2014-08-26 Thread Ruslan Baratov via CMake
On 21-Aug-14 00:50, Nico Schl?mer wrote: Hi all, a general question: I have a dependency chain of libraries A -> B -> C -> ... -> Z and all of those libraries are built with CMake, using CMake's export functionality [1] to let the next in the chain know about its the dependencies. If all of t

Re: [CMake] set(a b); set(b c); if(a STREQUAL b OR a STREQUAL c) ...

2014-09-04 Thread Ruslan Baratov via CMake
On 04-Sep-14 09:58, Clark Wang wrote: On Thu, Sep 4, 2014 at 1:44 PM, Clark Wang > wrote: On Thu, Sep 4, 2014 at 1:36 PM, Chuck Atkins mailto:chuck.atk...@kitware.com>> wrote: Hi Clark The expression inside the if statement has it's variables

Re: [CMake] set(a b); set(b c); if(a STREQUAL b OR a STREQUAL c) ...

2014-09-04 Thread Ruslan Baratov via CMake
On 04-Sep-14 16:48, Chuck Atkins wrote: Command `if(a MATCHES ...)` has the same flaw: `if( MATCHES regex)`: .. set(MYSTRING "B") set(A "MYSTRING") if("${A}" MATCHES "^MYSTRING$") # do *not* go here even A is MYSTRING (use *variable* MYSTRING) endif() This sho

Re: [CMake] set(a b); set(b c); if(a STREQUAL b OR a STREQUAL c) ...

2014-09-04 Thread Ruslan Baratov via CMake
On 04-Sep-14 18:09, Anders Lindgren wrote: make sure that the argument don't form a valid variable name. It's not possible set(a b) set(b c) if(">${a}<" STREQUAL ">b<" OR ">${a}<" STREQUAL ">c<") message("true") endif() How about that: set(a "") # variable `a` is empty

Re: [CMake] set(a b); set(b c); if(a STREQUAL b OR a STREQUAL c) ...

2014-09-05 Thread Ruslan Baratov via CMake
On 04-Sep-14 20:40, Hendrik Sattler wrote: On 4. September 2014 16:38:21 MESZ, Ruslan Baratov via CMake wrote: On 04-Sep-14 18:09, Anders Lindgren wrote: make sure that the argument don't form a valid variable name. It's not possible set(a b) set(b c) if("&

Re: [CMake] @ONLY and nested variables

2014-09-29 Thread Ruslan Baratov via CMake
You can run configure_package_config_file twice with code: SET(@PACKAGE@_LIBS @@PACKAGE@_LIBRARIES@) Also you can use configure_file command to create one file and include it with config file that was made by configure_package_config_file: # CMakeLists.txt configure_file(FooVars.cmake.in FooV

Re: [CMake] Dependency paths in CMake package config files

2014-10-05 Thread Ruslan Baratov via CMake
On 02-Oct-14 20:56, Alexander Lamaison wrote: How do you manage the paths to the libraries that your static library package depends on in the XXXConfig.cmake that gets installed with package XXX? I'm exporting my static library package from both the build tree and from the installation location

[CMake] Parallel build with custom command

2014-10-06 Thread Ruslan Baratov via CMake
Hi, I have a problem with parallel build of project with custom command. Custom command generates two files and depends on generator script. For optimization purpose first file created only when not exists. This lead to conflict, even if I "protect" custom command with a custom target and set

Re: [CMake] Parallel build with custom command

2014-10-07 Thread Ruslan Baratov via CMake
On 07-Oct-14 18:00, Bill Hoffman wrote: On 10/7/2014 2:19 AM, Ruslan Baratov via CMake wrote: Hi, I have a problem with parallel build of project with custom command. Custom command generates two files and depends on generator script. For optimization purpose first file created only when not

Re: [CMake] Parallel build with custom command

2014-10-07 Thread Ruslan Baratov via CMake
On 07-Oct-14 19:14, Bill Hoffman wrote: On 10/7/2014 10:26 AM, Ruslan Baratov wrote: I'm expecting 1 message `Script run`, but I have 5 messages. If I modify `generate.cmake` script so it always write the file then everything works fine. Ah OK, I see. Your depend never gets up to date. If you

Re: [CMake] Parallel build with custom command

2014-10-08 Thread Ruslan Baratov via CMake
On 07-Oct-14 22:34, Brad King wrote: On 10/07/2014 12:14 PM, Ruslan Baratov via CMake wrote: Yes, that's why second file always modified. So assume I have a script that generates a lot of *.cpp files. I modify script so it only change one file, one file modified - one file recompiled. So w

Re: [CMake] command in add_custom_command launched even if output not stale

2015-02-04 Thread Ruslan Baratov via CMake
All OUTPUT files O0, O1, O2,... depends on all DEPENDS files I0, I1, I2,... See this discussion: http://www.cmake.org/pipermail/cmake/2014-October/058824.html On 04-Feb-15 17:14, CREMARENCO Cosmin wrote: Hello, We use CMake and among other things CMake is used for generating code at compil

Re: [CMake] Set Xcode sources language to "Default"

2015-02-04 Thread Ruslan Baratov via CMake
Update cmake to version 3.1 and try: set_source_files_properties(juce_audio_devices.cpp PROPERTIES XCODE_LAST_KNOWN_FILE_TYPE YES) On 23-Jan-15 00:52, Daniel Kollmann wrote: Hello, I have some files in Xcode that have mixed Objective-C and C++ code which is no problem if the files type is

[CMake] Default INTERFACE_POSITION_INDEPENDENT_CODE value for static library

2015-04-08 Thread Ruslan Baratov via CMake
Hi, I've got next error while trying to link static library to shared one on Linux: /usr/bin/ld: ...: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC This error can be detected on CMake configure step instead of linker stage if I

Re: [CMake] External Packages?

2015-04-12 Thread Ruslan Baratov via CMake
Take a look at this project: https://github.com/ruslo/hunter On 07-Apr-15 21:59, Steven Stallion wrote: All, I'm currently working on a fairly large project that requires a number of external tools be installed. I've been playing with the idea of having CMake download and install these packag

Re: [CMake] Alias of imported target

2015-05-07 Thread Ruslan Baratov via CMake
On 05-May-15 20:01, Stephen Kelly wrote: CHEVRIER, Marc wrote: Hi, Currently it is not possible to create an alias target for an imported target (I.e. add_library with ALIAS keyword). But I don’t understand what is the technical constraint or semantic reason behind this limitation. If anybody

Re: [CMake] FindModules.cmake quality + Kitware proposition

2015-05-14 Thread Ruslan Baratov via CMake
On 14-May-15 14:01, Nagy-Egri Máté Ferenc via CMake wrote: This is more of a remark, or something to get the ball rolling, rather than anything else. I recently came across various FindModule.cmake files (FindOpenCL, FindOpenGL, FindGLEW, FindGLM, FindSFML) as a sideeffect of a project I am d

Re: [CMake] Where do all the extra clang flags come from in Xcode?

2015-05-17 Thread Ruslan Baratov via CMake
On 14-May-15 23:53, Paul Smith wrote: I was comparing the command line used when we choose an Xcode generator on our OSX systems, vs. the command line used when we choose a Makefile generator. We certainly have nothing in our CMakeLists.txt which sets compiler flags based on the type of generato

Re: [CMake] Where do all the extra clang flags come from in Xcode?

2015-05-18 Thread Ruslan Baratov via CMake
On 18-May-15 06:50, Paul Smith wrote: On Sun, 2015-05-17 at 14:43 +0200, Ruslan Baratov via CMake wrote: As far as I know extra flags set by Xcode itself. You can use XCODE_ATTRIBUTE_* target properties to enable/disable warnings. This table can be helpful: https://github.com/ruslo/leathers

Re: [CMake] Where do all the extra clang flags come from in Xcode?

2015-05-18 Thread Ruslan Baratov via CMake
On 18-May-15 15:20, Paul Smith wrote: On Mon, 2015-05-18 at 12:32 +0200, Ruslan Baratov via CMake wrote: This table tells you what attribute you need to set to disable/enable specific warning. I see, so these are CMake attributes? That wasn't clear to me. I thought they were attribut

Re: [CMake] Where do all the extra clang flags come from in Xcode?

2015-05-18 Thread Ruslan Baratov via CMake
On 18-May-15 16:50, Parag Chandra wrote: In other words, these flags might very well be the same ones you’d see if you were to manually create an Xcode project via its wizards. Not exactly. Wizard add some extra attributes: Xcode 6.2 -> New project -> OSX -> Application -> Command Line Tool >

Re: [CMake] iOS multi-arch library target and xcodebuild

2015-06-24 Thread Ruslan Baratov via CMake
On 24-Jun-15 23:03, Bill Hoffman wrote: What is in the patched CMake? * workaround for bug: http://public.kitware.com/Bug/view.php?id=12506 * installing universal simulator + device library CMake already supports mulit-arch libraries on the Apple platform. As far as I know you can build two lib

Re: [CMake] iOS multi-arch library target and xcodebuild

2015-06-25 Thread Ruslan Baratov via CMake
On 25-Jun-15 02:26, Eric Wing wrote: On 6/24/15, Ruslan Baratov via CMake wrote: On 24-Jun-15 23:03, Bill Hoffman wrote: What is in the patched CMake? * workaround for bug: http://public.kitware.com/Bug/view.php?id=12506 * installing universal simulator + device library CMake already

Re: [CMake] iOS multi-arch library target and xcodebuild

2015-06-25 Thread Ruslan Baratov via CMake
On 25-Jun-15 12:14, Eric Wing wrote: * iOS toolchains I'm using: https://github.com/ruslo/polly (used to switch between different SDKs + to add some flags, like -std=c++11) Do you have to use a different toolchain for every different variant and different OS version? That's rather unfortunate if

Re: [CMake] Icon and Launch image support for iOS apps

2015-07-08 Thread Ruslan Baratov via CMake
On 03-Jul-15 13:00, Daniel Dewald wrote: Howdy folks, I’m currently in the process of converting our internal projects from premake to cmake. The process is almost complete. However I’ve been stuck on a seemingly simple problem the last few days that I could need some help /advise on. Since

Re: [CMake] Finding internal libraries

2015-07-14 Thread Ruslan Baratov via CMake
John LaGrone wrote > cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) > project(ex1) > find_package(foo REQUIRED) > add_executable(ex1.x ex1.c) > target_link_libraries(ex1.x foo) Just check that library exists already: if(NOT TARGET foo) find_package(foo REQUIRED) endif() -- View this mess

Re: [CMake] CMakeFindDependencyMacro and components

2015-07-23 Thread Ruslan Baratov via CMake
On 23-Jul-15 18:08, Guillaume Dumont wrote: include(CMakeFindDependencyMacro) find_dependency(Boost COMPONENTS date_time filesystem system) Note that by default Boost_LIBRARIES is a list of full paths to the components, so find_dependency not needed since library will be hardcoded into *Target

Re: [CMake] Building gtest with ExternalProject at configure time

2015-07-25 Thread Ruslan Baratov via CMake
On 25-Jul-15 10:20, Craig Scott wrote: Hi all. I was surprised recently to find little in the way of a simple method to build gtest as part of a CMake project without having to either (a) add the gtest source to my own project or (b) use ExternalProject and then have to manually create import l

Re: [CMake] [cmake-developers] CMake IR

2015-07-31 Thread Ruslan Baratov via CMake
On 30-Jul-15 20:36, Bill Hoffman wrote: On 7/30/2015 11:56 AM, Dan Kegel wrote: I believe the latter, but not the former. I never use the GUI, and consider the cache an anti-feature there solely to support GUI users. It complicates my life, and I'd love to see it go. It is certainly not there

Re: [CMake] [cmake-developers] CMake IR

2015-07-31 Thread Ruslan Baratov via CMake
On 31-Jul-15 19:43, Bill Hoffman wrote: On 7/31/2015 12:33 PM, Ruslan Baratov wrote: > rm -rf _builds > cmake -H. -B_builds > cmake -H. -B_builds -DA=ON > grep '\' _builds/CMakeCache.txt B:STRING=There is no A I'm not saying cache is a bad idea, I'm just saying that whe

Re: [CMake] [cmake-developers] CMake IR

2015-07-31 Thread Ruslan Baratov via CMake
On 31-Jul-15 19:44, Daniel Schepler wrote: This seems to work for me: set(CMAKE_BUILD_TYPE_INIT RelWithDebInfo) By the way you need to set it before first 'project' command. Also it will not have any effects for multi-config generators like Xcode or Visual Studio. -- Powered by www.kitware.co

Re: [CMake] Best way to handle application data path for local run vs. installation

2015-11-30 Thread Ruslan Baratov via CMake
On 30-Nov-15 09:10, Dmitry Marakasov wrote: Hi! This question bugs me for a long time so I though maybe someone has a solution. I have a project which includes an application and some data for it. An application needs to know path to its data files, so I pass it via compiler definition: ADD_DEFI

Re: [CMake] Best way to handle application data path for local run vs. installation

2015-11-30 Thread Ruslan Baratov via CMake
On 01-Dec-15 03:51, Alexander Neundorf wrote: On Monday, November 30, 2015 16:13:03 Ruslan Baratov via CMake wrote: > On 30-Nov-15 09:10, Dmitry Marakasov wrote: > > Hi! > > ... > > The best solution would be for cmake to fix path in executable file > > right af

Re: [CMake] Best way to handle application data path for local run vs. installation

2015-12-01 Thread Ruslan Baratov via CMake
On 02-Dec-15 05:13, Alexander Neundorf wrote: On Tuesday, December 01, 2015 07:17:35 Ruslan Baratov wrote: > On 01-Dec-15 03:51, Alexander Neundorf wrote: > > On Monday, November 30, 2015 16:13:03 Ruslan Baratov via CMake wrote: > > > On 30-Nov-15 09:10, Dmitry Marakasov

Re: [CMake] Best way to handle application data path for local run vs. installation

2015-12-01 Thread Ruslan Baratov via CMake
On 02-Dec-15 12:27, Ruslan Baratov via CMake wrote: If you pass "/usr/local" output will be (nice): -- /usr/local -- If you pass "/home/username", output will be (nice): /home/username -

Re: [CMake] Best way to handle application data path for local run vs. installation

2015-12-02 Thread Ruslan Baratov via CMake
On 03-Dec-15 04:34, Alexander Neundorf wrote: On Wednesday, December 02, 2015 12:27:42 Ruslan Baratov wrote: > On 02-Dec-15 05:13, Alexander Neundorf wrote: ... > > well, the RPATH entry was not designed to be patched, > > RPATH designed to be patched. And since it's a third time I'm making

Re: [CMake] Best way to handle application data path for local run vs. installation

2015-12-03 Thread Ruslan Baratov via CMake
On 03-Dec-15 16:59, Johannes Zarl-Zierl wrote: I.e. it could be replaced with a string of the same length or a shorter one, but not a longer one. CMake works around this by extending the build RPATH artificially with ":" at the end I think, patchelf works around this by making the whole executab

Re: [CMake] Best way to handle application data path for local run vs. installation

2015-12-03 Thread Ruslan Baratov via CMake
On 04-Dec-15 03:47, Alexander Neundorf wrote: On Thursday, December 03, 2015 09:27:29 Ruslan Baratov via CMake wrote: > On 03-Dec-15 04:34, Alexander Neundorf wrote: > > On Wednesday, December 02, 2015 12:27:42 Ruslan Baratov wrote: > > If RPATH was _designed_ to be patchab

Re: [CMake] How to set environment variables with spaces in commands

2015-12-10 Thread Ruslan Baratov via CMake
On 10-Dec-15 12:52, Attila Krasznahorkay wrote: Hi QP, Probably not the intended solution, but what I’m doing in such cases is that in a patch step I create a shell script that does the configuration for me. With all the environment settings and everything. Like: PATCH_COMMAND ${CMAKE_COMMAND

Re: [CMake] Tests with assert and Release build type

2015-12-18 Thread Ruslan Baratov via CMake
How about using RelWithDebInfo? See: http://stackoverflow.com/a/28124715/2288008 Ruslo On 18-Dec-15 20:55, Magnus Therning wrote: I'm sure I'm not the first one to run into the conflict between a desire to test the code shipped to customers and the desire to at the same time define NDEBUG to m

Re: [CMake] Tests with assert and Release build type

2015-12-21 Thread Ruslan Baratov via CMake
On 20-Dec-15 01:31, Magnus Therning wrote: Ruslan Baratov writes: How about using RelWithDebInfo? See: http://stackoverflow.com/a/28124715/2288008 Hmm, I'm probably missing something but how does that solve the issue with some targets requiring NDEBUG to be *undefined* and other targets requir

Re: [CMake] Tests with assert and Release build type

2015-12-23 Thread Ruslan Baratov via CMake
On 22-Dec-15 04:07, Magnus Therning wrote: Ruslan Baratov writes: On 20-Dec-15 01:31, Magnus Therning wrote: Ruslan Baratov writes: How about using RelWithDebInfo? See: http://stackoverflow.com/a/28124715/2288008 Hmm, I'm probably missing something but how does that solve the issue with som

Re: [CMake] Tests with assert and Release build type

2015-12-24 Thread Ruslan Baratov via CMake
On 24-Dec-15 19:46, Magnus Therning wrote: I'm *not* mixing stuff built with `-g` and stuff built without it. Actually I don't see anything bad about mixing `-g` code with code without `-g`. I'm also *not* mixing linking with debug- and non-debug libraries. Since we cover a lot of aspects

Re: [CMake] CMake based package manager

2016-01-11 Thread Ruslan Baratov via CMake
On 11-Jan-16 18:42, Cristian Adam wrote: Ruslan Baratov via CMake writes: Hi, I'm developing a project that is a kind of wrapper of ExternalProject_Add and allow it to be more reusable. User interface is quite simple. For anybody interested, here is a github project: * https://githu

Re: [CMake] What is the best way to handle Boost dependencies in a package config file

2016-01-26 Thread Ruslan Baratov via CMake
On 27-Jan-16 09:54, Johnson, Matt (GE Healthcare) wrote: I like package config files. I want to use more of them. However, I have a dependency on boost. While boost has a Find module, it doesn't have a package config file. I'm not going to be able to depend on the users of my package build

Re: [CMake] What is the best way to handle Boost dependencies in a package config file

2016-01-27 Thread Ruslan Baratov via CMake
On 27-Jan-16 20:08, Johnson, Matt (GE Healthcare) wrote: -Original Message- From: Ruslan Baratov [mailto:ruslan_bara...@yahoo.com] Sent: Wednesday, January 27, 2016 2:18 AM To: Johnson, Matt (GE Healthcare) Cc: cmake@cmake.org Subject: Re: [CMake] What is the best way to handle Boost depe