Re: [CMake] Question about list ordering

2019-11-12 Thread Eric Doenges
The list command is what you want. Specifically, list(GET ...) will return the index of a string in the list, and list(INSERT ...) and list(REMOVE_ITEM ...) or list(REMOVE_AT ...) to insert and remove items. Am 13.11.19 um 00:56 schrieb U

[CMake] Question about list ordering

2019-11-12 Thread Unnamed User
Hello everyone, i'm relative new to CMake and i need a function that does change the order of a list. So for example when i have a list like set(LIBS_TO_BUILD "BOOST;EIGEN;PYTHON;GLUT;GLFW;NLOHMANNJSON") i need a function to swap places like listSwapString("GLUT", "GLFW", ${LIBS_TO_BUILD}).

Re: [CMake] question about version details in source code

2019-07-17 Thread Eric Doenges
Am 17.07.19 um 15:38 schrieb hex: hello community, I am receiving a|fatal error: foobar_version.h: No such file or directory|for|foobar_version.h|. The reason is that the source file is generated in|${CMAKE_CURRENT_BINARY_DIR}/foobar_version.cpp|while the header file is in|${CMAKE_CURRENT_SO

[CMake] question about version details in source code

2019-07-17 Thread hex
hello community, I am receiving a|fatal error: foobar_version.h: No such file or directory|for|foobar_version.h|. The reason is that the source file is generated in|${CMAKE_CURRENT_BINARY_DIR}/foobar_version.cpp|while the header file is in|${CMAKE_CURRENT_SOURCE_DIR}|as seen here: 1234|confi

Re: [CMake] Question about getting git branch name.

2019-06-13 Thread Marc Herbert
Try: git describe --all or git describe --all --dirty --long git help describe PS: a git branch is effectively a *moving* tag so for a BUILD_VERSION it seems wrong to rely on branches (--all) instead of tags. I think you mean BUILD_BRANCH instead of BUILD_VERSION. Le sam. 8 juin 2019 à 15:25, Ste

Re: [CMake] Question about getting git branch name.

2019-06-10 Thread Juan Sanchez
Hello, https://stackoverflow.com/questions/1417957/show-just-the-current-branch-in-git suggests: git rev-parse --abbrev-ref HEAD Regards, Juan On Sat, Jun 8, 2019 at 5:25 PM Steven Truppe wrote: > Hi everyone, > > i want to have code lines like: > > #define BUILD_VERSION > > and the BUILD_

Re: [CMake] Question about config_file.

2019-06-10 Thread Petr Kmoch
Hi Steven. "what is the configure_file command for?" https://cmake.org/cmake/help/latest/command/configure_file.html "what is Doxygen.in?" Check its contents at wherever you found the example for details, but it should be a template for the Doxygen configuration file (the config file read by Do

Re: [CMake] Question about a simple macro.

2019-06-09 Thread Steven Truppe
Problem solved - thanks anyway... On 09.06.19 09:11, Steven Truppe wrote: How on earth can i create a variables out of the string flags_to_add ??? On 09.06.19 08:41, Steven Truppe wrote: OK, i don't realy understand why it does work but i got it working: include(CMakePrintHelpers) macro(b

Re: [CMake] Question about a simple macro.

2019-06-09 Thread Steven Truppe
How on earth can i create a variables out of the string flags_to_add ??? On 09.06.19 08:41, Steven Truppe wrote: OK, i don't realy understand why it does work but i got it working: include(CMakePrintHelpers) macro(bsMergeFlags flags_to_add flags)     set(flags_to_add ${flags_to_add} ${ARGN}

Re: [CMake] Question about a simple macro.

2019-06-08 Thread Steven Truppe
OK, i don't realy understand why it does work but i got it working: include(CMakePrintHelpers) macro(bsMergeFlags flags_to_add flags)     set(flags_to_add ${flags_to_add} ${ARGN} )     cmake_print_variables(flags_to_add)     message(STATUS "bsMergeFlags ${flags_to_add}")     list(APPEND flags ${

Re: [CMake] Question about a simple macro.

2019-06-08 Thread Steven Truppe
ARGV1 gives me the first list entry of my first arguments, but i don't know how i can access the hole list. best regards! On 09.06.19 07:20, Steven Truppe wrote: Do i need cmake_parse_arguments ?? On 09.06.19 07:01, Steven Truppe wrote: Hi everyone, i'm a c,c++,asm and a few other languages

Re: [CMake] Question about a simple macro.

2019-06-08 Thread Steven Truppe
Do i need cmake_parse_arguments ?? On 09.06.19 07:01, Steven Truppe wrote: Hi everyone, i'm a c,c++,asm and a few other languages, but i still have troubles with macros and their arguments. As a simple example i would like to have a macro that list(APPEND the two passed arguments), here the co

[CMake] Question about a simple macro.

2019-06-08 Thread Steven Truppe
Hi everyone, i'm a c,c++,asm and a few other languages, but i still have troubles with macros and their arguments. As a simple example i would like to have a macro that list(APPEND the two passed arguments), here the code i tried: https://wandbox.org/permlink/WQZGty9PQaOz3422. Let's forget ab

Re: [CMake] Question about getting git branch name.

2019-06-08 Thread J Decker
On Sat, Jun 8, 2019 at 3:25 PM Steven Truppe wrote: > Hi everyone, > > i want to have code lines like: > > #define BUILD_VERSION > > and the BUILD_VERSION should be the name of the actual branch the code > was compiled with, this way i can create a branch for each version and > name it like 0.1 s

[CMake] Question about getting git branch name.

2019-06-08 Thread Steven Truppe
Hi everyone, i want to have code lines like: #define BUILD_VERSION and the BUILD_VERSION should be the name of the actual branch the code was compiled with, this way i can create a branch for each version and name it like 0.1 so each version i'm using for release is an own branch. I found many

[CMake] Question about config_file.

2019-06-08 Thread Steven Truppe
Hi everyone, currently i'm trying to build my doxygen documentation from my CMakeLists.txt file. I found the following example that seems to be correct: ## ## bsBuildDoxygen() ## ## macro(bsBuildDocs) if(GENERATE_DOCS) # check if Do

Re: [CMake] Question about looping inside a macro.

2019-06-04 Thread Bruce Stephens
This works: macro(bsPrintList) foreach(l ${ARGN}) message(STATUS "List entry: ${l}") endforeach() endmacro() bsPrintList(foo bar baz) On Tue, 4 Jun 2019 at 22:14, Steven Truppe wrote: > > Hi everyone, like you know i'm relative new the cmake and i'm working my way > through the book and

[CMake] Question about looping inside a macro.

2019-06-04 Thread Steven Truppe
Hi everyone, like you know i'm relative new the cmake and i'm working my way through the book and the documentation but there is something that i don't understand in the docs. I just want to write a macro that uses as first argument a list and then iterates over it. The docs show the example: m

Re: [CMake] Question about regular expressions

2019-06-04 Thread Kyle Edwards via CMake
On Tue, 2019-06-04 at 16:39 +0200, Steven Truppe wrote: > Hi everyone, > > > i had the same question a few days ago but can't rember the command > (and > can't find it in the cods): > > I have a regular expression like "WITH_LIB${lib}_EXAMPLE_([A-Za-z]+)" > and i want the get the content of the

