It works perfectly - thanks!
QT
On Tue, 28 Aug 2018 at 12:37, Robert Maynard
wrote:
> The way Eric suggest with check_language is what I use when I want to
> conditionally support CUDA.
>
> On Tue, Aug 28, 2018 at 10:28 AM Eric Noulard
> wrote:
>
>>
>>
>> Le mar. 28 août 2018 à 19:07, Quang Ha
The way Eric suggest with check_language is what I use when I want to
conditionally support CUDA.
On Tue, Aug 28, 2018 at 10:28 AM Eric Noulard
wrote:
>
>
> Le mar. 28 août 2018 à 19:07, Quang Ha a écrit :
>
>> Hi all,
>>
>> So this question is again about project(foo LANGUAGES CXX CUDA). Is it
Le mar. 28 août 2018 à 19:07, Quang Ha a écrit :
> Hi all,
>
> So this question is again about project(foo LANGUAGES CXX CUDA). Is it
> possible to switch off CUDA if Cmake couldn't find CUDA compiler? I.e.
> something along the line:
>
May be you can only:
project(foo LANGUAGES CXX)
then
i
Hi all,
So this question is again about project(foo LANGUAGES CXX CUDA). Is it
possible to switch off CUDA if Cmake couldn't find CUDA compiler? I.e.
something along the line:
if (CUDA_FOUND)
set_language_to_CUDA_and_CXX
else(CUDA_FOUND)
set_language_to_CXX_only
endif(CUDA_FOUND)
The main re
I cc the list because I think you drop it inadvertently.
Le mar. 28 août 2018 à 16:18, George PF a écrit :
> > Because generator expressions are not handled in every cmake construct:
> >
> https://cmake.org/cmake/help/v3.12/manual/cmake-generator-expressions.7.html
> >
> > genex is probably not
Le mar. 28 août 2018 à 15:39, George PF a écrit :
> Hello,
>
> how can e.g. $ be iterated over in cmake?
>
> This builds the lib, but the loop is never run:
>
> add_library(objlib12 OBJECT lib1.c lib2.c)
> foreach(o IN LISTS $)
> message("obj ${o}")
> endforeach()
>
> But the
Hello,
how can e.g. $ be iterated over in cmake?
This builds the lib, but the loop is never run:
add_library(objlib12 OBJECT lib1.c lib2.c)
foreach(o IN LISTS $)
message("obj ${o}")
endforeach()
But the $ variable is set correctly, as this builds a
shared library:
add_
Hello, thanks for your answer.
Here's a mockup :
projectroot/lib1
projectroot/lib1/CMakeLists.txt
projectroot/lib1/a.proto
projectroot/lib1/b.proto
projectroot/lib1/test.cc
See below for the content of the files.
Here's the cmake output :
$ cmake --build build
[0/1] Re-running CMake...
-- Config
Hi,
can you elaborate on how the commands you've shown "don't work?" What do
they do and how does it differ from what you need?
Petr
On Tue, 28 Aug 2018 at 08:33, Ke Gao wrote:
> Hi,
>
> I tried different way of using GET_FILENAME_COMPONENT to find the parent
> path of PROJECT_SOURCE_DIR, or a