Re: [CMake] The C compiler "/usr/bin/cc" is not able to compile a simple test program.

2017-07-30 Thread Nils Gladitz

On 30.07.2017 10:54, Micha Hergarden wrote:

On 30-07-17 04:36, jupiter wrote:
I thought if I add -DCMAKE_CC_COMPILER=gcc that error should go, no, 
it still compile with the specific default cc:


The corresponding CMake cache variable for the C compiler is 
CMAKE_C_COMPILER (note C not CC).


Also note if the C compiler has already been configured for a build tree 
it can not simply be changed.
Which is also why the CC environment variable has no effect on build 
trees where the C compiler is already configured.


Nils
--

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] setting PYTHONPATH for test

2017-07-30 Thread Nils Gladitz

On 30.07.2017 03:22, Kris Thielemans wrote:


Hi

I’m trying to add to the PYTHONPATH for a test that uses Python. I do 
that using set_test_properties. When using the makefile generator, I 
need to add ${CMAKE_CURRENT_BINARY_DIR}. However, for Visual Studio I 
also need to add for instance ${CMAKE_CURRENT_BINARY_DIR}/Release.


My current CMakeLists.txt works only on Windows and when building 
Release mode:


add_test(${name} “${PYTHON_EXECUTABLE}" ${testfile} )

   set_tests_properties ( ${name} PROPERTIES ENVIRONMENT

"PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}/Release\;${CMAKE_CURRENT_BINARY_DIR}")

I have 2 problems:

  * How do I figure out which configuration is being used?
$ doesn’t seem to work inside
set_test_properties (it just gets passed verbatim)



Try using the NAME/COMMAND signature of add_test() e.g.
add_test(NAME ${name} COMMAND “${PYTHON_EXECUTABLE}" ${testfile})

It should enable generator expression processing in test properties.

Nils
-- 

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] The C compiler "/usr/bin/cc" is not able to compile a simple test program.

2017-07-30 Thread Micha Hergarden
On 30-07-17 04:36, jupiter wrote:
> I thought if I add -DCMAKE_CC_COMPILER=gcc that error should go, no,
> it still compile with the specific default cc:
>
> /usr/bin/cc 
>
> How could I fix it?
>
> Thank you.
>
> On Sun, Jul 30, 2017 at 11:51 AM, jupiter  > wrote:
>
> Hi,
>
> How can I set up the cmake not to check /usr/bin/cc but to check
> $CC (which link to gcc without hard corded path in the environment)?
>
> Thank you.
>
> Regards
>
>
>
>
>
Hello Jupiter,

Running the following sets the compiler to gcov:

CC=/usr/bin/gcov cmake ../

This outputs:

-- The C compiler identification is unknown
-- The CXX compiler identification is GNU 7.1.1
-- Check for working C compiler: /usr/bin/gcov
-- Check for working C compiler: /usr/bin/gcov -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done


As you can see cmake definitely uses the CC environment variable. What
is your OS? What do you set $CC to? What is the full commandline you use
to call cmake?
What happens if you set it the way I did?

Regards,
Micha


signature.asc
Description: OpenPGP digital signature
-- 

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] Using caffe in my own project

2017-07-30 Thread Laurent Berger

Hi,

OS windows 10. Visual Studio 14 2015 win 64. CMake 3.7.1


I have got some problem to use Caffe in my own project. My 
cmakelists.txt is