[CMake] Question about regular expressions

2019-06-04 Thread Steven Truppe
Hi everyone, i had the same question a few days ago but can't rember the command (and can't find it in the cods): I have a regular expression like "WITH_LIB${lib}_EXAMPLE_([A-Za-z]+)" and i want the get the content of the found variables in the (), the command i used stored them if MATCH_XYZ bu

Re: [CMake] Question about running C code from within cmake

2019-06-03 Thread Eric Doenges
The easiest way to get the number of cores on your Windows build machine from within CMake is to get the value of the NUMBER_OF_PROCESSORS environment variable using $ENV{NUMBER_OF_PROCESSORS}. Am 02.06.19 um 14:16 schrieb Steven Truppe: Hi everyone, i'm trying to search for a way for win32

Re: [CMake] Question about running C code from within cmake

2019-06-02 Thread Andrew Maclean
ven Truppe > To: CMake MailingList > Cc: > Bcc: > Date: Sun, 2 Jun 2019 14:16:53 +0200 > Subject: [CMake] Question about running C code from within cmake > > Hi everyone, > > > i'm trying to search for a way for win32 to get the cpu core count. i > found the

Re: [CMake] Question about running C code from within cmake

2019-06-02 Thread Michael Ellery
have a look at https://cmake.org/cmake/help/latest/module/ProcessorCount.html If you still think you really need to compile/run code for this, have a look at https://cmake.org/cmake/help/latest/command/try_run.html#command:try_run, but that is harder to get working and maintain. > On Jun 2, 201

Re: [CMake] Question about properties.

2019-06-02 Thread Michael Ellery
I think you can refer to https://cmake.org/cmake/help/latest/manual/cmake-properties.7.html or “cmake —help-properties”. > On Jun 2, 2019, at 5:07 AM, Steven Truppe wrote: > > Hi again, > > > i'm reading up on properties and i see how to use set_properties and > get_properties but i don't

[CMake] Question about running C code from within cmake

2019-06-02 Thread Steven Truppe
Hi everyone, i'm trying to search for a way for win32 to get the cpu core count. i found the c code: |SYSTEM_INFO sysinfo;GetSystemInfo(&sysinfo);intnumCPU =sysinfo.dwNumberOfProcessors; Is there a way i can get the return value numCPU and create a variable out of it ? for apple and linux i all

[CMake] Question about properties.

2019-06-02 Thread Steven Truppe
Hi again, i'm reading up on properties and i see how to use set_properties and get_properties but i don't know how i can find out which properties exists for each entry (GLOBAL, DIRECTORY, TARGET, SOURCE, ...). How can i retrieve a property if i don't have a list with all available properties

[CMake] Question about INSTALL and cpack

