Re: [cmake-developers] (no subject)

2017-12-02 Thread Jano Svitok
On Sat, Dec 2, 2017 at 10:45 AM, Lectem  wrote:

> Hi,
>
>
>
> I’m hurting an issue trying to hide dependencies from files that do not
> need those.
>
> For example, I have a library that helps me decode some file, but I don’t
> want this library headers to be available for every .cpp in my library but
> one.
>
>
>
> For example what one may do is the following :
>
>
>
> #-
>
> add_library(mylib foo.cpp bar.cpp)
>
> target_link_libraries(mylib PRIVATE libonlyusefulforfoo)
>
> #-
>
>
>
> It works fine, but now bar.cpp can also include headers from
> libonlyusefulforfoo.
>
> So what I tried was to use object libraries, but it has many
> disadvantages :
>
>- I now have to duplicate dependencies for the object library and
>mylib if they have include directories requirements or compile flags in
>common
>- An object library is a target… and I don’t want to add one target
>per file that has special include directories
>- An object library shows in IDEs, while I’d like the .cpp files to
>stay in the same project. In visual the obj will be in my library but this
>is not practical.
>
> I thought about source files properties, but unfortunately they do not
> support include directories, so here is my question :
>
>
>
> *TL ;DR*
>
> Would it be possible/difficult to have a PRIVATE_INCLUDE_DIRECTORIES
> property added for source files ?
>
> We already have COMPILE_FLAGS so why not include directories ?
>
>
>
> I know we can set include directories per directory, but I don’t think
> that putting single .cpp files in seperate headers is good.
>
>
>
> Thanks,
>
> Lectem
>

Did you check these?

https://cmake.org/cmake/help/v3.10/command/target_include_directories.html
https://cmake.org/cmake/help/v3.10/command/target_sources.html

Jano
-- 

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-developers

[cmake-developers] (no subject)

2017-12-02 Thread Lectem
Hi,

I’m hurting an issue trying to hide dependencies from files that do not need 
those.
For example, I have a library that helps me decode some file, but I don’t want 
this library headers to be available for every .cpp in my library but one.

For example what one may do is the following :

#-
add_library(mylib foo.cpp bar.cpp)
target_link_libraries(mylib PRIVATE libonlyusefulforfoo)
#-

It works fine, but now bar.cpp can also include headers from 
libonlyusefulforfoo.
So what I tried was to use object libraries, but it has many disadvantages :
- I now have to duplicate dependencies for the object library and mylib if they 
have include directories requirements or compile flags in common
- An object library is a target… and I don’t want to add one target per file 
that has special include directories
- An object library shows in IDEs, while I’d like the .cpp files to stay in the 
same project. In visual the obj will be in my library but this is not practical.
I thought about source files properties, but unfortunately they do not support 
include directories, so here is my question :

TL ;DR
Would it be possible/difficult to have a PRIVATE_INCLUDE_DIRECTORIES property 
added for source files ? 
We already have COMPILE_FLAGS so why not include directories ?

I know we can set include directories per directory, but I don’t think that 
putting single .cpp files in seperate headers is good.

Thanks,
Lectem
-- 

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-developers

[cmake-developers] (no subject)

2017-02-18 Thread Soumaia Djaadi via cmake-developers

Hi allI want to install the Fast Code and I have prepared for it all the 
software needed, including cmake and intel fortran and siesta-4 code. I 
followed the installation steps carefully when run make this error occurs. What 
can i do 
?..[ilaf@localhost
 build]$ make