cmake_minimum_required(VERSION 2.8)
PROJECT (HelloWorld)
find_package(opencv  REQUIRED)
find_package(Caffe  REQUIRED)
file(GLOB HelloWorld_srcs
"*.h"
"*.cpp")
ADD_EXECUTABLE (HelloWorld ${HelloWorld_srcs})
if (OpenCV_FOUND)
include_directories( ${OpenCV_INCLUDE_DIRS} )
target_link_libraries( HelloWorld ${OpenCV_LIBS} )
else (OpenCV_FOUND)
message("PB->OPENCV not found= ${OpenCV_INCLUDE_DIRS}")
endif (OpenCV_FOUND)
if (Caffe_FOUND)
include_directories( ${Caffe_INCLUDE_DIRS} )
target_link_libraries( HelloWorld ${Caffe_LIBS} )
else (Caffe_FOUND)
message("PB->Caffe_ not found= ${Caffe_INCLUDE_DIRS} ${Caffe_LIBS} end 
variable")

endif (Caffe_FOUND)

 When I open my solution in VS 8I can opencv include but nothing about 
caffe (my first line in my c++ program is #include )



In CaffeConfig.cmake I can read :

# Config file for the Caffe package.
#
# Note:
#   Caffe and this config file depends on opencv,
#   so put `find_package(OpenCV)` before searching Caffe
#   via `find_package(Caffe)`. All other lib/includes
#   dependencies are hard coded in the file
#
# After successful configuration the following variables
# will be defined:
#
#   Caffe_LIBRARIES- IMPORTED targets to link against
#(There is no Caffe_INCLUDE_DIRS and 
Caffe_DEFINITIONS
# because they are specified in the IMPORTED 
target interface.)

#
#   Caffe_HAVE_CUDA- signals about CUDA support
#   Caffe_HAVE_CUDNN   - signals about cuDNN support

What does it mean

There is no Caffe_INCLUDE_DIRS and Caffe_DEFINITIONS because they are 
specified in the IMPORTED target interface.)



How can I insert caffe include and libs in my project using my 
cmakelists.txt ?



Thanks in advance for your answer










--

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] CMake CUDA 3.8+/9 support as a first class language with out Visual Studio Support... err what?

2017-07-30 Thread Brian J. Davis


Saga novella continues:

>> Next I am going to remove all NVIDA drivers and try reinstall of 
CUDA 7.5  see if I can get deviceQuery to report 7.5/7.5.


Nvidia 352.65 driver removal from Add/Remove Programs
Device Manager -> NVIDIA GeForce GTX 960M -> General reports "device has 
been disabled"


Device Query:

C:\ProgramData\NVIDIA Corporation\CUDA Samples\v7.5\bin\win64\Debug>rem 
start "Device Query" deviceQuery.exe


C:\ProgramData\NVIDIA Corporation\CUDA 
Samples\v7.5\bin\win64\Debug>deviceQuery.exe

deviceQuery.exe Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)

cudaGetDeviceCount returned 35
-> CUDA driver version is insufficient for CUDA runtime version
Result = FAIL

Ok so great no driver installed!

Reinstall of CUDA 7.5.18

Run of DeviceQuery:

C:\ProgramData\NVIDIA Corporation\CUDA Samples\v7.5\bin\win64\Debug>rem 
start "Device Query" deviceQuery.exe


C:\ProgramData\NVIDIA Corporation\CUDA 
Samples\v7.5\bin\win64\Debug>deviceQuery.exe

deviceQuery.exe Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)

Detected 1 CUDA Capable device(s)

Device 0: "GeForce GTX 960M"
  CUDA Driver Version / Runtime Version  7.5 / 7.5
  CUDA Capability Major/Minor version number:5.0
  Total amount of global memory: 4096 MBytes 
(4294967296 bytes)

  ( 5) Multiprocessors, (128) CUDA Cores/MP: 640 CUDA Cores
  GPU Max Clock rate:1176 MHz (1.18 GHz)
  Memory Clock rate: 2505 Mhz
  Memory Bus Width:  128-bit
  L2 Cache Size: 2097152 bytes
  Maximum Texture Dimension Size (x,y,z) 1D=(65536), 2D=(65536, 
65536), 3D=(4096, 4096, 4096)

  Maximum Layered 1D Texture Size, (num) layers  1D=(16384), 2048 layers
  Maximum Layered 2D Texture Size, (num) layers  2D=(16384, 16384), 
2048 layers

  Total amount of constant memory:   65536 bytes
  Total amount of shared memory per block:   49152 bytes
  Total number of registers available per block: 65536
  Warp size: 32
  Maximum number of threads per multiprocessor:  2048
  Maximum number of threads per block:   1024
  Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
  Max dimension size of a grid size(x,y,z): (2147483647, 65535, 65535)
  Maximum memory pitch:  2147483647 bytes
  Texture alignment: 512 bytes
  Concurrent copy and kernel execution:  Yes with 1 copy engine(s)
  Run time limit on kernels: Yes
  Integrated GPU sharing Host Memory:No
  Support host page-locked memory mapping:   Yes
  Alignment requirement for Surfaces:Yes
  Device has ECC support:Disabled
  CUDA Device Driver Mode (TCC or WDDM): WDDM (Windows Display 
Driver Model)

  Device supports Unified Addressing (UVA):  Yes
  Device PCI Domain ID / Bus ID / location ID:   0 / 2 / 0
  Compute Mode:
 < Default (multiple host threads can use ::cudaSetDevice() with 
device simultaneously) >


deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 7.5, CUDA 
Runtime Version = 7.5, NumDevs = 1, Device0 = GeForce GTX 960M

Result = PASS

Ok return to sanity with 7.5/7.5

Return to insanity as NBody still does not work with:

Run "nbody -benchmark [-numbodies=]" to measure performance.
-fullscreen   (run n-body simulation in fullscreen mode)
-fp64 (use double precision floating point values 
for simulation)

-hostmem  (stores simulation data in host memory)
-benchmark(run benchmark to measure performance)
-numbodies=(number of bodies (>= 1) to run in simulation)
-device=   (where d=0,1,2 for the CUDA device to use)
-numdevices=   (where i=(number of CUDA devices > 0) to use 
for simulation)
-compare  (compares simulation results running once on 
the default GPU and once on the CPU)

-cpu  (run n-body simulation on the CPU)
-tipsy= (load a tipsy model file for simulation)

NOTE: The CUDA Samples are not meant for performance measurements. 
Results may vary when GPU Boost is enabled.


> Windowed mode
> Simulation data stored in video memory
> Single precision floating point simulation
> 1 Devices used for simulation
> Compute 5.0 CUDA device: [GeForce GTX 960M]
CUDA error at c:\programdata\nvidia corporation\cuda 
samples\v7.5\5_simulations\nbody\bodysystemcuda_impl.h:160 
code=46(cudaErrorDevicesUnavailable) 
"cudaEventCreate(_deviceData[0].event)"


There is at this point clearly some very odd behavior with CUDA 7.5 and 
GeForce 960M.  CMake still can build a project, but will not run or 
create memory with cudaMalloc etc.


Installed driver at this point is 353.90.

GeForce Experience reports 381.65 driver

but I have downloaded:


Re: [CMake] CMake CUDA 3.8+/9 support as a first class language with out Visual Studio Support... err what?

2017-07-30 Thread Brian J. Davis


Things I have tried:

Install Visual Studio 15
Install CUDA 8.0 + patch
Install Visual Studio 13 <- Yes Nvidia / CMake'ers sometimes we have to 
do back ports

Install CUDA 7.5
VS 13 will run CUDA 8.0 samples nbody/deviceQuery
VS 13 does not run CUDA 7.5  samples nbody or any example attempting to 
actually use the GPU.  deviceQuery worked.
CMake v3.2/3.9 compiles with either FindCUDA approach v3.2 or new 
"project" approach v3.9, but neither is able to access the deivce. 
Devcie query code such as in deviceQuery works stating there is a CUDA 
cable device ready and waiting but fails on device access like 
cudaMalloc calls.

Reinstalled CUDA 7.5
Still only VS with 8.0 works with samples.
Used NVIDIA Control panel to assign every program to run on NVIDIA GPU 
such as VS and CMake instead of Integrated graphics through Nvidia 
Optimus Interface.

Used GeForce Experience to get latest driver.
VS, CUDA, CMake is at same state.
Removed all CUDA 8.0 goop
Forced to reinstall/repair VS 13 due to .NET not sure why this happened.
VS unable to run nbody in VS 13 CUDA 7.5
Reinstall CUDA 7.5
Same state
Reinstall CUDA 8.0
VS 13 works with CUDA 8.0 but still  will not run nbody with 7.5 will 
run deviceQuery and report happily there a a CUDA device just beckoning 
to be used.

Removed CUDA 8.0
Removed CUDA 7.5
Removed GeForce Experience to keep it from mucking about in the 
background with what ever driver version shenanigans it may be performing.

Device Manager -> NVIDIA GeForce GTX 960M -> Uninstall device.
Device keeps cumming back across reboots as it appears, may be due to 
NVIDIA Graphics Driver 353.90 in "Add remove programs"

Reinstalled CUDA 7.5
VS 13 runs successfully deviceQuery and nbody with 7.5.  Oddly 
deviceQuery reports driver version at 9.0 ???  Not sure how that's 
possible.  My understanding/experience has been Driver version / Runtime 
match after install say like 7.5 / 7.5, but hey this has gone completely 
off the rails.


C:\ProgramData\NVIDIA Corporation\CUDA 
Samples\v7.5\bin\win64\Debug>deviceQuery.exe

deviceQuery.exe Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)

Detected 1 CUDA Capable device(s)

Device 0: "GeForce GTX 960M"
  CUDA Driver Version / Runtime Version  9.0 / 7.5
  CUDA Capability Major/Minor version number:5.0
  Total amount of global memory: 4096 MBytes 
(4294967296 bytes)

  ( 5) Multiprocessors, (128) CUDA Cores/MP: 640 CUDA Cores
  GPU Max Clock rate:1176 MHz (1.18 GHz)
  Memory Clock rate: 2505 Mhz
  Memory Bus Width:  128-bit
  L2 Cache Size: 2097152 bytes
  Maximum Texture Dimension Size (x,y,z) 1D=(65536), 2D=(65536, 
65536), 3D=(4096, 4096, 4096)

  Maximum Layered 1D Texture Size, (num) layers  1D=(16384), 2048 layers
  Maximum Layered 2D Texture Size, (num) layers  2D=(16384, 16384), 
2048 layers

  Total amount of constant memory:   65536 bytes
  Total amount of shared memory per block:   49152 bytes
  Total number of registers available per block: 65536
  Warp size: 32
  Maximum number of threads per multiprocessor:  2048
  Maximum number of threads per block:   1024
  Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
  Max dimension size of a grid size(x,y,z): (2147483647, 65535, 65535)
  Maximum memory pitch:  2147483647 bytes
  Texture alignment: 512 bytes
  Concurrent copy and kernel execution:  Yes with 1 copy engine(s)
  Run time limit on kernels: Yes
  Integrated GPU sharing Host Memory:No
  Support host page-locked memory mapping:   Yes
  Alignment requirement for Surfaces:Yes
  Device has ECC support:Disabled
  CUDA Device Driver Mode (TCC or WDDM): WDDM (Windows Display 
Driver Model)

  Device supports Unified Addressing (UVA):  Yes
  Device PCI Domain ID / Bus ID / location ID:   0 / 2 / 0
  Compute Mode:
 < Default (multiple host threads can use ::cudaSetDevice() with 
device simultaneously) >


deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 9.0, CUDA 
Runtime Version = 7.5, NumDevs = 1, Device0 = GeForce GTX 960M



Device Manager -> NVIDIA GeForce GTX 960M -> Properties reports:
NVidia GeForce GTX 960M
Driver provider: NVIDIA
Driver Date:  7/18/2017
Driver Version: 22.21.13.8494
Digital Signer: Microsoft Windows Hardware Compatibility Publisher

Note: Driver Date:  7/18/2017

Could this mean there is a 9.0 driver in the wild that I cannot download 
from NVIDIA or through GeForce Experience, but may be delivered via OS?  
Posted @ https://devtalk.nvidia.com/default/board/58/ to see if anyone 
knows what is going on here.


CMake 3.2/3.9 still fail to run (again compiles fine)

What It appears I am experiencing is some CUDA 7.5 / 8.0 

[Cmake-commits] CMake branch, master, updated. v3.9.0-361-gdf585ca

2017-07-30 Thread Kitware Robot
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
   via  df585ca96f591c2084b2ccd1818316a2bbb5ab99 (commit)
  from  49577c98b4a92d8fd67e7edd7ad199ffc0b6f466 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=df585ca96f591c2084b2ccd1818316a2bbb5ab99
commit df585ca96f591c2084b2ccd1818316a2bbb5ab99
Author: Kitware Robot <kwro...@kitware.com>
AuthorDate: Mon Jul 31 00:01:04 2017 -0400
Commit: Kitware Robot <kwro...@kitware.com>
CommitDate: Mon Jul 31 00:01:04 2017 -0400

CMake Nightly Date Stamp

diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 70102f6..2178689 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
 # CMake version number components.
 set(CMake_VERSION_MAJOR 3)
 set(CMake_VERSION_MINOR 9)
-set(CMake_VERSION_PATCH 20170730)
+set(CMake_VERSION_PATCH 20170731)
 #set(CMake_VERSION_RC 1)

---

Summary of changes:
 Source/CMakeVersion.cmake |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits