Diff for /imach/CMakeLists.txt between versions 1.5 and 1.24

version 1.5, 2015/09/15 17:57:21 version 1.24, 2020/02/22 21:01:54
Line 6 Line 6
 #      FORCE)  #      FORCE)
 #  endif()  #  endif()
 # SET (CMAKE_CONFIGURATION_TYPES "Debug;RelWithDebinfo" CACHE STRING "" FORCE)  # SET (CMAKE_CONFIGURATION_TYPES "Debug;RelWithDebinfo" CACHE STRING "" FORCE)
   set(PACKAGE_NAME "imach")
 SET(IMACH_VERSION_MAJOR 0)  SET(IMACH_VERSION_MAJOR 0)
 SET(IMACH_VERSION_MINOR 98r0)  SET(IMACH_VERSION_MINOR 99r20)
 SET(IMACH_VERSION_PATCH 0)  SET(IMACH_VERSION_PATCH 0)
 SET(IMACH_VERSION_NOTE "")  SET(IMACH_VERSION_NOTE "")
 SET(IMACH_VERSION ${IMACH_VERSION_MAJOR}.${IMACH_VERSION_MINOR})  SET(IMACH_VERSION ${IMACH_VERSION_MAJOR}.${IMACH_VERSION_MINOR})
Line 17  SET(@NOREG@ ) Line 18  SET(@NOREG@ )
 SET(@IMACHSETUPVERSION@ imach-${IMACH_VERSION_MAJOR}.${IMACH_VERSION_MINOR}-icl-setup)  SET(@IMACHSETUPVERSION@ imach-${IMACH_VERSION_MAJOR}.${IMACH_VERSION_MINOR}-icl-setup)
 SET(@APPCOMPILATIONMODE@ icl)  SET(@APPCOMPILATIONMODE@ icl)
 SET(@VERSION@ ${IMACH_VERSION_MAJOR}.${IMACH_VERSION_MINOR})  SET(@VERSION@ ${IMACH_VERSION_MAJOR}.${IMACH_VERSION_MINOR})
 SET(@GNUPLOTVERSION@ 4.6)  SET(@GNUPLOTVERSION@ 5.1)
 SET(@INFOBEFOREFILE@ README.txt)  SET(@INFOBEFOREFILE@ README.txt)
 SET(@LICENSEFILE@ Copying)  SET(@LICENSEFILE@ Copying)
 SET(@PACKAGE@ imach)  SET(@PACKAGE@ imach)
 SET(@DICTLANG@ en)  SET(@DICTLANG@ en)
 SET(@VERMAJOR@ )  SET(@VERMAJOR@ )
 SET(@COPYRIGHT@ "Copyright (C)  2002-2015 INED-EUROREVES-Institut de longevite-Japan Society for the Promotion of Science (Grant-in-Aid for Scientific Research 25293121) - Intel Software 2015")  SET(@COPYRIGHT@ "Copyright (C)  2002-2015 INED-EUROREVES-Institut de longevite-Japan Society for the Promotion of Science (Grant-in-Aid for Scientific Research 25293121) 2013-2016- Intel Software 2015-2018")
 #SET(IMACH_VERSION ${IMACH_VERSION_MAJOR}.${IMACH_VERSION_MINOR}.${IMACH_VERSION_PATCH})  #SET(IMACH_VERSION ${IMACH_VERSION_MAJOR}.${IMACH_VERSION_MINOR}.${IMACH_VERSION_PATCH})
 #MATH(EXPR IMACH_VERSION_NUMBER "100000*${IMACH_VERSION_MAJOR} + 100*${IMACH_VERSION_MINOR} + ${IMACH_VERSION_PATCH}")  #MATH(EXPR IMACH_VERSION_NUMBER "100000*${IMACH_VERSION_MAJOR} + 100*${IMACH_VERSION_MINOR} + ${IMACH_VERSION_PATCH}")
   