Scanning dependencies of target iter
[  1%] Building Fortran object src/CMakeFiles/iter.dir/modul_precision.f90.o
[  3%] Building Fortran object src/CMakeFiles/iter.dir/modul_sort.f90.o
[  4%] Building Fortran object src/CMakeFiles/iter.dir/modul_algebra.f90.o
[  6%] Building Fortran object src/CMakeFiles/iter.dir/modul_log.F90.o
[  7%] Building Fortran object src/CMakeFiles/iter.dir/modul_solver.f90.o
[  9%] Building Fortran object 
src/CMakeFiles/iter.dir/modul_wigner_rotation.f90.o
[ 11%] Building Fortran object src/CMakeFiles/iter.dir/modul_mathtools.F90.o
[ 12%] Building Fortran object src/CMakeFiles/iter.dir/modul_abramowitz.f90.o
[ 14%] Building Fortran object src/CMakeFiles/iter.dir/modul_hankel0.F90.o
[ 15%] Building Fortran object src/CMakeFiles/iter.dir/modul_harmonics.f90.o
[ 17%] Building Fortran object src/CMakeFiles/iter.dir/modul_orbital_vars.F90.o
[ 19%] Building Fortran object src/CMakeFiles/iter.dir/modul_wigner2.f90.o
[ 20%] Building Fortran object src/CMakeFiles/iter.dir/modul_overlap.F90.o
[ 22%] Building Fortran object src/CMakeFiles/iter.dir/modul_input.F90.o
[ 23%] Building Fortran object src/CMakeFiles/iter.dir/modul_interpolation.f90.o
[ 25%] Building Fortran object src/CMakeFiles/iter.dir/modul_numint.f90.o
[ 26%] Building Fortran object src/CMakeFiles/iter.dir/modul_type.f90.o
[ 28%] Building Fortran object src/CMakeFiles/iter.dir/modul_dipoles.F90.o
[ 30%] Building Fortran object src/CMakeFiles/iter.dir/modul_parallel.F90.o
[ 31%] Building Fortran object src/CMakeFiles/iter.dir/modul_prod_talman.F90.o
[ 33%] Building Fortran object 
src/CMakeFiles/iter.dir/modul_bilocal_vertex.F90.o
[ 34%] Building Fortran object src/CMakeFiles/iter.dir/modul_local_vertex.F90.o
[ 36%] Building Fortran object 
src/CMakeFiles/iter.dir/modul_general_vertex.F90.o
[ 38%] Building Fortran object src/CMakeFiles/iter.dir/modul_cpackgmres.F90.o
[ 39%] Building Fortran object src/CMakeFiles/iter.dir/modul_freq_vars.F90.o
[ 41%] Building Fortran object 
src/CMakeFiles/iter.dir/modul_polariz_iter_coarse.F90.o
[ 42%] Building Fortran object src/CMakeFiles/iter.dir/modul_sigma_coulomb.F90.o
[ 44%] Building Fortran object src/CMakeFiles/iter.dir/modul_chrg_dens.f90.o
[ 46%] Building Fortran object 
src/CMakeFiles/iter.dir/modul_lebedev_laikov_grid.f90.o
[ 47%] Building Fortran object src/CMakeFiles/iter.dir/modul_sigma_xc.F90.o
/home/ilaf/Desktop/FAST-1-1/src/modul_sigma_xc.F90(858): error #7013: This 
module file was not generated by any release of this compiler.   [M_LDAXC]
  use  m_ldaxc, only: pzxc
---^
/home/ilaf/Desktop/FAST-1-1/src/modul_sigma_xc.F90(858): error #6580: Name in 
only-list does not exist.   [PZXC]
  use  m_ldaxc, only: pzxc
--^
compilation aborted for /home/ilaf/Desktop/FAST-1-1/src/modul_sigma_xc.F90 
(code 1)
src/CMakeFiles/iter.dir/build.make:854: recipe for target 
'src/CMakeFiles/iter.dir/modul_sigma_xc.F90.o' failed
make[3]: *** [src/CMakeFiles/iter.dir/modul_sigma_xc.F90.o] Error 1
src/CMakeFiles/iter.dir/build.make:870: recipe for target 
'src/CMakeFiles/iter.dir/modul_sigma_xc.F90.o.provides' failed
make[2]: *** [src/CMakeFiles/iter.dir/modul_sigma_xc.F90.o.provides] Error 2
CMakeFiles/Makefile2:1015: recipe for target 'src/CMakeFiles/iter.dir/all' 
failed
make[1]: *** [src/CMakeFiles/iter.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2






with best regard-- 

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-developers