[CMake] linking with libstdc++ statically

2014-08-27 Thread victor.zverov...@gmail.com
Hello, I am trying to link an application with libstdc++ statically on Linux and OS X. The first attempt was to add -static-libstdc++ to CMAKE_EXE_LINKER_FLAGS: set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libstdc++") This works on Linux with GCC, but Clang gives the following

[CMake] Dependency between Fortran projects added with cmake_add_fortran_subdirectory

2014-04-12 Thread victor.zverov...@gmail.com
Hi, I have a C++ project with two subprojects written in Fortran, sub1 and sub2. To be able to build them on Windows with MinGW's gfortran, the subprojects are added to the main project with cmake_add_fortran_subdirectory as described in http://www.kitware.com/blog/home/post/231. Moreover, sub2 ca