[CMake] C# Language Detection Errors in 3.8.0-rc2

2017-03-16 Thread Wesley Smith
I'm trying to test out the C# features added to 3.8.0.  A few things:

+ I couldn't find any documentation as to what the language name for CSHARP
was in the enable_language documentation page

+ When I tried enable_language(CSHARP), I got some errors

CMake Error at CMakeLists.txt:4 (enable_language):
No CMAKE_CSHARP_COMPILER could be found.

In the error log, I see:

The CSharp compiler identification could not be found in
"/build_/CMakeFiles/3.8.0-rc2/CompilerIdCSharp/CompilerIdCSharp.csproj"

When I open this project, it compiles and runs just fine.  I'm not sure why
it's giving an error.  Any thoughts?

thanks,
wes
-- 

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 CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] Building using Qt 5.8 and VS2017.

2017-03-16 Thread Andrew Maclean
At present the builds will fail.

I have posted a report on the Qt forum:
https://forum.qt.io/topic/77260/errors-when-building-cmake-and-vtk

In the interim here is a temporary fix:

The problem relates to the Qt macro:
**Q_DECL_CONSTEXPR**

If it is commented out in lines  593 to 714 of *qalgorithms.h* then the
builds work for CMake and VTK and any other Qt build using VS2017.

Regards
   Andrew
-- 
___
Andrew J. P. Maclean

___
-- 

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 CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/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://cmake.3232098.n2.nabble.com/Question-regarding-CUDA-support-in-CMake-3-8-0-rc2-tp7595171p7595174.html
Sent from the CMake mailing list archive at Nabble.com.
-- 

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 CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


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 ). Updating CMake to only do device linking
where needed is theoretical possible, but opens up a new question on
consistency [1].

What you have pointed out is actually two issues. The first is that
target_compile_options by design does not propagate any flags to the
linker, which is a design decision made by CMake. The second being
that for CUDA arch/code flags in general need to be passed to both the
compiler and the linker.

So currently CUDA projects should specify arch/code flags through
CMAKE_CUDA_FLAGS/CMAKE_CUDA_FLAGS_ to have them propagate to
the linker.

[1] - If we only do device linking for targets that need separable
compilation, we introduce a split in CUDA targets where some are
satisfied by add_compile_options, and others require
CMAKE_CUDA_FLAGS/CMAKE_CUDA_FLAGS_. To complicate this
situation you can't provide -arch/code in both as that will generally
result in a collection of invalid flags.


On Wed, Mar 15, 2017 at 8:22 PM, Nick Henderson
 wrote:
> 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
> cd /home/nwh/git/foobar/build/exec && /usr/local/bin/cmake -E
> cmake_link_script CMakeFiles/exec.dir/dlink.txt --verbose=1
> /usr/local/cuda/bin/nvcc   -Xcompiler=-fPIC -shared -dlink
> CMakeFiles/exec.dir/exec.cc.o -o CMakeFiles/exec.dir/cmake_device_link.o
> ../libfoobar.a
> nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are
> deprecated, and may be removed in a future release (Use
> -Wno-deprecated-gpu-targets to suppress warning).
> ```
>
> I don't get the warning when the executable source is being compiled because
> an up-to-date architecture is specified:
>
> ```
> [ 60%] Building CUDA object exec/CMakeFiles/exec.dir/exec.cc.o
> cd /home/nwh/git/foobar/build/exec && /usr/local/cuda/bin/nvcc
> -I/home/nwh/git/foobar  -arch compute_30 -std=c++11 -x cu -c
> /home/nwh/git/foobar/exec/exec.cc -o CMakeFiles/exec.dir/exec.cc.o
> ```
>
> Link to sample project: https://github.com/nwh/foobar
>
> Questions:
>
> * Is this a problem?
> * What is the purpose of cmake_device_link.o?
>
> Thanks,
> Nick
>
>
>
> --
> View this message in context: 
> http://cmake.3232098.n2.nabble.com/Question-regarding-CUDA-support-in-CMake-3-8-0-rc2-tp7595171.html
> Sent from the CMake mailing list archive at Nabble.com.
> --
>
> 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 CMake community. For more 
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
-- 

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 CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] CHECK_INCLUDE_FILE_CXX with built from source compiler

2017-03-16 Thread Robert Maynard
This is a known issue that will be resolved in CMake 3.8 (
https://cmake.org/cmake/help/v3.8/policy/CMP0067.html#policy:CMP0067 )

On Wed, Mar 15, 2017 at 5:12 AM, houssen  wrote:
> For the record, the solution is (try_compile needs this option):
> SET(CMAKE_REQUIRED_FLAGS "-std=c++11")
>
> Is there a way to get this flag whatever the compiler to do this ?
> [SET_TARGET_PROPERTIES(myTarget PROPERTIES CXX_STANDARD 11) seems to be
> relevant only for target - flags are not available]
>
> Franck
>
>
> Le 2017-03-13 19:36, houssen a écrit :
>>
>> Forgot to mention:
>>
>> ~> cmake --version
>> cmake version 3.5.0
>>
>>
>> Le 2017-03-13 19:33, houssen a écrit :
>>>
>>> Hello,
>>>
>>> I do NOT use /usr/bin/g++ that is installed in the system (long story
>>> - don't ask why).
>>> I compiled gcc from source and installed it in /my/path/local/bin/g++.
>>>
>>> Now I need to check for tuple with CHECK_INCLUDE_FILE_CXX : it fails !
>>>
>>> Still failing if:
>>> 1. I export CPLUS_INCLUDE_PATH to point at
>>> /my/path/local/include/c++/x.y.z (I checked: tuple is here)
>>> 2. set this before calling CHECK_INCLUDE_FILE_CXX :
>>>   SET ( CMAKE_REQUIRED_FLAGS "-I$ENV{CPLUS_INCLUDE_PATH}" )
>>>   SET ( CMAKE_REQUIRED_INCLUDES "$ENV{CPLUS_INCLUDE_PATH}" )
>>>
>>> What is wrong ?
>>>
>>> Franck
>>
>>
>> --
>>
>> 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 CMake community. For
>> more information on each offering, please visit:
>>
>> CMake Support: http://cmake.org/cmake/help/support.html
>> CMake Consulting: http://cmake.org/cmake/help/consulting.html
>> CMake Training Courses: http://cmake.org/cmake/help/training.html
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/cmake
>
>
> --
>
> 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 CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
-- 

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 CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake