]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
CMake: Bugfix: Link static report_features correctly
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 11 Jul 2013 22:44:44 +0000 (22:44 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 11 Jul 2013 22:44:44 +0000 (22:44 +0000)
git-svn-id: https://svn.dealii.org/trunk@29982 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/scripts/CMakeLists.txt

index 41c50b9855b6f16a80be137b5e594ad0e0b12be0..8103212819f413797ce352febb343e3eb51b2616 100644 (file)
@@ -49,12 +49,21 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES)
   ADD_EXECUTABLE(report_features
     ${CMAKE_CURRENT_BINARY_DIR}/report_features.cc
     )
+
+  #
+  # Link report_features in the same way as the library/final executable:
+  #
   TARGET_LINK_LIBRARIES(report_features ${DEAL_II_EXTERNAL_LIBRARIES})
   SET_TARGET_PROPERTIES(report_features
     PROPERTIES
     LINK_FLAGS "${DEAL_II_LINKER_FLAGS}"
     COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS}"
     )
+  IF(DEAL_II_STATIC_EXECUTABLE)
+    SET_PROPERTY(TARGET report_features PROPERTY
+      LINK_SEARCH_END_STATIC TRUE
+      )
+  ENDIF()
 
   IF(NOT CMAKE_CROSSCOMPILING)
     ADD_CUSTOM_TARGET(run_report_features COMMAND report_features)

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.