Line 47  CONFIGURE_FILE("${PROJECT_SOURCE_DIR}/te Line 48  CONFIGURE_FILE("${PROJECT_SOURCE_DIR}/te
 CONFIGURE_FILE("${PROJECT_SOURCE_DIR}/tests/data/mydata.txt" "html/doc/data/mydata.txt" COPYONLY)  CONFIGURE_FILE("${PROJECT_SOURCE_DIR}/tests/data/mydata.txt" "html/doc/data/mydata.txt" COPYONLY)
 # Test files  # Test files
 CONFIGURE_FILE("${PROJECT_SOURCE_DIR}/tests/data/data2.txt" "tests/data/data2.txt" COPYONLY)  CONFIGURE_FILE("${PROJECT_SOURCE_DIR}/tests/data/data2.txt" "tests/data/data2.txt" COPYONLY)
 CONFIGURE_FILE("${PROJECT_SOURCE_DIR}/tests/testV2.imach" "tests/testV2.imach" COPYONLY)  #CONFIGURE_FILE("${PROJECT_SOURCE_DIR}/tests/testV2.imach" "tests/testV2.imach" COPYONLY)
 CONFIGURE_FILE("${PROJECT_SOURCE_DIR}/tests/testV1V2.imach" "tests/testV1V2.imach" COPYONLY)  #CONFIGURE_FILE("${PROJECT_SOURCE_DIR}/tests/testV1V2.imach" "tests/testV1V2.imach" COPYONLY)
   
   
 set (imach_SRCS ./src/imach.c)  set (imach_SRCS ./src/imach.c)
 SET( CMAKE_VERBOSE_MAKEFILE on )  SET( CMAKE_VERBOSE_MAKEFILE on )
 ADD_EXECUTABLE ( IMaCh-${IMACH_VERSION_MAJOR}.${IMACH_VERSION_MINOR} ${imach_SRCS})  #SET(CMAKE_INSTALL_PREFIX "/usr/local")
   ADD_EXECUTABLE (IMaCh-${IMACH_VERSION_MAJOR}.${IMACH_VERSION_MINOR} ${imach_SRCS})
 INSTALL(TARGETS IMaCh-${IMACH_VERSION_MAJOR}.${IMACH_VERSION_MINOR} DESTINATION bin COMPONENT binaries )  INSTALL(TARGETS IMaCh-${IMACH_VERSION_MAJOR}.${IMACH_VERSION_MINOR} DESTINATION bin COMPONENT binaries )
   #INSTALL(TARGETS imach DESTINATION bin COMPONENT binaries )
 ADD_SUBDIRECTORY(html)  ADD_SUBDIRECTORY(html)
 ADD_SUBDIRECTORY(tests)  ADD_SUBDIRECTORY(tests)
 ADD_SUBDIRECTORY(src)  #ADD_SUBDIRECTORY(src) 
 ADD_SUBDIRECTORY(distributions)  #ADD_SUBDIRECTORY(distributions)
 #if (${WIN32})  #if (${WIN32})
 #if(APPLE)  #if(APPLE)
 #  set(DOCDIR "${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}/doc")  #  set(DOCDIR "${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}/doc")
Line 68  if(UNIX) Line 71  if(UNIX)
   target_link_libraries(IMaCh-${IMACH_VERSION_MAJOR}.${IMACH_VERSION_MINOR} m)    target_link_libraries(IMaCh-${IMACH_VERSION_MAJOR}.${IMACH_VERSION_MINOR} m)
   set(BINDIR "${CMAKE_INSTALL_PREFIX}/bin")    set(BINDIR "${CMAKE_INSTALL_PREFIX}/bin")
   set(DOCDIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}/doc")    set(DOCDIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}/doc")
   set(MANDIR "${CMAKE_INSTALL_PREFIX}/share/man")    set(TESTDIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}/tests")
     set(DATADIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}/tests/data")
     set(MANDIR "${CMAKE_INSTALL_PREFIX}/share/man/man1")
   #set(EXAMPLE_CONF_DIR ${DOCDIR})    #set(EXAMPLE_CONF_DIR ${DOCDIR})
   set(XDG_APPS_DIR "${CMAKE_INSTALL_PREFIX}/share/applications")    set(XDG_APPS_DIR "${CMAKE_INSTALL_PREFIX}/share/applications")
   set(APPDATADIR "${CMAKE_INSTALL_PREFIX}/share/appdata")    set(APPDATADIR "${CMAKE_INSTALL_PREFIX}/share/appdata")
   set(ICONDIR "${CMAKE_INSTALL_PREFIX}/share/icons")    set(ICONDIR "${CMAKE_INSTALL_PREFIX}/share/icons")
     install(FILES "distributions/gnulinux/imach.1" DESTINATION "${MANDIR}")
     install(FILES "distributions/gnulinux/imach.png" DESTINATION "${ICONDIR}")
     install(FILES "distributions/gnulinux/imach.desktop" DESTINATION "${XDG_APPS_DIR}")
 endif()  endif()
 if(MSVC)  if(MSVC)
   set(DOCDIR "${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}/doc")    set(DOCDIR "${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}/doc")
     set(TESTDIR "${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}/tests")
     set(DATADIR "${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}/tests/data")
   set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd")    set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd")
   set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT")    set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT")
   set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd")    set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd")
