[CMake] QT + CMake + Visual Studio = ui files refresh

2016-06-16 Thread Tiago Macarios
Hi,

I am currently using QT + CMake + Visual Studio and everything works great.

Problem I am having is that if I change a .ui file Visual Studio does not
seem to capture that during the build. If I just "touch" the header file,
them everything works fine (moc gets triggered).

Is there a way to set this up so that the ui file change also gets detected?

I tried simply adding the ui file to the target, but this does not seem to
work...

Tiago
-- 

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 install target doesn't run ldconfig after installing library

2016-06-16 Thread Young Yang
Thanks!
This command really solve my problem.

But I still get a problem about the command order now.

I have some sub directories.
For e.g. One of them is called "src" and there is also a CMakeLists.txt in
it. And the shared library installation instructions are in it.
So I have `ADD_SUBDIRECTORY(src)` in my main CMakeLists.txt.

I put the command `install(CODE "execute_process(COMMAND ldconfig)")`
 after `ADD_SUBDIRECTORY(src)` . But It still  run ldconfig before the
installation of shared libraries in src sub folder.



On Thu, Jun 16, 2016 at 9:02 PM, Matthew Keeler  wrote:

> CMake won’t and in my opinion shouldn’t implicitly invoke ldconfig for
> you. There are many scenarios and platforms where this is incorrect
> behavior and some such as running install to prepare for packaging that
> CMake wouldn’t reliably be able to detect.
>
> If you want to provide the functionality for your users you could add
> something like the following to your CMakeLists.txt:
>
> install(CODE “execute_process(COMMAND ldconfig)”)
>
> This will need to run after your other installed targets. I can’t find any
> way in the CMake documentation to force install ordering but it seems like
> as long as CMake processes that install command last it will perform it
> last. So at the very end of your top level CMakeLists.txt file should do
> the trick.
>
> --
> Matt Keeler
>
>
> On June 15, 2016 at 22:12:09, Young Yang (afe.yo...@gmail.com) wrote:
>
> Hi,
> I've encountered some problem when writing install target with cmake.
>
> I use `install (TARGETS  DESTINATION lib)` to install
> my shared_library.
> However, when I run `make install`. It just install the .so to
> /usr/local/lib and didn't run the ldconfig.
>
> I think it is strange and inconvenient to tell the user he should run
> ldconfig by himself or herself.
>
> What is the best way to make the ldconfig run automatically?
>
>
> Thanks in advance :)
>
> --
> Best wishes,
> Young Yang
> --
>
> 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
>
>


-- 
Best wishes,
Young Yang
-- 

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] oversubscribing OpenMPI in tests

2016-06-16 Thread Zaak Beekman
Excellent, this is far better than any of the approaches I had thought
of... cheers!

On Thu, Jun 16, 2016 at 4:45 PM Thompson, KT  wrote:

> Zaak,
>
>
>
> I use ‘execute_process (${MPIEXEC} --version)’ and match the output to a
> string (Open MPI, ALPS, MPICH).  This isn’t the most elegant solution, but
> it seems fairly robust.
>
>
>
> -kt
>
>
>
> *From:* CMake [mailto:cmake-boun...@cmake.org] *On Behalf Of *Zaak Beekman
> *Sent:* Thursday, June 16, 2016 9:14 AM
> *To:* cmake@cmake.org
> *Subject:* [CMake] oversubscribing OpenMPI in tests
>
>
>
> Does anyone know a good way to determine if `find_package(MPI REQUIRED)`
> is returning OpenMPI? I need to know, because OpenMPI does not handle
> oversubscribed (more ranks than cores) tests well without explicitly
> telling OpenMPI that you are oversubscribing. This can be done by creating
> a hosts file, and passing some flags to `mpirun` to tell it to use the
> hosts file, or can be accomplished by passing the `--oversubscribe` flag.
> The problem is that MPICH has different flags/host-file syntax.
>
>
>
> (I am oversubscribing some of the project's tests because this will often
> find correctness problems due to race conditions or other parallel
> programming errors that are not always exposed otherwise.)
>
-- 

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] oversubscribing OpenMPI in tests

2016-06-16 Thread Thompson, KT
Zaak,

I use ‘execute_process (${MPIEXEC} --version)’ and match the output to a string 
(Open MPI, ALPS, MPICH).  This isn’t the most elegant solution, but it seems 
fairly robust.

-kt

From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Zaak Beekman
Sent: Thursday, June 16, 2016 9:14 AM
To: cmake@cmake.org
Subject: [CMake] oversubscribing OpenMPI in tests

Does anyone know a good way to determine if `find_package(MPI REQUIRED)` is 
returning OpenMPI? I need to know, because OpenMPI does not handle 
oversubscribed (more ranks than cores) tests well without explicitly telling 
OpenMPI that you are oversubscribing. This can be done by creating a hosts 
file, and passing some flags to `mpirun` to tell it to use the hosts file, or 
can be accomplished by passing the `--oversubscribe` flag. The problem is that 
MPICH has different flags/host-file syntax.

(I am oversubscribing some of the project's tests because this will often find 
correctness problems due to race conditions or other parallel programming 
errors that are not always exposed otherwise.)
-- 

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 targeting vs2015 error

2016-06-16 Thread Welson Sun
Update:

I tried cmake 3.5.2, and that worked fine. BTW, I am trying to compile
llvm+clang 3.5 with VS2015.


On Wed, Jun 15, 2016 at 1:36 PM, Kristian 
wrote:

> Could you give us either the CMakeLists.txt or the whole cl command, which
> was called?
>
> Without of some more information, I could not give you a hint, where the
> problem is.
>
> 2016-06-15 14:43 GMT-04:00 Welson Sun :
>
>> cmake 3.4.3 on windows 7 targeting vs2015 error out:
>>
>> cl : Command line error D8021: invalid numeric argument
>> '/Wno-variadic-macros'
>>
>>
>> Thanks,
>> Welson
>>
>> --
>>
>> 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
>>
>
>


-- 
- Welson
-- 

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] What do these CMake error messages mean?

2016-06-16 Thread Howard Rubin
 

CMake is giving many error messages like the below since we added OpenCV
3.1.0 to our project (and we need that new version). Can anyone help me
understand what do about it and/or what the error messages are telling me?

 

None of the 3 hits for this google search were helpful: opencv cmake "which
is prefixed in the"

 

- Howard Rubin

 

 Error messages
==

 

:

:

Configuring done

CMake Error in 3rdparty/opencv-3.1.0/modules/core/CMakeLists.txt:

  Target "opencv_core" INTERFACE_INCLUDE_DIRECTORIES property contains path:

 

"D:/shared/projects/magellan-build-windows"

 

 which is prefixed in the build directory.

 

 

CMake Error in 3rdparty/opencv-3.1.0/modules/core/CMakeLists.txt:

  Target "opencv_core" INTERFACE_INCLUDE_DIRECTORIES property contains path:

 

"D:/shared/projects/magellan/3rdparty/opencv-3.1.0/include"

 

which is prefixed in the source directory.

:

:

 

 The referenced 3rdparty/opencv-3.1.0/modules/core/CMakeLists.txt
=

 

set(the_description "The Core Functionality")

ocv_add_module(core

   PRIVATE_REQUIRED ${ZLIB_LIBRARIES} "${OPENCL_LIBRARIES}"
"${VA_LIBRARIES}"

   OPTIONAL opencv_cudev

   WRAP java python)

 

set(extra_libs "")

 

if(WINRT AND CMAKE_SYSTEM_NAME MATCHES WindowsStore AND CMAKE_SYSTEM_VERSION
MATCHES "8.0")

  list(APPEND extra_libs ole32.lib)

endif()

 

if(DEFINED WINRT AND NOT DEFINED ENABLE_WINRT_MODE_NATIVE)

  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /ZW")

endif()

 

if(HAVE_CUDA)

  ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef -Wenum-compare
-Wunused-function -Wshadow)

endif()

 

file(GLOB lib_cuda_hdrs"include/opencv2/${name}/cuda/*.hpp"
"include/opencv2/${name}/cuda/*.h")

file(GLOB lib_cuda_hdrs_detail "include/opencv2/${name}/cuda/detail/*.hpp"
"include/opencv2/${name}/cuda/detail/*.h")

 

source_group("Cuda Headers" FILES ${lib_cuda_hdrs})

source_group("Cuda Headers\\Detail" FILES ${lib_cuda_hdrs_detail})

 

ocv_glob_module_sources(SOURCES
"${OPENCV_MODULE_opencv_core_BINARY_DIR}/version_string.inc"

HEADERS ${lib_cuda_hdrs} ${lib_cuda_hdrs_detail})

 

ocv_module_include_directories(${the_module} ${ZLIB_INCLUDE_DIRS})

ocv_create_module(${extra_libs})

 

ocv_add_accuracy_tests()

ocv_add_perf_tests()

-- 

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] oversubscribing OpenMPI in tests

2016-06-16 Thread Zaak Beekman
Does anyone know a good way to determine if `find_package(MPI REQUIRED)` is
returning OpenMPI? I need to know, because OpenMPI does not handle
oversubscribed (more ranks than cores) tests well without explicitly
telling OpenMPI that you are oversubscribing. This can be done by creating
a hosts file, and passing some flags to `mpirun` to tell it to use the
hosts file, or can be accomplished by passing the `--oversubscribe` flag.
The problem is that MPICH has different flags/host-file syntax.

(I am oversubscribing some of the project's tests because this will often
find correctness problems due to race conditions or other parallel
programming errors that are not always exposed otherwise.)
-- 

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 install target doesn't run ldconfig after installing library

2016-06-16 Thread Matthew Keeler
CMake won’t and in my opinion shouldn’t implicitly invoke ldconfig for you.
There are many scenarios and platforms where this is incorrect behavior and
some such as running install to prepare for packaging that CMake wouldn’t
reliably be able to detect.

If you want to provide the functionality for your users you could add
something like the following to your CMakeLists.txt:

install(CODE “execute_process(COMMAND ldconfig)”)

This will need to run after your other installed targets. I can’t find any
way in the CMake documentation to force install ordering but it seems like
as long as CMake processes that install command last it will perform it
last. So at the very end of your top level CMakeLists.txt file should do
the trick.

-- 
Matt Keeler


On June 15, 2016 at 22:12:09, Young Yang (afe.yo...@gmail.com) wrote:

Hi,
I've encountered some problem when writing install target with cmake.

I use `install (TARGETS  DESTINATION lib)` to install my
shared_library.
However, when I run `make install`. It just install the .so to
/usr/local/lib and didn't run the ldconfig.

I think it is strange and inconvenient to tell the user he should run
ldconfig by himself or herself.

What is the best way to make the ldconfig run automatically?


Thanks in advance :)

--
Best wishes,
Young Yang
-- 

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