Re: [CMake] CMake 3.5-CMAKE_BINARY_DIR is set to ${CMAKE_SOURCE_DIR} when calling add_subdirectory?

2016-02-22 Thread Stephen Kelly
Attila Krasznahorkay wrote: > Setting these variables by hand sounds quite dangerous. I'm not sure how > much this is meant to be supported. > This is definitely UB. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

[CMake] How to know the MPI Fortran compiler vendor

2016-02-22 Thread victor sv
Hi all, we need to force some compilation flags for a library compiled with the MPI_Fortran_COMPILER provided by find_pakage. With the CMAKE_Fortran_COMPILER we can ask for the compiler vendor checking the CMAKE_Fortran_COMPILER_ID variable. There is a way to do the same with MPI_Fortran_COMPILE

Re: [CMake] CMake 3.5-CMAKE_BINARY_DIR is set to ${CMAKE_SOURCE_DIR} when calling add_subdirectory?

2016-02-22 Thread Attila Krasznahorkay
Hi Gerry, Setting these variables by hand sounds quite dangerous. I'm not sure how much this is meant to be supported. There is a much more "native" way of doing this. You could do: add_subdirectory( ${source_dir} ${binary_dir} ) , where "source_dir" would be the source directory relative to