Line 89  install(FILES "html/doc/mypar.imach" DES Line 99  install(FILES "html/doc/mypar.imach" DES
 install(FILES "html/doc/data/mydata.txt" DESTINATION "${DOCDIR}/data")  install(FILES "html/doc/data/mydata.txt" DESTINATION "${DOCDIR}/data")
 install(FILES "html/doc/biaspar.imach" DESTINATION "${DOCDIR}")  install(FILES "html/doc/biaspar.imach" DESTINATION "${DOCDIR}")
 install(FILES "html/doc/data1.txt" DESTINATION "${DOCDIR}")  install(FILES "html/doc/data1.txt" DESTINATION "${DOCDIR}")
   install(FILES "src/README.txt" DESTINATION "${DOCDIR}")
   #install(FILES "tests/testV1V2.imach" DESTINATION "${TESTDIR}")
   install(FILES "tests/rtestV1V2.imach" DESTINATION "${TESTDIR}")
   install(FILES "tests/testV2.imach" DESTINATION "${TESTDIR}")
   install(FILES "tests/rtestV2.imach" DESTINATION "${TESTDIR}")
   install(FILES "tests/data/data2.txt" DESTINATION "${DATADIR}")
   #not working install(FILES "imach.desktop" DESTINATION "${XDG_APPS_DIR}")
 #install(FILES "html" DESTINATION "${DOCDIR}")  #install(FILES "html" DESTINATION "${DOCDIR}")
   
   
 set(CPACK_PACKAGE_VERSION ${IMACH_VERSION})  set(CPACK_PACKAGE_VERSION ${IMACH_VERSION})
 set(CPACK_PACKAGE_NAME "IMaCh")  set(CPACK_PACKAGE_NAME "imach")
 set(CPACK_PACKAGE_RELEASE 2)  set(CPACK_PACKAGE_RELEASE 1)
 set(CPACK_PACKAGE_CONTACT "Nicolas Brouard")  set(CPACK_PACKAGE_CONTACT "Nicolas Brouard")
 set(CPACK_PACKAGE_VENDOR "INED")  set(CPACK_PACKAGE_VENDOR "INED")
 SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "IMaCh Interpolated Markov Chain program")  
 SET(CPACK_PACKAGE_VENDOR "IMaCh, INED")  SET(CPACK_PACKAGE_VENDOR "IMaCh, INED")
 SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.txt")  SET(CPACK_PACKAGE_LICENSE "GPLv2")
   #SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.txt")
 SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt")  SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt")
 SET(CPACK_PACKAGE_VERSION_MAJOR "${IMACH_VERSION_MAJOR}")  SET(CPACK_PACKAGE_VERSION_MAJOR "${IMACH_VERSION_MAJOR}")
 SET(CPACK_PACKAGE_VERSION_MINOR "${IMACH_VERSION_MINOR}")  SET(CPACK_PACKAGE_VERSION_MINOR "${IMACH_VERSION_MINOR}")
 SET(CPACK_PACKAGE_VERSION_PATCH "${IMACH_VERSION_PATCH}")  SET(CPACK_PACKAGE_VERSION_PATCH "${IMACH_VERSION_PATCH}")
 SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")  SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
   #SET(CPACK_INSTALLED_DIRECTORIES "${PROJECT_SOURCE_DIR}" ".")
 #SET(CPACK_PACKAGE_EXECUTABLES "IMaCh" "IMaCh")  #SET(CPACK_PACKAGE_EXECUTABLES "IMaCh" "IMaCh")
 SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "IMaCh program estimates Health Expectancies from Cross-longitudinal surveys.")  SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "IMaCh program estimates Health Expectancies from Cross-longitudinal surveys.")
   #SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.txt")
 SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/imach-desc.txt")  SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/imach-desc.txt")
 #set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})  set(CPACK_RPM_PACKAGE_URL "http://euroreves.ined.fr/imach")
 set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_PACKAGE_RELEASE}.${CMAKE_SYSTEM_PROCESSOR}")  IF(UNIX)
     SET(CPACK_RPM_PACKAGE_LICENSE "GPL")
     SET(CPACK_RPM_PACKAGE_GROUP "Applications/Sciences")
     SET(CPACK_RPM_PACKAGE_REQUIRES "gnuplot >= 4.2, cmake >= 2.8")
     SET(CPACK_GENERATOR "TXZ")
     SET(CPACK_SOURCE_GENERATOR "TXZ")
     SET(CPACK_SOURCE_TBZ2 "OFF")
     SET(CPACK_SOURCE_TGZ "ON")
     SET(CPACK_SOURCE_TOPLEVEL_TAG "Linux-src")
     SET(CPACK_SOURCE_TXZ "ON")
     SET(CPACK_SOURCE_TZ "ON")
     SET(CPACK_SOURCE_ZIP "OFF")
     #SET(CPACK_RPM_PREFIX "/usr/local")
     # SET(CPACK_RPM_PACKAGE_PREFIX "/usr/local")
      SET(CPACK_PACKAGING_INSTALL_PREFIX "/usr/local")
     # SET(CMAKE_INSTALL_PREFIX "/usr/local")
     set(CPACK_RPM_PACKAGE_RELOCATABLE True)
     # This a .spec Changelog not an Emacs ChangeLog that you get with C-x v a (vc-update-change-log)
     # * Mon May 20 2019  Brouard Nicolas  <brouard@brouard.name>
     # ${CMAKE_CURRENT_SOURCE_DIR}/specchangelog")
     set(CPACK_RPM_CHANGELOG_FILE "${PROJECT_SOURCE_DIR}/src/Changelog")
     SET(CPACK_BINARY_RPM "ON")
     SET(CPACK_RPM_PACKAGE_SOURCES "ON")
     set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_PACKAGE_RELEASE}.${CMAKE_SYSTEM_PROCESSOR}")
     SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_PACKAGE_RELEASE}.src")
   ENDIF(UNIX)
   
 IF(WIN32 AND NOT UNIX)  IF(WIN32 AND NOT UNIX)
   # There is a bug in NSI that does not handle full unix paths properly. Make    # There is a bug in NSI that does not handle full unix paths properly. Make
Line 166  INCLUDE(CPack) Line 211  INCLUDE(CPack)
 #   set(VERSION_PATCH "${BUILD_VERSION_PATCH}")  #   set(VERSION_PATCH "${BUILD_VERSION_PATCH}")
 # ENDIF()  # ENDIF()
 file( GLOB_RECURSE parameter_files RELATIVE  file( GLOB_RECURSE parameter_files RELATIVE
 "${CMAKE_CURRENT_SOURCE_DIR}/html/doc" "html/*.imach" )  "${CMAKE_CURRENT_SOURCE_DIR}/html/doc" "html/*.imach" "tests/*.imach" )
 foreach( parameter_file ${parameter_files} )  foreach( parameter_file ${parameter_files} )
   add_custom_command(    add_custom_command(
     OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${parameter_file}"      OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${parameter_file}"
Line 180  endforeach( parameter_file ) Line 225  endforeach( parameter_file )
   
 #add_custom_target( CopyParameter ALL DEPENDS ${parameter_files_dest} )  #add_custom_target( CopyParameter ALL DEPENDS ${parameter_files_dest} )
 ENABLE_TESTING()  ENABLE_TESTING()
 ADD_SUBDIRECTORY(html/doc)  #ADD_SUBDIRECTORY(html/doc)
 ADD_SUBDIRECTORY(html/doc/data)  #ADD_SUBDIRECTORY(html/doc/data)
 install(FILES "${PROJECT_SOURCE_DIR}/html/doc/mypar.imach" DESTINATION "html/doc/mypar.imach")  #install(FILES "${PROJECT_SOURCE_DIR}/html/doc/mypar.imach" DESTINATION "html/doc")
 ADD_TEST(testV2.imach  IMaCh-${IMACH_VERSION} tests/testV2.imach )  ADD_TEST(testV2.imach  IMaCh-${IMACH_VERSION} tests/testV2.imach )
 ADD_TEST(testV1V2.imach  IMaCh-${IMACH_VERSION} tests/testV1V2.imach )  ADD_TEST(testV1V2.imach  IMaCh-${IMACH_VERSION} tests/testV1V2.imach )
 ADD_TEST(mypar  IMaCh-${IMACH_VERSION} html/doc/mypar.imach )  ADD_TEST(mypar  IMaCh-${IMACH_VERSION} local/html/doc/ )
 ADD_TEST(biaspar  IMaCh-${IMACH_VERSION} html/doc/biaspar.imach )  ADD_TEST(biaspar  IMaCh-${IMACH_VERSION} local/html/doc/ )
 #SET(FAB "po" CACHE STRING "Some user-specified option")  #SET(FAB "po" CACHE STRING "Some user-specified option")
 #set_target_properties(TARGET_NAME imach-${VERSION_MAJOR}.${VERSION_MINOR})  #set_target_properties(TARGET_NAME imach-${VERSION_MAJOR}.${VERSION_MINOR})
 #%comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\VsDevCmd.bat""  #%comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\VsDevCmd.bat""
Line 240  ADD_TEST(biaspar  IMaCh-${IMACH_VERSION} Line 285  ADD_TEST(biaspar  IMaCh-${IMACH_VERSION}
 #   endif()  #   endif()
 # endif()  # endif()
 # Add a target to generate API documentation with Doxygen  # Add a target to generate API documentation with Doxygen
 find_package(Doxygen)  
 if(DOXYGEN_FOUND)  
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/latex/Doxyfile.in  
 ${CMAKE_CURRENT_BINARY_DIR}/latex/Doxyfile @ONLY)  
 add_custom_target(doc  
 ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/latex/Doxyfile  
 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/latex  
 COMMENT "Generating IMaCh documentation with Doxygen" VERBATIM  
 )  
 endif()  
   
   option(BUILD_DOC "Build documentation" ON)
   if(UNIXDODOXYGEN)
     find_package(Doxygen)
     if(DOXYGEN_FOUND)# set input and output files
       #set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/../docs/Doxyfile.in) ~/Documents/imach/cvs/imach/latex/Doxyfile.in
       set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/latex/Doxyfile.in)
       set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
       
       # request to configure the file
       configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
       message("Doxygen build started")
       
       # note the option ALL which allows to build the docs together with the application
       add_custom_target( doc_doxygen ALL
         COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
         WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
         COMMENT "Generating API documentation with Doxygen in gnulinux/html/index.html"
         VERBATIM )
       install(DIRECTORY ${CMAKE_BINARY_DIR}/html 
         DESTINATION local/share/doc/${CMAKE_PROJECT_NAME})
     else (DOXYGEN_FOUND)
       message("Doxygen need to be installed to generate the doxygen documentation")
     endif (DOXYGEN_FOUND)
     message("Doxygen only in UNIX doxygen documentation")
   endif (UNIXDODOXYGEN)
   

Removed from v.1.5  
changed lines
  Added in v.1.24


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>