2019-06-02 Thread Steven Truppe
Hi everyone, i'm relative new the cmake and i'm asking myself if i need the install command for ExternalProject_Add() since these commands also "install" the libraries needed at runtime. Or do i need the install command only for targets that i want to compile ? best regards! -- Powered by w

Re: [CMake] Question about Variables

2019-05-31 Thread Robert Maynard via CMake
The `${ }` syntax deferences the variable, so what you are asking is if the variable `1_INC_PATH` exists. What you want is `if(DEFINED WITH_LIB_GLAD_INC_PATH)` to check for the existence of the variable `WITH_LIB_GLAD_INC_PATH` On Fri, May 31, 2019 at 4:11 PM Steven Truppe wrote: > > Hi everyone

[CMake] Question about Variables

2019-05-31 Thread Steven Truppe
Hi everyone, i'm relative new to cmake (a few weeks now) and i have the following problem: set(WITH_LIB_GLAD 1) IF(DEFINED ${WITH_LIB_GLAD}_INC_PATH) I try to check if the variable WITH_LIB_GLAD_INC_PATH can be found. best regards! -- Powered by www.kitware.com Please keep messages on-

Re: [CMake] Question about IF and STRINGS

2019-05-31 Thread Steven Truppe
Found the problem, my regex was wrong [AZaz] should be [A-Za-z] ... On 31.05.19 19:07, Steven Truppe wrote: The problem is the line: if(${_var} MATCHES "^WITH_LIB_([AZaz]+)$") cmake_print_variables(CMAKE_MATCH_0) doesn't print me any output ... On 31.05.19 18:53, Steven Truppe wrote: Hi e

Re: [CMake] Question about IF and STRINGS

2019-05-31 Thread Kyle Edwards via CMake
On Fri, 2019-05-31 at 19:07 +0200, Steven Truppe wrote: > The problem is the line: > if(${_var} MATCHES "^WITH_LIB_([AZaz]+)$") > cmake_print_variables(CMAKE_MATCH_0) > > doesn't print me any output ... There are two problems with the following line: if(${_var} MATCHES "^WITH_LIB_([AZaz]+)$") T

Re: [CMake] Question about IF and STRINGS

2019-05-31 Thread Steven Truppe
The problem is the line: if(${_var} MATCHES "^WITH_LIB_([AZaz]+)$") cmake_print_variables(CMAKE_MATCH_0) doesn't print me any output ... On 31.05.19 18:53, Steven Truppe wrote: Hi everyone, i try to create a build system where you can decide which libraries you want to use with variables li

[CMake] Question about IF and STRINGS

2019-05-31 Thread Steven Truppe
Hi everyone, i try to create a build system where you can decide which libraries you want to use with variables like "WITH_LIB_GLFW" for example. every lib variable has other variables like WITH_LIB_GLFW_INC_PATH, WITH_LIB_GLFW_LIB_PATH, etc. so i can decide with cmake what libraries i'm going t

Re: [CMake] question ? [cmake could not find a include_dir]

2019-05-22 Thread Hendrik Sattler
How about using the same build directory? Am 22. Mai 2019 18:02:28 MESZ schrieb "Agata Krasoń" : >Hello, > >I am trying to build from source an application. >I add in cmake-gui : XIOT_INCLUDE_DIR - path do include dir >When I compile on linux ... >It gives me an error: > >[image: Screenshot_20190

Re: [CMake] Question about find_package

2019-03-16 Thread workbe...@gmx.at
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=862328 On 16.03.19 13:34, workbe...@gmx.at wrote: > > The ClangConfig.cmake file is in /usr/share/llvm4.0/cmake ... > > On 16.03.19 13:11, workbe...@gmx.at wrote: >> Hi everyone, >> >> i'm on debian strech and there is a package called clang-4.0 th

Re: [CMake] Question about find_package

2019-03-16 Thread workbe...@gmx.at
The ClangConfig.cmake file is in /usr/share/llvm4.0/cmake ... On 16.03.19 13:11, workbe...@gmx.at wrote: > Hi everyone, > > i'm on debian strech and there is a package called clang-4.0 that > contains a ClangConfig.cmake in the > > path /usr/local/llvm/cmake but find_package(Clang 4.0 REQUIRED) is

[CMake] Question about find_package

2019-03-16 Thread workbe...@gmx.at
Hi everyone, i'm on debian strech and there is a package called clang-4.0 that contains a ClangConfig.cmake in the path /usr/local/llvm/cmake but find_package(Clang 4.0 REQUIRED) is not able to find it.. it worked the day before.. i don't know what i'm doing wrong here. best regards! pEpkey.

Re: [CMake] Question about find_packages.

2019-03-15 Thread Kyle Edwards via CMake
On Fri, 2019-03-15 at 17:03 +0100, workbe...@gmx.at wrote: > Hi everyone, > > i try to use find_packages for clang, i'm on debian and have > installed > libclang-4.0-dev package, now i've the files in > /usr/lib/llvm4-0/lib/libclang-4.0.so and the include in > /usr/lib/llvm-4.0/include/clang - how

Re: [CMake] Question about find_packages.

2019-03-15 Thread workbe...@gmx.at
I allways get the error: CMake Error at CMakeLists.txt:78 (find_package):   Could not find a package configuration file provided by "Clang" (requested   version 4.0) with any of the following names:     libclang-4.0.soConfig.cmake     libclang-4.0.so-config.cmake   Add the installation prefix of

[CMake] Question about find_packages.

2019-03-15 Thread workbe...@gmx.at
Hi everyone, i try to use find_packages for clang, i'm on debian and have installed libclang-4.0-dev package, now i've the files in /usr/lib/llvm4-0/lib/libclang-4.0.so and the include in /usr/lib/llvm-4.0/include/clang - how can i make find_package find those ?? best regards! pEpkey.asc Desc

Re: [CMake] Question about INSTALL_COMMAND for ExternalProject_Add()

2019-03-10 Thread workbe...@gmx.at
I finally got it working, for other who might have the same problem: You just have to use ExternalProject_Add(ftgl-dl ... ) add_executable(Test01 ${SRC}) add_dependencies(Test01 ftgl-dl) That all! Happy coding! best regards! On 10.03.19 13:20, workbe...@gmx.at wrote: > > I got the

Re: [CMake] Question about INSTALL_COMMAND for ExternalProject_Add()

2019-03-10 Thread workbe...@gmx.at
I got the problem solved again, but now i'm stuck... now i've the following: add_library(glad STATIC IMPORTED) set_target_properties(glad PROPERTIES IMPORTED_LOCATION ${LIB_DIR}/glad/lib/libglad.a) add_library(glfw3 STATIC IMPORTED) set_target_properties(glfw3 PROPERTIES IMPORTED_LOCATION ${LIB_

Re: [CMake] Question about INSTALL_COMMAND for ExternalProject_Add()

2019-03-10 Thread workbe...@gmx.at
I came a step forward, now it looks like this: include(ExternalProject) ExternalProject_Add(glfw3     PREFIX ${CMAKE_BINARY_DIR}/glfw-log     GIT_REPOSITORY https://github.com/glfw/glfw.git     GIT_TAG 3.2.1     SOURCE_DIR ${CMAKE_BINARY_DIR}/glfw     UPDATE_COMMAND ""     PATCH_COMMAND ""     INS

Re: [CMake] Question about INSTALL_COMMAND for ExternalProject_Add()

2019-03-10 Thread workbe...@gmx.at
Now i've managed to create the right INSTALL_COMMAND but i don't know how to link with my executable. i tried add_executable(MyApp ${src}) target_link_libraries(MyApp STATIC GLFW GLAD) and i get the following error message: CMake Error at CMakeLists.txt:96 (target_link_libraries):   Target "LIB

[CMake] Question about INSTALL_COMMAND for ExternalProject_Add()

2019-03-10 Thread workbe...@gmx.at
Hi everyone, i've managed to use ExternalProject_Add to install GLFW but i have troubles with glad... Here is my code for GLFW wich is working: include(ExternalProject) ExternalProject_Add(GLFW     PREFIX ${LIBDIR}/${CMAKE_BUILD_TYPE}/glfw-log     GIT_REPOSITORY https://github.com/glfw/glfw.git

Re: [CMake] Question about set

2019-02-18 Thread workbe...@gmx.at
Thank you. On 18.02.19 21:46, Craig Scott wrote: On Tue, Feb 19, 2019 at 4:16 AM Kyle Edwards via CMake mailto:cmake@cmake.org>> wrote: On Mon, 2019-02-18 at 17:59 +0100, Andreas Naumann wrote: > Hey, > > I would introduce a list with the allowed values and introduce a >

Re: [CMake] Question about set

2019-02-18 Thread Craig Scott
On Tue, Feb 19, 2019 at 4:16 AM Kyle Edwards via CMake wrote: > On Mon, 2019-02-18 at 17:59 +0100, Andreas Naumann wrote: > > Hey, > > > > I would introduce a list with the allowed values and introduce a > > macro > > "checked_set", which tests the setting or aborts. > > > > Regards, > > Andreas"

Re: [CMake] Question about functions

2019-02-18 Thread Andreas Naumann
Am 18.02.19 um 20:43 schrieb workbe...@gmx.at: Hi everyone, i have a function like: FUNCTION(checksyste_64Bit arg1)     IF(CMAKE_SIZEOF_VOID_P EQUAL 8)         SET(${arg1} TRUE PARENT_SCOPE) ENDFUNCTION() but when i call it with an INTERNAL variable i've set before with SET(SYSTEM_64BIT F

[CMake] Question about functions

2019-02-18 Thread workbe...@gmx.at
Hi everyone, i have a function like: FUNCTION(checksyste_64Bit arg1)     IF(CMAKE_SIZEOF_VOID_P EQUAL 8)         SET(${arg1} TRUE PARENT_SCOPE) ENDFUNCTION() but when i call it with an INTERNAL variable i've set before with SET(SYSTEM_64BIT FALSE CACHE INTERNAL) checksystem_64bit(${SYSTEM

Re: [CMake] Question about set

2019-02-18 Thread workbe...@gmx.at
I need it for an INTERNAL variable, for the different android architecture types that are supported. so he can only set one of the available arch types. On 18.02.19 18:16, Kyle Edwards wrote: On Mon, 2019-02-18 at 17:59 +0100, Andreas Naumann wrote: Hey, I would introduce a list with the al

Re: [CMake] Question about set

2019-02-18 Thread Kyle Edwards via CMake
On Mon, 2019-02-18 at 17:59 +0100, Andreas Naumann wrote: > Hey, > > I would introduce a list with the allowed values and introduce a > macro  > "checked_set", which tests the setting or aborts. > > Regards, > Andreas" > > Am 18.02.19 um 15:06 schrieb workbe...@gmx.at: > > > > Hi everyone, > >

Re: [CMake] Question about set

2019-02-18 Thread Andreas Naumann
Hey, I would introduce a list with the allowed values and introduce a macro "checked_set", which tests the setting or aborts. Regards, Andreas Am 18.02.19 um 15:06 schrieb workbe...@gmx.at: Hi everyone, i've looked the web but found no result. I need a string variable that allows only cert

Re: [CMake] Question about CMAKE_MODULE_PATH

2019-02-18 Thread Kyle Edwards via CMake
On Mon, 2019-02-18 at 16:50 +0100, workbe...@gmx.at wrote: > Doesn't the content of CMAKE_MODULE_PATH should also include the path > to  > the default modules ?? The default modules are automatically checked by CMake, independently of the contents of CMAKE_MODULE_PATH. They should not normally be

Re: [CMake] Question about CMAKE_MODULE_PATH

2019-02-18 Thread workbe...@gmx.at
Doesn't the content of CMAKE_MODULE_PATH should also include the path to the default modules ?? On 18.02.19 16:48, workbe...@gmx.at wrote: Hi everyone, i try to load custom modules. i use list(append CMAKE_MODULE_PATH "/mypathtomdoules") and then i try to load the module with include(mymo

[CMake] Question about CMAKE_MODULE_PATH

2019-02-18 Thread workbe...@gmx.at
Hi everyone, i try to load custom modules. i use list(append CMAKE_MODULE_PATH "/mypathtomdoules") and then i try to load the module with include(mymodule) but he can't find it. now i tried to output the content of CMAKE_MODULE_PATH with the cmake_print_variable from the CMakePrintHelpers

[CMake] Question about set

2019-02-18 Thread workbe...@gmx.at
Hi everyone, i've looked the web but found no result. I need a string variable that allows only certain values, like bool variables only allow true/false my string should be either "A" or "B" ... best regards! -- Powered by www.kitware.com Please keep messages on-topic and check the CMake

[CMake] Question about searching for another toolchain

2019-02-16 Thread workbe...@gmx.at
Hello everyone, i'm realtively new to CMake and i find it awesome, the best building system ever ! Now to my question: I want to support either intel or amd specific functions in my application, that means i need either the amd or the intel sdk, i know how i can set another toolchain and st

Re: [CMake] Question about eclipse

2018-02-10 Thread Martin Weber
On Donnerstag, 8. Februar 2018 02:42:13 CET jaeho jo wrote: > Hi! I have a Question aboue eclipse. > > I have a one C project in eclipse. > > I have built this project only using eclipse so far. > > I want to build thid C project using cmake > > Should I write the CMakeLists.txt file myself??

[CMake] Question about eclipse

2018-02-07 Thread jaeho jo
Hi! I have a Question aboue eclipse. I have a one C project in eclipse. I have built this project only using eclipse so far. I want to build thid C project using cmake Should I write the CMakeLists.txt file myself?? or Is there a way to set CMake build environment automatically? I can find m

Re: [CMake] Question about strange Android behavior

2017-06-29 Thread Jim Borden
Broadbent Date: Friday, June 30, 2017 8:36 To: "cmake@cmake.org" Subject: Re: [CMake] Question about strange Android behavior We hit this on android too, and moved across to using std::numeric_limits in our code. The root cause for us was differences between the C standard libraries on an

Re: [CMake] Question about strange Android behavior

2017-06-29 Thread Christopher Broadbent
We hit this on android too, and moved across to using std::numeric_limits in our code. The root cause for us was differences between the C standard libraries on android, and the one we were running on Linux. https://stackoverflow.com/questions/986426/what-do-stdc-limit-macros-and-stdc-constant-

[CMake] Question about strange Android behavior

2017-06-29 Thread Jim Borden
I’m not sure what the state of Android support is (there is the documentation on the CMake page, and then there is the documentation on the Android page which is different) but I wanted to point out a weird difference in behavior between CMake 3.7.2 and CMake 3.8.2 and ask about it. My project

Re: [CMake] Question about transitive deps and static libs.

2017-04-18 Thread Petr Kmoch
Hi, I will offer an alternative phrasing based on what makes me personally understand this best. It might potentially be useful for the documentation update you're planning. `target_link_libraries(A B)` specifies that the code in A needs B to be added to the produced binary when the binary is *li

Re: [CMake] Question about transitive deps and static libs.

2017-04-18 Thread Eric Noulard
Answering to myself. This mail by Craig explains a lot: https://cmake.org/pipermail/cmake/2016-May/063400.html Sorry for the noise. I guess I have my answer in there. I'll try to propose a documentation update based on Craig's explanation because, https://cmake.org/cmake/help/v3.8/manual/cmake-bu

[CMake] Question about transitive deps and static libs.

2017-04-18 Thread Eric Noulard
I have a question concerning the transitive linking of dependence and static libs. I'm working a on prokect where some shared lib are linked to static lib (do not ask me why). So I do: set(CMAKE_POSITION_INDEPENDENT_CODE True) then I have a bunch of libraries (either static or shared) which depe

Re: [CMake] Question regarding CUDA support in CMake 3.8.0-rc2

2017-03-17 Thread Robert Maynard
A good starting spot would be the tests in CMake itself for CUDA support: https://gitlab.kitware.com/cmake/cmake/tree/master/Tests/Cuda https://gitlab.kitware.com/cmake/cmake/tree/master/Tests/CudaOnly On Thu, Mar 16, 2017 at 1:58 PM, Nick Henderson wrote: > Thank you! > > Setting: > > set(CMAKE

Re: [CMake] Question regarding CUDA support in CMake 3.8.0-rc2

2017-03-16 Thread Nick Henderson
Thank you! Setting: set(CMAKE_CUDA_FLAGS "-arch compute_30 ${CMAKE_CUDA_FLAGS}") did the trick. Is there any documentation or example projects related to the new CUDA support? CUDA support is great to have and will simplify my build system! Thank you. -- View this message in context: http

Re: [CMake] Question regarding CUDA support in CMake 3.8.0-rc2

2017-03-16 Thread Robert Maynard
Hi, The purpose of the cmake_device_link.o is to resolve device side symbols when doing separable compilation. We do this device linking step for all CUDA enabled targets as it makes the internal CMake to logic significantly easier ( no need to propagate another property through the graph, etc ).

[CMake] Question regarding CUDA support in CMake 3.8.0-rc2

2017-03-15 Thread Nick Henderson
Hello! I am testing out the CUDA support in CMake 3.8.0-rc2. When running `make VERBOSE=1` in the build directory, I get a warning generated related to the GPU architecture flags for nvcc: ``` [ 80%] Linking CUDA device code /home/nwh/git/foobar/build/exec/CMakeFiles/exec.dir/cmake_device_link.o

[CMake] Question about CHECK_C_COMPILER_FLAG

2016-06-17 Thread Sergei Nikulov
Hi All, I have a question about CHECK_C_COMPILER_FLAG behaviour. Documentation will tell that "the compiler does not give an error message when it encounters the flag". Unfortunately, it not only compiles but try to link executable. If linker fails, due missed libraries it also does not produce

[CMake] Question on pathes/names of generated lib (CMake 3.5.1, Visual Studio 2015 - x64)

2016-04-13 Thread Martin Maurer
Hi, I am trying to use CMake on a open source project called cryptominisat ( https://github.com/msoos/cryptominisat ) which is initially developed under Linux, but is meanwhile partly ported to Windows. Source can already compiled (with a batch file) and run, but not yet completely with cmake.

Re: [CMake] Question on usage of cmake on Windows with clang

2016-02-08 Thread Cristian Adam
On Mon, Feb 8, 2016 at 1:56 PM, Victor Leschuk wrote: > Hello, I am trying to use clang with cmake on Windows. > > I have compiled LLVM+clang using Visual Studio 2015. And now I am facing > problems with building cmake projects using this clang. It looks like cmake > is trying to pass wrong optio

[CMake] Question on usage of cmake on Windows with clang

2016-02-08 Thread Victor Leschuk
Hello, I am trying to use clang with cmake on Windows. I have compiled LLVM+clang using Visual Studio 2015. And now I am facing problems with building cmake projects using this clang. It looks like cmake is trying to pass wrong options to linker. Here simple test project: $ cat CMakeLists.tx

Re: [CMake] Question about the "logic" behind Utilities/KWIML/INT.h.in statement: @KWIML@_INT__VERIFY_TYPE(@KWIML@_INT_intptr_t, sizeof(void*));

2015-11-05 Thread Custin, Jay (CSC Sw Middleware)
Probably a moot question at this point... I posed the same question to some of the language/compiler experts at HPE and got the following explanation: Looking quickly, I suspect that he is not using the /pointer=long qualifier at compile time. The default pointer size is 32-bit (4 bytes), but th

[CMake] Question about the "logic" behind Utilities/KWIML/INT.h.in statement: @KWIML@_INT__VERIFY_TYPE(@KWIML@_INT_intptr_t, sizeof(void*));

2015-11-05 Thread Custin, Jay (CSC Sw Middleware)
>From INT.h.in: 828 #if !defined(@KWIML@_INT_NO_INTPTR_T) 829 @KWIML@_INT__VERIFY_TYPE(@KWIML@_INT_intptr_t, sizeof(void*)); 830 #endif 831 #if !defined(@KWIML@_INT_NO_UINTPTR_T) 832 @KWIML@_INT__VERIFY_TYPE(@KWIML@_INT_uintptr_t, sizeof(void*)); 833 #endif Now this state

[CMake] Question about loading Toolchain files

2015-05-26 Thread Murali Paluru
Hi, The current way of specifying a toolchain file is during the configure step via the command line. mkdir /tmp/build && cd /tmp/build cmake -DCMAKE_TOOLCHAIN_FILE=/path/to/toolchain.cmake /path/to/source In the project that I am working on I need to load different toolchain files depending on

[CMake] -question-

2015-05-19 Thread Andrew Bostick
Dear CMake users *I installed the newest version of cmake (3.2.2).* *Than I used *Installation guide for GROMACS 5.0.5: (*Quick and dirty *installation ) http://www.gromacs.org/Documentation/Installa

Re: [CMake] Tiny cmake question

2015-05-11 Thread J Decker
On Mon, May 11, 2015 at 3:05 PM, Alexey Petruchik < alexey.petruc...@gmail.com> wrote: > Is it possible to rewrite: > > if (${OPENSSL_FOUND}) > option(USE_OUR_OWN_MD5 "Build using own md5 implementation" OFF) > else() > option(USE_OUR_OWN_MD5 "Build using own md5 implementation" ON) > endif() > >

[CMake] Tiny cmake question

2015-05-11 Thread Alexey Petruchik
Is it possible to rewrite: if (${OPENSSL_FOUND}) option(USE_OUR_OWN_MD5 "Build using own md5 implementation" OFF) else() option(USE_OUR_OWN_MD5 "Build using own md5 implementation" ON) endif() in one line? Something like: option(USE_OUR_OWN_MD5 "Build using own md5 implementation" NOT OPENSSL_FO

Re: [CMake] Question regarding External Project add and VTK

2014-08-08 Thread jmerkow
Ahh, I believe I answered my own question. There seems to be a new function, ExternalProject_Install_CMake, Im testing it out now. Thanks! -Jameson On Thu, Aug 7, 2014 at 2:19 PM, jmerkow [via CMake] < ml-node+s3232098n7588095...@n2.nabble.com> wrote: > Jc, > > I guess I spoke too soon on my

Re: [CMake] Question regarding External Project add and VTK

2014-08-07 Thread jmerkow
Jc, I guess I spoke too soon on my 'last question.' How does make install work with this superbuild system. Looking at slicer and ctk, they seem to set INSTALL_COMMAND to "" in their superbuild.cmake, but presumably these packages still install even with superbuild mode on. Can you offer any adv

Re: [CMake] Question of using cmake in Windows

2014-06-23 Thread John Drescher
> Ok, run cmake -G "MinGW Makefiles" > -DCMAKE_C_COMPILER=/c/mingw-w64-4.9.0/mingw64/bin > I got this error: > CMake Error: the source directory does not appear to contain > CMakeLists.txt > > What I am missing? > You are not passing the folder of the source. John -- Powered by www.kitware

Re: [CMake] Question of using cmake in Windows

2014-06-23 Thread jici gao
Ok, run cmake -G "MinGW Makefiles" -DCMAKE_C_COMPILER=/c/mingw-w64-4.9.0/mingw64/bin I got this error: CMake Error: the source directory does not appear to contain CMakeLists.txt What I am missing? Thanks again! On Mon, Jun 23, 2014 at 9:32 AM, Bill Hoffman wrote: > On 6/23/2014 12:24 PM

Re: [CMake] Question of using cmake in Windows

2014-06-23 Thread Bill Hoffman
On 6/23/2014 12:24 PM, jici gao wrote: So why only cmake gui version works for me, not the cmake command? Use the -G option to the cmake on the command line to pick a generator. cmake --help should list the ones supported by your version of cmake. -Bill -- Powered by www.kitware.com Plea

[CMake] Question of using cmake in Windows

2014-06-23 Thread jici gao
Hi, I am using cmake (3.0.0) to setup environment for my compiling on Windows and require mingw-w64 compiler. I pretty much followed your instruction with Method 2 here: http://www.cmake.org/Wiki/CMake_FAQ#How_do_I_use_a_different_compiler.3F But cmake output always showed that it is building for

Re: [CMake] Question regarding External Project add and VTK

2014-06-19 Thread jmerkow
Jc, Thank you! This is what Im looking for. I've been having some trouble with these paths in other places too ([1]), but haven't had the time to go back and redo it. -Jameson [1] http://cmake.3232098.n2.nabble.com/CMAKE-RUNTIME-OUTPUT-DIRECTORY-inconsistent-between-make-and-Xcode-td7586922.ht

Re: [CMake] Question regarding External Project add and VTK

2014-06-19 Thread Jean-Christophe Fillion-Robin
Hi Jameson, There is indeed a recipe, assuming you are using ExternalProjectDependency.cmake from Artichoke [1], if you pass the variable to your project using ${CMAKE_CFG_INTDIR} it will be automatically passed as CMAKE_ARGS (instead of CMAKE_CACHE_ARGS) to external project and it will be expende

Re: [CMake] Question regarding External Project add and VTK

2014-06-15 Thread jmerkow
Ok I have one final question. One of the project is built using CMake but does not contain a config file. On unix systems (make file based generators) it works fantastic, but with windows (and I presume xcode), the libraries are output to the buildtype directory. i.e. Debug/ or Release/. I can a

Re: [CMake] Question regarding External Project add and VTK

2014-06-09 Thread Jameson Merkow
Jc, I'm working on an open source project, but we're no quite ready to release it to the world yet.  We will likely post it on github or another hosting website (publicly) in the coming months and I'll be sure to let you know. We are looking at an early fall release date.  Jameson — Sent

Re: [CMake] Question regarding External Project add and VTK

2014-06-09 Thread Jean-Christophe Fillion-Robin
Hi Jameson, Glad to know you sorted out the issue. By any chance, do you think you could share a link to a github repository with your project ? That would allow us to review how you integrated "ExternalProjectDependency" and improve it. Thanks Jc On Sun, Jun 8, 2014 at 9:39 PM, jmerkow wrote

Re: [CMake] Question regarding External Project add and VTK

2014-06-08 Thread jmerkow
Ok, So I've converted my project to a super build system with ExternalProjectDependency. I ended up going through and re writing most of my project (most of it was written while I was learning CMake and was pretty ugly). It is extremely useful. It seems that superbuilds are very popular, it seems

Re: [CMake] Question regarding External Project add and VTK

2014-06-04 Thread David Cole
P.S. I'm thinking we may want to move this off the CMake mailing list? Some of us are lurking and reading this thread with interest... It would be ok to keep it on the CMake mailing list unless it goes on an entirely non-ExternalProject tangent. :-) David C. -- Powered by www.kitware.com

Re: [CMake] Question regarding External Project add and VTK

2014-06-03 Thread jmerkow
Jc, Im been updating my CMakeLists.txt to do this superbuild. But I am running into an error. Im not sure why... My project is something like the following: cmake_minimum_required(VERSION 2.8.8) set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake"

Re: [CMake] Question regarding External Project add and VTK

2014-06-02 Thread Jean-Christophe Fillion-Robin
Hi Jameson, That is indeed the idea. To clarify even further, 1) the call to ExternalProject_Include_Dependencies [1] should be added before "ExternalProject_Add". It will recursively include the needed dependencies. 2) By simply adding an additional parameter: by default ${_EP_AR

Re: [CMake] Question regarding External Project add and VTK

2014-06-02 Thread jmerkow
Jc, Thanks a lot this may be exactly what I am looking for. Basically I include ExternalProjectDependency in my project, then mark_as_superbuild() options/vars that I want to pass back to the 'normal' build. Add the external project with 'CMAKE_CACHE_ARGS' and this will pass those variables to

Re: [CMake] Question regarding External Project add and VTK

2014-06-02 Thread Jean-Christophe Fillion-Robin
Hi Jameson, To specifically address the issue you described, I started to develop an (experimental) module extending ExternalProject and providing some convenience function. Documentation is far from being perfect but looking at (1) the tests: https://github.com/commontk/Artichoke/tree/master/

Re: [CMake] Question regarding External Project add and VTK

2014-06-02 Thread jmerkow
I see, that makes a lot of sense. And in order to pass options from the 'superbuild' build to the 'normal' build you make them options as command line args in your ExternalProhect_Add command? i.e.: set( proj my_prog ) ExternalProject_Add( ${proj} DOWNLOAD_COMMAND "" SOURCE_DIR "${${p

Re: [CMake] Question regarding External Project add and VTK

2014-06-02 Thread Matthew Woehlke
On 2014-06-02 17:48, jmerkow wrote: > I want to add VTK as an external project, but I have a few questions. > > Looking online at examples of other projects using vtk as an > external project, many of them use a 'superbuild' style technique > [...] they have some option to enable SuperBuild (or a

[CMake] Question regarding External Project add and VTK

2014-06-02 Thread jmerkow
Hello, I want to add VTK as an external project, but I have a few questions. Looking online at examples of other projects using vtk as an external project, many of them use a 'superbuild' style technique (example here from the archives: [1]). By that I mean that they have some option to enable

[CMake] question about SET_SOURCE_FILES_PROPERTIES

2013-12-12 Thread pellegrini
Dear CMakers, I have a Fortran project to be built on Windows and Linux using ifort compiler. For two of the project files, I need to add specific compiler flag (i.e. /assume:byterecl). To do so, I used the following CMake command: SET_SOURCE_FILES_PROPERTIES(file1.f90 PROPERTIES COMPILE_FLAG

  1   2   3   4   5   >