This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake".
The branch, next has been updated via d1a6b049056ac50af38a75fe68bd7df0aec230b0 (commit) via b46c42c87117dbe6022f301b0f2e1fd485b7064b (commit) from c07479619c47bcc30aa551bc46fd90311048126e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d1a6b049056ac50af38a75fe68bd7df0aec230b0 commit d1a6b049056ac50af38a75fe68bd7df0aec230b0 Merge: c074796 b46c42c Author: Bill Hoffman <bill.hoff...@kitware.com> AuthorDate: Fri Jan 6 14:04:19 2012 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Fri Jan 6 14:04:19 2012 -0500 Merge topic 'cmake_add_fortran_subdirectory' into next b46c42c Use a raw try_compile to test for -lsunquad working on SunOS. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b46c42c87117dbe6022f301b0f2e1fd485b7064b commit b46c42c87117dbe6022f301b0f2e1fd485b7064b Author: Bill Hoffman <bill.hoff...@kitware.com> AuthorDate: Fri Jan 6 14:03:30 2012 -0500 Commit: Bill Hoffman <bill.hoff...@kitware.com> CommitDate: Fri Jan 6 14:03:30 2012 -0500 Use a raw try_compile to test for -lsunquad working on SunOS. diff --git a/Tests/VSGNUFortran/fortran/CMakeLists.txt b/Tests/VSGNUFortran/fortran/CMakeLists.txt index 46b2b38..3ee1855 100644 --- a/Tests/VSGNUFortran/fortran/CMakeLists.txt +++ b/Tests/VSGNUFortran/fortran/CMakeLists.txt @@ -1,12 +1,36 @@ cmake_minimum_required(VERSION 2.8) project(FortranHello Fortran C) +# add a function to test for -lsunquad on sunpro sun systems. +function(test_sunquad result) + set( TEST_DIR "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/sunq") + file(WRITE "${TEST_DIR}/testsunq.f" " + PROGRAM TEST + END + ") + file(WRITE ${TEST_DIR}/CMakeLists.txt " +project(sunq Fortran) +add_library(sunq SHARED testsunq.f) +target_link_libraries(sunq sunquad) +") + message(STATUS "looking for -lsunquad") + try_compile(RESULT "${TEST_DIR}" "${TEST_DIR}" sunq OUTPUT_VARIABLE OUT) + if("${RESULT}") + message(STATUS "-lsunquad found") + else() + message(STATUS "-lsunquad not found") + endif() + message(STATUS + "looking for sunquad:\nRESULT=[${RESULT}]\nOUTPUT=[\n${OUT}\n]") + set(${result} "${RESULT}" PARENT_SCOPE) +endfunction() + +# check for the fortran c interface mangling include(FortranCInterface) FortranCInterface_HEADER(HelloWorldFCMangle.h MACRO_NAMESPACE "FC_" SYMBOL_NAMESPACE "FC_" SYMBOLS hello world) - add_library(hello SHARED hello.f) add_library(world SHARED world.f) target_link_libraries(hello world) @@ -14,8 +38,7 @@ if(CMAKE_Fortran_COMPILER_ID MATCHES SunPro) target_link_libraries(hello fsu) if(CMAKE_Fortran_PLATFORM_ID MATCHES SunOS) target_link_libraries(hello sunmath m) - include(CheckLibraryExists) - check_library_exists(sunquad Qge "" CMAKE_HAS_SUNQUAD) + test_sunquad(CMAKE_HAS_SUNQUAD) if(CMAKE_HAS_SUNQUAD) target_link_libraries(hello sunquad) endif() ----------------------------------------------------------------------- Summary of changes: Tests/VSGNUFortran/fortran/CMakeLists.txt | 29 ++++++++++++++++++++++++++--- 1 files changed, 26 insertions(+), 3 deletions(-) hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits